vp8dec: Set decoder deadline from the QoS information
This commit is contained in:
parent
7028ba1ff5
commit
24027dd9f2
@ -424,6 +424,7 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame,
|
|||||||
vpx_codec_err_t status;
|
vpx_codec_err_t status;
|
||||||
vpx_codec_iter_t iter = NULL;
|
vpx_codec_iter_t iter = NULL;
|
||||||
vpx_image_t *img;
|
vpx_image_t *img;
|
||||||
|
long decoder_deadline = 0;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (decoder, "handle_frame");
|
GST_DEBUG_OBJECT (decoder, "handle_frame");
|
||||||
|
|
||||||
@ -508,9 +509,17 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (deadline < 0) {
|
||||||
|
decoder_deadline = 1;
|
||||||
|
} else if (deadline == G_MAXINT64) {
|
||||||
|
decoder_deadline = 0;
|
||||||
|
} else {
|
||||||
|
decoder_deadline = MAX (1, deadline / GST_MSECOND);
|
||||||
|
}
|
||||||
|
|
||||||
status = vpx_codec_decode (&dec->decoder,
|
status = vpx_codec_decode (&dec->decoder,
|
||||||
GST_BUFFER_DATA (frame->sink_buffer),
|
GST_BUFFER_DATA (frame->sink_buffer),
|
||||||
GST_BUFFER_SIZE (frame->sink_buffer), NULL, 0);
|
GST_BUFFER_SIZE (frame->sink_buffer), NULL, decoder_deadline);
|
||||||
if (status) {
|
if (status) {
|
||||||
GST_ELEMENT_ERROR (decoder, LIBRARY, ENCODE,
|
GST_ELEMENT_ERROR (decoder, LIBRARY, ENCODE,
|
||||||
("Failed to decode frame"), ("%s", gst_vpx_error_name (status)));
|
("Failed to decode frame"), ("%s", gst_vpx_error_name (status)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user