Bug 657791 - Update WebM demuxer to consider cue-less WebMs seekable. r=jya
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 19 Jan 2016 11:43:49 +1300
changeset 288503 4261e08ba51aa5241a05d5a6da8c7557e870ef47
parent 288502 bcff334f8746e76b550b4226f0e54d0094bce159
child 288504 2e990a8d4553a9c2ce896681163fd33a74b78235
push id73430
push userryanvm@gmail.com
push dateSun, 13 Mar 2016 17:40:31 +0000
treeherdermozilla-inbound@51766683141b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs657791
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 657791 - Update WebM demuxer to consider cue-less WebMs seekable. r=jya It appears that the work to seek in WebMs that do not have cues has already been done, however this functionality was gated by the IsSeekable() function still returning that such WebMs were not seekable. This updates that function so that WebMs without cues are now considered seekable. Tests are also updated to reflect this.
dom/media/test/manifest.js
dom/media/webm/WebMDemuxer.cpp
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -474,16 +474,17 @@ var gErrorTests = [
 // These are files that have nontrivial duration and are useful for seeking within.
 var gSeekTests = [
   { name:"r11025_s16_c1.wav", type:"audio/x-wav", duration:1.0 },
   { name:"audio.wav", type:"audio/x-wav", duration:0.031247 },
   { name:"seek.ogv", type:"video/ogg", duration:3.966 },
   { name:"320x240.ogv", type:"video/ogg", duration:0.266 },
   { name:"seek.webm", type:"video/webm", duration:3.966 },
   { name:"sine.webm", type:"audio/webm", duration:4.001 },
+  { name:"no-cues.webm", type:"video/webm", duration:3.967 },
   { name:"bug516323.indexed.ogv", type:"video/ogg", duration:4.208333 },
   { name:"split.webm", type:"video/webm", duration:1.967 },
   { name:"detodos.opus", type:"audio/ogg; codecs=opus", duration:2.9135 },
   { name:"gizmo.mp4", type:"video/mp4", duration:5.56 },
   { name:"owl.mp3", type:"audio/mpeg", duration:3.343 },
   { name:"bogus.duh", type:"bogus/duh", duration:123 },
 
   // Bug 1242338: hit a numerical problem while seeking to the duration.
@@ -504,17 +505,16 @@ function IsWindows8OrLater() {
   var re = /Windows NT (\d.\d)/;
   var winver = manifestNavigator().userAgent.match(re);
   return winver && winver.length == 2 && parseFloat(winver[1]) >= 6.2;
 }
 
 // These are files that are non seekable, due to problems with the media,
 // for example broken or missing indexes.
 var gUnseekableTests = [
-  { name:"no-cues.webm", type:"video/webm" },
   { name:"bogus.duh", type:"bogus/duh"}
 ];
 
 var androidVersion = -1; // non-Android platforms
 if (manifestNavigator().userAgent.indexOf("Mobile") != -1 ||
     manifestNavigator().userAgent.indexOf("Tablet") != -1) {
   // See nsSystemInfo.cpp, the getProperty('version') returns different value
   // on each platforms, so we need to distinguish the android and B2G platform.
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -426,17 +426,17 @@ WebMDemuxer::ReadMetadata()
     }
   }
   return NS_OK;
 }
 
 bool
 WebMDemuxer::IsSeekable() const
 {
-  return mContext && nestegg_has_cues(mContext);
+  return mContext;
 }
 
 void
 WebMDemuxer::EnsureUpToDateIndex()
 {
   if (!mNeedReIndex || !mInitData) {
     return;
   }