summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2017-04-11 18:22:00 +0200
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2017-04-11 19:22:38 +0200
commit8e8280efbf01e997564831c14cd1bc30a50d313f (patch)
tree48c8ad968d7d1cbdcc40509174326cc6cc5e55e8 /gst-libs
parentc5b3577e8827277e75bc1a3bdb6eb66f388e2480 (diff)
libs: window: remove surface_format member
Since we always convert to NV12, there is no need to keep a variable for that. Let us hard code it. https://bugzilla.gnome.org/show_bug.cgi?id=759533
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow.c7
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_priv.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow.c b/gst-libs/gst/vaapi/gstvaapiwindow.c
index f63a4b98..001802cf 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow.c
+++ b/gst-libs/gst/vaapi/gstvaapiwindow.c
@@ -69,7 +69,7 @@ ensure_filter (GstVaapiWindow * window)
window->filter = gst_vaapi_filter_new (display);
if (!window->filter)
goto error_create_filter;
- if (!gst_vaapi_filter_set_format (window->filter, window->surface_format))
+ if (!gst_vaapi_filter_set_format (window->filter, GST_VIDEO_FORMAT_NV12))
goto error_unsupported_format;
return TRUE;
@@ -83,7 +83,7 @@ error_create_filter:
error_unsupported_format:
{
GST_ERROR ("unsupported render target format %s",
- gst_vaapi_video_format_to_string (window->surface_format));
+ gst_vaapi_video_format_to_string (GST_VIDEO_FORMAT_NV12));
window->has_vpp = FALSE;
return FALSE;
}
@@ -100,7 +100,7 @@ ensure_filter_surface_pool (GstVaapiWindow * window)
/* Ensure VA surface pool is created */
/* XXX: optimize the surface format to use. e.g. YUY2 */
window->surface_pool = gst_vaapi_surface_pool_new (display,
- window->surface_format, window->width, window->height);
+ GST_VIDEO_FORMAT_NV12, window->width, window->height);
if (!window->surface_pool) {
GST_WARNING ("failed to create surface pool for conversion");
return FALSE;
@@ -168,7 +168,6 @@ gst_vaapi_window_new_internal (const GstVaapiWindowClass * window_class,
window->use_foreign_window = id != GST_VAAPI_ID_INVALID;
GST_VAAPI_OBJECT_ID (window) = window->use_foreign_window ? id : 0;
- window->surface_format = GST_VIDEO_FORMAT_ENCODED;
window->has_vpp =
GST_VAAPI_DISPLAY_HAS_VPP (GST_VAAPI_OBJECT_DISPLAY (window));
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_priv.h b/gst-libs/gst/vaapi/gstvaapiwindow_priv.h
index c2c10633..cd0df1a4 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_priv.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_priv.h
@@ -78,8 +78,7 @@ struct _GstVaapiWindow
guint is_fullscreen:1;
guint check_geometry:1;
- /* for conversion */
- GstVideoFormat surface_format;
+ /* for conversion */
GstVaapiVideoPool *surface_pool;
GstVaapiFilter *filter;
gboolean has_vpp;