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

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

Issue 1178643006: VideoCapturerAndroid: Add possibility to request a new resolution from the video adapter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added log message Created 5 years, 6 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 void AndroidVideoCapturer::OnIncomingFrame(void* frame_data, 236 void AndroidVideoCapturer::OnIncomingFrame(void* frame_data,
237 int length, 237 int length,
238 int rotation, 238 int rotation,
239 int64 time_stamp) { 239 int64 time_stamp) {
240 CHECK(thread_checker_.CalledOnValidThread()); 240 CHECK(thread_checker_.CalledOnValidThread());
241 frame_factory_->UpdateCapturedFrame(frame_data, length, rotation, time_stamp); 241 frame_factory_->UpdateCapturedFrame(frame_data, length, rotation, time_stamp);
242 SignalFrameCaptured(this, frame_factory_->GetCapturedFrame()); 242 SignalFrameCaptured(this, frame_factory_->GetCapturedFrame());
243 } 243 }
244 244
245 void AndroidVideoCapturer::OnOutputFormatRequest(
246 int width, int height, int fps) {
247 CHECK(thread_checker_.CalledOnValidThread());
248 const cricket::VideoFormat& current = video_adapter()->output_format();
249 cricket::VideoFormat format(
250 width, height, cricket::VideoFormat::FpsToInterval(fps), current.fourcc);
251 video_adapter()->OnOutputFormatRequest(format);
252 }
253
245 } // namespace webrtc 254 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/androidvideocapturer.h ('k') | talk/app/webrtc/java/jni/androidvideocapturer_jni.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698