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

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

Issue 163553006: Cast: Refactoring Cast API's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/cast_sender.h » ('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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 virtual ~LocalFrameReceiver() {} 75 virtual ~LocalFrameReceiver() {}
76 76
77 private: 77 private:
78 friend class base::RefCountedThreadSafe<LocalFrameReceiver>; 78 friend class base::RefCountedThreadSafe<LocalFrameReceiver>;
79 79
80 scoped_refptr<CastEnvironment> cast_environment_; 80 scoped_refptr<CastEnvironment> cast_environment_;
81 AudioReceiver* audio_receiver_; 81 AudioReceiver* audio_receiver_;
82 VideoReceiver* video_receiver_; 82 VideoReceiver* video_receiver_;
83 }; 83 };
84 84
85 CastReceiver* CastReceiver::CreateCastReceiver( 85 scoped_ptr<CastReceiver> CastReceiver::Create(
86 scoped_refptr<CastEnvironment> cast_environment, 86 scoped_refptr<CastEnvironment> cast_environment,
87 const AudioReceiverConfig& audio_config, 87 const AudioReceiverConfig& audio_config,
88 const VideoReceiverConfig& video_config, 88 const VideoReceiverConfig& video_config,
89 transport::PacketSender* const packet_sender) { 89 transport::PacketSender* const packet_sender) {
90 return new CastReceiverImpl( 90 return scoped_ptr<CastReceiver>(new CastReceiverImpl(
91 cast_environment, audio_config, video_config, packet_sender); 91 cast_environment, audio_config, video_config, packet_sender));
92 } 92 }
93 93
94 CastReceiverImpl::CastReceiverImpl( 94 CastReceiverImpl::CastReceiverImpl(
95 scoped_refptr<CastEnvironment> cast_environment, 95 scoped_refptr<CastEnvironment> cast_environment,
96 const AudioReceiverConfig& audio_config, 96 const AudioReceiverConfig& audio_config,
97 const VideoReceiverConfig& video_config, 97 const VideoReceiverConfig& video_config,
98 transport::PacketSender* const packet_sender) 98 transport::PacketSender* const packet_sender)
99 : pacer_(cast_environment->Clock(), 99 : pacer_(cast_environment->Clock(),
100 packet_sender, 100 packet_sender,
101 cast_environment->GetTaskRunner(CastEnvironment::TRANSPORT)), 101 cast_environment->GetTaskRunner(CastEnvironment::TRANSPORT)),
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 transport::PacketReceiverCallback CastReceiverImpl::packet_receiver() { 149 transport::PacketReceiverCallback CastReceiverImpl::packet_receiver() {
150 return base::Bind(&CastReceiverImpl::ReceivedPacket, base::Unretained(this)); 150 return base::Bind(&CastReceiverImpl::ReceivedPacket, base::Unretained(this));
151 } 151 }
152 152
153 scoped_refptr<FrameReceiver> CastReceiverImpl::frame_receiver() { 153 scoped_refptr<FrameReceiver> CastReceiverImpl::frame_receiver() {
154 return frame_receiver_; 154 return frame_receiver_;
155 } 155 }
156 156
157 } // namespace cast 157 } // namespace cast
158 } // namespace media 158 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast_receiver.h ('k') | media/cast/cast_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698