Backing out bug 882027
authorRobert O'Callahan <robert@ocallahan.org>
Sun, 16 Jun 2013 01:28:34 +1200
changeset 146682 775c4219d32a6a829afee7f2e217382e6c8bdcce
parent 146681 f6f5699da1fd2926bc3ddeccc73723d27a8ce4d5
child 146683 d2e7bdb863f70fa1516650b7339c308881727a69
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs882027
milestone24.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
Backing out bug 882027
content/media/MediaDecoder.cpp
content/media/MediaDecoder.h
--- a/content/media/MediaDecoder.cpp
+++ b/content/media/MediaDecoder.cpp
@@ -1041,16 +1041,42 @@ void MediaDecoder::NotifyBytesConsumed(i
   NS_ENSURE_TRUE_VOID(mDecoderStateMachine);
   MOZ_ASSERT(OnStateMachineThread() || OnDecodeThread());
   if (!mIgnoreProgressData) {
     mDecoderPosition += aBytes;
     mPlaybackStatistics.AddBytes(aBytes);
   }
 }
 
+void MediaDecoder::NextFrameUnavailableBuffering()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  if (!mOwner || mShuttingDown || !mDecoderStateMachine)
+    return;
+
+  mOwner->UpdateReadyStateForData(MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE_BUFFERING);
+}
+
+void MediaDecoder::NextFrameAvailable()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  if (!mOwner || mShuttingDown || !mDecoderStateMachine)
+    return;
+
+  mOwner->UpdateReadyStateForData(MediaDecoderOwner::NEXT_FRAME_AVAILABLE);
+}
+
+void MediaDecoder::NextFrameUnavailable()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  if (!mOwner || mShuttingDown || !mDecoderStateMachine)
+    return;
+  mOwner->UpdateReadyStateForData(MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE);
+}
+
 void MediaDecoder::UpdateReadyStateForData()
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mOwner || mShuttingDown || !mDecoderStateMachine)
     return;
   MediaDecoderOwner::NextFrameStatus frameStatus =
     mDecoderStateMachine->GetNextFrameStatus();
   mOwner->UpdateReadyStateForData(frameStatus);
--- a/content/media/MediaDecoder.h
+++ b/content/media/MediaDecoder.h
@@ -705,16 +705,22 @@ public:
   // thread.
   void SeekingStarted();
 
   // Called when the backend has changed the current playback
   // position. It dispatches a timeupdate event and invalidates the frame.
   // This must be called on the main thread only.
   void PlaybackPositionChanged();
 
+  // Calls mElement->UpdateReadyStateForData, telling it which state we have
+  // entered.  Main thread only.
+  void NextFrameUnavailableBuffering();
+  void NextFrameAvailable();
+  void NextFrameUnavailable();
+
   // Calls mElement->UpdateReadyStateForData, telling it whether we have
   // data for the next frame and if we're buffering. Main thread only.
   void UpdateReadyStateForData();
 
   // Find the end of the cached data starting at the current decoder
   // position.
   int64_t GetDownloadPosition();