Changeset 236640 in webkit


Ignore:
Timestamp:
Sep 29, 2018 2:43:00 AM (6 years ago)
Author:
aboya@igalia.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r236636 r236640  
     12018-09-29  Alicia Boya García  <aboya@igalia.com>
     2
     3        [GStreamer][MSE] Use GObject for GST_TRACE_OBJECT
     4        https://bugs.webkit.org/show_bug.cgi?id=190045
     5
     6        Reviewed by Philippe Normand.
     7
     8        Passing a non-GObject object to GST_TRACE_OBJECT() can be
     9        theoretically misunderstood by the GStreamer logging function, so this
     10        patch avoids that.
     11
     12        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
     13        (WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
     14        (WebCore::AppendPipeline::handleEndOfAppend):
     15        (WebCore::AppendPipeline::consumeAppsinkAvailableSamples):
     16        (WebCore::AppendPipeline::pushNewBuffer):
     17
    1182018-09-28  Zamiul Haque  <zhaque@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp

    r236547 r236640  
    140140    // FIXME: give a name to the pipeline, maybe related with the track it's managing.
    141141    // The track name is still unknown at this time, though.
    142     m_pipeline = gst_pipeline_new(nullptr);
     142    static size_t appendPipelineCount = 0;
     143    String pipelineName = String::format("append-pipeline-%s-%zu",
     144        m_sourceBufferPrivate->type().containerType().replace("/", "-").utf8().data(), appendPipelineCount++);
     145    m_pipeline = gst_pipeline_new(pipelineName.utf8().data());
    143146
    144147    m_bus = adoptGRef(gst_pipeline_get_bus(GST_PIPELINE(m_pipeline.get())));
     
    279282    }
    280283
    281     GST_TRACE_OBJECT(this, "posting end-of-append request to bus");
     284    GST_TRACE_OBJECT(m_pipeline.get(), "posting end-of-append request to bus");
    282285    GstStructure* structure = gst_structure_new_empty("end-of-append");
    283286    GstMessage* message = gst_message_new_application(GST_OBJECT(m_appsrc.get()), structure);
     
    615618{
    616619    ASSERT(WTF::isMainThread());
    617     GST_TRACE_OBJECT(this, "received end-of-append");
     620    GST_TRACE_OBJECT(m_pipeline.get(), "received end-of-append");
    618621
    619622    // Regardless of the state transition, the result is the same: didReceiveAllPendingSamples() is called.
     
    743746    }
    744747
    745     GST_TRACE_OBJECT(this, "batchedSampleCount = %d", batchedSampleCount);
     748    GST_TRACE_OBJECT(m_pipeline.get(), "batchedSampleCount = %d", batchedSampleCount);
    746749}
    747750
     
    791794    setAppendState(AppendPipeline::AppendState::Ongoing);
    792795
    793     GST_TRACE_OBJECT(this, "pushing data buffer %" GST_PTR_FORMAT, buffer);
     796    GST_TRACE_OBJECT(m_pipeline.get(), "pushing data buffer %" GST_PTR_FORMAT, buffer);
    794797    GstFlowReturn pushDataBufferRet = gst_app_src_push_buffer(GST_APP_SRC(m_appsrc.get()), buffer);
    795798    // Pushing buffers to appsrc can only fail if the appsrc is flushing, in EOS or stopped. Neither of these should
     
    809812    gst_buffer_add_meta(endOfAppendBuffer, s_webKitEndOfAppendMetaInfo, nullptr);
    810813
    811     GST_TRACE_OBJECT(this, "pushing end-of-append buffer %" GST_PTR_FORMAT, endOfAppendBuffer);
     814    GST_TRACE_OBJECT(m_pipeline.get(), "pushing end-of-append buffer %" GST_PTR_FORMAT, endOfAppendBuffer);
    812815    GstFlowReturn pushEndOfAppendBufferRet = gst_app_src_push_buffer(GST_APP_SRC(m_appsrc.get()), endOfAppendBuffer);
    813816    g_return_val_if_fail(pushEndOfAppendBufferRet == GST_FLOW_OK, GST_FLOW_ERROR);
Note: See TracChangeset for help on using the changeset viewer.