Debugging aid for MSE data handling

RESOLVED FIXED in mozilla35

Status

()

RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: kinetik, Assigned: kinetik)

Tracking

(Blocks: 1 bug)

Trunk
mozilla35
Points:
---
Bug Flags:
qe-verify -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
When debugging particular classes of bugs, it'd be useful to dump each chunk of data appended to a SourceBuffer to disk for later inspection/reconstruction.  This would consist of a directory tree for each MediaSource, then each SourceBuffer, then each TrackBuffer and each decoder.  A log of which chunks were appended to what in which order (for, e.g. later replay) would also be useful along with the raw data.
(Assignee)

Comment 1

5 years ago
Posted patch wip (obsolete) — Splinter Review
(Assignee)

Comment 2

5 years ago
Attached patch is already useful for debugging.  Given $mse is a pointer to a MediaSource object, invoking:

    p (('mozilla::dom::MediaSource'*)$mse)->Dump("/path/to/use/mse-debug")

The dump code assumes /path/to/use exists, and will create "mse-debug" and a tree below it containing each ResourceItem for each MediaDecoderReader for each TrackBuffer.
(Assignee)

Comment 3

5 years ago
Cleaned up slightly.  This is already useful enough to land, so I'll request review after a try push.
Attachment #8486226 - Attachment is obsolete: true
(Assignee)

Comment 5

5 years ago
(In reply to Matthew Gregan [:kinetik] from comment #4)
> https://tbpl.mozilla.org/?tree=Try&rev=46e44e3f7bd9

Killed, darn unified builds.
(Assignee)

Updated

5 years ago
Attachment #8486819 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
(Assignee)

Updated

5 years ago
Attachment #8486844 - Flags: review?(cajbir.bugzilla)

Comment 8

5 years ago
Comment on attachment 8486844 [details] [diff] [review]
Add a debug-only dump method to MediaSource for debugging issues with appended data

Review of attachment 8486844 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/mediasource/MediaSource.cpp
@@ +516,5 @@
> +void
> +MediaSource::Dump(const char* aPath)
> +{
> +  char buf[255];
> +  sprintf(buf, "%s/mediasource-%p", aPath, this);

Use PR_snprintf (or similar function that handles the size of 'buf') in places throughout where sprintf is used.

::: content/media/mediasource/MediaSource.h
@@ +98,5 @@
>    // initialization.
>    void QueueInitializationEvent();
>  
> +#if defined(DEBUG)
> +  void Dump(const char* aPath);

Add a comment explaining what this function is for and what it does to the given path. How to call it from gdb as you describe in comment 2 would also be useful.
Attachment #8486844 - Flags: review?(cajbir.bugzilla) → review+
(Assignee)

Comment 12

5 years ago
Backed out, my try push was opt only, which isn't that useful for stuff hidden behind DEBUG.
https://hg.mozilla.org/mozilla-central/rev/0a3666402f8b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.