diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp index 506d8e25fedc2..c28e81c79cd9f 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp @@ -759,14 +759,24 @@ void AppendPipeline::appsinkNewSample(GRefPtr&& sample) return; } + if (!m_presentationSize.isEmpty()) { + GstCaps* caps = gst_sample_get_caps(sample.get()); + std::optional size = getVideoResolutionFromCaps(caps); + if (size.has_value() && size.value() != m_presentationSize) + m_presentationSize = size.value(); + } + RefPtr mediaSample = WebCore::MediaSampleGStreamer::create(WTFMove(sample), m_presentationSize, trackId()); - GST_TRACE("append: trackId=%s PTS=%s DTS=%s DUR=%s presentationSize=%.0fx%.0f", + GST_TRACE("append: MediaSample %p trackId=%s PTS=%s DTS=%s DUR=%s presentationSize=%.0fx%.0f %s%s", + dynamic_cast(mediaSample.get()), mediaSample->trackID().string().utf8().data(), mediaSample->presentationTime().toString().utf8().data(), mediaSample->decodeTime().toString().utf8().data(), mediaSample->duration().toString().utf8().data(), - mediaSample->presentationSize().width(), mediaSample->presentationSize().height()); + mediaSample->presentationSize().width(), mediaSample->presentationSize().height(), + mediaSample->isSync() ? "[SYNC]" : "", + mediaSample->isNonDisplaying() ? "[NON-DISPLAYING]" : ""); // If we're beyond the duration, ignore this sample and the remaining ones. MediaTime duration = m_mediaSourceClient->duration(); diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp index f899b4964b178..1051ebdd08ff4 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp @@ -351,11 +351,15 @@ void PlaybackPipeline::enqueueSample(Ref&& mediaSample) AtomicString trackId = mediaSample->trackID(); - GST_TRACE("enqueing sample trackId=%s PTS=%s presentationSize=%.0fx%.0f at %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT, - trackId.string().utf8().data(), mediaSample->presentationTime().toString().utf8().data(), + GST_TRACE("enqueing MediaSample %p trackId=%s PTS=%s DTS=%s DUR=%s presentationSize=%.0fx%.0f %s%s", + &(mediaSample.get()), + mediaSample->trackID().string().utf8().data(), + mediaSample->presentationTime().toString().utf8().data(), + mediaSample->decodeTime().toString().utf8().data(), + mediaSample->duration().toString().utf8().data(), mediaSample->presentationSize().width(), mediaSample->presentationSize().height(), - GST_TIME_ARGS(WebCore::toGstClockTime(mediaSample->presentationTime())), - GST_TIME_ARGS(WebCore::toGstClockTime(mediaSample->duration()))); + mediaSample->isSync() ? "[SYNC]" : "", + mediaSample->isNonDisplaying() ? "[NON-DISPLAYING]" : ""); // No need to lock to access the Stream here because the only chance of conflict with this read and with the usage // of the sample fields done in this method would be the deletion of the stream. However, that operation can only