Chromium Code Reviews| Index: webrtc/api/androidvideocapturer.cc |
| diff --git a/webrtc/api/androidvideocapturer.cc b/webrtc/api/androidvideocapturer.cc |
| index 69278db3bd81cd1bc5118fbca74c2e29f143032b..2c63ee4d1f09a30711ab74612eb2872cfdc9540b 100644 |
| --- a/webrtc/api/androidvideocapturer.cc |
| +++ b/webrtc/api/androidvideocapturer.cc |
| @@ -12,7 +12,6 @@ |
| #include "webrtc/api/java/jni/native_handle_impl.h" |
| #include "webrtc/base/common.h" |
| -#include "webrtc/base/json.h" |
| #include "webrtc/base/timeutils.h" |
| #include "webrtc/media/engine/webrtcvideoframe.h" |
| @@ -119,27 +118,12 @@ AndroidVideoCapturer::AndroidVideoCapturer( |
| frame_factory_(NULL), |
| current_state_(cricket::CS_STOPPED) { |
| thread_checker_.DetachFromThread(); |
| - std::string json_string = delegate_->GetSupportedFormats(); |
| - LOG(LS_INFO) << json_string; |
| - |
| - Json::Value json_values; |
| - Json::Reader reader(Json::Features::strictMode()); |
| - if (!reader.parse(json_string, json_values)) { |
| - LOG(LS_ERROR) << "Failed to parse formats."; |
| - } |
| - |
| - std::vector<cricket::VideoFormat> formats; |
| - for (Json::ArrayIndex i = 0; i < json_values.size(); ++i) { |
| - const Json::Value& json_value = json_values[i]; |
| - RTC_CHECK(!json_value["width"].isNull() && |
| - !json_value["height"].isNull() && |
| - !json_value["framerate"].isNull()); |
| - cricket::VideoFormat format( |
| - json_value["width"].asInt(), |
| - json_value["height"].asInt(), |
| - cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()), |
| - cricket::FOURCC_YV12); |
| - formats.push_back(format); |
| + const std::vector<cricket::VideoFormat> formats = |
| + delegate_->GetSupportedFormats(); |
| + LOG(LS_INFO) << formats.size() << " supported formats: "; |
|
perkj_webrtc
2016/02/16 14:35:41
is this logged in Java- if so - remove from here.
magjed_webrtc
2016/02/18 10:43:35
Done, but this will be a change from current code.
|
| + for (const cricket::VideoFormat& format : formats) { |
| + LOG(LS_INFO) << format.width << "x" << format.height << "@" |
| + << format.framerate(); |
| } |
| SetSupportedFormats(formats); |
| } |