Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Side by Side Diff: media/cast/cast_receiver_impl.cc

Issue 214273003: [Cast] Remove AudioDecoder's dependency on WebRTC, and refactor/clean-up AudioReceiver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One moar Windows compile fix. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/cast_receiver.h ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 virtual void GetEncodedVideoFrame(const VideoFrameEncodedCallback& callback) 43 virtual void GetEncodedVideoFrame(const VideoFrameEncodedCallback& callback)
44 OVERRIDE { 44 OVERRIDE {
45 cast_environment_->PostTask(CastEnvironment::MAIN, 45 cast_environment_->PostTask(CastEnvironment::MAIN,
46 FROM_HERE, 46 FROM_HERE,
47 base::Bind(&VideoReceiver::GetEncodedVideoFrame, 47 base::Bind(&VideoReceiver::GetEncodedVideoFrame,
48 video_receiver_->AsWeakPtr(), 48 video_receiver_->AsWeakPtr(),
49 callback)); 49 callback));
50 } 50 }
51 51
52 virtual void GetRawAudioFrame(int number_of_10ms_blocks, 52 virtual void GetRawAudioFrame(const AudioFrameDecodedCallback& callback)
53 int desired_frequency,
54 const AudioFrameDecodedCallback& callback)
55 OVERRIDE { 53 OVERRIDE {
56 cast_environment_->PostTask(CastEnvironment::MAIN, 54 cast_environment_->PostTask(CastEnvironment::MAIN,
57 FROM_HERE, 55 FROM_HERE,
58 base::Bind(&AudioReceiver::GetRawAudioFrame, 56 base::Bind(&AudioReceiver::GetRawAudioFrame,
59 audio_receiver_->AsWeakPtr(), 57 audio_receiver_->AsWeakPtr(),
60 number_of_10ms_blocks,
61 desired_frequency,
62 callback)); 58 callback));
63 } 59 }
64 60
65 virtual void GetCodedAudioFrame(const AudioFrameEncodedCallback& callback) 61 virtual void GetCodedAudioFrame(const AudioFrameEncodedCallback& callback)
66 OVERRIDE { 62 OVERRIDE {
67 cast_environment_->PostTask(CastEnvironment::MAIN, 63 cast_environment_->PostTask(CastEnvironment::MAIN,
68 FROM_HERE, 64 FROM_HERE,
69 base::Bind(&AudioReceiver::GetEncodedAudioFrame, 65 base::Bind(&AudioReceiver::GetEncodedAudioFrame,
70 audio_receiver_->AsWeakPtr(), 66 audio_receiver_->AsWeakPtr(),
71 callback)); 67 callback));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 transport::PacketReceiverCallback CastReceiverImpl::packet_receiver() { 154 transport::PacketReceiverCallback CastReceiverImpl::packet_receiver() {
159 return base::Bind(&CastReceiverImpl::ReceivedPacket, base::Unretained(this)); 155 return base::Bind(&CastReceiverImpl::ReceivedPacket, base::Unretained(this));
160 } 156 }
161 157
162 scoped_refptr<FrameReceiver> CastReceiverImpl::frame_receiver() { 158 scoped_refptr<FrameReceiver> CastReceiverImpl::frame_receiver() {
163 return frame_receiver_; 159 return frame_receiver_;
164 } 160 }
165 161
166 } // namespace cast 162 } // namespace cast
167 } // namespace media 163 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast_receiver.h ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698