Title: [226358] trunk/Source/WebCore
- Revision
- 226358
- Author
- ph...@webkit.org
- Date
- 2018-01-03 03:01:32 -0800 (Wed, 03 Jan 2018)
Log Message
[GStreamer] The bus synchronous handler should be in the base player class
https://bugs.webkit.org/show_bug.cgi?id=181237
Reviewed by Carlos Garcia Campos.
Because this is where video rendering is handled.
No new tests, this is only a refactoring.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (226357 => 226358)
--- trunk/Source/WebCore/ChangeLog 2018-01-03 10:58:21 UTC (rev 226357)
+++ trunk/Source/WebCore/ChangeLog 2018-01-03 11:01:32 UTC (rev 226358)
@@ -1,5 +1,21 @@
2018-01-03 Philippe Normand <pnorm...@igalia.com>
+ [GStreamer] The bus synchronous handler should be in the base player class
+ https://bugs.webkit.org/show_bug.cgi?id=181237
+
+ Reviewed by Carlos Garcia Campos.
+
+ Because this is where video rendering is handled.
+
+ No new tests, this is only a refactoring.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+ (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
+
+2018-01-03 Philippe Normand <pnorm...@igalia.com>
+
[GStreamer] move MediaSample implementation out of mse/
https://bugs.webkit.org/show_bug.cgi?id=179165
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (226357 => 226358)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-01-03 10:58:21 UTC (rev 226357)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-01-03 11:01:32 UTC (rev 226358)
@@ -2079,19 +2079,8 @@
setPipeline(gst_element_factory_make("playbin", "play"));
setStreamVolumeElement(GST_STREAM_VOLUME(m_pipeline.get()));
+ // Let also other listeners subscribe to (application) messages in this bus.
GRefPtr<GstBus> bus = adoptGRef(gst_pipeline_get_bus(GST_PIPELINE(m_pipeline.get())));
- gst_bus_set_sync_handler(bus.get(), [](GstBus*, GstMessage* message, gpointer userData) {
- auto& player = *static_cast<MediaPlayerPrivateGStreamer*>(userData);
-
- if (player.handleSyncMessage(message)) {
- gst_message_unref(message);
- return GST_BUS_DROP;
- }
-
- return GST_BUS_PASS;
- }, this, nullptr);
-
- // Let also other listeners subscribe to (application) messages in this bus.
gst_bus_add_signal_watch_full(bus.get(), RunLoopSourcePriority::RunLoopDispatcher);
g_signal_connect(bus.get(), "message", G_CALLBACK(busMessageCallback), this);
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (226357 => 226358)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2018-01-03 10:58:21 UTC (rev 226357)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2018-01-03 11:01:32 UTC (rev 226358)
@@ -274,6 +274,18 @@
void MediaPlayerPrivateGStreamerBase::setPipeline(GstElement* pipeline)
{
m_pipeline = pipeline;
+
+ GRefPtr<GstBus> bus = adoptGRef(gst_pipeline_get_bus(GST_PIPELINE(m_pipeline.get())));
+ gst_bus_set_sync_handler(bus.get(), [](GstBus*, GstMessage* message, gpointer userData) {
+ auto& player = *static_cast<MediaPlayerPrivateGStreamerBase*>(userData);
+
+ if (player.handleSyncMessage(message)) {
+ gst_message_unref(message);
+ return GST_BUS_DROP;
+ }
+
+ return GST_BUS_PASS;
+ }, this, nullptr);
}
#if ENABLE(ENCRYPTED_MEDIA)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes