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

Side by Side Diff: media/cast/cast_receiver.h

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_defines.h ('k') | media/cast/cast_receiver_impl.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 // This is the main interface for the cast receiver. All configuration are done 5 // This is the main interface for the cast receiver. All configuration are done
6 // at creation. 6 // at creation.
7 7
8 #ifndef MEDIA_CAST_CAST_RECEIVER_H_ 8 #ifndef MEDIA_CAST_CAST_RECEIVER_H_
9 #define MEDIA_CAST_CAST_RECEIVER_H_ 9 #define MEDIA_CAST_CAST_RECEIVER_H_
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 protected: 61 protected:
62 virtual ~FrameReceiver() {} 62 virtual ~FrameReceiver() {}
63 63
64 private: 64 private:
65 friend class base::RefCountedThreadSafe<FrameReceiver>; 65 friend class base::RefCountedThreadSafe<FrameReceiver>;
66 }; 66 };
67 67
68 // This Class is thread safe. 68 // This Class is thread safe.
69 class CastReceiver { 69 class CastReceiver {
70 public: 70 public:
71 static CastReceiver* CreateCastReceiver( 71 static scoped_ptr<CastReceiver> Create(
72 scoped_refptr<CastEnvironment> cast_environment, 72 scoped_refptr<CastEnvironment> cast_environment,
73 const AudioReceiverConfig& audio_config, 73 const AudioReceiverConfig& audio_config,
74 const VideoReceiverConfig& video_config, 74 const VideoReceiverConfig& video_config,
75 transport::PacketSender* const packet_sender); 75 transport::PacketSender* const packet_sender);
76 76
77 // All received RTP and RTCP packets for the call should be sent to this 77 // All received RTP and RTCP packets for the call should be sent to this
78 // PacketReceiver. Can be called from any function. 78 // PacketReceiver. Can be called from any function.
79 // TODO(hubbe): Replace with: 79 // TODO(hubbe): Replace with:
80 // virtual void ReceivePacket(scoped_ptr<Packet> packet) = 0; 80 // virtual void ReceivePacket(scoped_ptr<Packet> packet) = 0;
81 virtual transport::PacketReceiverCallback packet_receiver() = 0; 81 virtual transport::PacketReceiverCallback packet_receiver() = 0;
82 82
83 // Polling interface to get audio and video frames from the CastReceiver. 83 // Polling interface to get audio and video frames from the CastReceiver.
84 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0; 84 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0;
85 85
86 virtual ~CastReceiver() {} 86 virtual ~CastReceiver() {}
87 }; 87 };
88 88
89 } // namespace cast 89 } // namespace cast
90 } // namespace media 90 } // namespace media
91 91
92 #endif // MEDIA_CAST_CAST_RECEIVER_H_ 92 #endif // MEDIA_CAST_CAST_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/cast_defines.h ('k') | media/cast/cast_receiver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698