Commit 88586b41 authored by Haihao Xiang's avatar Haihao Xiang Committed by Víctor Manuel Jáquez Leal
Browse files

msdk: change the wait time for encoder and vpp

In MSDK samples, the wait time for encoder, decoder and vpp is
300000. Let's set the wait time to the same value in msdk plugin
parent 51dc3887
...@@ -685,9 +685,12 @@ gst_msdkenc_finish_frame (GstMsdkEnc * thiz, MsdkEncTask * task, ...@@ -685,9 +685,12 @@ gst_msdkenc_finish_frame (GstMsdkEnc * thiz, MsdkEncTask * task,
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }
/* Wait for encoding operation to complete */ /* Wait for encoding operation to complete, the magic number 300000 below
* is used in MSDK samples
* #define MSDK_ENC_WAIT_INTERVAL 300000
*/
MFXVideoCORE_SyncOperation (gst_msdk_context_get_session (thiz->context), MFXVideoCORE_SyncOperation (gst_msdk_context_get_session (thiz->context),
task->sync_point, 10000); task->sync_point, 300000);
if (!discard && task->output_bitstream.DataLength) { if (!discard && task->output_bitstream.DataLength) {
GstBuffer *out_buf = NULL; GstBuffer *out_buf = NULL;
guint8 *data = guint8 *data =
......
...@@ -699,8 +699,12 @@ gst_msdkvpp_transform (GstBaseTransform * trans, GstBuffer * inbuf, ...@@ -699,8 +699,12 @@ gst_msdkvpp_transform (GstBaseTransform * trans, GstBuffer * inbuf,
if (status == MFX_ERR_MORE_DATA) if (status == MFX_ERR_MORE_DATA)
goto error_more_data; goto error_more_data;
/* Wait for vpp operation to complete, the magic number 300000 below
* is used in MSDK samples
* #define MSDK_VPP_WAIT_INTERVAL 300000
*/
if (sync_point) if (sync_point)
MFXVideoCORE_SyncOperation (session, sync_point, 10000); MFXVideoCORE_SyncOperation (session, sync_point, 300000);
/* More than one output buffers are generated */ /* More than one output buffers are generated */
if (status == MFX_ERR_MORE_SURFACE) { if (status == MFX_ERR_MORE_SURFACE) {
......
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