2 * Copyright (C) 2007-2009 Nokia Corporation.
4 * Author: Felipe Contreras <felipe.contreras@nokia.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation
9 * version 2.1 of the License.
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 Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef GSTOMX_BASE_FILTER_H
23 #define GSTOMX_BASE_FILTER_H
28 #define GST_OMX_BASE_FILTER(obj) (GstOmxBaseFilter *) (obj)
29 #define GST_OMX_BASE_FILTER_TYPE (gst_omx_base_filter_get_type ())
30 #define GST_OMX_BASE_FILTER_CLASS(obj) (GstOmxBaseFilterClass *) (obj)
31 typedef struct GstOmxBaseFilter GstOmxBaseFilter;
32 typedef struct GstOmxBaseFilterClass GstOmxBaseFilterClass;
33 typedef void (*GstOmxBaseFilterCb) (GstOmxBaseFilter * self);
35 #include "gstomx_util.h"
36 #include <async_queue.h>
38 /* Add extended_color_format */
39 typedef enum _EXT_OMX_COLOR_FORMATTYPE {
40 OMX_EXT_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
41 OMX_EXT_COLOR_FormatNV12LPhysicalAddress = 0x7F000002,
42 OMX_EXT_COLOR_FormatNV12Tiled = 0x7FC00002 /* 0x7FC00002 */
43 }EXT_OMX_COLOR_FORMATTYPE;
45 struct GstOmxBaseFilter
56 gboolean use_timestamps; /** @todo remove; timestamps should always be used */
60 GstOmxBaseFilterCb omx_setup;
61 GstFlowReturn last_pad_push_return;
62 GstBuffer *codec_data;
64 /** @todo these are hacks, OpenMAX IL spec should be revised. */
65 gboolean share_input_buffer;
66 gboolean share_output_buffer;
69 GstCaps *sink_set_caps;
70 gboolean use_state_tuning;
73 struct GstOmxBaseFilterClass
75 GstElementClass parent_class;
78 GType gst_omx_base_filter_get_type (void);
81 #endif /* GSTOMX_BASE_FILTER_H */