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

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

Issue 109413004: Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 11 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_environment.cc ('k') | media/cast/cast_receiver_impl.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 // 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 10 matching lines...) Expand all
21 } 21 }
22 22
23 namespace media { 23 namespace media {
24 namespace cast { 24 namespace cast {
25 // Callback in which the raw audio frame and play-out time will be returned 25 // Callback in which the raw audio frame and play-out time will be returned
26 // once decoding is complete. 26 // once decoding is complete.
27 typedef base::Callback<void(scoped_ptr<PcmAudioFrame>, const base::TimeTicks&)> 27 typedef base::Callback<void(scoped_ptr<PcmAudioFrame>, const base::TimeTicks&)>
28 AudioFrameDecodedCallback; 28 AudioFrameDecodedCallback;
29 29
30 // Callback in which the encoded audio frame and play-out time will be returned. 30 // Callback in which the encoded audio frame and play-out time will be returned.
31 typedef base::Callback<void(scoped_ptr<EncodedAudioFrame>, 31 typedef base::Callback<void(scoped_ptr<transport::EncodedAudioFrame>,
32 const base::TimeTicks&)> AudioFrameEncodedCallback; 32 const base::TimeTicks&)> AudioFrameEncodedCallback;
33 33
34 // Callback in which the raw frame and render time will be returned once 34 // Callback in which the raw frame and render time will be returned once
35 // decoding is complete. 35 // decoding is complete.
36 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame, 36 typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
37 const base::TimeTicks&)> 37 const base::TimeTicks&)>
38 VideoFrameDecodedCallback; 38 VideoFrameDecodedCallback;
39 39
40 // Callback in which the encoded video frame and render time will be returned. 40 // Callback in which the encoded video frame and render time will be returned.
41 typedef base::Callback<void(scoped_ptr<EncodedVideoFrame>, 41 typedef base::Callback<void(scoped_ptr<transport::EncodedVideoFrame>,
42 const base::TimeTicks&)> VideoFrameEncodedCallback; 42 const base::TimeTicks&)> VideoFrameEncodedCallback;
43 43
44 // This Class is thread safe. 44 // This Class is thread safe.
45 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> { 45 class FrameReceiver : public base::RefCountedThreadSafe<FrameReceiver> {
46 public: 46 public:
47 virtual void GetRawAudioFrame(int number_of_10ms_blocks, 47 virtual void GetRawAudioFrame(int number_of_10ms_blocks,
48 int desired_frequency, 48 int desired_frequency,
49 const AudioFrameDecodedCallback& callback) = 0; 49 const AudioFrameDecodedCallback& callback) = 0;
50 50
51 virtual void GetCodedAudioFrame( 51 virtual void GetCodedAudioFrame(
(...skipping 15 matching lines...) Expand all
67 class CastReceiver { 67 class CastReceiver {
68 public: 68 public:
69 static CastReceiver* CreateCastReceiver( 69 static CastReceiver* CreateCastReceiver(
70 scoped_refptr<CastEnvironment> cast_environment, 70 scoped_refptr<CastEnvironment> cast_environment,
71 const AudioReceiverConfig& audio_config, 71 const AudioReceiverConfig& audio_config,
72 const VideoReceiverConfig& video_config, 72 const VideoReceiverConfig& video_config,
73 PacketSender* const packet_sender); 73 PacketSender* const packet_sender);
74 74
75 // All received RTP and RTCP packets for the call should be inserted to this 75 // All received RTP and RTCP packets for the call should be inserted to this
76 // PacketReceiver. 76 // PacketReceiver.
77 virtual scoped_refptr<PacketReceiver> packet_receiver() = 0; 77 virtual scoped_refptr<transport::PacketReceiver> packet_receiver() = 0;
78 78
79 // Polling interface to get audio and video frames from the CastReceiver. 79 // Polling interface to get audio and video frames from the CastReceiver.
80 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0; 80 virtual scoped_refptr<FrameReceiver> frame_receiver() = 0;
81 81
82 virtual ~CastReceiver() {} 82 virtual ~CastReceiver() {}
83 }; 83 };
84 84
85 } // namespace cast 85 } // namespace cast
86 } // namespace media 86 } // namespace media
87 87
88 #endif // MEDIA_CAST_CAST_RECEIVER_H_ 88 #endif // MEDIA_CAST_CAST_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/cast_environment.cc ('k') | media/cast/cast_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698