| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 media::VideoCaptureFormats formats; | 436 media::VideoCaptureFormats formats; |
| 437 formats.push_back( | 437 formats.push_back( |
| 438 media::VideoCaptureFormat(plugin_frame_size_, | 438 media::VideoCaptureFormat(plugin_frame_size_, |
| 439 kDefaultOutputFrameRate, | 439 kDefaultOutputFrameRate, |
| 440 ToPixelFormat(plugin_frame_format_))); | 440 ToPixelFormat(plugin_frame_format_))); |
| 441 callback.Run(formats); | 441 callback.Run(formats); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void PepperMediaStreamVideoTrackHost::StartSourceImpl( | 444 void PepperMediaStreamVideoTrackHost::StartSourceImpl( |
| 445 const media::VideoCaptureParams& params, | 445 const media::VideoCaptureFormat& format, |
| 446 const VideoCaptureDeliverFrameCB& frame_callback) { | 446 const VideoCaptureDeliverFrameCB& frame_callback) { |
| 447 output_started_ = true; | 447 output_started_ = true; |
| 448 frame_deliverer_ = new FrameDeliverer(io_message_loop(), frame_callback); | 448 frame_deliverer_ = new FrameDeliverer(io_message_loop(), frame_callback); |
| 449 } | 449 } |
| 450 | 450 |
| 451 void PepperMediaStreamVideoTrackHost::StopSourceImpl() { | 451 void PepperMediaStreamVideoTrackHost::StopSourceImpl() { |
| 452 output_started_ = false; | 452 output_started_ = false; |
| 453 frame_deliverer_ = NULL; | 453 frame_deliverer_ = NULL; |
| 454 } | 454 } |
| 455 | 455 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 538 } |
| 539 | 539 |
| 540 void PepperMediaStreamVideoTrackHost::OnTrackStarted( | 540 void PepperMediaStreamVideoTrackHost::OnTrackStarted( |
| 541 MediaStreamSource* source, | 541 MediaStreamSource* source, |
| 542 MediaStreamRequestResult result, | 542 MediaStreamRequestResult result, |
| 543 const blink::WebString& result_name) { | 543 const blink::WebString& result_name) { |
| 544 DVLOG(3) << "OnTrackStarted result: " << result; | 544 DVLOG(3) << "OnTrackStarted result: " << result; |
| 545 } | 545 } |
| 546 | 546 |
| 547 } // namespace content | 547 } // namespace content |
| OLD | NEW |