OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/renderer/media/cast_receiver_session.h" | 5 #include "chrome/renderer/media/cast_receiver_session.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void StartCapture(const media::VideoCaptureParams& params, | 52 void StartCapture(const media::VideoCaptureParams& params, |
53 const VideoCaptureDeliverFrameCB& frame_callback, | 53 const VideoCaptureDeliverFrameCB& frame_callback, |
54 const RunningCallback& running_callback) override; | 54 const RunningCallback& running_callback) override; |
55 void StopCapture() override; | 55 void StopCapture() override; |
56 private: | 56 private: |
57 const scoped_refptr<CastReceiverSession> cast_receiver_session_; | 57 const scoped_refptr<CastReceiverSession> cast_receiver_session_; |
58 }; | 58 }; |
59 | 59 |
60 CastReceiverSession::CastReceiverSession() | 60 CastReceiverSession::CastReceiverSession() |
61 : delegate_(new CastReceiverSessionDelegate()), | 61 : delegate_(new CastReceiverSessionDelegate()), |
62 io_task_runner_( | 62 io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()) {} |
63 content::RenderThread::Get()->GetIOMessageLoopProxy()) {} | |
64 | 63 |
65 CastReceiverSession::~CastReceiverSession() { | 64 CastReceiverSession::~CastReceiverSession() { |
66 // We should always be able to delete the object on the IO thread. | 65 // We should always be able to delete the object on the IO thread. |
67 CHECK(io_task_runner_->DeleteSoon(FROM_HERE, delegate_.release())); | 66 CHECK(io_task_runner_->DeleteSoon(FROM_HERE, delegate_.release())); |
68 } | 67 } |
69 | 68 |
70 void CastReceiverSession::Start( | 69 void CastReceiverSession::Start( |
71 const media::cast::FrameReceiverConfig& audio_config, | 70 const media::cast::FrameReceiverConfig& audio_config, |
72 const media::cast::FrameReceiverConfig& video_config, | 71 const media::cast::FrameReceiverConfig& video_config, |
73 const net::IPEndPoint& local_endpoint, | 72 const net::IPEndPoint& local_endpoint, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 184 } |
186 | 185 |
187 void CastReceiverSession::AudioCapturerSource::SetVolume(double volume) { | 186 void CastReceiverSession::AudioCapturerSource::SetVolume(double volume) { |
188 // not supported | 187 // not supported |
189 } | 188 } |
190 | 189 |
191 void CastReceiverSession::AudioCapturerSource::SetAutomaticGainControl( | 190 void CastReceiverSession::AudioCapturerSource::SetAutomaticGainControl( |
192 bool enable) { | 191 bool enable) { |
193 // not supported | 192 // not supported |
194 } | 193 } |
OLD | NEW |