Revert "Switch default color format to YV12."

This reverts commit 1c3e728aa9.

Reason: Fails test running on Nexus 9 bots - org.webrtc.VideoCapturerAndroidTest#testStartStopWithDifferentResolutions.
Note that all other tests pass so it seems like there is resolution supported by the device that can't use YV12.

TBR=glaznev@webrtc.org
BUG=4011

Review URL: https://webrtc-codereview.appspot.com/42389004

Cr-Commit-Position: refs/heads/master@{#8414}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8414 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
perkj@webrtc.org 2015-02-18 15:19:39 +00:00
parent b255865e6e
commit 8fbdcfd73f
2 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ class AndroidVideoCapturer::FrameFactory : public cricket::VideoFrameFactory {
int length, int length,
int rotation, int rotation,
int64 time_stamp_in_ms) { int64 time_stamp_in_ms) {
captured_frame_.fourcc = static_cast<uint32>(cricket::FOURCC_YV12); captured_frame_.fourcc = static_cast<uint32>(cricket::FOURCC_NV21);
captured_frame_.data = frame_data; captured_frame_.data = frame_data;
captured_frame_.elapsed_time = rtc::TimeNanos() - start_time_; captured_frame_.elapsed_time = rtc::TimeNanos() - start_time_;
captured_frame_.time_stamp = captured_frame_.time_stamp =
@ -120,7 +120,7 @@ AndroidVideoCapturer::AndroidVideoCapturer(
json_value["width"].asInt(), json_value["width"].asInt(),
json_value["height"].asInt(), json_value["height"].asInt(),
cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()), cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()),
cricket::FOURCC_YV12); cricket::FOURCC_NV21);
formats.push_back(format); formats.push_back(format);
} }
SetSupportedFormats(formats); SetSupportedFormats(formats);
@ -169,7 +169,7 @@ bool AndroidVideoCapturer::IsRunning() {
} }
bool AndroidVideoCapturer::GetPreferredFourccs(std::vector<uint32>* fourccs) { bool AndroidVideoCapturer::GetPreferredFourccs(std::vector<uint32>* fourccs) {
fourccs->push_back(cricket::FOURCC_YV12); fourccs->push_back(cricket::FOURCC_NV21);
return true; return true;
} }

View File

@ -386,7 +386,7 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba
} }
parameters.setPictureSize(width, height); parameters.setPictureSize(width, height);
parameters.setPreviewSize(width, height); parameters.setPreviewSize(width, height);
int format = ImageFormat.YV12; int format = ImageFormat.NV21;
parameters.setPreviewFormat(format); parameters.setPreviewFormat(format);
camera.setParameters(parameters); camera.setParameters(parameters);
// Note: setRecordingHint(true) actually decrease frame rate on N5. // Note: setRecordingHint(true) actually decrease frame rate on N5.