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 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // NOTE: Must be called on the thread that constructed the VCM instance. | 125 // NOTE: Must be called on the thread that constructed the VCM instance. |
126 // | 126 // |
127 // Input: | 127 // Input: |
128 // - sendCodec : Settings for the codec to be registered. | 128 // - sendCodec : Settings for the codec to be registered. |
129 // - numberOfCores : The number of cores the codec is allowed | 129 // - numberOfCores : The number of cores the codec is allowed |
130 // to use. | 130 // to use. |
131 // - maxPayloadSize : The maximum size each payload is allowed | 131 // - maxPayloadSize : The maximum size each payload is allowed |
132 // to have. Usually MTU - overhead. | 132 // to have. Usually MTU - overhead. |
133 // | 133 // |
134 // Return value : VCM_OK, on success. | 134 // Return value : VCM_OK, on success. |
135 // < 0, on error. | 135 // < 0, on error. |
136 virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec, | 136 virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec, |
137 uint32_t numberOfCores, | 137 uint32_t numberOfCores, |
138 uint32_t maxPayloadSize) = 0; | 138 uint32_t maxPayloadSize) = 0; |
139 | 139 |
140 // Get the current send codec in use. | 140 // Get the current send codec in use. |
141 // | 141 // |
142 // If a codec has not been set yet, the |id| property of the return value | 142 // If a codec has not been set yet, the |id| property of the return value |
143 // will be 0 and |name| empty. | 143 // will be 0 and |name| empty. |
144 // | 144 // |
145 // NOTE: This method intentionally does not hold locks and minimizes data | 145 // NOTE: This method intentionally does not hold locks and minimizes data |
146 // copying. It must be called on the thread where the VCM was constructed. | 146 // copying. It must be called on the thread where the VCM was constructed. |
147 virtual const VideoCodec& GetSendCodec() const = 0; | 147 virtual const VideoCodec& GetSendCodec() const = 0; |
148 | 148 |
149 // DEPRECATED: Use GetSendCodec() instead. | 149 // DEPRECATED: Use GetSendCodec() instead. |
150 // | 150 // |
151 // API to get the current send codec in use. | 151 // API to get the current send codec in use. |
152 // | 152 // |
153 // Input: | 153 // Input: |
154 // - currentSendCodec : Address where the sendCodec will be written. | 154 // - currentSendCodec : Address where the sendCodec will be written. |
155 // | 155 // |
156 // Return value : VCM_OK, on success. | 156 // Return value : VCM_OK, on success. |
157 // < 0, on error. | 157 // < 0, on error. |
158 // | 158 // |
159 // NOTE: The returned codec information is not guaranteed to be current when | 159 // NOTE: The returned codec information is not guaranteed to be current when |
160 // the call returns. This method acquires a lock that is aligned with | 160 // the call returns. This method acquires a lock that is aligned with |
161 // video encoding, so it should be assumed to be allowed to block for | 161 // video encoding, so it should be assumed to be allowed to block for |
162 // several milliseconds. | 162 // several milliseconds. |
163 virtual int32_t SendCodec(VideoCodec* currentSendCodec) const = 0; | 163 virtual int32_t SendCodec(VideoCodec* currentSendCodec) const = 0; |
164 | 164 |
165 // DEPRECATED: Use GetSendCodec() instead. | 165 // DEPRECATED: Use GetSendCodec() instead. |
166 // | 166 // |
167 // API to get the current send codec type | 167 // API to get the current send codec type |
168 // | 168 // |
169 // Return value : Codec type, on success. | 169 // Return value : Codec type, on success. |
170 // kVideoCodecUnknown, on error or if no send codec is s
et | 170 // kVideoCodecUnknown, on error or if no send codec is s
et |
171 // NOTE: Same notes apply as for SendCodec() above. | 171 // NOTE: Same notes apply as for SendCodec() above. |
172 virtual VideoCodecType SendCodec() const = 0; | 172 virtual VideoCodecType SendCodec() const = 0; |
173 | 173 |
174 // Register an external encoder object. This can not be used together with | 174 // Register an external encoder object. This can not be used together with |
175 // external decoder callbacks. | 175 // external decoder callbacks. |
176 // | 176 // |
177 // Input: | 177 // Input: |
178 // - externalEncoder : Encoder object to be used for encoding frames in
serted | 178 // - externalEncoder : Encoder object to be used for encoding frames in
serted |
179 // with the AddVideoFrame API. | 179 // with the AddVideoFrame API. |
180 // - payloadType : The payload type bound which this encoder is bou
nd to. | 180 // - payloadType : The payload type bound which this encoder is bou
nd to. |
181 // | 181 // |
182 // Return value : VCM_OK, on success. | 182 // Return value : VCM_OK, on success. |
183 // < 0, on error. | 183 // < 0, on error. |
184 virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder, | 184 virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder, |
185 uint8_t payloadType, | 185 uint8_t payloadType, |
186 bool internalSource = false) = 0; | 186 bool internalSource = false) = 0; |
187 | 187 |
188 // API to get codec config parameters to be sent out-of-band to a receiver. | 188 // API to get codec config parameters to be sent out-of-band to a receiver. |
189 // | 189 // |
190 // Input: | 190 // Input: |
191 // - buffer : Memory where the codec config parameters should
be written. | 191 // - buffer : Memory where the codec config parameters should
be written. |
192 // - size : Size of the memory available. | 192 // - size : Size of the memory available. |
193 // | 193 // |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 // Sets the parameters describing the receive channel. These parameters are
inputs to the | 226 // Sets the parameters describing the receive channel. These parameters are
inputs to the |
227 // Media Optimization inside the VCM. | 227 // Media Optimization inside the VCM. |
228 // | 228 // |
229 // Input: | 229 // Input: |
230 // - rtt : Current round-trip time in ms. | 230 // - rtt : Current round-trip time in ms. |
231 // with the most amount available bandwidth i
n a conference | 231 // with the most amount available bandwidth i
n a conference |
232 // scenario | 232 // scenario |
233 // | 233 // |
234 // Return value : VCM_OK, on success. | 234 // Return value : VCM_OK, on success. |
235 // < 0, on error. | 235 // < 0, on error. |
236 virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0; | 236 virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0; |
237 | 237 |
238 // Register a transport callback which will be called to deliver the encoded
data and | 238 // Register a transport callback which will be called to deliver the encoded
data and |
239 // side information. | 239 // side information. |
240 // | 240 // |
241 // Input: | 241 // Input: |
242 // - transport : The callback object to register. | 242 // - transport : The callback object to register. |
243 // | 243 // |
244 // Return value : VCM_OK, on success. | 244 // Return value : VCM_OK, on success. |
245 // < 0, on error. | 245 // < 0, on error. |
246 virtual int32_t RegisterTransportCallback(VCMPacketizationCallback* transpor
t) = 0; | 246 virtual int32_t RegisterTransportCallback(VCMPacketizationCallback* transpor
t) = 0; |
247 | 247 |
248 // Register video output information callback which will be called to delive
r information | 248 // Register video output information callback which will be called to delive
r information |
249 // about the video stream produced by the encoder, for instance the average
frame rate and | 249 // about the video stream produced by the encoder, for instance the average
frame rate and |
250 // bit rate. | 250 // bit rate. |
251 // | 251 // |
252 // Input: | 252 // Input: |
253 // - outputInformation : The callback object to register. | 253 // - outputInformation : The callback object to register. |
254 // | 254 // |
255 // Return value : VCM_OK, on success. | 255 // Return value : VCM_OK, on success. |
256 // < 0, on error. | 256 // < 0, on error. |
257 virtual int32_t RegisterSendStatisticsCallback( | 257 virtual int32_t RegisterSendStatisticsCallback( |
258 VCMSendStatisticsCallback* sendStats) = 0; | 258 VCMSendStatisticsCallback* sendStats) = 0; |
259 | 259 |
260 // Register a video protection callback which will be called to deliver | 260 // Register a video protection callback which will be called to deliver |
261 // the requested FEC rate and NACK status (on/off). | 261 // the requested FEC rate and NACK status (on/off). |
262 // | 262 // |
263 // Input: | 263 // Input: |
264 // - protection : The callback object to register. | 264 // - protection : The callback object to register. |
265 // | 265 // |
266 // Return value : VCM_OK, on success. | 266 // Return value : VCM_OK, on success. |
267 // < 0, on error. | 267 // < 0, on error. |
268 virtual int32_t RegisterProtectionCallback(VCMProtectionCallback* protection
) = 0; | 268 virtual int32_t RegisterProtectionCallback(VCMProtectionCallback* protection
) = 0; |
269 | 269 |
270 // Enable or disable a video protection method. | 270 // Enable or disable a video protection method. |
271 // | 271 // |
272 // Input: | 272 // Input: |
273 // - videoProtection : The method to enable or disable. | 273 // - videoProtection : The method to enable or disable. |
274 // - enable : True if the method should be enabled, false if | 274 // - enable : True if the method should be enabled, false if |
275 // it should be disabled. | 275 // it should be disabled. |
276 // | 276 // |
277 // Return value : VCM_OK, on success. | 277 // Return value : VCM_OK, on success. |
278 // < 0, on error. | 278 // < 0, on error. |
279 virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection, | 279 virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection, |
280 bool enable) = 0; | 280 bool enable) = 0; |
281 | 281 |
282 // Add one raw video frame to the encoder. This function does all the necess
ary | 282 // Add one raw video frame to the encoder. This function does all the necess
ary |
283 // processing, then decides what frame type to encode, or if the frame shoul
d be | 283 // processing, then decides what frame type to encode, or if the frame shoul
d be |
284 // dropped. If the frame should be encoded it passes the frame to the encode
r | 284 // dropped. If the frame should be encoded it passes the frame to the encode
r |
285 // before it returns. | 285 // before it returns. |
286 // | 286 // |
287 // Input: | 287 // Input: |
288 // - videoFrame : Video frame to encode. | 288 // - videoFrame : Video frame to encode. |
289 // - codecSpecificInfo : Extra codec information, e.g., pre-parsed in-b
and signaling. | 289 // - codecSpecificInfo : Extra codec information, e.g., pre-parsed in-b
and signaling. |
290 // | 290 // |
291 // Return value : VCM_OK, on success. | 291 // Return value : VCM_OK, on success. |
292 // < 0, on error. | 292 // < 0, on error. |
293 virtual int32_t AddVideoFrame( | 293 virtual int32_t AddVideoFrame( |
294 const VideoFrame& videoFrame, | 294 const VideoFrame& videoFrame, |
295 const VideoContentMetrics* contentMetrics = NULL, | 295 const VideoContentMetrics* contentMetrics = NULL, |
296 const CodecSpecificInfo* codecSpecificInfo = NULL) = 0; | 296 const CodecSpecificInfo* codecSpecificInfo = NULL) = 0; |
297 | 297 |
298 // Next frame encoded should be an intra frame (keyframe). | 298 // Next frame encoded should be an intra frame (keyframe). |
299 // | 299 // |
300 // Return value : VCM_OK, on success. | 300 // Return value : VCM_OK, on success. |
301 // < 0, on error. | 301 // < 0, on error. |
302 virtual int32_t IntraFrameRequest(int stream_index) = 0; | 302 virtual int32_t IntraFrameRequest(int stream_index) = 0; |
303 | 303 |
304 // Frame Dropper enable. Can be used to disable the frame dropping when the
encoder | 304 // Frame Dropper enable. Can be used to disable the frame dropping when the
encoder |
305 // over-uses its bit rate. This API is designed to be used when the encoded
frames | 305 // over-uses its bit rate. This API is designed to be used when the encoded
frames |
306 // are supposed to be stored to an AVI file, or when the I420 codec is used
and the | 306 // are supposed to be stored to an AVI file, or when the I420 codec is used
and the |
307 // target bit rate shouldn't affect the frame rate. | 307 // target bit rate shouldn't affect the frame rate. |
308 // | 308 // |
309 // Input: | 309 // Input: |
310 // - enable : True to enable the setting, false to disable i
t. | 310 // - enable : True to enable the setting, false to disable i
t. |
311 // | 311 // |
312 // Return value : VCM_OK, on success. | 312 // Return value : VCM_OK, on success. |
313 // < 0, on error. | 313 // < 0, on error. |
314 virtual int32_t EnableFrameDropper(bool enable) = 0; | 314 virtual int32_t EnableFrameDropper(bool enable) = 0; |
315 | 315 |
316 // Sent frame counters | 316 // Sent frame counters |
317 virtual int32_t SentFrameCount(VCMFrameCount& frameCount) const = 0; | 317 virtual int32_t SentFrameCount(VCMFrameCount& frameCount) const = 0; |
318 | 318 |
319 /* | 319 /* |
320 * Receiver | 320 * Receiver |
321 */ | 321 */ |
322 | 322 |
323 // Register possible receive codecs, can be called multiple times for differ
ent codecs. | 323 // Register possible receive codecs, can be called multiple times for differ
ent codecs. |
324 // The module will automatically switch between registered codecs depending
on the | 324 // The module will automatically switch between registered codecs depending
on the |
325 // payload type of incoming frames. The actual decoder will be created when
needed. | 325 // payload type of incoming frames. The actual decoder will be created when
needed. |
326 // | 326 // |
327 // Input: | 327 // Input: |
328 // - receiveCodec : Settings for the codec to be registered. | 328 // - receiveCodec : Settings for the codec to be registered. |
329 // - numberOfCores : Number of CPU cores that the decoder is allowe
d to use. | 329 // - numberOfCores : Number of CPU cores that the decoder is allowe
d to use. |
330 // - requireKeyFrame : Set this to true if you don't want any delta f
rames | 330 // - requireKeyFrame : Set this to true if you don't want any delta f
rames |
331 // to be decoded until the first key frame has be
en decoded. | 331 // to be decoded until the first key frame has be
en decoded. |
332 // | 332 // |
333 // Return value : VCM_OK, on success. | 333 // Return value : VCM_OK, on success. |
334 // < 0, on error. | 334 // < 0, on error. |
335 virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, | 335 virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, |
336 int32_t numberOfCores, | 336 int32_t numberOfCores, |
337 bool requireKeyFrame = false) = 0; | 337 bool requireKeyFrame = false) = 0; |
338 | 338 |
339 // Register an externally defined decoder/renderer object. Can be a decoder
only or a | 339 // Register an externally defined decoder/renderer object. Can be a decoder
only or a |
340 // decoder coupled with a renderer. Note that RegisterReceiveCodec must be c
alled to | 340 // decoder coupled with a renderer. Note that RegisterReceiveCodec must be c
alled to |
341 // be used for decoding incoming streams. | 341 // be used for decoding incoming streams. |
342 // | 342 // |
343 // Input: | 343 // Input: |
344 // - externalDecoder : The external decoder/renderer object. | 344 // - externalDecoder : The external decoder/renderer object. |
345 // - payloadType : The payload type which this decoder shoul
d be | 345 // - payloadType : The payload type which this decoder shoul
d be |
346 // registered to. | 346 // registered to. |
347 // - internalRenderTiming : True if the internal renderer (if any) of
the decoder | 347 // - internalRenderTiming : True if the internal renderer (if any) of
the decoder |
348 // object can make sure to render at a given
time in ms. | 348 // object can make sure to render at a given
time in ms. |
349 // | 349 // |
350 // Return value : VCM_OK, on success. | 350 // Return value : VCM_OK, on success. |
351 // < 0, on error. | 351 // < 0, on error. |
352 virtual int32_t RegisterExternalDecoder(VideoDecoder* externalDecoder, | 352 virtual int32_t RegisterExternalDecoder(VideoDecoder* externalDecoder, |
353 uint8_t payloadType, | 353 uint8_t payloadType, |
354 bool internalRenderTiming) = 0; | 354 bool internalRenderTiming) = 0; |
355 | 355 |
356 // Register a receive callback. Will be called whenever there is a new frame
ready | 356 // Register a receive callback. Will be called whenever there is a new frame
ready |
357 // for rendering. | 357 // for rendering. |
358 // | 358 // |
359 // Input: | 359 // Input: |
360 // - receiveCallback : The callback object to be used by the mod
ule when a | 360 // - receiveCallback : The callback object to be used by the mod
ule when a |
361 // frame is ready for rendering. | 361 // frame is ready for rendering. |
362 // De-register with a NULL pointer. | 362 // De-register with a NULL pointer. |
363 // | 363 // |
364 // Return value : VCM_OK, on success. | 364 // Return value : VCM_OK, on success. |
365 // < 0, on error. | 365 // < 0, on error. |
366 virtual int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback)
= 0; | 366 virtual int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback)
= 0; |
367 | 367 |
368 // Register a receive statistics callback which will be called to deliver in
formation | 368 // Register a receive statistics callback which will be called to deliver in
formation |
369 // about the video stream received by the receiving side of the VCM, for ins
tance the | 369 // about the video stream received by the receiving side of the VCM, for ins
tance the |
370 // average frame rate and bit rate. | 370 // average frame rate and bit rate. |
371 // | 371 // |
372 // Input: | 372 // Input: |
373 // - receiveStats : The callback object to register. | 373 // - receiveStats : The callback object to register. |
374 // | 374 // |
375 // Return value : VCM_OK, on success. | 375 // Return value : VCM_OK, on success. |
376 // < 0, on error. | 376 // < 0, on error. |
377 virtual int32_t RegisterReceiveStatisticsCallback( | 377 virtual int32_t RegisterReceiveStatisticsCallback( |
378 VCMReceiveStatisticsCallback* receiveStats) = 0; | 378 VCMReceiveStatisticsCallback* receiveStats) = 0; |
379 | 379 |
380 // Register a decoder timing callback which will be called to deliver | 380 // Register a decoder timing callback which will be called to deliver |
381 // information about the timing of the decoder in the receiving side of the | 381 // information about the timing of the decoder in the receiving side of the |
382 // VCM, for instance the current and maximum frame decode latency. | 382 // VCM, for instance the current and maximum frame decode latency. |
383 // | 383 // |
384 // Input: | 384 // Input: |
385 // - decoderTiming : The callback object to register. | 385 // - decoderTiming : The callback object to register. |
386 // | 386 // |
387 // Return value : VCM_OK, on success. | 387 // Return value : VCM_OK, on success. |
388 // < 0, on error. | 388 // < 0, on error. |
389 virtual int32_t RegisterDecoderTimingCallback( | 389 virtual int32_t RegisterDecoderTimingCallback( |
390 VCMDecoderTimingCallback* decoderTiming) = 0; | 390 VCMDecoderTimingCallback* decoderTiming) = 0; |
391 | 391 |
392 // Register a frame type request callback. This callback will be called when
the | 392 // Register a frame type request callback. This callback will be called when
the |
393 // module needs to request specific frame types from the send side. | 393 // module needs to request specific frame types from the send side. |
394 // | 394 // |
395 // Input: | 395 // Input: |
396 // - frameTypeCallback : The callback object to be used by the mod
ule when | 396 // - frameTypeCallback : The callback object to be used by the mod
ule when |
397 // requesting a specific type of frame from
the send side. | 397 // requesting a specific type of frame from
the send side. |
398 // De-register with a NULL pointer. | 398 // De-register with a NULL pointer. |
399 // | 399 // |
400 // Return value : VCM_OK, on success. | 400 // Return value : VCM_OK, on success. |
401 // < 0, on error. | 401 // < 0, on error. |
402 virtual int32_t RegisterFrameTypeCallback( | 402 virtual int32_t RegisterFrameTypeCallback( |
403 VCMFrameTypeCallback* frameTypeCallback) = 0; | 403 VCMFrameTypeCallback* frameTypeCallback) = 0; |
404 | 404 |
405 // Registers a callback which is called whenever the receive side of the VCM | 405 // Registers a callback which is called whenever the receive side of the VCM |
406 // encounters holes in the packet sequence and needs packets to be retransmi
tted. | 406 // encounters holes in the packet sequence and needs packets to be retransmi
tted. |
407 // | 407 // |
408 // Input: | 408 // Input: |
409 // - callback : The callback to be registered in the VCM. | 409 // - callback : The callback to be registered in the VCM. |
410 // | 410 // |
411 // Return value : VCM_OK, on success. | 411 // Return value : VCM_OK, on success. |
412 // <0, on error. | 412 // <0, on error. |
413 virtual int32_t RegisterPacketRequestCallback( | 413 virtual int32_t RegisterPacketRequestCallback( |
414 VCMPacketRequestCallback* callback) = 0; | 414 VCMPacketRequestCallback* callback) = 0; |
415 | 415 |
416 // Waits for the next frame in the jitter buffer to become complete | 416 // Waits for the next frame in the jitter buffer to become complete |
417 // (waits no longer than maxWaitTimeMs), then passes it to the decoder for d
ecoding. | 417 // (waits no longer than maxWaitTimeMs), then passes it to the decoder for d
ecoding. |
418 // Should be called as often as possible to get the most out of the decoder. | 418 // Should be called as often as possible to get the most out of the decoder. |
419 // | 419 // |
420 // Return value : VCM_OK, on success. | 420 // Return value : VCM_OK, on success. |
421 // < 0, on error. | 421 // < 0, on error. |
422 virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0; | 422 virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0; |
423 | 423 |
424 // Registers a callback which conveys the size of the render buffer. | 424 // Registers a callback which conveys the size of the render buffer. |
425 virtual int RegisterRenderBufferSizeCallback( | 425 virtual int RegisterRenderBufferSizeCallback( |
426 VCMRenderBufferSizeCallback* callback) = 0; | 426 VCMRenderBufferSizeCallback* callback) = 0; |
427 | 427 |
428 // Reset the decoder state to the initial state. | 428 // Reset the decoder state to the initial state. |
429 // | 429 // |
430 // Return value : VCM_OK, on success. | 430 // Return value : VCM_OK, on success. |
431 // < 0, on error. | 431 // < 0, on error. |
432 virtual int32_t ResetDecoder() = 0; | 432 virtual int32_t ResetDecoder() = 0; |
433 | 433 |
434 // API to get the codec which is currently used for decoding by the module. | 434 // API to get the codec which is currently used for decoding by the module. |
435 // | 435 // |
436 // Input: | 436 // Input: |
437 // - currentReceiveCodec : Settings for the codec to be registered
. | 437 // - currentReceiveCodec : Settings for the codec to be registered
. |
438 // | 438 // |
439 // Return value : VCM_OK, on success. | 439 // Return value : VCM_OK, on success. |
440 // < 0, on error. | 440 // < 0, on error. |
441 virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0; | 441 virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0; |
442 | 442 |
443 // API to get the codec type currently used for decoding by the module. | 443 // API to get the codec type currently used for decoding by the module. |
444 // | 444 // |
445 // Return value : codecy type, on success. | 445 // Return value : codecy type, on success. |
446 // kVideoCodecUnknown, on error or if no receive codec i
s registered | 446 // kVideoCodecUnknown, on error or if no receive codec i
s registered |
447 virtual VideoCodecType ReceiveCodec() const = 0; | 447 virtual VideoCodecType ReceiveCodec() const = 0; |
448 | 448 |
449 // Insert a parsed packet into the receiver side of the module. Will be plac
ed in the | 449 // Insert a parsed packet into the receiver side of the module. Will be plac
ed in the |
450 // jitter buffer waiting for the frame to become complete. Returns as soon a
s the packet | 450 // jitter buffer waiting for the frame to become complete. Returns as soon a
s the packet |
451 // has been placed in the jitter buffer. | 451 // has been placed in the jitter buffer. |
452 // | 452 // |
453 // Input: | 453 // Input: |
454 // - incomingPayload : Payload of the packet. | 454 // - incomingPayload : Payload of the packet. |
455 // - payloadLength : Length of the payload. | 455 // - payloadLength : Length of the payload. |
456 // - rtpInfo : The parsed header. | 456 // - rtpInfo : The parsed header. |
457 // | 457 // |
458 // Return value : VCM_OK, on success. | 458 // Return value : VCM_OK, on success. |
459 // < 0, on error. | 459 // < 0, on error. |
460 virtual int32_t IncomingPacket(const uint8_t* incomingPayload, | 460 virtual int32_t IncomingPacket(const uint8_t* incomingPayload, |
461 size_t payloadLength, | 461 size_t payloadLength, |
462 const WebRtcRTPHeader& rtpInfo) = 0; | 462 const WebRtcRTPHeader& rtpInfo) = 0; |
463 | 463 |
464 // Minimum playout delay (Used for lip-sync). This is the minimum delay requ
ired | 464 // Minimum playout delay (Used for lip-sync). This is the minimum delay requ
ired |
465 // to sync with audio. Not included in VideoCodingModule::Delay() | 465 // to sync with audio. Not included in VideoCodingModule::Delay() |
466 // Defaults to 0 ms. | 466 // Defaults to 0 ms. |
467 // | 467 // |
468 // Input: | 468 // Input: |
469 // - minPlayoutDelayMs : Additional delay in ms. | 469 // - minPlayoutDelayMs : Additional delay in ms. |
470 // | 470 // |
471 // Return value : VCM_OK, on success. | 471 // Return value : VCM_OK, on success. |
472 // < 0, on error. | 472 // < 0, on error. |
473 virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0; | 473 virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0; |
474 | 474 |
475 // Set the time required by the renderer to render a frame. | 475 // Set the time required by the renderer to render a frame. |
476 // | 476 // |
477 // Input: | 477 // Input: |
478 // - timeMS : The time in ms required by the renderer to render
a frame. | 478 // - timeMS : The time in ms required by the renderer to render
a frame. |
479 // | 479 // |
480 // Return value : VCM_OK, on success. | 480 // Return value : VCM_OK, on success. |
481 // < 0, on error. | 481 // < 0, on error. |
482 virtual int32_t SetRenderDelay(uint32_t timeMS) = 0; | 482 virtual int32_t SetRenderDelay(uint32_t timeMS) = 0; |
483 | 483 |
484 // The total delay desired by the VCM. Can be less than the minimum | 484 // The total delay desired by the VCM. Can be less than the minimum |
485 // delay set with SetMinimumPlayoutDelay. | 485 // delay set with SetMinimumPlayoutDelay. |
486 // | 486 // |
487 // Return value : Total delay in ms, on success. | 487 // Return value : Total delay in ms, on success. |
488 // < 0, on error. | 488 // < 0, on error. |
489 virtual int32_t Delay() const = 0; | 489 virtual int32_t Delay() const = 0; |
490 | 490 |
491 // Returns the number of packets discarded by the jitter buffer due to being | 491 // Returns the number of packets discarded by the jitter buffer due to being |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 EncodedImageCallback* observer) = 0; | 547 EncodedImageCallback* observer) = 0; |
548 virtual void RegisterPostEncodeImageCallback( | 548 virtual void RegisterPostEncodeImageCallback( |
549 EncodedImageCallback* post_encode_callback) = 0; | 549 EncodedImageCallback* post_encode_callback) = 0; |
550 // Releases pending decode calls, permitting faster thread shutdown. | 550 // Releases pending decode calls, permitting faster thread shutdown. |
551 virtual void TriggerDecoderShutdown() = 0; | 551 virtual void TriggerDecoderShutdown() = 0; |
552 }; | 552 }; |
553 | 553 |
554 } // namespace webrtc | 554 } // namespace webrtc |
555 | 555 |
556 #endif // WEBRTC_MODULES_INTERFACE_VIDEO_CODING_H_ | 556 #endif // WEBRTC_MODULES_INTERFACE_VIDEO_CODING_H_ |
OLD | NEW |