| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 std::string c_name; | 86 std::string c_name; |
| 87 StreamDataCounters rtp_stats; | 87 StreamDataCounters rtp_stats; |
| 88 RtcpPacketTypeCounter rtcp_packet_type_counts; | 88 RtcpPacketTypeCounter rtcp_packet_type_counts; |
| 89 RtcpStatistics rtcp_stats; | 89 RtcpStatistics rtcp_stats; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 struct Config { | 92 struct Config { |
| 93 Config() | 93 Config() |
| 94 : renderer(NULL), | 94 : renderer(NULL), |
| 95 render_delay_ms(10), | 95 render_delay_ms(10), |
| 96 audio_channel_id(-1), | |
| 97 pre_decode_callback(NULL), | 96 pre_decode_callback(NULL), |
| 98 pre_render_callback(NULL), | 97 pre_render_callback(NULL), |
| 99 target_delay_ms(0) {} | 98 target_delay_ms(0) {} |
| 100 std::string ToString() const; | 99 std::string ToString() const; |
| 101 | 100 |
| 102 // Decoders for every payload that we can receive. | 101 // Decoders for every payload that we can receive. |
| 103 std::vector<Decoder> decoders; | 102 std::vector<Decoder> decoders; |
| 104 | 103 |
| 105 // Receive-stream specific RTP settings. | 104 // Receive-stream specific RTP settings. |
| 106 struct Rtp { | 105 struct Rtp { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 158 |
| 160 // VideoRenderer will be called for each decoded frame. 'NULL' disables | 159 // VideoRenderer will be called for each decoded frame. 'NULL' disables |
| 161 // rendering of this stream. | 160 // rendering of this stream. |
| 162 VideoRenderer* renderer; | 161 VideoRenderer* renderer; |
| 163 | 162 |
| 164 // Expected delay needed by the renderer, i.e. the frame will be delivered | 163 // Expected delay needed by the renderer, i.e. the frame will be delivered |
| 165 // this many milliseconds, if possible, earlier than the ideal render time. | 164 // this many milliseconds, if possible, earlier than the ideal render time. |
| 166 // Only valid if 'renderer' is set. | 165 // Only valid if 'renderer' is set. |
| 167 int render_delay_ms; | 166 int render_delay_ms; |
| 168 | 167 |
| 169 // Audio channel corresponding to this video stream, used for audio/video | 168 // Identifier for an A/V synchronization group. Empty string to disable. |
| 170 // synchronization. 'audio_channel_id' is ignored if no VoiceEngine is set | 169 // TODO(pbos): Synchronize streams in a sync group, not just video streams |
| 171 // when creating the VideoEngine instance. '-1' disables a/v sync. | 170 // to one of the audio streams. |
| 172 int audio_channel_id; | 171 std::string sync_group; |
| 173 | 172 |
| 174 // Called for each incoming video frame, i.e. in encoded state. E.g. used | 173 // Called for each incoming video frame, i.e. in encoded state. E.g. used |
| 175 // when | 174 // when |
| 176 // saving the stream to a file. 'NULL' disables the callback. | 175 // saving the stream to a file. 'NULL' disables the callback. |
| 177 EncodedFrameObserver* pre_decode_callback; | 176 EncodedFrameObserver* pre_decode_callback; |
| 178 | 177 |
| 179 // Called for each decoded frame. E.g. used when adding effects to the | 178 // Called for each decoded frame. E.g. used when adding effects to the |
| 180 // decoded | 179 // decoded |
| 181 // stream. 'NULL' disables the callback. | 180 // stream. 'NULL' disables the callback. |
| 182 I420FrameCallback* pre_render_callback; | 181 I420FrameCallback* pre_render_callback; |
| 183 | 182 |
| 184 // Target delay in milliseconds. A positive value indicates this stream is | 183 // Target delay in milliseconds. A positive value indicates this stream is |
| 185 // used for streaming instead of a real-time call. | 184 // used for streaming instead of a real-time call. |
| 186 int target_delay_ms; | 185 int target_delay_ms; |
| 187 }; | 186 }; |
| 188 | 187 |
| 189 virtual void Start() = 0; | 188 virtual void Start() = 0; |
| 190 virtual void Stop() = 0; | 189 virtual void Stop() = 0; |
| 191 | 190 |
| 192 // TODO(pbos): Add info on currently-received codec to Stats. | 191 // TODO(pbos): Add info on currently-received codec to Stats. |
| 193 virtual Stats GetStats() const = 0; | 192 virtual Stats GetStats() const = 0; |
| 194 | 193 |
| 195 protected: | 194 protected: |
| 196 virtual ~VideoReceiveStream() {} | 195 virtual ~VideoReceiveStream() {} |
| 197 }; | 196 }; |
| 198 | 197 |
| 199 } // namespace webrtc | 198 } // namespace webrtc |
| 200 | 199 |
| 201 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ | 200 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ |
| OLD | NEW |