2014-03-03 15:15:24 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2014 Advanced Micro Devices, Inc.
|
|
|
|
* Author: Christian König <christian.koenig@amd.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation
|
|
|
|
* version 2.1 of the License.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_OMX_VIDEO_H__
|
|
|
|
#define __GST_OMX_VIDEO_H__
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/video/video.h>
|
2014-06-24 08:22:37 +00:00
|
|
|
#include <gst/video/gstvideodecoder.h>
|
|
|
|
#include <gst/video/gstvideoencoder.h>
|
2014-03-03 15:15:24 +00:00
|
|
|
|
|
|
|
#include "gstomx.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2019-01-04 09:11:38 +00:00
|
|
|
/* Keep synced with gst_omx_video_get_format_from_omx(). Sort by decreasing quality */
|
|
|
|
#define GST_OMX_VIDEO_SUPPORTED_FORMATS "{ NV16_10LE32, NV12_10LE32, " \
|
|
|
|
"NV16, YUY2, YVYU, UYVY, NV12, I420, RGB16, BGR16, ABGR, ARGB, BGR, GRAY8 }"
|
|
|
|
|
2014-03-03 15:15:24 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstVideoFormat format;
|
|
|
|
OMX_COLOR_FORMATTYPE type;
|
|
|
|
} GstOMXVideoNegotiationMap;
|
|
|
|
|
2014-04-09 16:51:12 +00:00
|
|
|
GstVideoFormat
|
|
|
|
gst_omx_video_get_format_from_omx (OMX_COLOR_FORMATTYPE omx_colorformat);
|
|
|
|
|
2014-03-03 15:15:24 +00:00
|
|
|
GList *
|
|
|
|
gst_omx_video_get_supported_colorformats (GstOMXPort * port,
|
|
|
|
GstVideoCodecState * state);
|
|
|
|
|
2014-03-12 11:47:34 +00:00
|
|
|
GstCaps * gst_omx_video_get_caps_for_map(GList * map);
|
2014-03-03 15:15:24 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
gst_omx_video_negotiation_map_free (GstOMXVideoNegotiationMap * m);
|
|
|
|
|
|
|
|
GstVideoCodecFrame *
|
2019-06-14 05:27:29 +00:00
|
|
|
gst_omx_video_find_nearest_frame (GstElement * element, GstOMXBuffer * buf, GList * frames);
|
2014-03-03 15:15:24 +00:00
|
|
|
|
2017-12-12 14:45:30 +00:00
|
|
|
OMX_U32 gst_omx_video_calculate_framerate_q16 (GstVideoInfo * info);
|
|
|
|
|
2017-12-12 17:30:27 +00:00
|
|
|
gboolean gst_omx_video_is_equal_framerate_q16 (OMX_U32 q16_a, OMX_U32 q16_b);
|
|
|
|
|
2019-07-09 11:07:32 +00:00
|
|
|
gboolean gst_omx_video_get_port_padding (GstOMXPort * port, GstVideoInfo * info_orig,
|
|
|
|
GstVideoAlignment * align);
|
|
|
|
|
2014-03-03 15:15:24 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_OMX_VIDEO_H__ */
|