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 sender. | 5 // This is the main interface for the cast sender. |
6 // | 6 // |
7 // The AudioFrameInput, VideoFrameInput and PacketReciever interfaces should | 7 // The AudioFrameInput, VideoFrameInput and PacketReciever interfaces should |
8 // be accessed from the main thread. | 8 // be accessed from the main thread. |
9 | 9 |
10 #ifndef MEDIA_CAST_CAST_SENDER_H_ | 10 #ifndef MEDIA_CAST_CAST_SENDER_H_ |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 virtual ~CastSender() {} | 81 virtual ~CastSender() {} |
82 | 82 |
83 // All video frames for the session should be inserted to this object. | 83 // All video frames for the session should be inserted to this object. |
84 virtual scoped_refptr<VideoFrameInput> video_frame_input() = 0; | 84 virtual scoped_refptr<VideoFrameInput> video_frame_input() = 0; |
85 | 85 |
86 // All audio frames for the session should be inserted to this object. | 86 // All audio frames for the session should be inserted to this object. |
87 virtual scoped_refptr<AudioFrameInput> audio_frame_input() = 0; | 87 virtual scoped_refptr<AudioFrameInput> audio_frame_input() = 0; |
88 | 88 |
89 // Initialize the audio stack. Must be called in order to send audio frames. | 89 // Initialize the audio stack. Must be called in order to send audio frames. |
90 // Status of the initialization will be returned on cast_initialization_cb. | 90 // |status_change_cb| will be run as operational status changes. |
91 virtual void InitializeAudio( | 91 virtual void InitializeAudio( |
92 const AudioSenderConfig& audio_config, | 92 const AudioSenderConfig& audio_config, |
93 const CastInitializationCallback& cast_initialization_cb) = 0; | 93 const StatusChangeCallback& status_change_cb) = 0; |
94 | 94 |
95 // Initialize the video stack. Must be called in order to send video frames. | 95 // Initialize the video stack. Must be called in order to send video frames. |
96 // Status of the initialization will be returned on cast_initialization_cb. | 96 // |status_change_cb| will be run as operational status changes. |
| 97 // |
| 98 // TODO(miu): Remove the VEA-specific callbacks. http://crbug.com/454029 |
97 virtual void InitializeVideo( | 99 virtual void InitializeVideo( |
98 const VideoSenderConfig& video_config, | 100 const VideoSenderConfig& video_config, |
99 const CastInitializationCallback& cast_initialization_cb, | 101 const StatusChangeCallback& status_change_cb, |
100 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, | 102 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, |
101 const CreateVideoEncodeMemoryCallback& create_video_encode_mem_cb) = 0; | 103 const CreateVideoEncodeMemoryCallback& create_video_encode_mem_cb) = 0; |
102 | 104 |
103 // Change the target delay. This is only valid if the receiver | 105 // Change the target delay. This is only valid if the receiver |
104 // supports the "adaptive_target_delay" rtp extension. | 106 // supports the "adaptive_target_delay" rtp extension. |
105 virtual void SetTargetPlayoutDelay( | 107 virtual void SetTargetPlayoutDelay( |
106 base::TimeDelta new_target_playout_delay) = 0; | 108 base::TimeDelta new_target_playout_delay) = 0; |
107 }; | 109 }; |
108 | 110 |
109 } // namespace cast | 111 } // namespace cast |
110 } // namespace media | 112 } // namespace media |
111 | 113 |
112 #endif // MEDIA_CAST_CAST_SENDER_H_ | 114 #endif // MEDIA_CAST_CAST_SENDER_H_ |
OLD | NEW |