Changeset 230540 in webkit
- Timestamp:
- Apr 11, 2018 11:33:39 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r230429 r230540 1 2018-04-11 Thibault Saunier <tsaunier@igalia.com> 2 3 [GStreamer] Use of playbin3 when USE_PLAYBIN3 environment variable is set 4 https://bugs.webkit.org/show_bug.cgi?id=184498 5 6 Reviewed by Philippe Normand. 7 8 This is the same behaviour as with playbin itself. 9 10 Make sure to keep using "playbin" for MediaSource. 11 12 * Source/cmake/GStreamerDefinitions.cmake: 13 1 14 2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r230533 r230540 1 2018-04-11 Thibault Saunier <tsaunier@igalia.com> 2 3 [GStreamer] Use of playbin3 when USE_PLAYBIN3 environment variable is set 4 https://bugs.webkit.org/show_bug.cgi?id=184498 5 6 Reviewed by Philippe Normand. 7 8 [GStreamer] Use of playbin3 when USE_PLAYBIN3 environment variable is set 9 10 This is the same behaviour as with playbin itself. 11 12 Make sure to keep using "playbin" for MediaSource. 13 14 No test added as this is basically a small rework of the way we expose a feature. 15 16 * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: 17 * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: 18 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: 19 * platform/graphics/gstreamer/GRefPtrGStreamer.h: 20 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: 21 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: 22 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 23 (WebCore::MediaPlayerPrivateGStreamer::load): 24 (WebCore::MediaPlayerPrivateGStreamer::enableTrack): 25 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): 26 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 27 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 28 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 29 * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: 30 (WebCore::TrackPrivateBaseGStreamer::disconnect): 31 (WebCore::TrackPrivateBaseGStreamer::tagsChanged): 32 * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: 33 * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: 34 * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: 35 1 36 2018-04-10 Alex Christensen <achristensen@webkit.org> 2 37 -
trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
r228617 r230540 44 44 } 45 45 46 #if USE(GSTREAMER_PLAYBIN3)46 #if GST_CHECK_VERSION(1, 10, 0) 47 47 AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) 48 48 : TrackPrivateBaseGStreamer(this, index, stream) -
trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h
r228617 r230540 44 44 } 45 45 46 #if USE(GSTREAMER_PLAYBIN3)46 #if GST_CHECK_VERSION(1, 10, 0) 47 47 static RefPtr<AudioTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) 48 48 { … … 65 65 private: 66 66 AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstPad>); 67 #if USE(GSTREAMER_PLAYBIN3)67 #if GST_CHECK_VERSION(1, 10, 0) 68 68 AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstStream>); 69 69 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
r228617 r230540 354 354 } 355 355 356 #if USE(GSTREAMER_PLAYBIN3)356 #if GST_CHECK_VERSION(1, 10, 0) 357 357 template <> GRefPtr<GstStream> adoptGRef(GstStream* ptr) 358 358 { -
trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
r228617 r230540 22 22 #if USE(GSTREAMER) 23 23 24 #include <gst/gst.h> 24 25 #include <wtf/glib/GRefPtr.h> 25 26 26 typedef struct _GstElement GstElement;27 typedef struct _GstPad GstPad;28 typedef struct _GstPadTemplate GstPadTemplate;29 typedef struct _GstCaps GstCaps;30 typedef struct _GstContext GstContext;31 typedef struct _GstTask GstTask;32 typedef struct _GstBus GstBus;33 typedef struct _GstElementFactory GstElementFactory;34 typedef struct _GstBuffer GstBuffer;35 typedef struct _GstBufferList GstBufferList;36 typedef struct _GstBufferPool GstBufferPool;37 typedef struct _GstSample GstSample;38 typedef struct _GstTagList GstTagList;39 typedef struct _GstEvent GstEvent;40 typedef struct _GstToc GstToc;41 typedef struct _GstMessage GstMessage;42 typedef struct _GstQuery GstQuery;43 27 typedef struct _WebKitVideoSink WebKitVideoSink; 44 28 typedef struct _WebKitWebSrc WebKitWebSrc; 45 46 #if USE(GSTREAMER_PLAYBIN3)47 typedef struct _GstStream GstStream;48 typedef struct _GstStreamCollection GstStreamCollection;49 #endif50 29 51 30 #if USE(GSTREAMER_GL) … … 133 112 template<> void derefGPtr<WebKitWebSrc>(WebKitWebSrc* ptr); 134 113 135 #if USE(GSTREAMER_PLAYBIN3)114 #if GST_CHECK_VERSION(1, 10, 0) 136 115 template<> GRefPtr<GstStream> adoptGRef(GstStream*); 137 116 template<> GstStream* refGPtr<GstStream>(GstStream*); -
trunk/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
r228617 r230540 59 59 } 60 60 61 #if USE(GSTREAMER_PLAYBIN3)61 #if GST_CHECK_VERSION(1, 10, 0) 62 62 InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstStream> stream) 63 63 : InbandTextTrackPrivate(WebVTT) -
trunk/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h
r228617 r230540 45 45 } 46 46 47 #if USE(GSTREAMER_PLAYBIN3)47 #if GST_CHECK_VERSION(1, 10, 0) 48 48 static Ref<InbandTextTrackPrivateGStreamer> create(gint index, GRefPtr<GstStream> stream) 49 49 { … … 64 64 private: 65 65 InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstPad>); 66 #if USE(GSTREAMER_PLAYBIN3)66 #if GST_CHECK_VERSION(1, 10, 0) 67 67 InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstStream>); 68 68 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r229127 r230540 253 253 254 254 if (!m_pipeline) 255 createGSTPlayBin( );255 createGSTPlayBin(isMediaSource() ? "playbin" : nullptr); 256 256 257 257 if (m_fillTimer.isActive()) … … 622 622 } 623 623 624 #if USE(GSTREAMER_PLAYBIN3)624 #if GST_CHECK_VERSION(1, 10, 0) 625 625 void MediaPlayerPrivateGStreamer::updateTracks() 626 626 { … … 756 756 g_object_set(element, propertyName, index, nullptr); 757 757 } 758 #if USE(GSTREAMER_PLAYBIN3)758 #if GST_CHECK_VERSION(1, 10, 0) 759 759 else { 760 760 GstStream* stream = gst_stream_collection_get_stream(m_streamCollection.get(), index); … … 1281 1281 break; 1282 1282 } 1283 #if USE(GSTREAMER_PLAYBIN3)1283 #if GST_CHECK_VERSION(1, 10, 0) 1284 1284 case GST_MESSAGE_STREAM_COLLECTION: { 1285 1285 GRefPtr<GstStreamCollection> collection; … … 2400 2400 #endif 2401 2401 2402 void MediaPlayerPrivateGStreamer::createGSTPlayBin() 2403 { 2402 void MediaPlayerPrivateGStreamer::createGSTPlayBin(const gchar* playbinName) 2403 { 2404 if (m_pipeline) { 2405 if (!playbinName) { 2406 GST_INFO_OBJECT(pipeline(), "Keeping same playbin as nothing forced"); 2407 return; 2408 } 2409 2410 if (!g_strcmp0(GST_OBJECT_NAME(gst_element_get_factory(m_pipeline.get())), playbinName)) { 2411 GST_INFO_OBJECT(pipeline(), "Already using %s", playbinName); 2412 return; 2413 } 2414 2415 GST_INFO_OBJECT(pipeline(), "Tearing down as we need to use %s now.", 2416 playbinName); 2417 changePipelineState(GST_STATE_NULL); 2418 m_pipeline = nullptr; 2419 } 2420 2404 2421 ASSERT(!m_pipeline); 2422 2423 #if GST_CHECK_VERSION(1, 10, 0) 2424 m_isLegacyPlaybin = !g_getenv("USE_PLAYBIN3"); 2425 if (!m_isLegacyPlaybin) 2426 playbinName = "playbin3"; 2427 #endif 2428 2429 if (!playbinName) 2430 playbinName = "playbin"; 2405 2431 2406 2432 // gst_element_factory_make() returns a floating reference so 2407 2433 // we should not adopt. 2408 #if USE(GSTREAMER_PLAYBIN3) 2409 m_isLegacyPlaybin = false; 2410 setPipeline(gst_element_factory_make("playbin3", "play")); 2411 #else 2412 m_isLegacyPlaybin = true; 2413 setPipeline(gst_element_factory_make("playbin", "play")); 2414 #endif 2434 setPipeline(gst_element_factory_make(playbinName, "play")); 2415 2435 setStreamVolumeElement(GST_STREAM_VOLUME(m_pipeline.get())); 2416 2436 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r228639 r230540 147 147 virtual void asyncStateChangeDone(); 148 148 149 void createGSTPlayBin( );149 void createGSTPlayBin(const gchar* playbinName); 150 150 151 151 bool loadNextLocation(); … … 179 179 void setPlaybinURL(const URL& urlString); 180 180 181 #if USE(GSTREAMER_PLAYBIN3)181 #if GST_CHECK_VERSION(1, 10, 0) 182 182 void updateTracks(); 183 183 #endif … … 258 258 bool m_preservesPitch; 259 259 bool m_isLegacyPlaybin; 260 #if USE(GSTREAMER_PLAYBIN3)260 #if GST_CHECK_VERSION(1, 10, 0) 261 261 GRefPtr<GstStreamCollection> m_streamCollection; 262 262 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
r230147 r230540 212 212 #endif 213 213 SizeChanged = 1 << 6, 214 #if USE(GSTREAMER_PLAYBIN3)214 #if GST_CHECK_VERSION(1, 10, 0) 215 215 StreamCollectionChanged = 1 << 7 216 216 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
r228870 r230540 59 59 } 60 60 61 #if USE(GSTREAMER_PLAYBIN3)61 #if GST_CHECK_VERSION(1, 10, 0) 62 62 TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstStream> stream) 63 63 : m_notifier(MainThreadNotifier<MainThreadNotification>::create()) … … 83 83 m_tags.clear(); 84 84 85 #if USE(GSTREAMER_PLAYBIN3)85 #if GST_CHECK_VERSION(1, 10, 0) 86 86 if (m_stream) 87 87 m_stream.clear(); … … 116 116 tags = adoptGRef(gst_tag_list_new_empty()); 117 117 } 118 #if USE(GSTREAMER_PLAYBIN3)118 #if GST_CHECK_VERSION(1, 10, 0) 119 119 else if (m_stream) 120 120 tags = adoptGRef(gst_stream_get_tags(m_stream.get())); -
trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
r228617 r230540 59 59 protected: 60 60 TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstPad>); 61 #if USE(GSTREAMER_PLAYBIN3)61 #if GST_CHECK_VERSION(1, 10, 0) 62 62 TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstStream>); 63 63 #endif … … 77 77 AtomicString m_language; 78 78 GRefPtr<GstPad> m_pad; 79 #if USE(GSTREAMER_PLAYBIN3)79 #if GST_CHECK_VERSION(1, 10, 0) 80 80 GRefPtr<GstStream> m_stream; 81 81 #endif -
trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
r228617 r230540 44 44 } 45 45 46 #if USE(GSTREAMER_PLAYBIN3)46 #if GST_CHECK_VERSION(1, 10, 0) 47 47 VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) 48 48 : TrackPrivateBaseGStreamer(this, index, stream) -
trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h
r228617 r230540 44 44 return adoptRef(*new VideoTrackPrivateGStreamer(player, index, pad)); 45 45 } 46 #if USE(GSTREAMER_PLAYBIN3)46 #if GST_CHECK_VERSION(1, 10, 0) 47 47 static Ref<VideoTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) 48 48 { … … 65 65 private: 66 66 VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstPad>); 67 #if USE(GSTREAMER_PLAYBIN3)67 #if GST_CHECK_VERSION(1, 10, 0) 68 68 VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstStream>); 69 69 #endif -
trunk/Source/cmake/GStreamerDefinitions.cmake
r228617 r230540 6 6 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_GL "Whether to enable support for GStreamer GL" PRIVATE ON) 7 7 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_MPEGTS "Whether to enable support for MPEG-TS" PRIVATE OFF) 8 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_PLAYBIN3 "Whether to enable support for GStreamer's playbin3 element" PRIVATE OFF)
Note: See TracChangeset
for help on using the changeset viewer.