Changeset 233797 in webkit
- Timestamp:
- Jul 13, 2018 3:47:10 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r233796 r233797 1 2018-07-13 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GStreamer][MSE] Add GstFlowCombiner to handle non-linked inactive branches 4 https://bugs.webkit.org/show_bug.cgi?id=187636 5 6 Reviewed by Carlos Garcia Campos. 7 8 When we have more than one source buffer, only one will be 9 rendered and the inactive branch will report linking errors that 10 we have to deal with. 11 12 * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Added GstFlowCombiner. 13 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: 14 (webkitMediaSrcChain): Combine the flow in the flow combiner. 15 (webkit_media_src_init): Initialize the flow combiner. 16 (webKitMediaSrcLinkStreamToSrcPad): Add the proxypad to the 17 combiner and set the chain function. 18 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h: 19 Declare the flow combiner. 20 1 21 2018-07-13 Charlie Turner <cturner@igalia.com> 2 22 -
trunk/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h
r213572 r233797 22 22 #if USE(GSTREAMER) 23 23 24 #include <gst/base/gstflowcombiner.h> 24 25 #include <gst/gstsegment.h> 25 26 #include <gst/gststructure.h> … … 32 33 WTF_DEFINE_GPTR_DELETER(GstInstallPluginsContext, gst_install_plugins_context_free) 33 34 WTF_DEFINE_GPTR_DELETER(GstSegment, gst_segment_free) 35 WTF_DEFINE_GPTR_DELETER(GstFlowCombiner, gst_flow_combiner_free) 34 36 35 37 } -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp
r232058 r233797 49 49 #include <wtf/Condition.h> 50 50 #include <wtf/MainThread.h> 51 #include <wtf/glib/GUniquePtr.h>52 51 #include <wtf/text/CString.h> 53 52 … … 250 249 } 251 250 251 static GstFlowReturn webkitMediaSrcChain(GstPad* pad, GstObject* parent, GstBuffer* buffer) 252 { 253 GRefPtr<WebKitMediaSrc> self = adoptGRef(WEBKIT_MEDIA_SRC(gst_object_get_parent(parent))); 254 255 return gst_flow_combiner_update_pad_flow(self->priv->flowCombiner.get(), pad, gst_proxy_pad_chain_default(pad, GST_OBJECT(self.get()), buffer)); 256 } 257 252 258 static void webkit_media_src_init(WebKitMediaSrc* source) 253 259 { … … 258 264 source->priv->appsrcNeedDataCount = 0; 259 265 source->priv->appsrcSeekDataNextAction = Nothing; 266 source->priv->flowCombiner = GUniquePtr<GstFlowCombiner>(gst_flow_combiner_new()); 260 267 261 268 // No need to reset Stream.appsrcNeedDataFlag because there are no Streams at this point yet. … … 475 482 GstPad* ghostpad = WebCore::webkitGstGhostPadFromStaticTemplate(&srcTemplate, padName.get(), sourcePad); 476 483 484 auto proxypad = adoptGRef(GST_PAD(gst_proxy_pad_get_internal(GST_PROXY_PAD(ghostpad)))); 485 gst_flow_combiner_add_pad(stream->parent->priv->flowCombiner.get(), proxypad.get()); 486 gst_pad_set_chain_function(proxypad.get(), static_cast<GstPadChainFunction>(webkitMediaSrcChain)); 477 487 gst_pad_set_query_function(ghostpad, webKitMediaSrcQueryWithParent); 478 488 -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h
r232015 r233797 24 24 25 25 #include "AudioTrackPrivateGStreamer.h" 26 #include "GUniquePtrGStreamer.h" 26 27 #include "SourceBufferPrivateGStreamer.h" 27 28 #include "VideoTrackPrivateGStreamer.h" … … 122 123 GRefPtr<GstBus> bus; 123 124 WebCore::MediaPlayerPrivateGStreamerMSE* mediaPlayerPrivate; 125 126 GUniquePtr<GstFlowCombiner> flowCombiner; 124 127 }; 125 128
Note: See TracChangeset
for help on using the changeset viewer.