Changeset 228418 in webkit


Ignore:
Timestamp:
Feb 13, 2018 4:11:33 AM (6 years ago)
Author:
aboya@igalia.com
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:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228417 r228418  
     12018-02-13  Alicia Boya García  <aboya@igalia.com>
     2
     3        [Gstreamer][MSE] Add string representation for GStreamerMediaSample
     4        https://bugs.webkit.org/show_bug.cgi?id=180262
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        * platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
     9        (WebCore::GStreamerMediaSample::offsetTimestampsBy):
     10        * platform/graphics/gstreamer/mse/GStreamerMediaSample.h:
     11
    1122018-02-12  Chris Fleizach  <cfleizach@apple.com>
    213
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp

    r226357 r228418  
    124124}
    125125
     126void MediaSampleGStreamer::dump(PrintStream& out) const
     127{
     128    out.print("{PTS(", presentationTime(), "), DTS(", decodeTime(), "), duration(", duration(), "), flags(");
     129
     130    bool anyFlags = false;
     131    auto appendFlag = [&out, &anyFlags](const char* flagName) {
     132        if (anyFlags)
     133            out.print(",");
     134        out.print(flagName);
     135        anyFlags = true;
     136    };
     137
     138    if (flags() & MediaSample::IsSync)
     139        appendFlag("sync");
     140    if (flags() & MediaSample::IsNonDisplaying)
     141        appendFlag("non-displaying");
     142    if (flags() & MediaSample::HasAlpha)
     143        appendFlag("has-alpha");
     144    if (flags() & ~(MediaSample::IsSync | MediaSample::IsNonDisplaying | MediaSample::HasAlpha))
     145        appendFlag("unknown-flag");
     146
     147    out.print("), trackId(", trackID().string(), "), presentationSize(", presentationSize().width(), "x", presentationSize().height(), ")}");
     148}
     149
    126150} // namespace WebCore.
    127151
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h

    r226357 r228418  
    5454    SampleFlags flags() const override { return m_flags; }
    5555    PlatformSample platformSample() override;
    56     void dump(PrintStream&) const override { }
     56    void dump(PrintStream&) const override;
    5757
    5858private:
Note: See TracChangeset for help on using the changeset viewer.