OLD | NEW |
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 Loading... |
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 |
OLD | NEW |