blob: cb413dac0087065f9c5633951e154f4c9ac7717f [file] [log] [blame]
Henrik Kjellander2557b862015-11-18 22:00:21 +01001/*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_
12#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_
13
14#if defined(WEBRTC_WIN)
15// This is a workaround on Windows due to the fact that some Windows
16// headers define CreateEvent as a macro to either CreateEventW or CreateEventA.
17// This can cause problems since we use that name as well and could
18// declare them as one thing here whereas in another place a windows header
19// may have been included and then implementing CreateEvent() causes compilation
20// errors. So for consistency, we include the main windows header here.
21#include <windows.h>
22#endif
23
24#include "webrtc/modules/include/module.h"
25#include "webrtc/modules/include/module_common_types.h"
26#include "webrtc/modules/video_coding/include/video_coding_defines.h"
27#include "webrtc/system_wrappers/include/event_wrapper.h"
28#include "webrtc/video_frame.h"
29
philipel9d3ab612015-12-21 04:12:39 -080030namespace webrtc {
Henrik Kjellander2557b862015-11-18 22:00:21 +010031
32class Clock;
33class EncodedImageCallback;
34class VideoEncoder;
35class VideoDecoder;
36struct CodecSpecificInfo;
37
38class EventFactory {
39 public:
40 virtual ~EventFactory() {}
41
42 virtual EventWrapper* CreateEvent() = 0;
43};
44
45class EventFactoryImpl : public EventFactory {
46 public:
47 virtual ~EventFactoryImpl() {}
48
philipel9d3ab612015-12-21 04:12:39 -080049 virtual EventWrapper* CreateEvent() { return EventWrapper::Create(); }
Henrik Kjellander2557b862015-11-18 22:00:21 +010050};
51
52// Used to indicate which decode with errors mode should be used.
53enum VCMDecodeErrorMode {
philipel9d3ab612015-12-21 04:12:39 -080054 kNoErrors, // Never decode with errors. Video will freeze
55 // if nack is disabled.
56 kSelectiveErrors, // Frames that are determined decodable in
57 // VCMSessionInfo may be decoded with missing
58 // packets. As not all incomplete frames will be
59 // decodable, video will freeze if nack is disabled.
60 kWithErrors // Release frames as needed. Errors may be
61 // introduced as some encoded frames may not be
62 // complete.
Henrik Kjellander2557b862015-11-18 22:00:21 +010063};
64
philipel9d3ab612015-12-21 04:12:39 -080065class VideoCodingModule : public Module {
66 public:
67 enum SenderNackMode { kNackNone, kNackAll, kNackSelective };
Henrik Kjellander2557b862015-11-18 22:00:21 +010068
philipel9d3ab612015-12-21 04:12:39 -080069 enum ReceiverRobustness { kNone, kHardNack, kSoftNack, kReferenceSelection };
Henrik Kjellander2557b862015-11-18 22:00:21 +010070
philipel9d3ab612015-12-21 04:12:39 -080071 static VideoCodingModule* Create(
72 Clock* clock,
73 VideoEncoderRateObserver* encoder_rate_observer,
74 VCMQMSettingsCallback* qm_settings_callback);
Henrik Kjellander2557b862015-11-18 22:00:21 +010075
philipel83f831a2016-03-12 03:30:23 -080076 static VideoCodingModule* Create(
77 Clock* clock,
78 VideoEncoderRateObserver* encoder_rate_observer,
79 VCMQMSettingsCallback* qm_settings_callback,
80 NackSender* nack_sender,
sprang3911c262016-04-15 01:24:14 -070081 KeyFrameRequestSender* keyframe_request_sender,
82 EncodedImageCallback* pre_decode_image_callback);
philipel83f831a2016-03-12 03:30:23 -080083
philipel9d3ab612015-12-21 04:12:39 -080084 static VideoCodingModule* Create(Clock* clock, EventFactory* event_factory);
Henrik Kjellander2557b862015-11-18 22:00:21 +010085
philipel83f831a2016-03-12 03:30:23 -080086 static VideoCodingModule* Create(
87 Clock* clock,
88 EventFactory* event_factory,
89 NackSender* nack_sender,
90 KeyFrameRequestSender* keyframe_request_sender);
91
philipel9d3ab612015-12-21 04:12:39 -080092 // Get supported codec settings using codec type
93 //
94 // Input:
95 // - codecType : The codec type to get settings for
96 // - codec : Memory where the codec settings will be stored
97 //
98 // Return value : VCM_OK, on success
99 // VCM_PARAMETER_ERROR if codec not supported
Peter Boström7776e782016-01-07 15:42:47 +0100100 static void Codec(VideoCodecType codecType, VideoCodec* codec);
Henrik Kjellander2557b862015-11-18 22:00:21 +0100101
philipel9d3ab612015-12-21 04:12:39 -0800102 /*
103 * Sender
104 */
Henrik Kjellander2557b862015-11-18 22:00:21 +0100105
philipel9d3ab612015-12-21 04:12:39 -0800106 // Registers a codec to be used for encoding. Calling this
107 // API multiple times overwrites any previously registered codecs.
108 //
109 // NOTE: Must be called on the thread that constructed the VCM instance.
110 //
111 // Input:
112 // - sendCodec : Settings for the codec to be registered.
113 // - numberOfCores : The number of cores the codec is allowed
114 // to use.
115 // - maxPayloadSize : The maximum size each payload is allowed
116 // to have. Usually MTU - overhead.
117 //
118 // Return value : VCM_OK, on success.
119 // < 0, on error.
120 virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec,
121 uint32_t numberOfCores,
122 uint32_t maxPayloadSize) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100123
philipel9d3ab612015-12-21 04:12:39 -0800124 // Register an external encoder object. This can not be used together with
125 // external decoder callbacks.
126 //
127 // Input:
128 // - externalEncoder : Encoder object to be used for encoding frames
129 // inserted
130 // with the AddVideoFrame API.
131 // - payloadType : The payload type bound which this encoder is bound
132 // to.
133 //
134 // Return value : VCM_OK, on success.
135 // < 0, on error.
136 // TODO(pbos): Remove return type when unused elsewhere.
137 virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder,
138 uint8_t payloadType,
139 bool internalSource = false) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100140
philipel9d3ab612015-12-21 04:12:39 -0800141 // API to get currently configured encoder target bitrate in bits/s.
142 //
143 // Return value : 0, on success.
144 // < 0, on error.
145 virtual int Bitrate(unsigned int* bitrate) const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100146
philipel9d3ab612015-12-21 04:12:39 -0800147 // API to get currently configured encoder target frame rate.
148 //
149 // Return value : 0, on success.
150 // < 0, on error.
151 virtual int FrameRate(unsigned int* framerate) const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100152
philipel9d3ab612015-12-21 04:12:39 -0800153 // Sets the parameters describing the send channel. These parameters are
154 // inputs to the
155 // Media Optimization inside the VCM and also specifies the target bit rate
156 // for the
157 // encoder. Bit rate used by NACK should already be compensated for by the
158 // user.
159 //
160 // Input:
161 // - target_bitrate : The target bitrate for VCM in bits/s.
162 // - lossRate : Fractions of lost packets the past second.
163 // (loss rate in percent = 100 * packetLoss /
164 // 255)
165 // - rtt : Current round-trip time in ms.
166 //
167 // Return value : VCM_OK, on success.
168 // < 0, on error.
169 virtual int32_t SetChannelParameters(uint32_t target_bitrate,
170 uint8_t lossRate,
171 int64_t rtt) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100172
philipel9d3ab612015-12-21 04:12:39 -0800173 // Sets the parameters describing the receive channel. These parameters are
174 // inputs to the
175 // Media Optimization inside the VCM.
176 //
177 // Input:
178 // - rtt : Current round-trip time in ms.
179 // with the most amount available bandwidth in
180 // a conference
181 // scenario
182 //
183 // Return value : VCM_OK, on success.
184 // < 0, on error.
185 virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100186
philipel9d3ab612015-12-21 04:12:39 -0800187 // Register a transport callback which will be called to deliver the encoded
188 // data and
189 // side information.
190 //
191 // Input:
192 // - transport : The callback object to register.
193 //
194 // Return value : VCM_OK, on success.
195 // < 0, on error.
196 virtual int32_t RegisterTransportCallback(
197 VCMPacketizationCallback* transport) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100198
philipel9d3ab612015-12-21 04:12:39 -0800199 // Register video output information callback which will be called to deliver
200 // information
201 // about the video stream produced by the encoder, for instance the average
202 // frame rate and
203 // bit rate.
204 //
205 // Input:
206 // - outputInformation : The callback object to register.
207 //
208 // Return value : VCM_OK, on success.
209 // < 0, on error.
210 virtual int32_t RegisterSendStatisticsCallback(
211 VCMSendStatisticsCallback* sendStats) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100212
philipel9d3ab612015-12-21 04:12:39 -0800213 // Register a video protection callback which will be called to deliver
214 // the requested FEC rate and NACK status (on/off).
215 //
216 // Input:
217 // - protection : The callback object to register.
218 //
219 // Return value : VCM_OK, on success.
220 // < 0, on error.
221 virtual int32_t RegisterProtectionCallback(
222 VCMProtectionCallback* protection) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100223
philipel9d3ab612015-12-21 04:12:39 -0800224 // Enable or disable a video protection method.
225 //
226 // Input:
227 // - videoProtection : The method to enable or disable.
228 // - enable : True if the method should be enabled, false if
229 // it should be disabled.
230 //
231 // Return value : VCM_OK, on success.
232 // < 0, on error.
233 virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection,
234 bool enable) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100235
philipel9d3ab612015-12-21 04:12:39 -0800236 // Add one raw video frame to the encoder. This function does all the
237 // necessary
238 // processing, then decides what frame type to encode, or if the frame should
239 // be
240 // dropped. If the frame should be encoded it passes the frame to the encoder
241 // before it returns.
242 //
243 // Input:
244 // - videoFrame : Video frame to encode.
245 // - codecSpecificInfo : Extra codec information, e.g., pre-parsed
246 // in-band signaling.
247 //
248 // Return value : VCM_OK, on success.
249 // < 0, on error.
250 virtual int32_t AddVideoFrame(
251 const VideoFrame& videoFrame,
252 const VideoContentMetrics* contentMetrics = NULL,
253 const CodecSpecificInfo* codecSpecificInfo = NULL) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100254
philipel9d3ab612015-12-21 04:12:39 -0800255 // Next frame encoded should be an intra frame (keyframe).
256 //
257 // Return value : VCM_OK, on success.
258 // < 0, on error.
259 virtual int32_t IntraFrameRequest(int stream_index) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100260
philipel9d3ab612015-12-21 04:12:39 -0800261 // Frame Dropper enable. Can be used to disable the frame dropping when the
262 // encoder
263 // over-uses its bit rate. This API is designed to be used when the encoded
264 // frames
265 // are supposed to be stored to an AVI file, or when the I420 codec is used
266 // and the
267 // target bit rate shouldn't affect the frame rate.
268 //
269 // Input:
270 // - enable : True to enable the setting, false to disable it.
271 //
272 // Return value : VCM_OK, on success.
273 // < 0, on error.
274 virtual int32_t EnableFrameDropper(bool enable) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100275
philipel9d3ab612015-12-21 04:12:39 -0800276 /*
277 * Receiver
278 */
Henrik Kjellander2557b862015-11-18 22:00:21 +0100279
philipel9d3ab612015-12-21 04:12:39 -0800280 // Register possible receive codecs, can be called multiple times for
281 // different codecs.
282 // The module will automatically switch between registered codecs depending on
283 // the
284 // payload type of incoming frames. The actual decoder will be created when
285 // needed.
286 //
287 // Input:
288 // - receiveCodec : Settings for the codec to be registered.
289 // - numberOfCores : Number of CPU cores that the decoder is allowed
290 // to use.
291 // - requireKeyFrame : Set this to true if you don't want any delta
292 // frames
293 // to be decoded until the first key frame has been
294 // decoded.
295 //
296 // Return value : VCM_OK, on success.
297 // < 0, on error.
298 virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec,
299 int32_t numberOfCores,
300 bool requireKeyFrame = false) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100301
philipel9d3ab612015-12-21 04:12:39 -0800302 // Register an externally defined decoder/renderer object. Can be a decoder
303 // only or a
304 // decoder coupled with a renderer. Note that RegisterReceiveCodec must be
305 // called to
306 // be used for decoding incoming streams.
307 //
308 // Input:
309 // - externalDecoder : The external decoder/renderer object.
310 // - payloadType : The payload type which this decoder should
311 // be
312 // registered to.
313 //
314 virtual void RegisterExternalDecoder(VideoDecoder* externalDecoder,
315 uint8_t payloadType) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100316
philipel9d3ab612015-12-21 04:12:39 -0800317 // Register a receive callback. Will be called whenever there is a new frame
318 // ready
319 // for rendering.
320 //
321 // Input:
322 // - receiveCallback : The callback object to be used by the
323 // module when a
324 // frame is ready for rendering.
325 // De-register with a NULL pointer.
326 //
327 // Return value : VCM_OK, on success.
328 // < 0, on error.
329 virtual int32_t RegisterReceiveCallback(
330 VCMReceiveCallback* receiveCallback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100331
philipel9d3ab612015-12-21 04:12:39 -0800332 // Register a receive statistics callback which will be called to deliver
333 // information
334 // about the video stream received by the receiving side of the VCM, for
335 // instance the
336 // average frame rate and bit rate.
337 //
338 // Input:
339 // - receiveStats : The callback object to register.
340 //
341 // Return value : VCM_OK, on success.
342 // < 0, on error.
343 virtual int32_t RegisterReceiveStatisticsCallback(
344 VCMReceiveStatisticsCallback* receiveStats) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100345
philipel9d3ab612015-12-21 04:12:39 -0800346 // Register a decoder timing callback which will be called to deliver
347 // information about the timing of the decoder in the receiving side of the
348 // VCM, for instance the current and maximum frame decode latency.
349 //
350 // Input:
351 // - decoderTiming : The callback object to register.
352 //
353 // Return value : VCM_OK, on success.
354 // < 0, on error.
355 virtual int32_t RegisterDecoderTimingCallback(
356 VCMDecoderTimingCallback* decoderTiming) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100357
philipel9d3ab612015-12-21 04:12:39 -0800358 // Register a frame type request callback. This callback will be called when
359 // the
360 // module needs to request specific frame types from the send side.
361 //
362 // Input:
363 // - frameTypeCallback : The callback object to be used by the
364 // module when
365 // requesting a specific type of frame from
366 // the send side.
367 // De-register with a NULL pointer.
368 //
369 // Return value : VCM_OK, on success.
370 // < 0, on error.
371 virtual int32_t RegisterFrameTypeCallback(
372 VCMFrameTypeCallback* frameTypeCallback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100373
philipel9d3ab612015-12-21 04:12:39 -0800374 // Registers a callback which is called whenever the receive side of the VCM
375 // encounters holes in the packet sequence and needs packets to be
376 // retransmitted.
377 //
378 // Input:
379 // - callback : The callback to be registered in the VCM.
380 //
381 // Return value : VCM_OK, on success.
382 // <0, on error.
383 virtual int32_t RegisterPacketRequestCallback(
384 VCMPacketRequestCallback* callback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100385
philipel9d3ab612015-12-21 04:12:39 -0800386 // Waits for the next frame in the jitter buffer to become complete
387 // (waits no longer than maxWaitTimeMs), then passes it to the decoder for
388 // decoding.
389 // Should be called as often as possible to get the most out of the decoder.
390 //
391 // Return value : VCM_OK, on success.
392 // < 0, on error.
393 virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100394
philipel9d3ab612015-12-21 04:12:39 -0800395 // Registers a callback which conveys the size of the render buffer.
396 virtual int RegisterRenderBufferSizeCallback(
397 VCMRenderBufferSizeCallback* callback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100398
philipel9d3ab612015-12-21 04:12:39 -0800399 // API to get the codec which is currently used for decoding by the module.
400 //
401 // Input:
402 // - currentReceiveCodec : Settings for the codec to be registered.
403 //
404 // Return value : VCM_OK, on success.
405 // < 0, on error.
406 virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100407
philipel9d3ab612015-12-21 04:12:39 -0800408 // API to get the codec type currently used for decoding by the module.
409 //
410 // Return value : codecy type, on success.
411 // kVideoCodecUnknown, on error or if no receive codec is
412 // registered
413 virtual VideoCodecType ReceiveCodec() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100414
philipel9d3ab612015-12-21 04:12:39 -0800415 // Insert a parsed packet into the receiver side of the module. Will be placed
416 // in the
417 // jitter buffer waiting for the frame to become complete. Returns as soon as
418 // the packet
419 // has been placed in the jitter buffer.
420 //
421 // Input:
422 // - incomingPayload : Payload of the packet.
423 // - payloadLength : Length of the payload.
424 // - rtpInfo : The parsed header.
425 //
426 // Return value : VCM_OK, on success.
427 // < 0, on error.
428 virtual int32_t IncomingPacket(const uint8_t* incomingPayload,
429 size_t payloadLength,
430 const WebRtcRTPHeader& rtpInfo) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100431
philipel9d3ab612015-12-21 04:12:39 -0800432 // Minimum playout delay (Used for lip-sync). This is the minimum delay
433 // required
434 // to sync with audio. Not included in VideoCodingModule::Delay()
435 // Defaults to 0 ms.
436 //
437 // Input:
438 // - minPlayoutDelayMs : Additional delay in ms.
439 //
440 // Return value : VCM_OK, on success.
441 // < 0, on error.
442 virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100443
philipel9d3ab612015-12-21 04:12:39 -0800444 // Set the time required by the renderer to render a frame.
445 //
446 // Input:
447 // - timeMS : The time in ms required by the renderer to render a
448 // frame.
449 //
450 // Return value : VCM_OK, on success.
451 // < 0, on error.
452 virtual int32_t SetRenderDelay(uint32_t timeMS) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100453
philipel9d3ab612015-12-21 04:12:39 -0800454 // The total delay desired by the VCM. Can be less than the minimum
455 // delay set with SetMinimumPlayoutDelay.
456 //
457 // Return value : Total delay in ms, on success.
458 // < 0, on error.
459 virtual int32_t Delay() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100460
philipel9d3ab612015-12-21 04:12:39 -0800461 // Returns the number of packets discarded by the jitter buffer due to being
462 // too late. This can include duplicated packets which arrived after the
463 // frame was sent to the decoder. Therefore packets which were prematurely
464 // NACKed will be counted.
465 virtual uint32_t DiscardedPackets() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100466
philipel9d3ab612015-12-21 04:12:39 -0800467 // Robustness APIs
Henrik Kjellander2557b862015-11-18 22:00:21 +0100468
philipel9d3ab612015-12-21 04:12:39 -0800469 // Set the receiver robustness mode. The mode decides how the receiver
470 // responds to losses in the stream. The type of counter-measure (soft or
471 // hard NACK, dual decoder, RPS, etc.) is selected through the
472 // robustnessMode parameter. The errorMode parameter decides if it is
473 // allowed to display frames corrupted by losses. Note that not all
474 // combinations of the two parameters are feasible. An error will be
475 // returned for invalid combinations.
476 // Input:
477 // - robustnessMode : selected robustness mode.
478 // - errorMode : selected error mode.
479 //
480 // Return value : VCM_OK, on success;
481 // < 0, on error.
482 virtual int SetReceiverRobustnessMode(ReceiverRobustness robustnessMode,
483 VCMDecodeErrorMode errorMode) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100484
philipel9d3ab612015-12-21 04:12:39 -0800485 // Set the decode error mode. The mode decides which errors (if any) are
486 // allowed in decodable frames. Note that setting decode_error_mode to
487 // anything other than kWithErrors without enabling nack will cause
488 // long-term freezes (resulting from frequent key frame requests) if
489 // packet loss occurs.
490 virtual void SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100491
philipel9d3ab612015-12-21 04:12:39 -0800492 // Sets the maximum number of sequence numbers that we are allowed to NACK
493 // and the oldest sequence number that we will consider to NACK. If a
494 // sequence number older than |max_packet_age_to_nack| is missing
495 // a key frame will be requested. A key frame will also be requested if the
496 // time of incomplete or non-continuous frames in the jitter buffer is above
497 // |max_incomplete_time_ms|.
498 virtual void SetNackSettings(size_t max_nack_list_size,
499 int max_packet_age_to_nack,
500 int max_incomplete_time_ms) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100501
philipel9d3ab612015-12-21 04:12:39 -0800502 // Setting a desired delay to the VCM receiver. Video rendering will be
503 // delayed by at least desired_delay_ms.
504 virtual int SetMinReceiverDelay(int desired_delay_ms) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100505
philipel9d3ab612015-12-21 04:12:39 -0800506 // Lets the sender suspend video when the rate drops below
507 // |threshold_bps|, and turns back on when the rate goes back up above
508 // |threshold_bps| + |window_bps|.
509 virtual void SuspendBelowMinBitrate() = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100510
philipel9d3ab612015-12-21 04:12:39 -0800511 // Returns true if SuspendBelowMinBitrate is engaged and the video has been
512 // suspended due to bandwidth limitations; otherwise false.
513 virtual bool VideoSuspended() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100514
philipel9d3ab612015-12-21 04:12:39 -0800515 virtual void RegisterPostEncodeImageCallback(
516 EncodedImageCallback* post_encode_callback) = 0;
517 // Releases pending decode calls, permitting faster thread shutdown.
518 virtual void TriggerDecoderShutdown() = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100519};
520
521} // namespace webrtc
522
philipel9d3ab612015-12-21 04:12:39 -0800523#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_