Skip to content

Commit

Permalink
Merge r228418 - [Gstreamer][MSE] Add string representation for GStrea…
Browse files Browse the repository at this point in the history
…merMediaSample

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:
  • Loading branch information
ntrrgc authored and carlosgcampos committed Feb 20, 2018
1 parent c3f2654 commit 216bb0c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
2018-02-13 Alicia Boya García <aboya@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-18 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>

Fix build error after r228417 without ACCESSIBILITY
Expand Down
Expand Up @@ -123,6 +123,30 @@ Ref<MediaSample> MediaSampleGStreamer::createNonDisplayingCopy() const
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)
Expand Up @@ -53,7 +53,7 @@ class MediaSampleGStreamer final : public MediaSample {
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);
Expand Down

0 comments on commit 216bb0c

Please sign in to comment.