Title: [236640] trunk/Source/WebCore
Revision
236640
Author
[email protected]
Date
2018-09-29 02:43:00 -0700 (Sat, 29 Sep 2018)

Log Message

[GStreamer][MSE] Use GObject for GST_TRACE_OBJECT
https://bugs.webkit.org/show_bug.cgi?id=190045

Reviewed by Philippe Normand.

Passing a non-GObject object to GST_TRACE_OBJECT() can be
theoretically misunderstood by the GStreamer logging function, so this
patch avoids that.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
(WebCore::AppendPipeline::handleEndOfAppend):
(WebCore::AppendPipeline::consumeAppsinkAvailableSamples):
(WebCore::AppendPipeline::pushNewBuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (236639 => 236640)


--- trunk/Source/WebCore/ChangeLog	2018-09-29 06:55:01 UTC (rev 236639)
+++ trunk/Source/WebCore/ChangeLog	2018-09-29 09:43:00 UTC (rev 236640)
@@ -1,3 +1,20 @@
+2018-09-29  Alicia Boya GarcĂ­a  <[email protected]>
+
+        [GStreamer][MSE] Use GObject for GST_TRACE_OBJECT
+        https://bugs.webkit.org/show_bug.cgi?id=190045
+
+        Reviewed by Philippe Normand.
+
+        Passing a non-GObject object to GST_TRACE_OBJECT() can be
+        theoretically misunderstood by the GStreamer logging function, so this
+        patch avoids that.
+
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
+        (WebCore::AppendPipeline::handleEndOfAppend):
+        (WebCore::AppendPipeline::consumeAppsinkAvailableSamples):
+        (WebCore::AppendPipeline::pushNewBuffer):
+
 2018-09-28  Zamiul Haque  <[email protected]>
 
         Angled gradient backgrounds in body render vertically when body height is 0

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (236639 => 236640)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2018-09-29 06:55:01 UTC (rev 236639)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2018-09-29 09:43:00 UTC (rev 236640)
@@ -139,7 +139,10 @@
 
     // FIXME: give a name to the pipeline, maybe related with the track it's managing.
     // The track name is still unknown at this time, though.
-    m_pipeline = gst_pipeline_new(nullptr);
+    static size_t appendPipelineCount = 0;
+    String pipelineName = String::format("append-pipeline-%s-%zu",
+        m_sourceBufferPrivate->type().containerType().replace("/", "-").utf8().data(), appendPipelineCount++);
+    m_pipeline = gst_pipeline_new(pipelineName.utf8().data());
 
     m_bus = adoptGRef(gst_pipeline_get_bus(GST_PIPELINE(m_pipeline.get())));
     gst_bus_add_signal_watch_full(m_bus.get(), RunLoopSourcePriority::RunLoopDispatcher);
@@ -278,7 +281,7 @@
         return GST_PAD_PROBE_OK;
     }
 
-    GST_TRACE_OBJECT(this, "posting end-of-append request to bus");
+    GST_TRACE_OBJECT(m_pipeline.get(), "posting end-of-append request to bus");
     GstStructure* structure = gst_structure_new_empty("end-of-append");
     GstMessage* message = gst_message_new_application(GST_OBJECT(m_appsrc.get()), structure);
     gst_bus_post(m_bus.get(), message);
@@ -614,7 +617,7 @@
 void AppendPipeline::handleEndOfAppend()
 {
     ASSERT(WTF::isMainThread());
-    GST_TRACE_OBJECT(this, "received end-of-append");
+    GST_TRACE_OBJECT(m_pipeline.get(), "received end-of-append");
 
     // Regardless of the state transition, the result is the same: didReceiveAllPendingSamples() is called.
     switch (m_appendState) {
@@ -742,7 +745,7 @@
         batchedSampleCount++;
     }
 
-    GST_TRACE_OBJECT(this, "batchedSampleCount = %d", batchedSampleCount);
+    GST_TRACE_OBJECT(m_pipeline.get(), "batchedSampleCount = %d", batchedSampleCount);
 }
 
 void AppendPipeline::resetPipeline()
@@ -790,7 +793,7 @@
 
     setAppendState(AppendPipeline::AppendState::Ongoing);
 
-    GST_TRACE_OBJECT(this, "pushing data buffer %" GST_PTR_FORMAT, buffer);
+    GST_TRACE_OBJECT(m_pipeline.get(), "pushing data buffer %" GST_PTR_FORMAT, buffer);
     GstFlowReturn pushDataBufferRet = gst_app_src_push_buffer(GST_APP_SRC(m_appsrc.get()), buffer);
     // Pushing buffers to appsrc can only fail if the appsrc is flushing, in EOS or stopped. Neither of these should
     // be true at this point.
@@ -808,7 +811,7 @@
     GstBuffer* endOfAppendBuffer = gst_buffer_new();
     gst_buffer_add_meta(endOfAppendBuffer, s_webKitEndOfAppendMetaInfo, nullptr);
 
-    GST_TRACE_OBJECT(this, "pushing end-of-append buffer %" GST_PTR_FORMAT, endOfAppendBuffer);
+    GST_TRACE_OBJECT(m_pipeline.get(), "pushing end-of-append buffer %" GST_PTR_FORMAT, endOfAppendBuffer);
     GstFlowReturn pushEndOfAppendBufferRet = gst_app_src_push_buffer(GST_APP_SRC(m_appsrc.get()), endOfAppendBuffer);
     g_return_val_if_fail(pushEndOfAppendBufferRet == GST_FLOW_OK, GST_FLOW_ERROR);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to