diff --git a/talk/app/webrtc/androidvideocapturer.cc b/talk/app/webrtc/androidvideocapturer.cc index 05fa9b98b..3264421db 100644 --- a/talk/app/webrtc/androidvideocapturer.cc +++ b/talk/app/webrtc/androidvideocapturer.cc @@ -63,7 +63,7 @@ class AndroidVideoCapturer::FrameFactory : public cricket::VideoFrameFactory { int length, int rotation, int64 time_stamp_in_ms) { - captured_frame_.fourcc = static_cast(cricket::FOURCC_YV12); + captured_frame_.fourcc = static_cast(cricket::FOURCC_NV21); captured_frame_.data = frame_data; captured_frame_.elapsed_time = rtc::TimeNanos() - start_time_; captured_frame_.time_stamp = @@ -120,7 +120,7 @@ AndroidVideoCapturer::AndroidVideoCapturer( json_value["width"].asInt(), json_value["height"].asInt(), cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()), - cricket::FOURCC_YV12); + cricket::FOURCC_NV21); formats.push_back(format); } SetSupportedFormats(formats); @@ -169,7 +169,7 @@ bool AndroidVideoCapturer::IsRunning() { } bool AndroidVideoCapturer::GetPreferredFourccs(std::vector* fourccs) { - fourccs->push_back(cricket::FOURCC_YV12); + fourccs->push_back(cricket::FOURCC_NV21); return true; } diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java b/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java index e40b7029d..2650e7137 100644 --- a/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java +++ b/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java @@ -386,7 +386,7 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba } parameters.setPictureSize(width, height); parameters.setPreviewSize(width, height); - int format = ImageFormat.YV12; + int format = ImageFormat.NV21; parameters.setPreviewFormat(format); camera.setParameters(parameters); // Note: setRecordingHint(true) actually decrease frame rate on N5.