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 // 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 Loading... |
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_ |
OLD | NEW |