Bug 247122 - [MSE] Bring back some useful SourceBuffer logs
Summary: [MSE] Bring back some useful SourceBuffer logs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrique Ocaña
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-27 05:47 PDT by Enrique Ocaña
Modified: 2022-11-04 03:20 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Enrique Ocaña 2022-10-27 06:17:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5854
Comment 2 EWS 2022-11-02 03:49:55 PDT
Committed 256224@main (e5e73c6cc13d): <https://commits.webkit.org/256224@main>

Reviewed commits have been landed. Closing PR #5854 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-11-02 03:50:19 PDT
<rdar://problem/101853612>
Comment 4 Enrique Ocaña 2022-11-02 10:16:22 PDT
Jer Noble gave the following feedback in Slack:

This logging change looks pretty bad; there’s no need to use printf(); DEBUG_LOG() works with StringConcatenation. There’s no need to include the method name, because that’s included with LOGIDENTIFIER. And *this shouldn’t be needed here as that’s also included in LOGIDENTIFIER*.

Can you please undo these changes you made? They can be replaced with something more like this:

DEBUG_LOG(LOGIDENTIFIER, "size = ", size, ", buffered = ", m_private->buffered()->ranges());

If you get an error concatenating a PlatformTimeRanges, the right way to deal with that is to add a macro to PlatformTimeRanges.h like the one from MediaTime.h:

template<typename> struct LogArgument;

template<> struct LogArgument<MediaTime> {
    static String toString(const MediaTime& time) { return time.toJSONString(); }
};
template<> struct LogArgument<MediaTimeRange> {
    static String toString(const MediaTimeRange& range) { return range.toJSONString(); }
};
Comment 5 Enrique Ocaña 2022-11-02 12:37:44 PDT
Pull request: https://github.com/WebKit/WebKit/pull/6044
Comment 6 EWS 2022-11-04 03:20:13 PDT
Committed 256317@main (445669890d9b): <https://commits.webkit.org/256317@main>

Reviewed commits have been landed. Closing PR #6044 and removing active labels.