OMX_TICKS
from a signed 64 bit value and
* vice-versa. These macros don't actually do anything unless OMX_TICKS
* is defined as a two-part structure (instead of a native signed 64-bit type).
**/
#ifndef OMX_SKIP64BIT
#define omx_ticks_from_s64(s) (s)
#define omx_ticks_to_s64(t) (t)
#else
static inline OMX_TICKS omx_ticks_from_s64(signed long long s) { OMX_TICKS t; t.nLowPart = (OMX_U32)s; t.nHighPart = (OMX_U32)(s>>32); return t; }
#define omx_ticks_to_s64(t) ((t).nLowPart | ((uint64_t)((t).nHighPart) << 32))
#endif /* OMX_SKIP64BIT */
/* Buffer fragment descriptor */
typedef struct OMX_BUFFERFRAGMENTTYPE {
OMX_PTR pBuffer; /**< Pointer to actual block of memory that is acting as the fragment buffer */
OMX_U32 nLen; /**< number of bytes in the buffer */
} OMX_BUFFERFRAGMENTTYPE;
/* OMX_IndexParamBrcmEnableIJGTableScaling: JPEG Quality Table Setting. */
typedef struct OMX_PARAM_IJGSCALINGTYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_BOOL bEnabled;
} OMX_PARAM_IJGSCALINGTYPE;
/*
The boolean \code{bEnabled} value determines whether the component uses
the standard IJG quality tables when encoding images.
*/
/* OMX_IndexConfigTimeInvalidStartTime: Invalid Start Times */
/*
This allows clock clients to supply a start time notification to the
clock whilst indicating that this time is invalid.
*/
/* OMX_IndexParamBrcmMaxFrameSkips: Frame timestamp jumps */
/*
This number represents the number of times a jump in frame timestamps
has been observed that is greater than expected.
*/
/* OMX_IndexConfigAsynchronousFailureURI: Asynchronous Failure Filename */
/*
This allows the client to query for the filename that cause an asynchronous
output error.
*/
/* OMX_IndexParamAsynchronousOutput: Asynchronous Output */
/*
The allows the client to specify to a component that is writing files
that this writing may happen asynchronously, including opening and closing
of files.
*/
/* OMX_IndexConfigClockAdjustment: Clock Adjustment */
/*
This allows the client to read from the clock the total time
adjustment made to the clock whilst running by the reference clock.
If the reference clock sends a time that causes the media time to jump
this difference is added to the total, which can be reported via this
index. When the stream restarts by setting the clock state to
\code{OMX_TIME_ClockStateRunning} or
\code{OMX_TIME_ClockStateWaitingForStartTime} this adjustment total is
set to zero.
*/
/* OMX_IndexParamBrcmDataUnit: Data Unit */
/*
The data unit is an indication to components connected to this
component of the type of data delivery available.
\code{OMX_DataUnitCodedPicture} indicates that we are able to give
framing information, using the \code{OMX_BUFFERFLAG_ENDOFFRAME} flag to
indicate that the data contained finishes a complete
frame. \code{OMX_DataUnitArbitraryStreamSection} indicates that no
end-of-frame markers will be present, and the decoder should perform
the steps necessary to decode the stream. The other enum values are
not used.
*/
/* OMX_IndexConfigPresentationOffset: Presentation Offset */
/*
The value of \code{nTimestamp} is added to the offset requested for
each new input frame. Takes effect for all new input frames, and has
no effect on the offset used for currently-queued frames. A positive
value will make the requested port earlier relative to other streams,
a negative value will make the requested port later relative to other
streams.
*/
/* OMX_IndexConfigSingleStep: Single Step */
/*
When setting this config on a paused clock, where the \code{nU32}
value is non-zero and \code{nPortIndex} is OMX_ALL, the media clock
will advance through the next \code{nU32} next requested media
times. A paused clock is in running state but has a time scale of
0. This will trigger the display of some video frames, so allowing
single-stepping functionality. This config can be set multiple times,
and will buffer up stepping requests until we have media requests to
fulfil, or the clock is stopped or un-paused.
This config can also be used on some video output ports and, if
\code{nU32} is non-zero, requests that the output port forwards the
next \code{nU32} frames appending an EOS marker on the last frame, and
then ceases to forward data on this port. If \code{nU32} is zero, any
previous request to forward a limited number of frames is cancelled
and the default behaviour of this port will resume.
*/
/* OMX_IndexParamCameraCamplusId: Camera Subsystem Identification */
/*
This parameter allows the configuration of the identifier to be used
to initialise the Broadcom Camplus subsystem that sits beneath the
camera component. If only one instance of the camera component is
used, the default value can be used. If more than one instance is
required, they must each have their own unique values for this
parameter. It is also used to tie the component to the image pool
created with \code{OMX_Set upCamPools}.
*/
/* OMX_IndexConfigAudioRenderingLatency: Audio Rendering Latency */
/*
This config allows the client to query the current latency of audio
rendering. The latency is returned as the number of samples that
an audio rendering component has received but have not been played.
*/
/* OMX_IndexConfigBrcmPoolMemAllocSize: Pool memory usage values */
/*
This config allows the client to query how much memory is being used by
the component for any image pools.
*/
/* OMX_IndexConfigDisplayRegion: Display Region */
typedef enum OMX_DISPLAYTRANSFORMTYPE{
OMX_DISPLAY_ROT0 = 0,
OMX_DISPLAY_MIRROR_ROT0 = 1,
OMX_DISPLAY_MIRROR_ROT180 = 2,
OMX_DISPLAY_ROT180 = 3,
OMX_DISPLAY_MIRROR_ROT90 = 4,
OMX_DISPLAY_ROT270 = 5,
OMX_DISPLAY_ROT90 = 6,
OMX_DISPLAY_MIRROR_ROT270 = 7,
OMX_DISPLAY_DUMMY = 0x7FFFFFFF
} OMX_DISPLAYTRANSFORMTYPE;
typedef struct OMX_DISPLAYRECTTYPE {
OMX_S16 x_offset;
OMX_S16 y_offset;
OMX_S16 width;
OMX_S16 height;
} OMX_DISPLAYRECTTYPE;
typedef enum OMX_DISPLAYMODETYPE {
OMX_DISPLAY_MODE_FILL = 0,
OMX_DISPLAY_MODE_LETTERBOX = 1,
OMX_DISPLAY_MODE_DUMMY = 0x7FFFFFFF
} OMX_DISPLAYMODETYPE;
typedef enum OMX_DISPLAYSETTYPE {
OMX_DISPLAY_SET_NONE = 0,
OMX_DISPLAY_SET_NUM = 1,
OMX_DISPLAY_SET_FULLSCREEN = 2,
OMX_DISPLAY_SET_TRANSFORM = 4,
OMX_DISPLAY_SET_DEST_RECT = 8,
OMX_DISPLAY_SET_SRC_RECT = 0x10,
OMX_DISPLAY_SET_MODE = 0x20,
OMX_DISPLAY_SET_PIXEL = 0x40,
OMX_DISPLAY_SET_NOASPECT = 0x80,
OMX_DISPLAY_SET_LAYER = 0x100,
OMX_DISPLAY_SET_COPYPROTECT = 0x200,
OMX_DISPLAY_SET_ALPHA = 0x400,
OMX_DISPLAY_SET_DUMMY = 0x7FFFFFFF
} OMX_DISPLAYSETTYPE;
typedef struct OMX_CONFIG_DISPLAYREGIONTYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_DISPLAYSETTYPE set;
OMX_U32 num;
OMX_BOOL fullscreen;
OMX_DISPLAYTRANSFORMTYPE transform;
OMX_DISPLAYRECTTYPE dest_rect;
OMX_DISPLAYRECTTYPE src_rect;
OMX_BOOL noaspect;
OMX_DISPLAYMODETYPE mode;
OMX_U32 pixel_x;
OMX_U32 pixel_y;
OMX_S32 layer;
OMX_BOOL copyprotect_required;
OMX_U32 alpha;
OMX_U32 wfc_context_width;
OMX_U32 wfc_context_height;
} OMX_CONFIG_DISPLAYREGIONTYPE;
/*
This config sets the output display device, as well as the region used
on the output display, any display transformation, and some flags to
indicate how to scale the image.
The structure uses a bitfield, \code{set}, to indicate which fields are set
and should be used. All other fields will maintain their current
value.
\code{num} describes the display output device, with 0 typically being
a directly connected LCD display.
\code{fullscreen} indicates that we are using the full device screen
area, rather than a window of the display. If fullscreen is false,
then dest_rect is used to specify a region of the display to use.
\code{transform} indicates any rotation or flipping used to map frames
onto the natural display orientation.
The \code{src_rect} indicates which area of the frame to display. If
all values are zero, the whole frame will be used.
The \code{noaspect} flag, if set, indicates that any display scaling
should disregard the aspect ratio of the frame region being displayed.
\code{mode} indicates how the image should be scaled to fit the
display. \code{OMX_DISPLAY_MODE_FILL} indicates that the image should
fill the screen by potentially cropping the frames. Setting
\code{mode} to \code{OMX_DISPLAY_MODE_LETTERBOX} indicates that all
the source region should be displayed and black bars added if
necessary.
The \code{pixel_x} and \code{pixel_y} values, if non-zero, are used to
describe the size of a source pixel. If values are zero, then pixels
default to being square.
Set the \code{layer} that the image will appear on with the
\code{layer} field.
*/
/* OMX_IndexParamSource: Source Image Configuration */
typedef enum OMX_SOURCETYPE {
OMX_SOURCE_WHITE = 0, // all white images
OMX_SOURCE_BLACK = 1, // all black images
OMX_SOURCE_DIAGONAL = 2, // greyscale diagonal stripes
OMX_SOURCE_NOISE = 3, // random pixel values
OMX_SOURCE_RANDOM = 4, // a shaded random pattern of colours
OMX_SOURCE_COLOUR = 5, // a solid colour determined by nParam
OMX_SOURCE_BLOCKS = 6, // random coloured blocks of 16x16 size
OMX_SOURCE_SWIRLY, // a swirly pattern used for encode testing
OMX_SOURCE_DUMMY = 0x7FFFFFFF
} OMX_SOURCETYPE;
typedef struct OMX_PARAM_SOURCETYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_SOURCETYPE eType;
OMX_U32 nParam;
OMX_U32 nFrameCount;
OMX_U32 xFrameRate;
} OMX_PARAM_SOURCETYPE;
/*
The source type determines the kind of image that is produced. Not all
combinations of source type and image type are supported. The
\code{OMX_SOURCE_SWIRLY} setting can only be used with YUV420 packed
planar image formats. When producing RGB565 image format, the
\code{OMX_SOURCE_DIAGONAL} and \code{OMX_SOURCE_RANDOM} modes are
treated as \code{OMX_SOURCE_NOISE}.
The \code{nParam} field is used to specify the colour for the source
colour mode, and the offset of the diagonal pattern for diagonal mode.
For the blocks mode, \code{nParam} is used as the seed for the random
colour generator.
The \code{nFrameCount} parameter determines how many frames to send.
If it is zero, then frames are sent continuously. For any other value,
it counts down until it has sent that many frames, and then stops,
sending out an EOS. The \code{xFrameRate} setting is used to determine
the timestamp for each frame produced, or can be set to zero if
timestamps should all remain at zero.
*/
/* OMX_IndexParamSourceSeed: Source Random Seed */
typedef struct OMX_PARAM_SOURCESEEDTYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_U16 nData[16];
} OMX_PARAM_SOURCESEEDTYPE;
/*
This structure sets the current state of the random number generator
used for \code{OMX_SOURCE_RANDOM} source type, allowing repeatable
random image creation.
*/
/* OMX_IndexParamResize: Resize Control */
typedef enum OMX_RESIZEMODETYPE {
OMX_RESIZE_NONE,
OMX_RESIZE_CROP,
OMX_RESIZE_BOX,
OMX_RESIZE_BYTES,
OMX_RESIZE_DUMMY = 0x7FFFFFFF
} OMX_RESIZEMODETYPE;
typedef struct OMX_PARAM_RESIZETYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_RESIZEMODETYPE eMode;
OMX_U32 nMaxWidth;
OMX_U32 nMaxHeight;
OMX_U32 nMaxBytes;
OMX_BOOL bPreserveAspectRatio;
OMX_BOOL bAllowUpscaling;
} OMX_PARAM_RESIZETYPE;
/*
The mode determines the kind of resize. \code{OMX_RESIZE_BOX} allow
the \code{nMaxWidth} and \code{nMaxHeight} to set a bounding box into
which the output must fit. \code{OMX_RESIZE_BYTES} allows
\code{nMaxBytes} to set the maximum number of bytes into which the
full output frame must fit. Two flags aid the setting of the output
size. \code{bPreseveAspectRatio} sets whether the resize should
preserve the aspect ratio of the incoming
image. \code{bAllowUpscaling} sets whether the resize is allowed to
increase the size of the output image compared to the size of the
input image.
*/
typedef struct OMX_PARAM_TESTINTERFACETYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_BOOL bTest;
OMX_BOOL bSetExtra;
OMX_U32 nExtra;
OMX_BOOL bSetError;
OMX_BOOL stateError[2];
} OMX_PARAM_TESTINTERFACETYPE;
/* OMX_IndexConfigVisualisation: Visualisation Mode */
typedef struct OMX_CONFIG_VISUALISATIONTYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_U8 name[16];
OMX_U8 property[64];
} OMX_CONFIG_VISUALISATIONTYPE;
/*
\code{name} is a string of characters specifying the type of
visualization. The component appends \code{"_vis.vll"} to the name
provided, and attempts to load a visualisation library contained in
this VLL. \code{property} contains configuration parameters and
values, which is interpreted by the visualisation library. Typically
all visualisations will accept a property string containing
\code{'mode=Filter | Parameters | Notes |
\code{OMX_ImageFilterSolarize} | \code{[x0 y0 y1 y2]} | Linear mapping of \code{[0,x0]} to \code{[0,y0>]} and \code{[x0,255]} to \code{[y1,y2]}. Default is \code{"128 128 128 0"}. |
\code{OMX_ImageFilterSharpen} | \code{[sz [str [th]]} | \code{sz} size of filter, either 1 or 2. \code{str} strength of filter. \code{th} threshold of filter. Default is \code{"1 40 20"}. |
\code{OMX_ImageFilterFilm} | \code{[[str] [u v]]} | \code{str} strength of effect. \code{u} sets u to constant value. \code{v} sets v to constant value. Default is \code{"24"}. |
\code{OMX_ImageFilterBlur} | \code{[sz]} | \code{sz} size of filter, either 1 or 2. Default is \code{"2"}. |
\code{OMX_ImageFilterSaturation} | \code{[str]} | \code{str} strength of effect, in 8.8 fixed point format. u/v value differences from 128 are multiplied by \code{str}. Default is \code{"272"}. |