Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
a090ff06
Commit
a090ff06
authored
May 13, 2014
by
Ghislain MARY
Browse files
Add functions to videostream to handle decoding error report.
parent
cc6d754a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
include/mediastreamer2/mediastream.h
include/mediastreamer2/mediastream.h
+15
-0
src/voip/videostream.c
src/voip/videostream.c
+11
-0
No files found.
include/mediastreamer2/mediastream.h
View file @
a090ff06
...
...
@@ -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.
**/
...
...
src/voip/videostream.c
View file @
a090ff06
...
...
@@ -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
;
else
return
FALSE
;
}
void
video_stream_decoding_error_reported
(
VideoStream
*
stream
)
{
stream
->
last_reported_decoding_error_time
=
stream
->
ms
.
sessions
.
ticker
->
time
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment