diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2013-07-10 13:07:37 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2013-07-10 17:03:47 +0200 |
commit | 4ca7922f4b15857b63fcf6c52aed411146d7c220 (patch) | |
tree | 177e82c3bd050b93537605ff8c5e69335e32e2a2 /tests/test-surfaces.c | |
parent | 97c0316fe497ec359040a208783c8f870bea67a0 (diff) | |
download | gst-vaapi-4ca7922f4b15857b63fcf6c52aed411146d7c220.tar.gz |
Use GstVideoInfo for video pools.
Get rid of GstCaps to create surface/image pool, and use GstVideoInfo
structures instead. Those are smaller, and allows for streamlining
libgstvaapi more.
Diffstat (limited to 'tests/test-surfaces.c')
-rw-r--r-- | tests/test-surfaces.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/test-surfaces.c b/tests/test-surfaces.c index 806f8f31..bc55dd7f 100644 --- a/tests/test-surfaces.c +++ b/tests/test-surfaces.c @@ -34,7 +34,7 @@ main(int argc, char *argv[]) GstVaapiID surface_id; GstVaapiSurface *surfaces[MAX_SURFACES]; GstVaapiVideoPool *pool; - GstCaps *caps; + GstVideoInfo vi; gint i; static const GstVaapiChromaType chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420; @@ -58,17 +58,9 @@ main(int argc, char *argv[]) gst_vaapi_object_unref(surface); - caps = gst_caps_new_simple( - GST_VAAPI_SURFACE_CAPS_NAME, - "type", G_TYPE_STRING, "vaapi", - "width", G_TYPE_INT, width, - "height", G_TYPE_INT, height, - NULL - ); - if (!caps) - g_error("cound not create Gst/VA surface caps"); - - pool = gst_vaapi_surface_pool_new(display, caps); + gst_video_info_set_format(&vi, GST_VIDEO_FORMAT_ENCODED, width, height); + + pool = gst_vaapi_surface_pool_new(display, &vi); if (!pool) g_error("could not create Gst/VA surface pool"); @@ -107,7 +99,6 @@ main(int argc, char *argv[]) /* Unref in random order to check objects are correctly refcounted */ gst_vaapi_display_unref(display); - gst_caps_unref(caps); gst_vaapi_video_pool_unref(pool); gst_vaapi_object_unref(surface); video_output_exit(); |