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

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

Issue 1313563002: Java VideoRenderer.Callbacks: Make renderFrame() interface asynchronous (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 3 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 CHECK(!json_value["width"].isNull() && !json_value["height"].isNull() && 122 CHECK(!json_value["width"].isNull() && !json_value["height"].isNull() &&
123 !json_value["framerate"].isNull()); 123 !json_value["framerate"].isNull());
124 cricket::VideoFormat format( 124 cricket::VideoFormat format(
125 json_value["width"].asInt(), 125 json_value["width"].asInt(),
126 json_value["height"].asInt(), 126 json_value["height"].asInt(),
127 cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()), 127 cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()),
128 cricket::FOURCC_YV12); 128 cricket::FOURCC_YV12);
129 formats.push_back(format); 129 formats.push_back(format);
130 } 130 }
131 SetSupportedFormats(formats); 131 SetSupportedFormats(formats);
132 // Do not apply frame rotation by default.
133 SetApplyRotation(false);
132 } 134 }
133 135
134 AndroidVideoCapturer::~AndroidVideoCapturer() { 136 AndroidVideoCapturer::~AndroidVideoCapturer() {
135 CHECK(!running_); 137 CHECK(!running_);
136 } 138 }
137 139
138 cricket::CaptureState AndroidVideoCapturer::Start( 140 cricket::CaptureState AndroidVideoCapturer::Start(
139 const cricket::VideoFormat& capture_format) { 141 const cricket::VideoFormat& capture_format) {
140 CHECK(thread_checker_.CalledOnValidThread()); 142 CHECK(thread_checker_.CalledOnValidThread());
141 CHECK(!running_); 143 CHECK(!running_);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 213
212 bool AndroidVideoCapturer::GetBestCaptureFormat( 214 bool AndroidVideoCapturer::GetBestCaptureFormat(
213 const cricket::VideoFormat& desired, 215 const cricket::VideoFormat& desired,
214 cricket::VideoFormat* best_format) { 216 cricket::VideoFormat* best_format) {
215 // Delegate this choice to VideoCapturerAndroid.startCapture(). 217 // Delegate this choice to VideoCapturerAndroid.startCapture().
216 *best_format = desired; 218 *best_format = desired;
217 return true; 219 return true;
218 } 220 }
219 221
220 } // namespace webrtc 222 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698