mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
msdkdec: improve spelling and grammar of comments
This commit is contained in:
parent
20f61db2e5
commit
96dc150b8b
1 changed files with 51 additions and 51 deletions
|
@ -308,8 +308,8 @@ gst_msdkdec_init_decoder (GstMsdkDec * thiz)
|
||||||
|
|
||||||
klass->preinit_decoder (thiz);
|
klass->preinit_decoder (thiz);
|
||||||
|
|
||||||
/* Set framerate only if provided.
|
/* Set frame rate only if provided.
|
||||||
* If not, framerate will be assumed inside the driver.
|
* If not, frame rate will be assumed inside the driver.
|
||||||
* Also we respect the upstream provided fps values */
|
* Also we respect the upstream provided fps values */
|
||||||
if (info->fps_n > 0 && info->fps_d > 0
|
if (info->fps_n > 0 && info->fps_d > 0
|
||||||
&& info->fps_n != thiz->param.mfx.FrameInfo.FrameRateExtN
|
&& info->fps_n != thiz->param.mfx.FrameInfo.FrameRateExtN
|
||||||
|
@ -361,7 +361,7 @@ gst_msdkdec_init_decoder (GstMsdkDec * thiz)
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* account the downstream requirement */
|
/* account for downstream requirement */
|
||||||
if (G_LIKELY (thiz->min_prealloc_buffers))
|
if (G_LIKELY (thiz->min_prealloc_buffers))
|
||||||
request.NumFrameSuggested += thiz->min_prealloc_buffers;
|
request.NumFrameSuggested += thiz->min_prealloc_buffers;
|
||||||
else
|
else
|
||||||
|
@ -382,7 +382,7 @@ gst_msdkdec_init_decoder (GstMsdkDec * thiz)
|
||||||
gst_msdk_frame_alloc (thiz->context, &request, &thiz->alloc_resp);
|
gst_msdk_frame_alloc (thiz->context, &request, &thiz->alloc_resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update the prealloc_buffer count which will be used later
|
/* update the prealloc_buffer count, which will be used later
|
||||||
* as GstBufferPool min_buffers */
|
* as GstBufferPool min_buffers */
|
||||||
thiz->min_prealloc_buffers = request.NumFrameSuggested;
|
thiz->min_prealloc_buffers = request.NumFrameSuggested;
|
||||||
|
|
||||||
|
@ -481,8 +481,8 @@ gst_msdkdec_set_src_caps (GstMsdkDec * thiz, gboolean need_allocation)
|
||||||
guint alloc_w, alloc_h;
|
guint alloc_w, alloc_h;
|
||||||
const gchar *format_str;
|
const gchar *format_str;
|
||||||
|
|
||||||
/* use display width and display height in output state which
|
/* use display width and display height in output state, which
|
||||||
* will be using for caps negotiation */
|
* will be used for caps negotiation */
|
||||||
width =
|
width =
|
||||||
thiz->param.mfx.FrameInfo.CropW ? thiz->param.mfx.
|
thiz->param.mfx.FrameInfo.CropW ? thiz->param.mfx.
|
||||||
FrameInfo.CropW : GST_VIDEO_INFO_WIDTH (&thiz->input_state->info);
|
FrameInfo.CropW : GST_VIDEO_INFO_WIDTH (&thiz->input_state->info);
|
||||||
|
@ -513,8 +513,8 @@ gst_msdkdec_set_src_caps (GstMsdkDec * thiz, gboolean need_allocation)
|
||||||
GST_ROUND_UP_32 (thiz->param.mfx.FrameInfo.Height ? thiz->param.mfx.
|
GST_ROUND_UP_32 (thiz->param.mfx.FrameInfo.Height ? thiz->param.mfx.
|
||||||
FrameInfo.Height : height);
|
FrameInfo.Height : height);
|
||||||
|
|
||||||
/* Ensure output_state->caps and info has same width and height
|
/* Ensure output_state->caps and info have same width and height
|
||||||
* Also mandate the 32 bit alignment */
|
* Also, mandate 32 bit alignment */
|
||||||
vinfo = &output_state->info;
|
vinfo = &output_state->info;
|
||||||
gst_msdk_set_video_alignment (vinfo, alloc_w, alloc_h, &align);
|
gst_msdk_set_video_alignment (vinfo, alloc_w, alloc_h, &align);
|
||||||
gst_video_info_align (vinfo, &align);
|
gst_video_info_align (vinfo, &align);
|
||||||
|
@ -533,7 +533,7 @@ gst_msdkdec_set_src_caps (GstMsdkDec * thiz, gboolean need_allocation)
|
||||||
GST_ROUND_UP_32 (thiz->param.mfx.FrameInfo.Height ? thiz->param.mfx.
|
GST_ROUND_UP_32 (thiz->param.mfx.FrameInfo.Height ? thiz->param.mfx.
|
||||||
FrameInfo.Height : GST_VIDEO_INFO_HEIGHT (&output_state->info));
|
FrameInfo.Height : GST_VIDEO_INFO_HEIGHT (&output_state->info));
|
||||||
|
|
||||||
/* set allocation width and height in allocation_caps
|
/* set allocation width and height in allocation_caps,
|
||||||
* which may or may not be similar to the output_state caps */
|
* which may or may not be similar to the output_state caps */
|
||||||
allocation_caps = gst_caps_copy (output_state->caps);
|
allocation_caps = gst_caps_copy (output_state->caps);
|
||||||
format_str =
|
format_str =
|
||||||
|
@ -544,8 +544,8 @@ gst_msdkdec_set_src_caps (GstMsdkDec * thiz, gboolean need_allocation)
|
||||||
allocation_caps);
|
allocation_caps);
|
||||||
gst_caps_replace (&thiz->allocation_caps, allocation_caps);
|
gst_caps_replace (&thiz->allocation_caps, allocation_caps);
|
||||||
} else {
|
} else {
|
||||||
/* We keep the allocation parameters as it is to avoid pool renegotiation.
|
/* We keep the allocation parameters as it is to avoid pool re-negotiation.
|
||||||
* For codecs like VP9, dynamic resolution change doesn't requires allocation
|
* For codecs like VP9, dynamic resolution change doesn't require allocation
|
||||||
* reset if the new video frame resolution is lower than the
|
* reset if the new video frame resolution is lower than the
|
||||||
* already configured one */
|
* already configured one */
|
||||||
allocation_caps = gst_caps_copy (thiz->allocation_caps);
|
allocation_caps = gst_caps_copy (thiz->allocation_caps);
|
||||||
|
@ -772,15 +772,15 @@ release_msdk_surfaces (GstMsdkDec * thiz)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This will get invoked in the following situations:
|
/* This will get invoked in the following situations:
|
||||||
* 1: begining of the stream, which requires initialization (== complete reset)
|
* 1: beginning of the stream, which requires initialization (== complete reset)
|
||||||
* 2: upstream notified a resolution change and set do_renego to TRUE.
|
* 2: upstream notified a resolution change and set do_renego to TRUE.
|
||||||
* new resoulution may or may not requires full reset
|
* new resolution may or may not requires full reset
|
||||||
* 3: upstream failed to notify the resoulution change but
|
* 3: upstream failed to notify the resolution change but
|
||||||
* msdk detected the change (eg: vp9 stream in ivf elementary form
|
* msdk detected the change (eg: vp9 stream in ivf elementary form
|
||||||
* with varying resolution frames).
|
* with varying resolution frames).
|
||||||
*
|
*
|
||||||
* for any input configuration change, we deal with notification
|
* for any input configuration change, we deal with notification
|
||||||
* from upstream and also use msdk apis to handle the parameter initialization
|
* from upstream and also use msdk APIs to handle the parameter initialization
|
||||||
* efficiently
|
* efficiently
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -810,24 +810,24 @@ gst_msdkdec_negotiate (GstMsdkDec * thiz, gboolean hard_reset)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* De-initialize the decoder if it is already active */
|
/* De-initialize the decoder if it is already active */
|
||||||
/* Not resetting the mfxVideoParam since it already
|
/* Do not reset the mfxVideoParam since it already
|
||||||
* possessing the required parameters for new session decode */
|
* has the required parameters for new session decode */
|
||||||
gst_msdkdec_close_decoder (thiz, FALSE);
|
gst_msdkdec_close_decoder (thiz, FALSE);
|
||||||
|
|
||||||
/* request for pool renegotiation by setting do_realloc */
|
/* request for pool re-negotiation by setting do_realloc */
|
||||||
thiz->do_realloc = TRUE;
|
thiz->do_realloc = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* At this point all pending frames(if there is any) are pushed downsteram
|
/* At this point all pending frames (if there are any) are pushed downstream
|
||||||
* and we are ready to negotiate the output caps */
|
* and we are ready to negotiate the output caps */
|
||||||
if (!gst_msdkdec_set_src_caps (thiz, hard_reset))
|
if (!gst_msdkdec_set_src_caps (thiz, hard_reset))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* this will initiate the allocation query, we create the
|
/* this will initiate the allocation query, we create the
|
||||||
* bufferpool in decide_allocation inorder to account
|
* bufferpool in decide_allocation in order to account
|
||||||
* the downstream min_buffer requirement
|
* for the downstream min_buffer requirement
|
||||||
* Required initializations for MediaSDK operations
|
* Required initializations for MediaSDK operations
|
||||||
* will all be inited from decide_allocation after considering
|
* will all be initialized from decide_allocation after considering
|
||||||
* some of the downstream requirements */
|
* some of the downstream requirements */
|
||||||
if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (thiz)))
|
if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (thiz)))
|
||||||
goto error_negotiate;
|
goto error_negotiate;
|
||||||
|
@ -842,7 +842,7 @@ error_drain:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
error_negotiate:
|
error_negotiate:
|
||||||
GST_ERROR_OBJECT (thiz, "Failed to renegotiation");
|
GST_ERROR_OBJECT (thiz, "Failed to re-negotiate");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
* the DecodeHeader() later on
|
* the DecodeHeader() later on
|
||||||
*/
|
*/
|
||||||
if (!thiz->initialized || thiz->do_renego) {
|
if (!thiz->initialized || thiz->do_renego) {
|
||||||
/* Clear the internal adapter in renegotiation for non-packetized
|
/* Clear the internal adapter in re-negotiation for non-packetized
|
||||||
* formats */
|
* formats */
|
||||||
if (!thiz->is_packetized)
|
if (!thiz->is_packetized)
|
||||||
gst_adapter_clear (thiz->adapter);
|
gst_adapter_clear (thiz->adapter);
|
||||||
|
@ -905,7 +905,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
memset (&bitstream, 0, sizeof (bitstream));
|
memset (&bitstream, 0, sizeof (bitstream));
|
||||||
|
|
||||||
if (thiz->is_packetized) {
|
if (thiz->is_packetized) {
|
||||||
/* Packetized stream: We prefer to have a parser as connected upstream
|
/* Packetized stream: we prefer to have a parser as a connected upstream
|
||||||
* element to the decoder */
|
* element to the decoder */
|
||||||
bitstream.Data = map_info.data;
|
bitstream.Data = map_info.data;
|
||||||
bitstream.DataLength = map_info.size;
|
bitstream.DataLength = map_info.size;
|
||||||
|
@ -928,12 +928,12 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
|
|
||||||
if (!thiz->initialized || thiz->do_renego) {
|
if (!thiz->initialized || thiz->do_renego) {
|
||||||
|
|
||||||
/* gstreamer caps will not bring all the necessary parameters
|
/* gstreamer caps will not provide all the necessary parameters
|
||||||
* required for optimal decode configuration. For eg: the required numbers
|
* required for optimal decode configuration. For example: the required number
|
||||||
* of surfaces to be allocated can be calculated based on H264 SEI header
|
* of surfaces to be allocated can be calculated based on H264 SEI header
|
||||||
* and this information can't be retrieved from the negotiated caps.
|
* and this information can't be retrieved from the negotiated caps.
|
||||||
* So instead of introducing the codecparser dependency to parse the headers
|
* So instead of introducing a codecparser dependency to parse the headers
|
||||||
* inside msdk plugin, we simply use the mfx apis to extract header information */
|
* inside msdk plugin, we simply use the mfx APIs to extract header information */
|
||||||
status = MFXVideoDECODE_DecodeHeader (session, &bitstream, &thiz->param);
|
status = MFXVideoDECODE_DecodeHeader (session, &bitstream, &thiz->param);
|
||||||
if (status == MFX_ERR_MORE_DATA) {
|
if (status == MFX_ERR_MORE_DATA) {
|
||||||
flow = GST_FLOW_OK;
|
flow = GST_FLOW_OK;
|
||||||
|
@ -986,7 +986,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
goto error;
|
goto error;
|
||||||
surface = get_surface (thiz, buffer);
|
surface = get_surface (thiz, buffer);
|
||||||
if (!surface) {
|
if (!surface) {
|
||||||
/* Can't get a surface for some reason, finish tasks to see if
|
/* Can't get a surface for some reason; finish tasks, then see if
|
||||||
a surface becomes available. */
|
a surface becomes available. */
|
||||||
for (i = 0; i < thiz->tasks->len - 1; i++) {
|
for (i = 0; i < thiz->tasks->len - 1; i++) {
|
||||||
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
|
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
|
||||||
|
@ -1010,14 +1010,14 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
MFXVideoDECODE_DecodeFrameAsync (session, &bitstream, surface->surface,
|
MFXVideoDECODE_DecodeFrameAsync (session, &bitstream, surface->surface,
|
||||||
&task->surface, &task->sync_point);
|
&task->surface, &task->sync_point);
|
||||||
|
|
||||||
/* media-sdk requires complete reset since the surface is inadaquate to
|
/* media-sdk requires complete reset since the surface is inadequate
|
||||||
* do further decoding */
|
* for further decoding */
|
||||||
if (status == MFX_ERR_INCOMPATIBLE_VIDEO_PARAM &&
|
if (status == MFX_ERR_INCOMPATIBLE_VIDEO_PARAM &&
|
||||||
retry_err_incompatible++ < 1) {
|
retry_err_incompatible++ < 1) {
|
||||||
/* MFX_ERR_INCOMPATIBLE_VIDEO_PARAM means the current mfx surface is not
|
/* MFX_ERR_INCOMPATIBLE_VIDEO_PARAM means the current mfx surface is not
|
||||||
* suitable for the current frame, call MFXVideoDECODE_DecodeHeader to get
|
* suitable for the current frame. Call MFXVideoDECODE_DecodeHeader to get
|
||||||
* the current frame size then do memory re-allocation, otherwise
|
* the current frame size, then do memory re-allocation, otherwise
|
||||||
* MFXVideoDECODE_DecodeFrameAsync still will fail for next call */
|
* MFXVideoDECODE_DecodeFrameAsync will still fail on next call */
|
||||||
status = MFXVideoDECODE_DecodeHeader (session, &bitstream, &thiz->param);
|
status = MFXVideoDECODE_DecodeHeader (session, &bitstream, &thiz->param);
|
||||||
if (status == MFX_ERR_MORE_DATA) {
|
if (status == MFX_ERR_MORE_DATA) {
|
||||||
flow = GST_FLOW_OK;
|
flow = GST_FLOW_OK;
|
||||||
|
@ -1028,7 +1028,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
if (!gst_msdkdec_negotiate (thiz, TRUE))
|
if (!gst_msdkdec_negotiate (thiz, TRUE))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* The current surface is freed when doing a hard reset, a new surface is
|
/* The current surface is freed when doing a hard reset; a new surface is
|
||||||
* required for the new resolution */
|
* required for the new resolution */
|
||||||
surface = NULL;
|
surface = NULL;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1061,7 +1061,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
surface = NULL;
|
surface = NULL;
|
||||||
continue;
|
continue;
|
||||||
} else if (status == MFX_WRN_DEVICE_BUSY) {
|
} else if (status == MFX_WRN_DEVICE_BUSY) {
|
||||||
/* If device is busy, wait 1ms and retry, as per MSDK's recomendation */
|
/* If device is busy, wait 1ms and retry, as per MSDK's recommendation */
|
||||||
g_usleep (1000);
|
g_usleep (1000);
|
||||||
|
|
||||||
if (task->surface &&
|
if (task->surface &&
|
||||||
|
@ -1070,8 +1070,8 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
surface = NULL;
|
surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the current surface is still busy, we should do sync oepration
|
/* If the current surface is still busy, we should do sync operation,
|
||||||
* then tries to decode again
|
* then try to decode again
|
||||||
*/
|
*/
|
||||||
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
|
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
|
||||||
} else if (status < MFX_ERR_NONE) {
|
} else if (status < MFX_ERR_NONE) {
|
||||||
|
@ -1083,7 +1083,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!thiz->is_packetized) {
|
if (!thiz->is_packetized) {
|
||||||
/* flush out the data which is already consumed by msdk */
|
/* flush out the data which has already been consumed by msdk */
|
||||||
gst_adapter_flush (thiz->adapter, bitstream.DataOffset);
|
gst_adapter_flush (thiz->adapter, bitstream.DataOffset);
|
||||||
flow = GST_FLOW_OK;
|
flow = GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
@ -1132,7 +1132,7 @@ gst_msdkdec_create_buffer_pool (GstMsdkDec * thiz, GstVideoInfo * info,
|
||||||
caps = gst_video_info_to_caps (info);
|
caps = gst_video_info_to_caps (info);
|
||||||
|
|
||||||
/* allocators should use the same width/height/stride/height_alignment of
|
/* allocators should use the same width/height/stride/height_alignment of
|
||||||
* negotiated output caps which is what we configure in msdk_allocator */
|
* negotiated output caps, which is what we configure in msdk_allocator */
|
||||||
if (thiz->use_dmabuf)
|
if (thiz->use_dmabuf)
|
||||||
allocator = gst_msdk_dmabuf_allocator_new (thiz->context, info, alloc_resp);
|
allocator = gst_msdk_dmabuf_allocator_new (thiz->context, info, alloc_resp);
|
||||||
else if (thiz->use_video_memory)
|
else if (thiz->use_video_memory)
|
||||||
|
@ -1200,14 +1200,14 @@ gst_msdkdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
query))
|
query))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Get the buffer pool config decided by the base class. The base
|
/* Get the buffer pool config decided on by the base class. The base
|
||||||
class ensures that there will always be at least a 0th pool in
|
class ensures that there will always be at least a 0th pool in
|
||||||
the query. */
|
the query. */
|
||||||
gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL);
|
gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL);
|
||||||
pool_config = gst_buffer_pool_get_config (pool);
|
pool_config = gst_buffer_pool_get_config (pool);
|
||||||
|
|
||||||
/* Get the caps of pool and increase the min and max buffers by async_depth,
|
/* Get the caps of pool and increase the min and max buffers by async_depth.
|
||||||
* we will always have that number of decode operations in-flight */
|
* We will always have that number of decode operations in-flight */
|
||||||
gst_buffer_pool_config_get_params (pool_config, &pool_caps, &size,
|
gst_buffer_pool_config_get_params (pool_config, &pool_caps, &size,
|
||||||
&min_buffers, &max_buffers);
|
&min_buffers, &max_buffers);
|
||||||
min_buffers += thiz->async_depth;
|
min_buffers += thiz->async_depth;
|
||||||
|
@ -1226,16 +1226,16 @@ gst_msdkdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize MSDK decoder before new bufferpool tries to alloc each buffer,
|
/* Initialize MSDK decoder before new bufferpool tries to alloc each buffer,
|
||||||
* which requires information of frame allocation.
|
* which requires information about frame allocation.
|
||||||
* No effect if already initialized.
|
* No effect if already initialized.
|
||||||
*/
|
*/
|
||||||
if (!gst_msdkdec_init_decoder (thiz))
|
if (!gst_msdkdec_init_decoder (thiz))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* get the updated min_buffers which account the msdk requirement too */
|
/* get the updated min_buffers, which account for the msdk requirement as well */
|
||||||
min_buffers = thiz->min_prealloc_buffers;
|
min_buffers = thiz->min_prealloc_buffers;
|
||||||
|
|
||||||
/* Decoder always use its own pool. So we create a pool if msdk apis
|
/* Decoder always use its own pool. So we create a pool if msdk APIs
|
||||||
* previously requested for allocation (do_realloc = TRUE) */
|
* previously requested for allocation (do_realloc = TRUE) */
|
||||||
if (thiz->do_realloc || !thiz->pool) {
|
if (thiz->do_realloc || !thiz->pool) {
|
||||||
if (thiz->pool)
|
if (thiz->pool)
|
||||||
|
@ -1254,7 +1254,7 @@ gst_msdkdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
GstAllocator *allocator;
|
GstAllocator *allocator;
|
||||||
|
|
||||||
/* If downstream supports video meta and video alignment,
|
/* If downstream supports video meta and video alignment,
|
||||||
* we can replace our own msdk bufferpool and use it
|
* we can replace with our own msdk bufferpool and use it
|
||||||
*/
|
*/
|
||||||
/* Remove downstream's pool */
|
/* Remove downstream's pool */
|
||||||
gst_structure_free (pool_config);
|
gst_structure_free (pool_config);
|
||||||
|
@ -1269,7 +1269,7 @@ gst_msdkdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
gst_query_set_nth_allocation_param (query, 0, allocator, NULL);
|
gst_query_set_nth_allocation_param (query, 0, allocator, NULL);
|
||||||
gst_structure_free (config);
|
gst_structure_free (config);
|
||||||
} else {
|
} else {
|
||||||
/* Unfortunately, dowstream doesn't have videometa or alignment support,
|
/* Unfortunately, downstream doesn't have videometa or alignment support,
|
||||||
* we keep msdk pool as a side-pool that will be decoded into and
|
* we keep msdk pool as a side-pool that will be decoded into and
|
||||||
* then copied from.
|
* then copied from.
|
||||||
*/
|
*/
|
||||||
|
@ -1360,8 +1360,8 @@ gst_msdkdec_drain (GstVideoDecoder * decoder)
|
||||||
/* If device is busy, wait 1ms and retry, as per MSDK's recomendation */
|
/* If device is busy, wait 1ms and retry, as per MSDK's recomendation */
|
||||||
g_usleep (1000);
|
g_usleep (1000);
|
||||||
|
|
||||||
/* If the current surface is still busy, we should do sync oepration
|
/* If the current surface is still busy, we should do sync operation,
|
||||||
* then tries to decode again
|
* then try to decode again
|
||||||
*/
|
*/
|
||||||
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
|
thiz->next_task = (thiz->next_task + 1) % thiz->tasks->len;
|
||||||
} else if (status == MFX_ERR_MORE_DATA) {
|
} else if (status == MFX_ERR_MORE_DATA) {
|
||||||
|
|
Loading…
Reference in a new issue