gboolean hardware;
gboolean is_joined;
GstMsdkContextJobType job_type;
+ gint shared_async_depth;
#ifndef _WIN32
gint fd;
VADisplay dpy;
{
context->priv->job_type |= job_type;
}
+
+gint
+gst_msdk_context_get_shared_async_depth (GstMsdkContext * context)
+{
+ return context->priv->shared_async_depth;
+}
+
+void
+gst_msdk_context_add_shared_async_depth (GstMsdkContext * context,
+ gint async_depth)
+{
+ context->priv->shared_async_depth += async_depth;
+}
void
gst_msdk_context_add_job_type (GstMsdkContext * context, GstMsdkContextJobType job_type);
+gint
+gst_msdk_context_get_shared_async_depth (GstMsdkContext * context);
+
+void
+gst_msdk_context_add_shared_async_depth (GstMsdkContext * context, gint async_depth);
+
G_END_DECLS
#endif /* GST_MSDK_CONTEXT_H */
}
if (thiz->use_video_memory) {
+ gint shared_async_depth;
+
+ shared_async_depth =
+ gst_msdk_context_get_shared_async_depth (thiz->context);
+ request.NumFrameSuggested += shared_async_depth;
+
request.Type |= MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;
- request.NumFrameSuggested += thiz->async_depth;
gst_msdk_frame_alloc (thiz->context, &request, &thiz->alloc_resp);
}
parent_context = thiz->context;
thiz->context = gst_msdk_context_new_with_parent (parent_context);
+
+ gst_msdk_context_add_shared_async_depth (thiz->context,
+ gst_msdk_context_get_shared_async_depth (parent_context));
gst_object_unref (parent_context);
GST_INFO_OBJECT (thiz,
thiz->context);
}
+ gst_msdk_context_add_shared_async_depth (thiz->context, thiz->async_depth);
+
return TRUE;
}
msdk_status_to_string (status));
}
+ if (thiz->use_video_memory)
+ request[0].NumFrameSuggested +=
+ gst_msdk_context_get_shared_async_depth (thiz->context);
thiz->num_vpp_surfaces = request[0].NumFrameSuggested;
if (thiz->use_video_memory)
thiz->context);
}
+ gst_msdk_context_add_shared_async_depth (thiz->context, thiz->async_depth);
+
/* Set the minimum pts to some huge value (1000 hours). This keeps
the dts at the start of the stream from needing to be
negative. */