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 and rerun tests 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 LOG(LS_INFO) << " AndroidVideoCapturer::Start w = " << capture_format.width 142 LOG(LS_INFO) << " AndroidVideoCapturer::Start w = " << capture_format.width
141 << " h = " << capture_format.height; 143 << " h = " << capture_format.height;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void AndroidVideoCapturer::OnOutputFormatRequest( 206 void AndroidVideoCapturer::OnOutputFormatRequest(
205 int width, int height, int fps) { 207 int width, int height, int fps) {
206 CHECK(thread_checker_.CalledOnValidThread()); 208 CHECK(thread_checker_.CalledOnValidThread());
207 const cricket::VideoFormat& current = video_adapter()->output_format(); 209 const cricket::VideoFormat& current = video_adapter()->output_format();
208 cricket::VideoFormat format( 210 cricket::VideoFormat format(
209 width, height, cricket::VideoFormat::FpsToInterval(fps), current.fourcc); 211 width, height, cricket::VideoFormat::FpsToInterval(fps), current.fourcc);
210 video_adapter()->OnOutputFormatRequest(format); 212 video_adapter()->OnOutputFormatRequest(format);
211 } 213 }
212 214
213 } // namespace webrtc 215 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698