Bug 180262 - [Gstreamer][MSE] Add string representation for GStreamerMediaSample
Summary: [Gstreamer][MSE] Add string representation for GStreamerMediaSample
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-01 10:23 PST by Alicia Boya García
Modified: 2018-02-13 04:12 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.57 KB, patch)
2017-12-01 10:25 PST, Alicia Boya García
no flags Details | Formatted Diff | Diff
Patch (2.56 KB, patch)
2017-12-01 12:31 PST, Alicia Boya García
no flags Details | Formatted Diff | Diff
Patch (18.91 KB, patch)
2017-12-01 16:06 PST, Alicia Boya García
no flags Details | Formatted Diff | Diff
Patch (2.56 KB, patch)
2017-12-01 16:10 PST, Alicia Boya García
no flags Details | Formatted Diff | Diff
Patch (3.10 KB, patch)
2018-02-12 12:04 PST, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 2017-12-01 10:23:47 PST
GStreamerMediaSample::dump() represents the sample as an empty string, which is not helpful for debugging.

This method is supposed to write useful information about the sample like PTS, DTS, duration...
The set of properties to write is platform-dependent.
Comment 1 Alicia Boya García 2017-12-01 10:25:56 PST
Created attachment 328116 [details]
Patch
Comment 2 Build Bot 2017-12-01 10:31:47 PST
Attachment 328116 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:120:  Missing space after ,  [whitespace/comma] [3]
ERROR: Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:121:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alicia Boya García 2017-12-01 12:31:25 PST
Created attachment 328131 [details]
Patch
Comment 4 Alicia Boya García 2017-12-01 16:06:41 PST
Created attachment 328175 [details]
Patch
Comment 5 Alicia Boya García 2017-12-01 16:09:58 PST
webkit-patch upload -g <hash> has uploaded the wrong patch...
Comment 6 Alicia Boya García 2017-12-01 16:10:47 PST
Created attachment 328177 [details]
Patch
Comment 7 Xabier Rodríguez Calvar 2017-12-05 00:24:46 PST
Comment on attachment 328177 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=328177&action=review

Patch is not wrong, though I'd improve it.

> Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:120
> +    out.print("{PTS(", presentationTime(), "), DTS(", decodeTime(), "), duration(", duration(), "), flags(", (int)flags(),

Instead of (int), I'd use a C++ cast, though in this case I'd rather dump the flags instead of just casting them to an int.
Comment 8 Alicia Boya García 2018-02-12 12:04:10 PST
Created attachment 333613 [details]
Patch
Comment 9 WebKit Commit Bot 2018-02-13 04:11:38 PST
Comment on attachment 333613 [details]
Patch

Clearing flags on attachment: 333613

Committed r228418: <https://trac.webkit.org/changeset/228418>
Comment 10 WebKit Commit Bot 2018-02-13 04:11:39 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-02-13 04:12:27 PST
<rdar://problem/37493448>