Bug 1077298 - add emulated camera hal pixel format. r=jesup
authorAlfredo Yang <ayang@mozilla.com>
Fri, 03 Oct 2014 00:37:00 +0200
changeset 208926 9fb226440c14b0c6663783823c39dc6a61707ce4
parent 208925 70af7ba3c01058433897bae0d95c9f5281df5a0b
child 208927 76e64cc73ccf87031cdbfe5d91f8821de073487f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjesup
bugs1077298
milestone35.0a1
Bug 1077298 - add emulated camera hal pixel format. r=jesup
content/media/webrtc/MediaEngineWebRTCVideo.cpp
--- a/content/media/webrtc/MediaEngineWebRTCVideo.cpp
+++ b/content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ -969,16 +969,18 @@ MediaEngineWebRTCVideoSource::OnTakePict
       new GenerateBlobRunnable(mPhotoCallbacks, aData, aLength, aMimeType));
   }
 }
 
 uint32_t
 MediaEngineWebRTCVideoSource::ConvertPixelFormatToFOURCC(int aFormat)
 {
   switch (aFormat) {
+  case HAL_PIXEL_FORMAT_RGBA_8888:
+    return libyuv::FOURCC_BGRA;
   case HAL_PIXEL_FORMAT_YCrCb_420_SP:
     return libyuv::FOURCC_NV21;
   case HAL_PIXEL_FORMAT_YV12:
     return libyuv::FOURCC_YV12;
   default: {
     LOG((" xxxxx Unknown pixel format %d", aFormat));
     MOZ_ASSERT(false, "Unknown pixel format.");
     return libyuv::FOURCC_ANY;