OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "media/cast/cast_sender_impl.h" | 4 #include "media/cast/cast_sender_impl.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... | |
27 LocalFrameInput(scoped_refptr<CastEnvironment> cast_environment, | 27 LocalFrameInput(scoped_refptr<CastEnvironment> cast_environment, |
28 base::WeakPtr<AudioSender> audio_sender, | 28 base::WeakPtr<AudioSender> audio_sender, |
29 base::WeakPtr<VideoSender> video_sender) | 29 base::WeakPtr<VideoSender> video_sender) |
30 : cast_environment_(cast_environment), | 30 : cast_environment_(cast_environment), |
31 audio_sender_(audio_sender), | 31 audio_sender_(audio_sender), |
32 video_sender_(video_sender) {} | 32 video_sender_(video_sender) {} |
33 | 33 |
34 virtual void InsertRawVideoFrame(const I420VideoFrame* video_frame, | 34 virtual void InsertRawVideoFrame(const I420VideoFrame* video_frame, |
35 const base::TimeTicks& capture_time, | 35 const base::TimeTicks& capture_time, |
36 const base::Closure callback) OVERRIDE { | 36 const base::Closure callback) OVERRIDE { |
37 cast_environment_->Logging()->InsertFrameEvent(kVideoFrameReceived, | |
38 GetVideoRtpTimestamp(capture_time), -1); | |
Alpha Left Google
2013/11/14 00:29:24
Add a TODO here to replace -1 with something meani
mikhal
2013/11/14 17:42:31
Added a const value for his. The -1 will be a vali
| |
39 | |
37 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, | 40 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, |
38 base::Bind(&VideoSender::InsertRawVideoFrame, video_sender_, | 41 base::Bind(&VideoSender::InsertRawVideoFrame, video_sender_, |
39 video_frame, capture_time, callback)); | 42 video_frame, capture_time, callback)); |
40 } | 43 } |
41 | 44 |
42 virtual void InsertCodedVideoFrame(const EncodedVideoFrame* video_frame, | 45 virtual void InsertCodedVideoFrame(const EncodedVideoFrame* video_frame, |
43 const base::TimeTicks& capture_time, | 46 const base::TimeTicks& capture_time, |
44 const base::Closure callback) OVERRIDE { | 47 const base::Closure callback) OVERRIDE { |
45 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, | 48 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, |
46 base::Bind(&VideoSender::InsertCodedVideoFrame, video_sender_, | 49 base::Bind(&VideoSender::InsertCodedVideoFrame, video_sender_, |
47 video_frame, capture_time, callback)); | 50 video_frame, capture_time, callback)); |
48 } | 51 } |
49 | 52 |
50 virtual void InsertAudio(const AudioBus* audio_bus, | 53 virtual void InsertAudio(const AudioBus* audio_bus, |
51 const base::TimeTicks& recorded_time, | 54 const base::TimeTicks& recorded_time, |
52 const base::Closure& done_callback) OVERRIDE { | 55 const base::Closure& done_callback) OVERRIDE { |
56 cast_environment_->Logging()->InsertFrameEvent(kAudioFrameReceived, | |
57 GetVideoRtpTimestamp(recorded_time), -1); | |
Alpha Left Google
2013/11/14 00:29:24
Add a TODO here to replace -1 with something meani
mikhal
2013/11/14 17:42:31
Same as above
On 2013/11/14 00:29:24, Alpha wrote:
| |
53 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, | 58 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, |
54 base::Bind(&AudioSender::InsertAudio, audio_sender_, | 59 base::Bind(&AudioSender::InsertAudio, audio_sender_, |
55 audio_bus, recorded_time, done_callback)); | 60 audio_bus, recorded_time, done_callback)); |
56 } | 61 } |
57 | 62 |
58 virtual void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, | 63 virtual void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, |
59 const base::TimeTicks& recorded_time, | 64 const base::TimeTicks& recorded_time, |
60 const base::Closure callback) OVERRIDE { | 65 const base::Closure callback) OVERRIDE { |
61 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, | 66 cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, |
62 base::Bind(&AudioSender::InsertCodedAudioFrame, audio_sender_, | 67 base::Bind(&AudioSender::InsertCodedAudioFrame, audio_sender_, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 scoped_refptr<FrameInput> CastSenderImpl::frame_input() { | 197 scoped_refptr<FrameInput> CastSenderImpl::frame_input() { |
193 return frame_input_; | 198 return frame_input_; |
194 } | 199 } |
195 | 200 |
196 scoped_refptr<PacketReceiver> CastSenderImpl::packet_receiver() { | 201 scoped_refptr<PacketReceiver> CastSenderImpl::packet_receiver() { |
197 return packet_receiver_; | 202 return packet_receiver_; |
198 } | 203 } |
199 | 204 |
200 } // namespace cast | 205 } // namespace cast |
201 } // namespace media | 206 } // namespace media |
OLD | NEW |