mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
msdkdec: output the decoded frame immediately if decoded order is required
DecodedOrder was deprecated in msdk-2017 version, but some customers still use this for low-latency streaming of non-b-frame encoded streams, which needs to output the frame at once
This commit is contained in:
parent
b8946d06c7
commit
18728310c9
1 changed files with 17 additions and 0 deletions
|
@ -915,6 +915,15 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
bitstream.Data = map_info.data;
|
bitstream.Data = map_info.data;
|
||||||
bitstream.DataLength = map_info.size;
|
bitstream.DataLength = map_info.size;
|
||||||
bitstream.MaxLength = map_info.size;
|
bitstream.MaxLength = map_info.size;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MFX_BITSTREAM_COMPLETE_FRAME was removed since commit df59db9, however
|
||||||
|
* some customers still use DecodedOrder (deprecated in msdk-2017 version)
|
||||||
|
* for low-latency streaming of non-b-frame encoded streams, which needs to
|
||||||
|
* output the frame at once, so add it back for this case
|
||||||
|
*/
|
||||||
|
if (thiz->param.mfx.DecodedOrder == GST_MSDKDEC_OUTPUT_ORDER_DECODE)
|
||||||
|
bitstream.DataFlag |= MFX_BITSTREAM_COMPLETE_FRAME;
|
||||||
} else {
|
} else {
|
||||||
/* Non packetized streams: eg: vc1 advanced profile with per buffer bdu */
|
/* Non packetized streams: eg: vc1 advanced profile with per buffer bdu */
|
||||||
gst_adapter_push (thiz->adapter, gst_buffer_ref (input_buffer));
|
gst_adapter_push (thiz->adapter, gst_buffer_ref (input_buffer));
|
||||||
|
@ -1104,6 +1113,14 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
flow = GST_FLOW_OK;
|
flow = GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DecodedOrder was deprecated in msdk-2017 version, but some
|
||||||
|
* customers still using this for low-latency streaming of non-b-frame
|
||||||
|
* encoded streams, which needs to output the frame at once
|
||||||
|
*/
|
||||||
|
if (thiz->param.mfx.DecodedOrder == GST_MSDKDEC_OUTPUT_ORDER_DECODE)
|
||||||
|
gst_msdkdec_finish_task (thiz, task);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (surface)
|
if (surface)
|
||||||
free_surface (thiz, surface);
|
free_surface (thiz, surface);
|
||||||
|
|
Loading…
Reference in a new issue