OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ |
12 #define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ | 12 #define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/api/video/video_frame.h" | 17 #include "webrtc/api/video/video_frame.h" |
18 #include "webrtc/modules/include/module_common_types.h" | 18 #include "webrtc/modules/include/module_common_types.h" |
19 #include "webrtc/typedefs.h" | 19 #include "webrtc/typedefs.h" |
20 // For EncodedImage | 20 // For EncodedImage |
21 #include "webrtc/video_frame.h" | 21 #include "webrtc/video_frame.h" |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 | 24 |
25 // Error codes | 25 // Error codes |
26 #define VCM_FRAME_NOT_READY 3 | 26 #define VCM_FRAME_NOT_READY 3 |
27 #define VCM_REQUEST_SLI 2 | |
28 #define VCM_MISSING_CALLBACK 1 | 27 #define VCM_MISSING_CALLBACK 1 |
29 #define VCM_OK 0 | 28 #define VCM_OK 0 |
30 #define VCM_GENERAL_ERROR -1 | 29 #define VCM_GENERAL_ERROR -1 |
31 #define VCM_LEVEL_EXCEEDED -2 | 30 #define VCM_LEVEL_EXCEEDED -2 |
32 #define VCM_MEMORY -3 | 31 #define VCM_MEMORY -3 |
33 #define VCM_PARAMETER_ERROR -4 | 32 #define VCM_PARAMETER_ERROR -4 |
34 #define VCM_UNKNOWN_PAYLOAD -5 | 33 #define VCM_UNKNOWN_PAYLOAD -5 |
35 #define VCM_CODEC_ERROR -6 | 34 #define VCM_CODEC_ERROR -6 |
36 #define VCM_UNINITIALIZED -7 | 35 #define VCM_UNINITIALIZED -7 |
37 #define VCM_NO_CODEC_REGISTERED -8 | 36 #define VCM_NO_CODEC_REGISTERED -8 |
38 #define VCM_JITTER_BUFFER_ERROR -9 | 37 #define VCM_JITTER_BUFFER_ERROR -9 |
39 #define VCM_OLD_PACKET_ERROR -10 | 38 #define VCM_OLD_PACKET_ERROR -10 |
40 #define VCM_NO_FRAME_DECODED -11 | 39 #define VCM_NO_FRAME_DECODED -11 |
41 #define VCM_ERROR_REQUEST_SLI -12 | |
42 #define VCM_NOT_IMPLEMENTED -20 | 40 #define VCM_NOT_IMPLEMENTED -20 |
43 | 41 |
44 enum { kDefaultStartBitrateKbps = 300 }; | 42 enum { kDefaultStartBitrateKbps = 300 }; |
45 | 43 |
46 enum VCMVideoProtection { | 44 enum VCMVideoProtection { |
47 kProtectionNone, | 45 kProtectionNone, |
48 kProtectionNack, | 46 kProtectionNack, |
49 kProtectionFEC, | 47 kProtectionFEC, |
50 kProtectionNackFEC, | 48 kProtectionNackFEC, |
51 }; | 49 }; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 protected: | 132 protected: |
135 virtual ~VCMProtectionCallback() {} | 133 virtual ~VCMProtectionCallback() {} |
136 }; | 134 }; |
137 | 135 |
138 // Callback class used for telling the user about what frame type needed to | 136 // Callback class used for telling the user about what frame type needed to |
139 // continue decoding. | 137 // continue decoding. |
140 // Typically a key frame when the stream has been corrupted in some way. | 138 // Typically a key frame when the stream has been corrupted in some way. |
141 class VCMFrameTypeCallback { | 139 class VCMFrameTypeCallback { |
142 public: | 140 public: |
143 virtual int32_t RequestKeyFrame() = 0; | 141 virtual int32_t RequestKeyFrame() = 0; |
144 virtual int32_t SliceLossIndicationRequest(const uint64_t pictureId) { | |
145 return -1; | |
146 } | |
147 | 142 |
148 protected: | 143 protected: |
149 virtual ~VCMFrameTypeCallback() {} | 144 virtual ~VCMFrameTypeCallback() {} |
150 }; | 145 }; |
151 | 146 |
152 // Callback class used for telling the user about which packet sequence numbers | 147 // Callback class used for telling the user about which packet sequence numbers |
153 // are currently | 148 // are currently |
154 // missing and need to be resent. | 149 // missing and need to be resent. |
155 // TODO(philipel): Deprecate VCMPacketRequestCallback | 150 // TODO(philipel): Deprecate VCMPacketRequestCallback |
156 // and use NackSender instead. | 151 // and use NackSender instead. |
(...skipping 18 matching lines...) Expand all Loading... |
175 public: | 170 public: |
176 virtual void RequestKeyFrame() = 0; | 171 virtual void RequestKeyFrame() = 0; |
177 | 172 |
178 protected: | 173 protected: |
179 virtual ~KeyFrameRequestSender() {} | 174 virtual ~KeyFrameRequestSender() {} |
180 }; | 175 }; |
181 | 176 |
182 } // namespace webrtc | 177 } // namespace webrtc |
183 | 178 |
184 #endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ | 179 #endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ |
OLD | NEW |