Backed out changesets f0459f2356bc, e66e54290fe6, and 1fb834da769c for Windows Bustage. a=backout on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 08 Feb 2013 16:40:18 -0800
changeset 127460 de299ce2b2c17ab09b6644ec51a7f3bf731e0caf
parent 127459 f0459f2356bc7680b2b32edc85e83649c9a89f5b
child 127461 76e3a3301af0d22bb500d183eb4d3abf91f2f167
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
milestone20.0a2
backs outf0459f2356bc7680b2b32edc85e83649c9a89f5b
e66e54290fe67127c8cc53fe76e966498cfec1be
1fb834da769c859c4e76b77b038831ca4c5ce033
Backed out changesets f0459f2356bc, e66e54290fe6, and 1fb834da769c for Windows Bustage. a=backout on a CLOSED TREE
content/media/MediaDecoderStateMachine.cpp
content/media/webm/WebMReader.cpp
media/libnestegg/README_MOZILLA
media/libnestegg/include/nestegg.h
media/libnestegg/src/nestegg.c
--- a/content/media/MediaDecoderStateMachine.cpp
+++ b/content/media/MediaDecoderStateMachine.cpp
@@ -2062,23 +2062,16 @@ nsresult MediaDecoderStateMachine::RunSt
         // We're playing, but the element/decoder is in paused state. Stop
         // playing! Note we do this before StopDecodeThread() below because
         // that blocks this state machine's execution, and can cause a
         // perceptible delay between the pause command, and playback actually
         // pausing.
         StopPlayback();
       }
 
-      if (mDecoder->GetState() == MediaDecoder::PLAY_STATE_PLAYING &&
-          !IsPlaying()) {
-        // We are playing, but the state machine does not know it yet. Tell it
-        // that it is, so that the clock can be properly queried.
-        StartPlayback();
-      }
-
       if (IsPausedAndDecoderWaiting()) {
         // The decode buffers are full, and playback is paused. Shutdown the
         // decode thread.
         StopDecodeThread();
         return NS_OK;
       }
 
       // We're playing and/or our decode buffers aren't full. Ensure we have
@@ -2345,17 +2338,17 @@ void MediaDecoderStateMachine::AdvanceFr
         break;
       frame = mReader->VideoQueue().PeekFront();
     }
     // Current frame has already been presented, wait until it's time to
     // present the next frame.
     if (frame && !currentFrame) {
       int64_t now = IsPlaying() ? clock_time : mPlayDuration;
 
-      remainingTime = frame->mTime - now;
+      remainingTime = frame->mTime - mStartTime - now;
     }
   }
 
   // Check to see if we don't have enough data to play up to the next frame.
   // If we don't, switch to buffering mode.
   MediaResource* resource = mDecoder->GetResource();
   if (mState == DECODER_STATE_DECODING &&
       mDecoder->GetState() == MediaDecoder::PLAY_STATE_PLAYING &&
@@ -2392,17 +2385,17 @@ void MediaDecoderStateMachine::AdvanceFr
     // If we're no longer playing after dropping and reacquiring the lock,
     // playback must've been stopped on the decode thread (by a seek, for
     // example).  In that case, the current frame is probably out of date.
     if (!IsPlaying()) {
       ScheduleStateMachine();
       return;
     }
     mDecoder->GetFrameStatistics().NotifyPresentedFrame();
-    remainingTime = currentFrame->mEndTime - clock_time;
+    remainingTime = currentFrame->mEndTime - mStartTime - clock_time;
     currentFrame = nullptr;
   }
 
   // Cap the current time to the larger of the audio and video end time.
   // This ensures that if we're running off the system clock, we don't
   // advance the clock to after the media end time.
   if (mVideoFrameEndTime != -1 || mAudioEndTime != -1) {
     // These will be non -1 if we've displayed a video frame, or played an audio frame.
--- a/content/media/webm/WebMReader.cpp
+++ b/content/media/webm/WebMReader.cpp
@@ -462,17 +462,21 @@ nsresult WebMReader::ReadMetadata(VideoI
       } else {
         clusterNum++;
       }
     } while (!done);
   }
 #endif
 
   // We can't seek in buffered regions if we have no cues.
-  mDecoder->SetMediaSeekable(nestegg_has_cues(mContext) == 1);
+  bool haveCues;
+  int64_t dummy = -1;
+  haveCues = nestegg_get_cue_point(mContext, 0, -1, &dummy, &dummy,
+                                   (uint64_t*)&dummy) == 0;
+  mDecoder->SetMediaSeekable(haveCues);
 
   *aInfo = mInfo;
 
   *aTags = nullptr;
 
 #ifdef MOZ_DASH
   mDecoder->OnReadMetadataCompleted();
 #endif
--- a/media/libnestegg/README_MOZILLA
+++ b/media/libnestegg/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the nestegg
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 Makefile.in build files for the Mozilla build system.
 
 The nestegg git repository is: git://github.com/kinetiknz/nestegg.git
 
-The git commit ID used was 113b228ac33cfe6311305461625a2d04475de614.
+The git commit ID used was 37c8ec972f6908e884b2e3be6eaf7915dbe4e278.
--- a/media/libnestegg/include/nestegg.h
+++ b/media/libnestegg/include/nestegg.h
@@ -314,19 +314,13 @@ int nestegg_packet_count(nestegg_packet 
     @param data    Storage for the queried data pointer.
                    The data is owned by the #nestegg_packet packet.
     @param length  Storage for the queried data size.
     @retval  0 Success.
     @retval -1 Error. */
 int nestegg_packet_data(nestegg_packet * packet, unsigned int item,
                         unsigned char ** data, size_t * length);
 
-/**
- * Query the presence of cues.
- * @retval 0 The media has no cues.
- * @retval 1 The media has cues. */
-int nestegg_has_cues(nestegg * context);
-
 #ifdef __cplusplus
 }
 #endif
 
 #endif /* NESTEGG_671cac2a_365d_ed69_d7a3_4491d3538d79 */
--- a/media/libnestegg/src/nestegg.c
+++ b/media/libnestegg/src/nestegg.c
@@ -1584,23 +1584,16 @@ nestegg_tstamp_scale(nestegg * ctx, uint
 int
 nestegg_track_count(nestegg * ctx, unsigned int * tracks)
 {
   *tracks = ctx->track_count;
   return 0;
 }
 
 int
-nestegg_has_cues(nestegg * ctx)
-{
-  return ctx->segment.cues.cue_point.head ||
-    ne_find_seek_for_id(ctx->segment.seek_head.head, ID_CUES);
-}
-
-int
 nestegg_get_cue_point(nestegg * ctx, unsigned int cluster_num, int64_t max_offset,
                       int64_t * start_pos, int64_t * end_pos, uint64_t * tstamp)
 {
   int range_obtained = 0;
   unsigned int cluster_count = 0;
   struct cue_point * cue_point;
   struct cue_track_positions * pos;
   uint64_t seek_pos, t, tc_scale, time;