Last Comment Bug 1000608 - Implement seeking portion of Media Source Extensions spec
: Implement seeking portion of Media Source Extensions spec
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla31
Assigned To: cajbir (:cajbir)
:
: Maire Reavy [:mreavy] Please needinfo me
Mentors:
http://www.w3.org/TR/media-source/#me...
Depends on: 1002297
Blocks: 575140 MSE 974362
  Show dependency treegraph
 
Reported: 2014-04-23 17:03 PDT by cajbir (:cajbir)
Modified: 2014-05-01 01:45 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
p1: nestegg change (1.29 KB, patch)
2014-04-23 18:10 PDT, cajbir (:cajbir)
kinetik: feedback+
Details | Diff | Splinter Review
p2: Allow querying source buffers to see if they contain data for a given time (3.71 KB, patch)
2014-04-23 18:11 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Splinter Review
p3: Implement seeking on MediaSourceDecoder (6.19 KB, patch)
2014-04-23 18:12 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Splinter Review
Implement cue-less seeking on WebM Reader (3.59 KB, patch)
2014-04-23 18:13 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Splinter Review
p5: Populate active source buffers and fix ContainsTime (1.70 KB, patch)
2014-04-23 19:18 PDT, cajbir (:cajbir)
no flags Details | Diff | Splinter Review
p5: Populate active source buffers and fix/rename ContainsTime (3.69 KB, patch)
2014-04-23 19:44 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Splinter Review
p2: Allow querying source buffers to see if they contain data for a given time (3.70 KB, patch)
2014-04-23 19:45 PDT, cajbir (:cajbir)
cajbir.bugzilla: review+
Details | Diff | Splinter Review
p3: Implement seeking on MediaSourceDecoder (5.25 KB, patch)
2014-04-23 19:46 PDT, cajbir (:cajbir)
cajbir.bugzilla: review+
Details | Diff | Splinter Review
p4: Implement cue-less seeking on WebM Reader (3.58 KB, patch)
2014-04-23 19:47 PDT, cajbir (:cajbir)
cajbir.bugzilla: review+
Details | Diff | Splinter Review
p1: update nestegg from upstream (2.01 KB, patch)
2014-04-23 20:04 PDT, cajbir (:cajbir)
kinetik: review+
Details | Diff | Splinter Review

Description User image cajbir (:cajbir) 2014-04-23 17:03:23 PDT
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.
Comment 1 User image cajbir (:cajbir) 2014-04-23 18:10:06 PDT
Created attachment 8411470 [details] [diff] [review]
p1: nestegg change

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+.
Comment 2 User image cajbir (:cajbir) 2014-04-23 18:11:33 PDT
Created attachment 8411471 [details] [diff] [review]
p2: Allow querying source buffers to see if they contain data for a given time
Comment 3 User image cajbir (:cajbir) 2014-04-23 18:12:17 PDT
Created attachment 8411472 [details] [diff] [review]
p3: Implement seeking on MediaSourceDecoder
Comment 4 User image cajbir (:cajbir) 2014-04-23 18:13:44 PDT
Created attachment 8411475 [details] [diff] [review]
Implement cue-less seeking on WebM Reader

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.
Comment 5 User image cajbir (:cajbir) 2014-04-23 18:15:23 PDT
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.
Comment 6 User image Matthew Gregan [:kinetik] 2014-04-23 18:44:06 PDT
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.
Comment 7 User image cajbir (:cajbir) 2014-04-23 19:18:20 PDT
Created attachment 8411496 [details] [diff] [review]
p5:  Populate active source buffers and fix ContainsTime
Comment 8 User image Matthew Gregan [:kinetik] 2014-04-23 19:27:15 PDT
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;
Comment 9 User image cajbir (:cajbir) 2014-04-23 19:44:35 PDT
Created attachment 8411510 [details] [diff] [review]
p5:  Populate active source buffers and fix/rename ContainsTime

I've renamed ContainsTime to AllContainsTime on SourceBufferList to make it clearer as to what it does.
Comment 10 User image cajbir (:cajbir) 2014-04-23 19:45:53 PDT
Created attachment 8411511 [details] [diff] [review]
p2: Allow querying source buffers to see if they contain data for a given time

Rebased on top of latest bug 881512 code. Carrying r+ forward.
Comment 11 User image cajbir (:cajbir) 2014-04-23 19:46:28 PDT
Created attachment 8411512 [details] [diff] [review]
p3: Implement seeking on MediaSourceDecoder

Rebased on top of latest bug 881512 code. Carrying r+ forward.
Comment 12 User image cajbir (:cajbir) 2014-04-23 19:47:11 PDT
Created attachment 8411513 [details] [diff] [review]
p4: Implement cue-less seeking on WebM Reader

Rebased on top of latest bug 881512 code. Carrying r+ forward.
Comment 13 User image cajbir (:cajbir) 2014-04-23 20:04:56 PDT
Created attachment 8411515 [details] [diff] [review]
p1: update nestegg from upstream

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.
Comment 14 User image Matthew Gregan [:kinetik] 2014-04-25 19:53:07 PDT
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

Note You need to log in before you can comment on or make changes to this bug.