diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c index 60cc61d339..df7bc6f26b 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c @@ -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) { diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.h b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.h index 88746bd101..cee5541ee1 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.h +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.h @@ -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);