OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" | 5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 buffer->size.width = size.width(); | 419 buffer->size.width = size.width(); |
420 buffer->size.height = size.height(); | 420 buffer->size.height = size.height(); |
421 buffer->data_size = frame_data_size_; | 421 buffer->data_size = frame_data_size_; |
422 ConvertFromMediaVideoFrame(frame, ppformat, size, buffer->data); | 422 ConvertFromMediaVideoFrame(frame, ppformat, size, buffer->data); |
423 | 423 |
424 SendEnqueueBufferMessageToPlugin(index); | 424 SendEnqueueBufferMessageToPlugin(index); |
425 } | 425 } |
426 | 426 |
427 void PepperMediaStreamVideoTrackHost::GetCurrentSupportedFormats( | 427 void PepperMediaStreamVideoTrackHost::GetCurrentSupportedFormats( |
428 int max_requested_width, int max_requested_height, | 428 int max_requested_width, int max_requested_height, |
| 429 double max_requested_frame_rate, |
429 const VideoCaptureDeviceFormatsCB& callback) { | 430 const VideoCaptureDeviceFormatsCB& callback) { |
430 if (type_ != kWrite) { | 431 if (type_ != kWrite) { |
431 DVLOG(1) << "GetCurrentSupportedFormats is only supported in output mode."; | 432 DVLOG(1) << "GetCurrentSupportedFormats is only supported in output mode."; |
432 callback.Run(media::VideoCaptureFormats()); | 433 callback.Run(media::VideoCaptureFormats()); |
433 return; | 434 return; |
434 } | 435 } |
435 | 436 |
436 media::VideoCaptureFormats formats; | 437 media::VideoCaptureFormats formats; |
437 formats.push_back( | 438 formats.push_back( |
438 media::VideoCaptureFormat(plugin_frame_size_, | 439 media::VideoCaptureFormat(plugin_frame_size_, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 base::Unretained(this)), | 537 base::Unretained(this)), |
537 enabled); | 538 enabled); |
538 } | 539 } |
539 | 540 |
540 void PepperMediaStreamVideoTrackHost::OnTrackStarted( | 541 void PepperMediaStreamVideoTrackHost::OnTrackStarted( |
541 MediaStreamSource* source, bool success) { | 542 MediaStreamSource* source, bool success) { |
542 DVLOG(3) << "OnTrackStarted result: " << success; | 543 DVLOG(3) << "OnTrackStarted result: " << success; |
543 } | 544 } |
544 | 545 |
545 } // namespace content | 546 } // namespace content |
OLD | NEW |