mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
vaapivideocontext: add gst_vaapi_video_context_set_display()
This function set the display to an already created context. This function is going to be used later. Also, gst_vaapi_video_context_new_with_display() now uses this function. Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=757598
This commit is contained in:
parent
ef3fb4afaf
commit
ed280f5b84
2 changed files with 19 additions and 4 deletions
|
@ -52,17 +52,27 @@ _init_context_debug (void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_vaapi_video_context_set_display (GstContext * context,
|
||||||
|
GstVaapiDisplay * display)
|
||||||
|
{
|
||||||
|
GstStructure *structure;
|
||||||
|
|
||||||
|
g_return_if_fail (context != NULL);
|
||||||
|
|
||||||
|
structure = gst_context_writable_structure (context);
|
||||||
|
gst_structure_set (structure, GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME,
|
||||||
|
GST_VAAPI_TYPE_DISPLAY, display, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
GstContext *
|
GstContext *
|
||||||
gst_vaapi_video_context_new_with_display (GstVaapiDisplay * display,
|
gst_vaapi_video_context_new_with_display (GstVaapiDisplay * display,
|
||||||
gboolean persistent)
|
gboolean persistent)
|
||||||
{
|
{
|
||||||
GstContext *context;
|
GstContext *context;
|
||||||
GstStructure *structure;
|
|
||||||
|
|
||||||
context = gst_context_new (GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME, persistent);
|
context = gst_context_new (GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME, persistent);
|
||||||
structure = gst_context_writable_structure (context);
|
gst_vaapi_video_context_set_display (context, display);
|
||||||
gst_structure_set (structure, GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME,
|
|
||||||
GST_VAAPI_TYPE_DISPLAY, display, NULL);
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,11 @@
|
||||||
|
|
||||||
#define GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME "gst.vaapi.Display"
|
#define GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME "gst.vaapi.Display"
|
||||||
|
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
void
|
||||||
|
gst_vaapi_video_context_set_display (GstContext * context,
|
||||||
|
GstVaapiDisplay * display);
|
||||||
|
|
||||||
G_GNUC_INTERNAL
|
G_GNUC_INTERNAL
|
||||||
GstContext *
|
GstContext *
|
||||||
gst_vaapi_video_context_new_with_display (GstVaapiDisplay * display,
|
gst_vaapi_video_context_new_with_display (GstVaapiDisplay * display,
|
||||||
|
|
Loading…
Reference in a new issue