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 | 4 |
5 #include "media/cast/cast_receiver_impl.h" | 5 #include "media/cast/cast_receiver_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 virtual void GetRawVideoFrame(const VideoFrameDecodedCallback& callback) | 27 virtual void GetRawVideoFrame(const VideoFrameDecodedCallback& callback) |
28 OVERRIDE { | 28 OVERRIDE { |
29 cast_environment_->PostTask(CastEnvironment::MAIN, | 29 cast_environment_->PostTask(CastEnvironment::MAIN, |
30 FROM_HERE, | 30 FROM_HERE, |
31 base::Bind(&VideoReceiver::GetRawVideoFrame, | 31 base::Bind(&VideoReceiver::GetRawVideoFrame, |
32 video_receiver_->AsWeakPtr(), | 32 video_receiver_->AsWeakPtr(), |
33 callback)); | 33 callback)); |
34 } | 34 } |
35 | 35 |
36 virtual void GetEncodedVideoFrame(const VideoFrameEncodedCallback& callback) | 36 virtual void GetEncodedVideoFrame(const FrameEncodedCallback& callback) |
37 OVERRIDE { | 37 OVERRIDE { |
38 cast_environment_->PostTask(CastEnvironment::MAIN, | 38 cast_environment_->PostTask(CastEnvironment::MAIN, |
39 FROM_HERE, | 39 FROM_HERE, |
40 base::Bind(&VideoReceiver::GetEncodedVideoFrame, | 40 base::Bind(&VideoReceiver::GetEncodedVideoFrame, |
41 video_receiver_->AsWeakPtr(), | 41 video_receiver_->AsWeakPtr(), |
42 callback)); | 42 callback)); |
43 } | 43 } |
44 | 44 |
45 virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback) | 45 virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback) |
46 OVERRIDE { | 46 OVERRIDE { |
47 cast_environment_->PostTask(CastEnvironment::MAIN, | 47 cast_environment_->PostTask(CastEnvironment::MAIN, |
48 FROM_HERE, | 48 FROM_HERE, |
49 base::Bind(&AudioReceiver::GetRawAudioFrame, | 49 base::Bind(&AudioReceiver::GetRawAudioFrame, |
50 audio_receiver_->AsWeakPtr(), | 50 audio_receiver_->AsWeakPtr(), |
51 callback)); | 51 callback)); |
52 } | 52 } |
53 | 53 |
54 virtual void GetCodedAudioFrame(const AudioFrameEncodedCallback& callback) | 54 virtual void GetCodedAudioFrame(const FrameEncodedCallback& callback) |
55 OVERRIDE { | 55 OVERRIDE { |
56 cast_environment_->PostTask(CastEnvironment::MAIN, | 56 cast_environment_->PostTask(CastEnvironment::MAIN, |
57 FROM_HERE, | 57 FROM_HERE, |
58 base::Bind(&AudioReceiver::GetEncodedAudioFrame, | 58 base::Bind(&AudioReceiver::GetEncodedAudioFrame, |
59 audio_receiver_->AsWeakPtr(), | 59 audio_receiver_->AsWeakPtr(), |
60 callback)); | 60 callback)); |
61 } | 61 } |
62 | 62 |
63 protected: | 63 protected: |
64 virtual ~LocalFrameReceiver() {} | 64 virtual ~LocalFrameReceiver() {} |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 transport::PacketReceiverCallback CastReceiverImpl::packet_receiver() { | 141 transport::PacketReceiverCallback CastReceiverImpl::packet_receiver() { |
142 return base::Bind(&CastReceiverImpl::ReceivedPacket, base::Unretained(this)); | 142 return base::Bind(&CastReceiverImpl::ReceivedPacket, base::Unretained(this)); |
143 } | 143 } |
144 | 144 |
145 scoped_refptr<FrameReceiver> CastReceiverImpl::frame_receiver() { | 145 scoped_refptr<FrameReceiver> CastReceiverImpl::frame_receiver() { |
146 return frame_receiver_; | 146 return frame_receiver_; |
147 } | 147 } |
148 | 148 |
149 } // namespace cast | 149 } // namespace cast |
150 } // namespace media | 150 } // namespace media |
OLD | NEW |