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 |
11 #ifndef WEBRTC_VIDEO_RECEIVE_STREAM_H_ | 11 #ifndef WEBRTC_VIDEO_RECEIVE_STREAM_H_ |
12 #define WEBRTC_VIDEO_RECEIVE_STREAM_H_ | 12 #define WEBRTC_VIDEO_RECEIVE_STREAM_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/common_types.h" | 18 #include "webrtc/common_types.h" |
19 #include "webrtc/config.h" | 19 #include "webrtc/config.h" |
20 #include "webrtc/frame_callback.h" | 20 #include "webrtc/frame_callback.h" |
| 21 #include "webrtc/stream.h" |
21 #include "webrtc/transport.h" | 22 #include "webrtc/transport.h" |
22 #include "webrtc/video_renderer.h" | 23 #include "webrtc/video_renderer.h" |
23 | 24 |
24 namespace webrtc { | 25 namespace webrtc { |
25 | 26 |
26 namespace newapi { | 27 namespace newapi { |
27 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size | 28 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size |
28 // RTCP mode is described by RFC 5506. | 29 // RTCP mode is described by RFC 5506. |
29 enum RtcpMode { kRtcpCompound, kRtcpReducedSize }; | 30 enum RtcpMode { kRtcpCompound, kRtcpReducedSize }; |
30 } // namespace newapi | 31 } // namespace newapi |
31 | 32 |
32 class VideoDecoder; | 33 class VideoDecoder; |
33 | 34 |
34 class VideoReceiveStream { | 35 class VideoReceiveStream : public ReceiveStream { |
35 public: | 36 public: |
36 // TODO(mflodman) Move all these settings to VideoDecoder and move the | 37 // TODO(mflodman) Move all these settings to VideoDecoder and move the |
37 // declaration to common_types.h. | 38 // declaration to common_types.h. |
38 struct Decoder { | 39 struct Decoder { |
39 std::string ToString() const; | 40 std::string ToString() const; |
40 | 41 |
41 // The actual decoder instance. | 42 // The actual decoder instance. |
42 VideoDecoder* decoder = nullptr; | 43 VideoDecoder* decoder = nullptr; |
43 | 44 |
44 // Received RTP packets with this payload type will be sent to this decoder | 45 // Received RTP packets with this payload type will be sent to this decoder |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Called for each decoded frame. E.g. used when adding effects to the | 159 // Called for each decoded frame. E.g. used when adding effects to the |
159 // decoded | 160 // decoded |
160 // stream. 'nullptr' disables the callback. | 161 // stream. 'nullptr' disables the callback. |
161 I420FrameCallback* pre_render_callback = nullptr; | 162 I420FrameCallback* pre_render_callback = nullptr; |
162 | 163 |
163 // Target delay in milliseconds. A positive value indicates this stream is | 164 // Target delay in milliseconds. A positive value indicates this stream is |
164 // used for streaming instead of a real-time call. | 165 // used for streaming instead of a real-time call. |
165 int target_delay_ms = 0; | 166 int target_delay_ms = 0; |
166 }; | 167 }; |
167 | 168 |
168 virtual void Start() = 0; | |
169 virtual void Stop() = 0; | |
170 | |
171 // TODO(pbos): Add info on currently-received codec to Stats. | 169 // TODO(pbos): Add info on currently-received codec to Stats. |
172 virtual Stats GetStats() const = 0; | 170 virtual Stats GetStats() const = 0; |
173 | |
174 protected: | |
175 virtual ~VideoReceiveStream() {} | |
176 }; | 171 }; |
177 | 172 |
178 } // namespace webrtc | 173 } // namespace webrtc |
179 | 174 |
180 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ | 175 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ |
OLD | NEW |