Cleanup of previous patch
authorEKR <ekr@rtfm.com>
Mon, 17 Jun 2013 08:15:18 -0700
changeset 136286 fcb5b279f477aa3e14fbfd9ca0d28719ca67f6d0
parent 136285 0b06da71de7ef1578a34b2a46ef0cc39a1bde020
child 136287 0fd96a1e096ba7d401d9758f304f2df63951eafa
push id24880
push userphilringnalda@gmail.com
push dateTue, 25 Jun 2013 04:54:35 +0000
treeherdermozilla-central@bc569033125a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs883869, 868405
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
Cleanup of previous patch Bug 883869 - Clean up MediaPipeline changes from bug 868405. r=jesup
media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -779,27 +779,29 @@ void MediaPipelineTransmit::PipelineList
   if (chunk_remaining) {
     memcpy(samples_10ms_buffer_, samples_tmp, chunk_remaining * sizeof(int16_t));
     buffer_current_ = chunk_remaining;
   }
 
 }
 
 #ifdef MOZILLA_INTERNAL_API
-static void FillBlackYCbCr420PixelData(uint8_t* aBuffer, const gfxIntSize& aSize)
-{
-  // Fill Y plane
-}
-
 void MediaPipelineTransmit::PipelineListener::ProcessVideoChunk(
     VideoSessionConduit* conduit,
     TrackRate rate,
     VideoChunk& chunk) {
   layers::Image *img = chunk.mFrame.GetImage();
-  gfxIntSize size = img ? img->GetSize() : chunk.mFrame.GetIntrinsicSize();
+
+  // We now need to send the video frame to the other side
+  if (!img) {
+    // segment.AppendFrame() allows null images, which show up here as null
+    return;
+  }
+
+  gfxIntSize size = img->GetSize();
   if ((size.width & 1) != 0 || (size.height & 1) != 0) {
     MOZ_ASSERT(false, "Can't handle odd-sized images");
     return;
   }
 
   if (chunk.mFrame.GetForceBlack()) {
     uint32_t yPlaneLen = size.width*size.height;
     uint32_t cbcrPlaneLen = yPlaneLen/2;
@@ -816,22 +818,16 @@ void MediaPipelineTransmit::PipelineList
 
       MOZ_MTLOG(PR_LOG_DEBUG, "Sending a black video frame");
       conduit->SendVideoFrame(pixelData, length, size.width, size.height,
                               mozilla::kVideoI420, 0);
     }
     return;
   }
 
-  // We now need to send the video frame to the other side
-  if (!img) {
-    // segment.AppendFrame() allows null images, which show up here as null
-    return;
-  }
-
   // We get passed duplicate frames every ~10ms even if there's no frame change!
   int32_t serial = img->GetSerial();
   if (serial == last_img_) {
     return;
   }
   last_img_ = serial;
 
   ImageFormat format = img->GetFormat();