2011-06-28 06:51:23 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
|
|
|
|
* Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
|
2013-01-10 13:44:33 +00:00
|
|
|
* Copyright (C) 2013, Collabora Ltd.
|
|
|
|
* Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2011-06-28 06:51:23 +00:00
|
|
|
*
|
|
|
|
* 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_H__
|
|
|
|
#define __GST_OMX_H__
|
|
|
|
|
2012-04-30 23:20:24 +00:00
|
|
|
#include <gmodule.h>
|
2011-06-28 06:51:23 +00:00
|
|
|
#include <gst/gst.h>
|
2011-07-28 07:54:53 +00:00
|
|
|
#include <string.h>
|
2012-12-12 17:45:39 +00:00
|
|
|
|
2012-12-19 10:22:16 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef GST_OMX_STRUCT_PACKING
|
|
|
|
# if GST_OMX_STRUCT_PACKING == 1
|
|
|
|
# pragma pack(1)
|
|
|
|
# elif GST_OMX_STRUCT_PACKING == 2
|
|
|
|
# pragma pack(2)
|
|
|
|
# elif GST_OMX_STRUCT_PACKING == 4
|
|
|
|
# pragma pack(4)
|
|
|
|
# elif GST_OMX_STRUCT_PACKING == 8
|
|
|
|
# pragma pack(8)
|
|
|
|
# else
|
|
|
|
# error "Unsupported struct packing value"
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2016-12-01 17:23:50 +00:00
|
|
|
/* If the component may signal EOS before it has finished pushing
|
|
|
|
* out all of its buffers. Happens with egl_render on the rpi.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_SIGNALS_PREMATURE_EOS G_GUINT64_CONSTANT (0x0000000000000400)
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
#include <OMX_Core.h>
|
|
|
|
#include <OMX_Component.h>
|
|
|
|
|
2013-02-25 10:55:04 +00:00
|
|
|
#ifdef USE_OMX_TARGET_RPI
|
|
|
|
#include <OMX_Broadcom.h>
|
|
|
|
#endif
|
|
|
|
|
2014-06-24 12:52:43 +00:00
|
|
|
#ifdef HAVE_VIDEO_EXT
|
|
|
|
#include <OMX_VideoExt.h>
|
|
|
|
#endif
|
|
|
|
|
2017-06-02 10:36:30 +00:00
|
|
|
#ifdef HAVE_INDEX_EXT
|
|
|
|
#include <OMX_IndexExt.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_COMPONENT_EXT
|
|
|
|
#include <OMX_ComponentExt.h>
|
|
|
|
#endif
|
|
|
|
|
2012-12-19 10:22:16 +00:00
|
|
|
#ifdef GST_OMX_STRUCT_PACKING
|
|
|
|
#pragma pack()
|
|
|
|
#endif
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2011-07-28 07:54:53 +00:00
|
|
|
#define GST_OMX_INIT_STRUCT(st) G_STMT_START { \
|
2011-08-08 11:04:30 +00:00
|
|
|
memset ((st), 0, sizeof (*(st))); \
|
|
|
|
(st)->nSize = sizeof (*(st)); \
|
2012-12-19 12:03:37 +00:00
|
|
|
(st)->nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \
|
|
|
|
(st)->nVersion.s.nVersionMinor = OMX_VERSION_MINOR; \
|
|
|
|
(st)->nVersion.s.nRevision = OMX_VERSION_REVISION; \
|
2012-12-19 12:05:28 +00:00
|
|
|
(st)->nVersion.s.nStep = OMX_VERSION_STEP; \
|
2011-07-28 07:54:53 +00:00
|
|
|
} G_STMT_END
|
|
|
|
|
2016-06-17 09:06:48 +00:00
|
|
|
#ifdef OMX_SKIP64BIT
|
|
|
|
#define GST_OMX_GET_TICKS(ticks) ((((guint64) (ticks).nHighPart) << 32) | ((ticks).nLowPart))
|
|
|
|
#define GST_OMX_SET_TICKS(ticks, i) G_STMT_START { \
|
|
|
|
ticks.nLowPart = ((guint64) (i)) & 0xffffffff; \
|
|
|
|
ticks.nHighPart = ((guint64) (i)) >> 32; \
|
|
|
|
} G_STMT_END
|
|
|
|
#else
|
|
|
|
#define GST_OMX_GET_TICKS(ticks) (ticks)
|
|
|
|
#define GST_OMX_SET_TICKS(ticks, i) G_STMT_START { \
|
|
|
|
ticks = i; \
|
|
|
|
} G_STMT_END
|
|
|
|
#endif
|
|
|
|
|
2017-04-28 21:23:26 +00:00
|
|
|
/* OMX_StateInvalid does not exist in 1.2.0 spec. The initial state is now
|
|
|
|
* StateLoaded. Problem is that gst-omx still needs an initial state different
|
|
|
|
* than StateLoaded. Otherwise gst_omx_component_set_state(StateLoaded) will
|
|
|
|
* early return because it will think it is already in StateLoaded. Also note
|
|
|
|
* that there is no call to gst_omx_component_set_state(StateInvalid) so this
|
|
|
|
* also shows that StateInvalid is used as a helper in gst-omx.
|
|
|
|
*/
|
|
|
|
#if OMX_VERSION_MINOR == 2
|
|
|
|
#define OMX_StateInvalid OMX_StateReserved_0x00000000
|
|
|
|
#endif
|
|
|
|
|
2011-07-19 08:33:15 +00:00
|
|
|
/* Different hacks that are required to work around
|
|
|
|
* bugs in different OpenMAX implementations
|
|
|
|
*/
|
|
|
|
/* In the EventSettingsChanged callback use nData2 instead of nData1 for
|
|
|
|
* the port index. Happens with Bellagio.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_EVENT_PORT_SETTINGS_CHANGED_NDATA_PARAMETER_SWAP G_GUINT64_CONSTANT (0x0000000000000001)
|
|
|
|
/* In the EventSettingsChanged callback assume that port index 0 really
|
|
|
|
* means port index 1. Happens with the Bellagio ffmpegdist video decoder.
|
|
|
|
*/
|
2011-07-20 06:34:33 +00:00
|
|
|
#define GST_OMX_HACK_EVENT_PORT_SETTINGS_CHANGED_PORT_0_TO_1 G_GUINT64_CONSTANT (0x0000000000000002)
|
|
|
|
/* If the video framerate is not specified as fraction (Q.16) but as
|
|
|
|
* integer number. Happens with the Bellagio ffmpegdist video encoder.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_VIDEO_FRAMERATE_INTEGER G_GUINT64_CONSTANT (0x0000000000000004)
|
|
|
|
/* If the SYNCFRAME flag on encoder output buffers is not used and we
|
|
|
|
* have to assume that all frames are sync frames.
|
|
|
|
* Happens with the Bellagio ffmpegdist video encoder.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_SYNCFRAME_FLAG_NOT_USED G_GUINT64_CONSTANT (0x0000000000000008)
|
2011-09-27 12:15:06 +00:00
|
|
|
/* If the component needs to be re-created if the caps change.
|
|
|
|
* Happens with Qualcomm's OpenMAX implementation.
|
|
|
|
*/
|
2011-10-14 08:27:47 +00:00
|
|
|
#define GST_OMX_HACK_NO_COMPONENT_RECONFIGURE G_GUINT64_CONSTANT (0x0000000000000010)
|
2011-09-26 11:04:18 +00:00
|
|
|
|
2011-12-09 11:17:29 +00:00
|
|
|
/* If the component does not accept empty EOS buffers.
|
|
|
|
* Happens with Qualcomm's OpenMAX implementation.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_NO_EMPTY_EOS_BUFFER G_GUINT64_CONSTANT (0x0000000000000020)
|
|
|
|
|
2012-04-25 13:31:32 +00:00
|
|
|
/* If the component might not acknowledge a drain.
|
|
|
|
* Happens with TI's Ducati OpenMAX implementation.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_DRAIN_MAY_NOT_RETURN G_GUINT64_CONSTANT (0x0000000000000040)
|
|
|
|
|
2012-04-20 14:51:34 +00:00
|
|
|
/* If the component doesn't allow any component role to be set.
|
|
|
|
* Happens with Broadcom's OpenMAX implementation.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_NO_COMPONENT_ROLE G_GUINT64_CONSTANT (0x0000000000000080)
|
|
|
|
|
2014-05-15 08:58:34 +00:00
|
|
|
/* If the component doesn't allow disabling the outport while
|
|
|
|
* when setting the format until the output format is known.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_NO_DISABLE_OUTPORT G_GUINT64_CONSTANT (0x0000000000000100)
|
|
|
|
|
2017-03-13 16:00:49 +00:00
|
|
|
/* If the encoder requires input buffers that have a height
|
|
|
|
* which is a multiple of 16 pixels
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_HEIGHT_MULTIPLE_16 G_GUINT64_CONSTANT (0x0000000000000200)
|
|
|
|
|
2017-03-28 14:27:10 +00:00
|
|
|
/* If we should pass the profile/level information from upstream to the
|
|
|
|
* OMX decoder. This is a violation of the OMX spec as
|
|
|
|
* OMX_IndexParamVideoProfileLevelCurrent is supposed to be r-o so
|
|
|
|
* do it as a platform specific hack.
|
|
|
|
*/
|
|
|
|
#define GST_OMX_HACK_PASS_PROFILE_TO_DECODER G_GUINT64_CONSTANT (0x0000000000000800)
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
typedef struct _GstOMXCore GstOMXCore;
|
|
|
|
typedef struct _GstOMXPort GstOMXPort;
|
|
|
|
typedef enum _GstOMXPortDirection GstOMXPortDirection;
|
|
|
|
typedef struct _GstOMXComponent GstOMXComponent;
|
|
|
|
typedef struct _GstOMXBuffer GstOMXBuffer;
|
2012-04-12 19:57:32 +00:00
|
|
|
typedef struct _GstOMXClassData GstOMXClassData;
|
2013-01-10 13:44:33 +00:00
|
|
|
typedef struct _GstOMXMessage GstOMXMessage;
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2011-07-07 10:23:24 +00:00
|
|
|
typedef enum {
|
2011-07-08 13:25:07 +00:00
|
|
|
/* Everything good and the buffer is valid */
|
2011-07-07 10:23:24 +00:00
|
|
|
GST_OMX_ACQUIRE_BUFFER_OK = 0,
|
2011-07-08 13:25:07 +00:00
|
|
|
/* The port is flushing, exit ASAP */
|
2011-07-07 10:23:24 +00:00
|
|
|
GST_OMX_ACQUIRE_BUFFER_FLUSHING,
|
2011-07-08 13:25:07 +00:00
|
|
|
/* The port must be reconfigured */
|
2011-07-07 10:23:24 +00:00
|
|
|
GST_OMX_ACQUIRE_BUFFER_RECONFIGURE,
|
2013-03-14 11:49:42 +00:00
|
|
|
/* The port is EOS */
|
|
|
|
GST_OMX_ACQUIRE_BUFFER_EOS,
|
2011-07-08 13:25:07 +00:00
|
|
|
/* A fatal error happened */
|
2011-07-07 10:23:24 +00:00
|
|
|
GST_OMX_ACQUIRE_BUFFER_ERROR
|
|
|
|
} GstOMXAcquireBufferReturn;
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
struct _GstOMXCore {
|
|
|
|
/* Handle to the OpenMAX IL core shared library */
|
|
|
|
GModule *module;
|
|
|
|
|
|
|
|
/* Current number of users, transitions from/to 0
|
|
|
|
* call init/deinit */
|
2012-11-12 10:29:48 +00:00
|
|
|
GMutex lock;
|
2011-06-28 06:51:23 +00:00
|
|
|
gint user_count; /* LOCK */
|
|
|
|
|
|
|
|
/* OpenMAX core library functions, protected with LOCK */
|
|
|
|
OMX_ERRORTYPE (*init) (void);
|
|
|
|
OMX_ERRORTYPE (*deinit) (void);
|
|
|
|
OMX_ERRORTYPE (*get_handle) (OMX_HANDLETYPE * handle,
|
|
|
|
OMX_STRING name, OMX_PTR data, OMX_CALLBACKTYPE * callbacks);
|
|
|
|
OMX_ERRORTYPE (*free_handle) (OMX_HANDLETYPE handle);
|
2013-01-11 17:44:13 +00:00
|
|
|
OMX_ERRORTYPE (*setup_tunnel) (OMX_HANDLETYPE output, OMX_U32 outport, OMX_HANDLETYPE input, OMX_U32 inport);
|
2011-06-28 06:51:23 +00:00
|
|
|
};
|
|
|
|
|
2013-01-10 13:44:33 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_OMX_MESSAGE_STATE_SET,
|
|
|
|
GST_OMX_MESSAGE_FLUSH,
|
|
|
|
GST_OMX_MESSAGE_ERROR,
|
|
|
|
GST_OMX_MESSAGE_PORT_ENABLE,
|
|
|
|
GST_OMX_MESSAGE_PORT_SETTINGS_CHANGED,
|
2013-03-14 11:49:42 +00:00
|
|
|
GST_OMX_MESSAGE_BUFFER_FLAG,
|
2013-01-10 13:44:33 +00:00
|
|
|
GST_OMX_MESSAGE_BUFFER_DONE,
|
|
|
|
} GstOMXMessageType;
|
|
|
|
|
2013-05-06 13:33:59 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_OMX_COMPONENT_TYPE_SINK,
|
|
|
|
GST_OMX_COMPONENT_TYPE_SOURCE,
|
|
|
|
GST_OMX_COMPONENT_TYPE_FILTER
|
|
|
|
} GstOmxComponentType;
|
|
|
|
|
2013-01-10 13:44:33 +00:00
|
|
|
struct _GstOMXMessage {
|
|
|
|
GstOMXMessageType type;
|
|
|
|
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
OMX_STATETYPE state;
|
|
|
|
} state_set;
|
|
|
|
struct {
|
|
|
|
OMX_U32 port;
|
|
|
|
} flush;
|
|
|
|
struct {
|
|
|
|
OMX_ERRORTYPE error;
|
|
|
|
} error;
|
|
|
|
struct {
|
|
|
|
OMX_U32 port;
|
|
|
|
OMX_BOOL enable;
|
|
|
|
} port_enable;
|
|
|
|
struct {
|
|
|
|
OMX_U32 port;
|
|
|
|
} port_settings_changed;
|
2013-03-14 11:49:42 +00:00
|
|
|
struct {
|
|
|
|
OMX_U32 port;
|
|
|
|
OMX_U32 flags;
|
|
|
|
} buffer_flag;
|
2013-01-10 13:44:33 +00:00
|
|
|
struct {
|
|
|
|
OMX_HANDLETYPE component;
|
|
|
|
OMX_PTR app_data;
|
|
|
|
OMX_BUFFERHEADERTYPE *buffer;
|
|
|
|
OMX_BOOL empty;
|
|
|
|
} buffer_done;
|
|
|
|
} content;
|
|
|
|
};
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
struct _GstOMXPort {
|
|
|
|
GstOMXComponent *comp;
|
2011-07-06 08:29:54 +00:00
|
|
|
guint32 index;
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2013-01-11 17:44:13 +00:00
|
|
|
gboolean tunneled;
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
OMX_PARAM_PORTDEFINITIONTYPE port_def;
|
2011-07-07 10:51:03 +00:00
|
|
|
GPtrArray *buffers; /* Contains GstOMXBuffer* */
|
2013-01-10 13:44:33 +00:00
|
|
|
GQueue pending_buffers; /* Contains GstOMXBuffer* */
|
2011-06-28 06:51:23 +00:00
|
|
|
gboolean flushing;
|
|
|
|
gboolean flushed; /* TRUE after OMX_CommandFlush was done */
|
2013-02-12 10:41:43 +00:00
|
|
|
gboolean enabled_pending; /* TRUE after OMX_Command{En,Dis}able */
|
|
|
|
gboolean disabled_pending; /* was done until it took effect */
|
2013-03-14 11:49:42 +00:00
|
|
|
gboolean eos; /* TRUE after a buffer with EOS flag was received */
|
2011-07-08 13:25:07 +00:00
|
|
|
|
2011-07-19 08:33:54 +00:00
|
|
|
/* Increased whenever the settings of these port change.
|
|
|
|
* If settings_cookie != configured_settings_cookie
|
|
|
|
* the port has to be reconfigured.
|
|
|
|
*/
|
2011-07-08 13:25:07 +00:00
|
|
|
gint settings_cookie;
|
2011-07-19 08:33:54 +00:00
|
|
|
gint configured_settings_cookie;
|
2011-06-28 06:51:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstOMXComponent {
|
|
|
|
GstObject *parent;
|
2013-03-15 00:28:02 +00:00
|
|
|
|
|
|
|
gchar *name; /* for debugging mostly */
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
OMX_HANDLETYPE handle;
|
|
|
|
GstOMXCore *core;
|
|
|
|
|
2011-07-19 08:33:15 +00:00
|
|
|
guint64 hacks; /* Flags, GST_OMX_HACK_* */
|
|
|
|
|
2013-01-10 13:44:33 +00:00
|
|
|
/* Added once, never changed. No locks necessary */
|
2011-07-07 10:51:03 +00:00
|
|
|
GPtrArray *ports; /* Contains GstOMXPort* */
|
2011-07-08 13:25:07 +00:00
|
|
|
gint n_in_ports, n_out_ports;
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2013-01-10 13:44:33 +00:00
|
|
|
/* Locking order: lock -> messages_lock
|
|
|
|
*
|
|
|
|
* Never hold lock while waiting for messages_cond
|
|
|
|
* Always check that messages is empty before waiting */
|
|
|
|
GMutex lock;
|
|
|
|
|
|
|
|
GQueue messages; /* Queue of GstOMXMessages */
|
|
|
|
GMutex messages_lock;
|
|
|
|
GCond messages_cond;
|
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
OMX_STATETYPE state;
|
|
|
|
/* OMX_StateInvalid if no pending state */
|
|
|
|
OMX_STATETYPE pending_state;
|
|
|
|
/* OMX_ErrorNone usually, if different nothing will work */
|
|
|
|
OMX_ERRORTYPE last_error;
|
2011-07-19 08:33:54 +00:00
|
|
|
|
|
|
|
GList *pending_reconfigure_outports;
|
2011-06-28 06:51:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstOMXBuffer {
|
|
|
|
GstOMXPort *port;
|
|
|
|
OMX_BUFFERHEADERTYPE *omx_buf;
|
|
|
|
|
|
|
|
/* TRUE if the buffer is used by the port, i.e.
|
|
|
|
* between {Empty,Fill}ThisBuffer and the callback
|
|
|
|
*/
|
|
|
|
gboolean used;
|
2011-07-08 13:25:07 +00:00
|
|
|
|
|
|
|
/* Cookie of the settings when this buffer was allocated */
|
|
|
|
gint settings_cookie;
|
2013-03-13 09:29:23 +00:00
|
|
|
|
|
|
|
/* TRUE if this is an EGLImage */
|
|
|
|
gboolean eglimage;
|
2011-06-28 06:51:23 +00:00
|
|
|
};
|
|
|
|
|
2012-04-12 19:57:32 +00:00
|
|
|
struct _GstOMXClassData {
|
|
|
|
const gchar *core_name;
|
|
|
|
const gchar *component_name;
|
|
|
|
const gchar *component_role;
|
|
|
|
|
|
|
|
const gchar *default_src_template_caps;
|
|
|
|
const gchar *default_sink_template_caps;
|
|
|
|
|
|
|
|
guint32 in_port_index, out_port_index;
|
|
|
|
|
|
|
|
guint64 hacks;
|
2013-05-06 13:33:59 +00:00
|
|
|
|
|
|
|
GstOmxComponentType type;
|
2012-04-12 19:57:32 +00:00
|
|
|
};
|
2011-07-12 08:05:31 +00:00
|
|
|
|
|
|
|
GKeyFile * gst_omx_get_configuration (void);
|
|
|
|
|
2011-07-13 18:22:51 +00:00
|
|
|
const gchar * gst_omx_error_to_string (OMX_ERRORTYPE err);
|
2013-03-15 00:47:47 +00:00
|
|
|
const gchar * gst_omx_state_to_string (OMX_STATETYPE state);
|
2013-03-15 01:06:05 +00:00
|
|
|
const gchar * gst_omx_command_to_string (OMX_COMMANDTYPE cmd);
|
2017-10-09 15:27:22 +00:00
|
|
|
const gchar * gst_omx_buffer_flags_to_string (guint32 flags);
|
2013-03-15 01:06:05 +00:00
|
|
|
|
2011-07-19 08:33:15 +00:00
|
|
|
guint64 gst_omx_parse_hacks (gchar ** hacks);
|
2011-07-13 18:22:51 +00:00
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
GstOMXCore * gst_omx_core_acquire (const gchar * filename);
|
|
|
|
void gst_omx_core_release (GstOMXCore * core);
|
|
|
|
|
|
|
|
|
2013-02-12 10:49:21 +00:00
|
|
|
GstOMXComponent * gst_omx_component_new (GstObject * parent, const gchar *core_name, const gchar *component_name, const gchar * component_role, guint64 hacks);
|
2011-06-28 06:51:23 +00:00
|
|
|
void gst_omx_component_free (GstOMXComponent * comp);
|
|
|
|
|
|
|
|
OMX_ERRORTYPE gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state);
|
|
|
|
OMX_STATETYPE gst_omx_component_get_state (GstOMXComponent * comp, GstClockTime timeout);
|
|
|
|
|
|
|
|
OMX_ERRORTYPE gst_omx_component_get_last_error (GstOMXComponent * comp);
|
2011-07-13 18:22:51 +00:00
|
|
|
const gchar * gst_omx_component_get_last_error_string (GstOMXComponent * comp);
|
2011-06-28 06:51:23 +00:00
|
|
|
|
|
|
|
GstOMXPort * gst_omx_component_add_port (GstOMXComponent * comp, guint32 index);
|
|
|
|
GstOMXPort * gst_omx_component_get_port (GstOMXComponent * comp, guint32 index);
|
|
|
|
|
2011-07-28 08:23:08 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_component_get_parameter (GstOMXComponent * comp, OMX_INDEXTYPE index, gpointer param);
|
|
|
|
OMX_ERRORTYPE gst_omx_component_set_parameter (GstOMXComponent * comp, OMX_INDEXTYPE index, gpointer param);
|
|
|
|
|
|
|
|
OMX_ERRORTYPE gst_omx_component_get_config (GstOMXComponent * comp, OMX_INDEXTYPE index, gpointer config);
|
|
|
|
OMX_ERRORTYPE gst_omx_component_set_config (GstOMXComponent * comp, OMX_INDEXTYPE index, gpointer config);
|
2014-03-04 16:41:20 +00:00
|
|
|
|
|
|
|
OMX_ERRORTYPE gst_omx_setup_tunnel (GstOMXPort * port1, GstOMXPort * port2);
|
|
|
|
OMX_ERRORTYPE gst_omx_close_tunnel (GstOMXPort * port1, GstOMXPort * port2);
|
2011-07-28 08:23:08 +00:00
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2013-03-01 10:18:18 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_get_port_definition (GstOMXPort * port, OMX_PARAM_PORTDEFINITIONTYPE * port_def);
|
2013-02-28 14:48:53 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_update_port_definition (GstOMXPort *port, OMX_PARAM_PORTDEFINITIONTYPE *port_definition);
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2011-07-07 10:23:24 +00:00
|
|
|
GstOMXAcquireBufferReturn gst_omx_port_acquire_buffer (GstOMXPort *port, GstOMXBuffer **buf);
|
2011-07-06 08:29:54 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_release_buffer (GstOMXPort *port, GstOMXBuffer *buf);
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2013-03-07 10:11:58 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_set_flushing (GstOMXPort *port, GstClockTime timeout, gboolean flush);
|
2011-06-28 06:51:23 +00:00
|
|
|
gboolean gst_omx_port_is_flushing (GstOMXPort *port);
|
|
|
|
|
2013-03-06 16:05:51 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_allocate_buffers (GstOMXPort *port);
|
2013-02-28 10:19:07 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_use_buffers (GstOMXPort *port, const GList *buffers);
|
|
|
|
OMX_ERRORTYPE gst_omx_port_use_eglimages (GstOMXPort *port, const GList *images);
|
2011-06-28 06:51:23 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_deallocate_buffers (GstOMXPort *port);
|
2013-03-07 10:11:58 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_populate (GstOMXPort *port);
|
2013-02-25 09:41:12 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_wait_buffers_released (GstOMXPort * port, GstClockTime timeout);
|
2011-06-28 06:51:23 +00:00
|
|
|
|
2013-02-27 14:49:56 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_mark_reconfigured (GstOMXPort * port);
|
2011-06-28 06:51:23 +00:00
|
|
|
|
|
|
|
OMX_ERRORTYPE gst_omx_port_set_enabled (GstOMXPort * port, gboolean enabled);
|
2013-02-12 10:41:43 +00:00
|
|
|
OMX_ERRORTYPE gst_omx_port_wait_enabled (GstOMXPort * port, GstClockTime timeout);
|
2011-06-28 06:51:23 +00:00
|
|
|
gboolean gst_omx_port_is_enabled (GstOMXPort * port);
|
|
|
|
|
2011-07-19 08:33:54 +00:00
|
|
|
|
2012-04-12 19:57:32 +00:00
|
|
|
void gst_omx_set_default_role (GstOMXClassData *class_data, const gchar *default_role);
|
|
|
|
|
2014-03-13 13:26:58 +00:00
|
|
|
/* refered by plugin_init */
|
|
|
|
GST_DEBUG_CATEGORY_EXTERN (gst_omx_video_debug_category);
|
2012-04-12 19:57:32 +00:00
|
|
|
|
2011-06-28 06:51:23 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_OMX_H__ */
|