Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: talk/app/webrtc/androidvideocapturer.cc

Issue 1655793003: Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed Android Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 !json_value["height"].isNull() && 150 !json_value["height"].isNull() &&
151 !json_value["framerate"].isNull()); 151 !json_value["framerate"].isNull());
152 cricket::VideoFormat format( 152 cricket::VideoFormat format(
153 json_value["width"].asInt(), 153 json_value["width"].asInt(),
154 json_value["height"].asInt(), 154 json_value["height"].asInt(),
155 cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()), 155 cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()),
156 cricket::FOURCC_YV12); 156 cricket::FOURCC_YV12);
157 formats.push_back(format); 157 formats.push_back(format);
158 } 158 }
159 SetSupportedFormats(formats); 159 SetSupportedFormats(formats);
160 // Do not apply frame rotation by default.
161 SetApplyRotation(false);
162 } 160 }
163 161
164 AndroidVideoCapturer::~AndroidVideoCapturer() { 162 AndroidVideoCapturer::~AndroidVideoCapturer() {
165 RTC_CHECK(!running_); 163 RTC_CHECK(!running_);
166 } 164 }
167 165
168 cricket::CaptureState AndroidVideoCapturer::Start( 166 cricket::CaptureState AndroidVideoCapturer::Start(
169 const cricket::VideoFormat& capture_format) { 167 const cricket::VideoFormat& capture_format) {
170 RTC_CHECK(thread_checker_.CalledOnValidThread()); 168 RTC_CHECK(thread_checker_.CalledOnValidThread());
171 RTC_CHECK(!running_); 169 RTC_CHECK(!running_);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 239
242 bool AndroidVideoCapturer::GetBestCaptureFormat( 240 bool AndroidVideoCapturer::GetBestCaptureFormat(
243 const cricket::VideoFormat& desired, 241 const cricket::VideoFormat& desired,
244 cricket::VideoFormat* best_format) { 242 cricket::VideoFormat* best_format) {
245 // Delegate this choice to VideoCapturerAndroid.startCapture(). 243 // Delegate this choice to VideoCapturerAndroid.startCapture().
246 *best_format = desired; 244 *best_format = desired;
247 return true; 245 return true;
248 } 246 }
249 247
250 } // namespace webrtc 248 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/remotevideocapturer_unittest.cc » ('j') | talk/media/base/capturerenderadapter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698