mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
msdk: Add a bufferpool in GstMsdkContext structure
This alloc_pool is the negotiated pool and will be used in mfxFrameAllocator:Alloc to create surfaces. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3439>
This commit is contained in:
parent
3b0d300759
commit
b2001c1ca5
2 changed files with 19 additions and 0 deletions
|
@ -48,6 +48,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_msdkcontext);
|
|||
struct _GstMsdkContextPrivate
|
||||
{
|
||||
MsdkSession session;
|
||||
GstBufferPool *alloc_pool;
|
||||
GList *cached_alloc_responses;
|
||||
gboolean hardware;
|
||||
gboolean has_frame_allocator;
|
||||
|
@ -917,6 +918,18 @@ gst_msdk_context_put_surface_available (GstMsdkContext * context,
|
|||
g_mutex_unlock (&priv->mutex);
|
||||
}
|
||||
|
||||
void
|
||||
gst_msdk_context_set_alloc_pool (GstMsdkContext * context, GstBufferPool * pool)
|
||||
{
|
||||
context->priv->alloc_pool = gst_object_ref (pool);
|
||||
}
|
||||
|
||||
GstBufferPool *
|
||||
gst_msdk_context_get_alloc_pool (GstMsdkContext * context)
|
||||
{
|
||||
return context->priv->alloc_pool;
|
||||
}
|
||||
|
||||
GstMsdkContextJobType
|
||||
gst_msdk_context_get_job_type (GstMsdkContext * context)
|
||||
{
|
||||
|
|
|
@ -144,6 +144,12 @@ gst_msdk_context_put_surface_locked (GstMsdkContext * context, mfxFrameAllocResp
|
|||
void
|
||||
gst_msdk_context_put_surface_available (GstMsdkContext * context, mfxFrameAllocResponse * resp, mfxFrameSurface1 * surface);
|
||||
|
||||
void
|
||||
gst_msdk_context_set_alloc_pool (GstMsdkContext * context, GstBufferPool * pool);
|
||||
|
||||
GstBufferPool *
|
||||
gst_msdk_context_get_alloc_pool (GstMsdkContext * context);
|
||||
|
||||
GstMsdkContextJobType
|
||||
gst_msdk_context_get_job_type (GstMsdkContext * context);
|
||||
|
||||
|
|
Loading…
Reference in a new issue