Closed Bug 1000608 Opened 10 years ago Closed 10 years ago

Implement seeking portion of Media Source Extensions spec

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: cajbir, Assigned: cajbir)

References

(Blocks 2 open bugs, )

Details

Attachments

(5 files, 5 obsolete files)

For seeking to work in web apps that use MSE we need to implement:

http://www.w3.org/TR/media-source/#mediasource-seeking

This is required to get seeking working on the YouTube MSE player.
Attached patch p1: nestegg change (obsolete) — Splinter Review
This is a patch to libnestegg to allow operations after a seek to a raw offset to work. Asking for feedback to see if this is an ok approach and will do a github pull request when/if f+.
Assignee: nobody → cajbir.bugzilla
Status: NEW → ASSIGNED
Attachment #8411470 - Flags: feedback?(kinetik)
Attachment #8411472 - Flags: review?(kinetik)
If seeking fails in the WebM reader, fall back to trying a seek using the internal offset data we keep track of. This handles MSE WebM files that don't have cues.
Attachment #8411475 - Flags: review?(kinetik)
With these four patches applied seeking works on http://cd.pn/mse/ytdemo/dash-player.html?url=http://cd.pn/mse/ytdemo/feelings2.mpd. Patches to come for the "If one or more of the objects in activeSourceBuffers is missing media segments for the new playback position" part of the spec.
Attachment #8411471 - Flags: review?(kinetik) → review+
Attachment #8411472 - Flags: review?(kinetik) → review+
Comment on attachment 8411470 [details] [diff] [review]
p1: nestegg change

   ctx->log(ctx, NESTEGG_LOG_DEBUG, "seek: parsing cluster elements");

Move this line with the ne_parse call into offset_seek.  Otherwise, looks good.
Attachment #8411470 - Flags: feedback?(kinetik) → feedback+
Attachment #8411475 - Flags: review?(kinetik) → review+
Blocks: 575140
Attachment #8411496 - Flags: review?(kinetik)
Comment on attachment 8411496 [details] [diff] [review]
p5:  Populate active source buffers and fix ContainsTime

   for (uint32_t i = 0; i < mSourceBuffers.Length(); ++i) {
     if (!mSourceBuffers[i]->ContainsTime(aTime)) {
       return false;
     }
   }
-  return true;
+  return mSourceBuffers.Length() > 0;

I think this should be:

   for (uint32_t i = 0; i < mSourceBuffers.Length(); ++i) {
     if (mSourceBuffers[i]->ContainsTime(aTime)) {
       return true;
     }
   }
   return false;
I've renamed ContainsTime to AllContainsTime on SourceBufferList to make it clearer as to what it does.
Attachment #8411496 - Attachment is obsolete: true
Attachment #8411496 - Flags: review?(kinetik)
Attachment #8411510 - Flags: review?(kinetik)
Rebased on top of latest bug 881512 code. Carrying r+ forward.
Attachment #8411471 - Attachment is obsolete: true
Attachment #8411511 - Flags: review+
Rebased on top of latest bug 881512 code. Carrying r+ forward.
Attachment #8411472 - Attachment is obsolete: true
Attachment #8411512 - Flags: review+
Rebased on top of latest bug 881512 code. Carrying r+ forward.
Attachment #8411475 - Attachment is obsolete: true
Attachment #8411513 - Flags: review+
Attachment #8411510 - Flags: review?(kinetik) → review+
Updates to latest libnestegg code which contains pull request 20 (https://github.com/kinetiknz/nestegg/pull/20). That pull request contains the attachment 8411470 [details] [diff] [review] fix plus review comments.
Attachment #8411470 - Attachment is obsolete: true
Attachment #8411515 - Flags: review?(kinetik)
Attachment #8411515 - Flags: review?(kinetik) → review+
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?changeset=d75260ca4ed2

	d75260ca4ed2	cajbir — Bug 1000608 - Populate active source buffers and fix/rename ContainsTime - r=kinetik default tip
	f398aa51c65a	cajbir — Bug 1000608 - Implement cue-less seeking on WebM Reader - r=kinetik
	a336e673aaf5	cajbir — Bug 1000608 - Implement seeking on MediaSourceDecoder - r=kinetik
	1e21f55bcc9d	cajbir — Bug 1000608 - Allow querying source buffers to see if they contain data for a given time - r=kinetik
	826e982173dd	cajbir — Bug 1000608 - Allow nestegg_offset_seek to be called externally - r=kinetik
Blocks: 974362
Depends on: 1002297
You need to log in before you can comment on or make changes to this bug.