2 * Copyright 2014 Advanced Micro Devices, Inc.
3 * Author: Christian König <christian.koenig@amd.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation
8 * version 2.1 of the License.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef __GST_OMX_VIDEO_H__
22 #define __GST_OMX_VIDEO_H__
29 #include <gst/video/video.h>
30 #include <gst/video/gstvideodecoder.h>
31 #include <gst/video/gstvideoencoder.h>
37 /* Keep synced with gst_omx_video_get_format_from_omx(). Sort by decreasing quality */
38 #define GST_OMX_VIDEO_DEC_SUPPORTED_FORMATS "{ NV16_10LE32, NV12_10LE32, " \
39 "NV16, YUY2, YVYU, UYVY, NV12, I420, RGB16, BGR16, ABGR, ARGB, GRAY8 }"
41 #define GST_OMX_VIDEO_ENC_SUPPORTED_FORMATS "{ NV16_10LE32, NV12_10LE32, " \
42 "NV16, NV12, I420, GRAY8 }"
46 GstVideoFormat format;
47 OMX_COLOR_FORMATTYPE type;
48 } GstOMXVideoNegotiationMap;
51 gst_omx_video_get_format_from_omx (OMX_COLOR_FORMATTYPE omx_colorformat);
54 gst_omx_video_get_supported_colorformats (GstOMXPort * port,
55 GstVideoCodecState * state);
57 GstCaps * gst_omx_video_get_caps_for_map(GList * map);
60 gst_omx_video_negotiation_map_free (GstOMXVideoNegotiationMap * m);
63 gst_omx_video_find_nearest_frame (GstElement * element, GstOMXBuffer * buf, GList * frames);
65 OMX_U32 gst_omx_video_calculate_framerate_q16 (GstVideoInfo * info);
67 gboolean gst_omx_video_is_equal_framerate_q16 (OMX_U32 q16_a, OMX_U32 q16_b);
69 gboolean gst_omx_video_get_port_padding (GstOMXPort * port, GstVideoInfo * info_orig,
70 GstVideoAlignment * align);
74 #endif /* __GST_OMX_VIDEO_H__ */