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 <limits> | 14 #include <limits> |
15 #include <map> | 15 #include <map> |
16 #include <string> | 16 #include <string> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/api/call/transport.h" | 19 #include "webrtc/api/call/transport.h" |
20 #include "webrtc/common_types.h" | 20 #include "webrtc/common_types.h" |
21 #include "webrtc/common_video/include/frame_callback.h" | 21 #include "webrtc/common_video/include/frame_callback.h" |
22 #include "webrtc/config.h" | 22 #include "webrtc/config.h" |
23 #include "webrtc/media/base/videosinkinterface.h" | 23 #include "webrtc/media/base/videosinkinterface.h" |
24 #include "webrtc/rtc_base/platform_file.h" | 24 #include "webrtc/rtc_base/platform_file.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
| 28 class RtpPacketSinkInterface; |
28 class VideoDecoder; | 29 class VideoDecoder; |
29 | 30 |
30 class VideoReceiveStream { | 31 class VideoReceiveStream { |
31 public: | 32 public: |
32 // TODO(mflodman) Move all these settings to VideoDecoder and move the | 33 // TODO(mflodman) Move all these settings to VideoDecoder and move the |
33 // declaration to common_types.h. | 34 // declaration to common_types.h. |
34 struct Decoder { | 35 struct Decoder { |
35 std::string ToString() const; | 36 std::string ToString() const; |
36 | 37 |
37 // The actual decoder instance. | 38 // The actual decoder instance. |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // Calling this method will close and finalize any current log. | 215 // Calling this method will close and finalize any current log. |
215 // Giving rtc::kInvalidPlatformFileValue disables logging. | 216 // Giving rtc::kInvalidPlatformFileValue disables logging. |
216 // If a frame to be written would make the log too large the write fails and | 217 // If a frame to be written would make the log too large the write fails and |
217 // the log is closed and finalized. A |byte_limit| of 0 means no limit. | 218 // the log is closed and finalized. A |byte_limit| of 0 means no limit. |
218 virtual void EnableEncodedFrameRecording(rtc::PlatformFile file, | 219 virtual void EnableEncodedFrameRecording(rtc::PlatformFile file, |
219 size_t byte_limit) = 0; | 220 size_t byte_limit) = 0; |
220 inline void DisableEncodedFrameRecording() { | 221 inline void DisableEncodedFrameRecording() { |
221 EnableEncodedFrameRecording(rtc::kInvalidPlatformFileValue, 0); | 222 EnableEncodedFrameRecording(rtc::kInvalidPlatformFileValue, 0); |
222 } | 223 } |
223 | 224 |
| 225 // RtpDemuxer only forwards a given RTP packet to one sink. However, some |
| 226 // sinks, such as FlexFEC, might wish to be informed of all of the packets |
| 227 // a given sink receives (or any set of sinks). They may do so by registering |
| 228 // themselves as secondary sinks. |
| 229 virtual void AddSecondarySink(RtpPacketSinkInterface* sink) = 0; |
| 230 virtual void RemoveSecondarySink(const RtpPacketSinkInterface* sink) = 0; |
| 231 |
224 protected: | 232 protected: |
225 virtual ~VideoReceiveStream() {} | 233 virtual ~VideoReceiveStream() {} |
226 }; | 234 }; |
227 | 235 |
228 } // namespace webrtc | 236 } // namespace webrtc |
229 | 237 |
230 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ | 238 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ |
OLD | NEW |