Commit a090ff06 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add functions to videostream to handle decoding error report.

parent cc6d754a
......@@ -547,6 +547,7 @@ struct _VideoStream
bool_t display_filter_auto_rotate_enabled;
bool_t source_performs_encoding;
bool_t output_performs_decoding;
uint64_t last_reported_decoding_error_time;
typedef struct _VideoStream VideoStream;
......@@ -686,6 +687,20 @@ static inline int video_stream_set_dscp(VideoStream *stream, int dscp) {
return media_stream_set_dscp(&stream->ms, dscp);
* Ask the video stream whether a decoding error should be reported (eg. to send a VFU request).
* @param[in] stream The VideoStream object.
* @param[in] ms The minimum interval in milliseconds between to decoding error report.
* @return TRUE if the decoding error should be reported, FALSE otherwise.
MS2_PUBLIC bool_t video_stream_is_decoding_error_to_be_reported(VideoStream *stream, uint32_t ms);
* Tell the video stream that a decoding error has been reported.
* @param[in] stream The VideoStream object.
MS2_PUBLIC void video_stream_decoding_error_reported(VideoStream *stream);
* Small API to display a local preview window.
......@@ -902,3 +902,14 @@ void video_stream_enable_zrtp(VideoStream *vstream, AudioStream *astream, OrtpZr
void video_stream_enable_display_filter_auto_rotate(VideoStream* stream, bool_t enable) {
stream->display_filter_auto_rotate_enabled = enable;
bool_t video_stream_is_decoding_error_to_be_reported(VideoStream *stream, uint32_t ms) {
if (((stream->ms.sessions.ticker->time - stream->last_reported_decoding_error_time) > ms) || (stream->last_reported_decoding_error_time == 0))
return TRUE;
return FALSE;
void video_stream_decoding_error_reported(VideoStream *stream) {
stream->last_reported_decoding_error_time = stream->ms.sessions.ticker->time;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment