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 <vector> | |
15 | |
16 #include "webrtc/modules/include/module_common_types.h" | 14 #include "webrtc/modules/include/module_common_types.h" |
17 #include "webrtc/typedefs.h" | 15 #include "webrtc/typedefs.h" |
18 #include "webrtc/video_frame.h" | 16 #include "webrtc/video_frame.h" |
19 | 17 |
20 namespace webrtc { | 18 namespace webrtc { |
21 | 19 |
22 // Error codes | 20 // Error codes |
23 #define VCM_FRAME_NOT_READY 3 | 21 #define VCM_FRAME_NOT_READY 3 |
24 #define VCM_REQUEST_SLI 2 | 22 #define VCM_REQUEST_SLI 2 |
25 #define VCM_MISSING_CALLBACK 1 | 23 #define VCM_MISSING_CALLBACK 1 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 return -1; | 153 return -1; |
156 } | 154 } |
157 | 155 |
158 protected: | 156 protected: |
159 virtual ~VCMFrameTypeCallback() {} | 157 virtual ~VCMFrameTypeCallback() {} |
160 }; | 158 }; |
161 | 159 |
162 // Callback class used for telling the user about which packet sequence numbers | 160 // Callback class used for telling the user about which packet sequence numbers |
163 // are currently | 161 // are currently |
164 // missing and need to be resent. | 162 // missing and need to be resent. |
165 // TODO(philipel): Deprecate VCMPacketRequestCallback | |
166 // and use NackSender instead. | |
167 class VCMPacketRequestCallback { | 163 class VCMPacketRequestCallback { |
168 public: | 164 public: |
169 virtual int32_t ResendPackets(const uint16_t* sequenceNumbers, | 165 virtual int32_t ResendPackets(const uint16_t* sequenceNumbers, |
170 uint16_t length) = 0; | 166 uint16_t length) = 0; |
171 | 167 |
172 protected: | 168 protected: |
173 virtual ~VCMPacketRequestCallback() {} | 169 virtual ~VCMPacketRequestCallback() {} |
174 }; | 170 }; |
175 | 171 |
176 class NackSender { | |
177 public: | |
178 virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0; | |
179 | |
180 protected: | |
181 virtual ~NackSender() {} | |
182 }; | |
183 | |
184 class KeyFrameRequestSender { | |
185 public: | |
186 virtual void RequestKeyFrame() = 0; | |
187 | |
188 protected: | |
189 virtual ~KeyFrameRequestSender() {} | |
190 }; | |
191 | |
192 // Callback used to inform the user of the the desired resolution | 172 // Callback used to inform the user of the the desired resolution |
193 // as subscribed by Media Optimization (Quality Modes) | 173 // as subscribed by Media Optimization (Quality Modes) |
194 class VCMQMSettingsCallback { | 174 class VCMQMSettingsCallback { |
195 public: | 175 public: |
196 virtual int32_t SetVideoQMSettings(const uint32_t frameRate, | 176 virtual int32_t SetVideoQMSettings(const uint32_t frameRate, |
197 const uint32_t width, | 177 const uint32_t width, |
198 const uint32_t height) = 0; | 178 const uint32_t height) = 0; |
199 | 179 |
200 virtual void SetTargetFramerate(int frame_rate) = 0; | 180 virtual void SetTargetFramerate(int frame_rate) = 0; |
201 | 181 |
202 protected: | 182 protected: |
203 virtual ~VCMQMSettingsCallback() {} | 183 virtual ~VCMQMSettingsCallback() {} |
204 }; | 184 }; |
205 | 185 |
206 // Callback class used for telling the user about the size (in time) of the | 186 // Callback class used for telling the user about the size (in time) of the |
207 // render buffer, that is the size in time of the complete continuous frames. | 187 // render buffer, that is the size in time of the complete continuous frames. |
208 class VCMRenderBufferSizeCallback { | 188 class VCMRenderBufferSizeCallback { |
209 public: | 189 public: |
210 virtual void RenderBufferSizeMs(int buffer_size_ms) = 0; | 190 virtual void RenderBufferSizeMs(int buffer_size_ms) = 0; |
211 | 191 |
212 protected: | 192 protected: |
213 virtual ~VCMRenderBufferSizeCallback() {} | 193 virtual ~VCMRenderBufferSizeCallback() {} |
214 }; | 194 }; |
215 | 195 |
216 } // namespace webrtc | 196 } // namespace webrtc |
217 | 197 |
218 #endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ | 198 #endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_DEFINES_H_ |
OLD | NEW |