-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GStreamer] Rewrite inner decoder leveraging the GStreamerElementHarness #8971
Conversation
The decoder diff won't be easy to read... I'd advise to read the final code instead. |
EWS run on previous version of this PR (hash b6cc15b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the changes I also commented, I think it could be a good idea to change the interface of pushBuffer
and pushBufferFull
for them to take a GRefPtr&&
that gives an explicit view of ownership. Maybe even all push* functions could use a similar interface.
The downside of this is that you have to WTFMove objects and adopt the ones with [transfer full] before passing them down, or we'd be leaking.
About this I don't have a strong opinion so I just leave it here as "food for thought".
Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
Outdated
Show resolved
Hide resolved
Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
Outdated
Show resolved
Hide resolved
Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.h
Outdated
Show resolved
Hide resolved
Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
Outdated
Show resolved
Hide resolved
Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
Outdated
Show resolved
Hide resolved
@@ -1041,6 +1041,19 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi | |||
GST_VIDEO_INFO_COLORIMETRY(info).range = GST_VIDEO_COLOR_RANGE_UNKNOWN; | |||
} | |||
|
|||
void configureVideoDecoderForHarnessing(const GRefPtr<GstElement>& element) | |||
{ | |||
auto elementHasProperty = [&](const char* name) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not the first time I see this, please strongly consider moving this to GStreamerCommon and refactor all appearances. It does not have to be in this PR though.
https://bugs.webkit.org/show_bug.cgi?id=250934 Reviewed by Xabier Rodriguez-Calvar. The previous decoder implementation relied on a GStreamer pipeline involving giostreamsrc, decodebin3 and appsinks. Due to the highly asynchronous behavior of that pipeline the decoder heavily relied on Locks and Conditions making the code hard to follow and debug. The new implementation relies on two element harnesses, the first one is in charge of parsing (with parsebin), the first parsed video output stream is then plugged to a decode harness, directly hooked to the platform video decoder, so no queue is involved. The decoding no longer involves additional threads, so we can simplify the code and entirely get rid of InnerDecoder. Canonical link: https://commits.webkit.org/259430@main
50b6913
to
fa3503d
Compare
Committed 259430@main (fa3503d): https://commits.webkit.org/259430@main Reviewed commits have been landed. Closing PR #8971 and removing active labels. |
fa3503d
50b6913