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