Title: [228418] trunk/Source/WebCore
Revision
228418
Author
ab...@igalia.com
Date
2018-02-13 04:11:33 -0800 (Tue, 13 Feb 2018)

Log Message

[Gstreamer][MSE] Add string representation for GStreamerMediaSample
https://bugs.webkit.org/show_bug.cgi?id=180262

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
(WebCore::GStreamerMediaSample::offsetTimestampsBy):
* platform/graphics/gstreamer/mse/GStreamerMediaSample.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228417 => 228418)


--- trunk/Source/WebCore/ChangeLog	2018-02-13 07:59:28 UTC (rev 228417)
+++ trunk/Source/WebCore/ChangeLog	2018-02-13 12:11:33 UTC (rev 228418)
@@ -1,3 +1,14 @@
+2018-02-13  Alicia Boya García  <ab...@igalia.com>
+
+        [Gstreamer][MSE] Add string representation for GStreamerMediaSample
+        https://bugs.webkit.org/show_bug.cgi?id=180262
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
+        (WebCore::GStreamerMediaSample::offsetTimestampsBy):
+        * platform/graphics/gstreamer/mse/GStreamerMediaSample.h:
+
 2018-02-12  Chris Fleizach  <cfleiz...@apple.com>
 
         AX: defer focusedUIElement notifications

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp (228417 => 228418)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp	2018-02-13 07:59:28 UTC (rev 228417)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp	2018-02-13 12:11:33 UTC (rev 228418)
@@ -123,6 +123,30 @@
     return adoptRef(*new MediaSampleGStreamer(sample.get(), m_presentationSize, m_trackId));
 }
 
+void MediaSampleGStreamer::dump(PrintStream& out) const
+{
+    out.print("{PTS(", presentationTime(), "), DTS(", decodeTime(), "), duration(", duration(), "), flags(");
+
+    bool anyFlags = false;
+    auto appendFlag = [&out, &anyFlags](const char* flagName) {
+        if (anyFlags)
+            out.print(",");
+        out.print(flagName);
+        anyFlags = true;
+    };
+
+    if (flags() & MediaSample::IsSync)
+        appendFlag("sync");
+    if (flags() & MediaSample::IsNonDisplaying)
+        appendFlag("non-displaying");
+    if (flags() & MediaSample::HasAlpha)
+        appendFlag("has-alpha");
+    if (flags() & ~(MediaSample::IsSync | MediaSample::IsNonDisplaying | MediaSample::HasAlpha))
+        appendFlag("unknown-flag");
+
+    out.print("), trackId(", trackID().string(), "), presentationSize(", presentationSize().width(), "x", presentationSize().height(), ")}");
+}
+
 } // namespace WebCore.
 
 #endif // ENABLE(VIDEO) && USE(GSTREAMER)

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h (228417 => 228418)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h	2018-02-13 07:59:28 UTC (rev 228417)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h	2018-02-13 12:11:33 UTC (rev 228418)
@@ -53,7 +53,7 @@
     Ref<MediaSample> createNonDisplayingCopy() const override;
     SampleFlags flags() const override { return m_flags; }
     PlatformSample platformSample() override;
-    void dump(PrintStream&) const override { }
+    void dump(PrintStream&) const override;
 
 private:
     MediaSampleGStreamer(GRefPtr<GstSample>&&, const FloatSize& presentationSize, const AtomicString& trackId);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to