mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
Change caps to use new video/x-surface generic type.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
99c5d18f41
commit
075374cda3
7 changed files with 19 additions and 12 deletions
|
@ -134,6 +134,7 @@ libgstvaapi_@GST_MAJORMINOR@includedir = \
|
|||
$(libgstvaapi_includedir)
|
||||
|
||||
libgstvaapi_@GST_MAJORMINOR@_la_CFLAGS = \
|
||||
-DGST_USE_UNSTABLE_API \
|
||||
-I$(top_srcdir)/gst-libs \
|
||||
$(GST_BASE_CFLAGS) \
|
||||
$(GST_CFLAGS) \
|
||||
|
@ -165,6 +166,7 @@ libgstvaapi_x11_@GST_MAJORMINOR@includedir = \
|
|||
$(libgstvaapi_includedir)
|
||||
|
||||
libgstvaapi_x11_@GST_MAJORMINOR@_la_CFLAGS = \
|
||||
-DGST_USE_UNSTABLE_API \
|
||||
-I$(top_srcdir)/gst-libs \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GST_BASE_CFLAGS) \
|
||||
|
@ -196,6 +198,7 @@ libgstvaapi_glx_@GST_MAJORMINOR@includedir = \
|
|||
$(libgstvaapi_includedir)
|
||||
|
||||
libgstvaapi_glx_@GST_MAJORMINOR@_la_CFLAGS = \
|
||||
-DGST_USE_UNSTABLE_API \
|
||||
-I$(top_srcdir)/gst-libs \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GST_BASE_CFLAGS) \
|
||||
|
|
|
@ -143,7 +143,8 @@ gst_vaapi_context_create_surfaces(GstVaapiContext *context)
|
|||
|
||||
if (!priv->surfaces_pool) {
|
||||
caps = gst_caps_new_simple(
|
||||
"video/x-vaapi-surface",
|
||||
GST_VAAPI_SURFACE_CAPS_NAME,
|
||||
"type", G_TYPE_STRING, "vaapi",
|
||||
"width", G_TYPE_INT, priv->width,
|
||||
"height", G_TYPE_INT, priv->height,
|
||||
NULL
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/vaapi/gstvaapidisplay.h>
|
||||
#include <gst/vaapi/gstvaapiimage.h>
|
||||
#include <gst/vaapi/gstvaapisubpicture.h>
|
||||
#include <gst/video/gstsurfacebuffer.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -39,8 +40,7 @@ typedef enum _GstVaapiSurfaceRenderFlags GstVaapiSurfaceRenderFlags;
|
|||
*
|
||||
* Generic caps type for VA surfaces.
|
||||
*/
|
||||
#define GST_VAAPI_SURFACE_CAPS_NAME \
|
||||
"video/x-vaapi-surface"
|
||||
#define GST_VAAPI_SURFACE_CAPS_NAME GST_VIDEO_CAPS_SURFACE
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_CAPS:
|
||||
|
@ -49,6 +49,8 @@ typedef enum _GstVaapiSurfaceRenderFlags GstVaapiSurfaceRenderFlags;
|
|||
*/
|
||||
#define GST_VAAPI_SURFACE_CAPS \
|
||||
GST_VAAPI_SURFACE_CAPS_NAME ", " \
|
||||
"type = vaapi, " \
|
||||
"opengl = (boolean) { true, false }, " \
|
||||
"width = (int) [ 1, MAX ], " \
|
||||
"height = (int) [ 1, MAX ], " \
|
||||
"framerate = (fraction) [ 0, MAX ]"
|
||||
|
|
|
@ -462,7 +462,7 @@ gst_vaapiconvert_transform_caps(
|
|||
out_caps = gst_caps_from_string(gst_vaapiconvert_vaapi_caps_str);
|
||||
}
|
||||
else {
|
||||
if (!gst_structure_has_name(structure, "video/x-vaapi-surface"))
|
||||
if (!gst_structure_has_name(structure, GST_VAAPI_SURFACE_CAPS_NAME))
|
||||
return NULL;
|
||||
out_caps = gst_caps_from_string(gst_vaapiconvert_yuv_caps_str);
|
||||
if (convert->display) {
|
||||
|
@ -667,7 +667,7 @@ gst_vaapiconvert_get_unit_size(
|
|||
GstVideoFormat format;
|
||||
gint width, height;
|
||||
|
||||
if (gst_structure_has_name(structure, "video/x-vaapi-surface"))
|
||||
if (gst_structure_has_name(structure, GST_VAAPI_SURFACE_CAPS_NAME))
|
||||
*size = 0;
|
||||
else {
|
||||
if (!gst_video_format_parse_caps(caps, &format, &width, &height))
|
||||
|
|
|
@ -499,7 +499,7 @@ gst_vaapisink_buffer_alloc(
|
|||
goto error_ensure_display;
|
||||
|
||||
structure = gst_caps_get_structure(caps, 0);
|
||||
if (!gst_structure_has_name(structure, "video/x-vaapi-surface"))
|
||||
if (!gst_structure_has_name(structure, GST_VAAPI_SURFACE_CAPS_NAME))
|
||||
goto error_invalid_caps;
|
||||
|
||||
buffer = gst_vaapi_video_buffer_new(sink->display);
|
||||
|
|
|
@ -11,7 +11,7 @@ noinst_PROGRAMS += \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
TEST_CFLAGS = $(LIBVA_CFLAGS) -I$(top_srcdir)/gst-libs $(GST_CFLAGS)
|
||||
TEST_CFLAGS = $(LIBVA_CFLAGS) -I$(top_srcdir)/gst-libs $(GST_CFLAGS) -DGST_USE_UNSTABLE_API
|
||||
TEST_X11_CFLAGS = -DUSE_X11 $(X11_CFLAGS)
|
||||
TEST_GLX_CFLAGS = -DUSE_GLX $(GLX_CFLAGS)
|
||||
TEST_MIX_CFLAGS = $(TEST_X11_CFLAGS)
|
||||
|
|
|
@ -66,7 +66,8 @@ main(int argc, char *argv[])
|
|||
g_object_unref(surface);
|
||||
|
||||
caps = gst_caps_new_simple(
|
||||
"video/x-vaapi-surface",
|
||||
GST_VAAPI_SURFACE_CAPS_NAME,
|
||||
"type", G_TYPE_STRING, "vaapi",
|
||||
"width", G_TYPE_INT, width,
|
||||
"height", G_TYPE_INT, height,
|
||||
NULL
|
||||
|
|
Loading…
Reference in a new issue