2 * gstvaapifilter.h - Video processing abstraction
4 * Copyright (C) 2013 Intel Corporation
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1
9 * of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef GST_VAAPI_FILTER_H
23 #define GST_VAAPI_FILTER_H
25 #include <gst/vaapi/gstvaapisurface.h>
26 #include <gst/vaapi/video-format.h>
30 typedef struct _GstVaapiFilter GstVaapiFilter;
31 typedef struct _GstVaapiFilterOpInfo GstVaapiFilterOpInfo;
34 * @GST_VAAPI_FILTER_OP_FORMAT: Force output pixel format (#GstVideoFormat).
36 * The set of operations that could be applied to the filter.
39 GST_VAAPI_FILTER_OP_FORMAT = 1,
43 * GstVaapiFilterOpInfo:
44 * @operation: the #GstVaapiFilterOp
45 * @pspec: the #GParamSpec describing the associated configurable value
47 * A #GstVaapiFilterOp descriptor.
49 struct _GstVaapiFilterOpInfo {
50 const GstVaapiFilterOp op;
51 GParamSpec * const pspec;
55 * GstVaapiFilterStatus:
56 * @GST_VAAPI_FILTER_STATUS_SUCCESS: Success.
57 * @GST_VAAPI_FILTER_STATUS_ERROR_ALLOCATION_FAILED: No memory left.
58 * @GST_VAAPI_FILTER_STATUS_ERROR_OPERATION_FAILED: Operation failed.
59 * @GST_VAAPI_FILTER_STATUS_ERROR_INVALID_PARAMETER: Invalid parameter.
60 * @GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_OPERATION: Unsupported operation.
61 * @GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_FORMAT: Unsupported target format.
63 * Video processing status for gst_vaapi_filter_process().
66 GST_VAAPI_FILTER_STATUS_SUCCESS = 0,
67 GST_VAAPI_FILTER_STATUS_ERROR_ALLOCATION_FAILED,
68 GST_VAAPI_FILTER_STATUS_ERROR_OPERATION_FAILED,
69 GST_VAAPI_FILTER_STATUS_ERROR_INVALID_PARAMETER,
70 GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_OPERATION,
71 GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_FORMAT,
72 } GstVaapiFilterStatus;
75 gst_vaapi_filter_new(GstVaapiDisplay *display);
78 gst_vaapi_filter_ref(GstVaapiFilter *filter);
81 gst_vaapi_filter_unref(GstVaapiFilter *filter);
84 gst_vaapi_filter_replace(GstVaapiFilter **old_filter_ptr,
85 GstVaapiFilter *new_filter);
88 gst_vaapi_filter_get_operations(GstVaapiFilter *filter);
91 gst_vaapi_filter_set_operation(GstVaapiFilter *filter, GstVaapiFilterOp op,
95 gst_vaapi_filter_process(GstVaapiFilter *filter, GstVaapiSurface *src_surface,
96 GstVaapiSurface *dst_surface, guint flags);
99 gst_vaapi_filter_get_formats(GstVaapiFilter *filter);
102 gst_vaapi_filter_set_format(GstVaapiFilter *filter, GstVideoFormat format);
104 #endif /* GST_VAAPI_FILTER_H */