MPI for OSD (On-Screen Display) More...
#include "mpi_index.h"
Data Structures | |
struct | MPI_OSD_POLYGON_ATTR_S |
Structure for the attribute of OSD polygon. More... | |
struct | MPI_OSD_LINE_ATTR_S |
Structure for the attribute of OSD line. More... | |
struct | MPI_OSD_BIND_ATTR_S |
Structure for the attribute of OSD bind. More... | |
struct | MPI_OSD_CANVAS_ATTR_S |
Structure for the attribute of canvas information. More... | |
struct | MPI_OSD_RGN_ATTR_S |
Structure for the attribute of OSD region. More... | |
Macros | |
#define | MPI_OSD_MAX_HANDLE (128) |
#define | MPI_OSD_MAX_BIND_CHANNEL (4) |
#define | MPI_OSD_MAX_U1_POLYGON_BIND_CHANNEL (8) |
#define | MPI_OSD_MAX_TOTAL_BIND_CHANNEL (MPI_OSD_MAX_BIND_CHANNEL + MPI_OSD_MAX_U1_POLYGON_BIND_CHANNEL) |
#define | MPI_OSD_MODE2_MAX_L10_BIND_CHANNEL (8) |
#define | MPI_OSD_MODE2_MAX_L30_BIND_CHANNEL (16) |
#define | MPI_OSD_MODE2_MAX_L50_BIND_CHANNEL (8) |
#define | MPI_OSD_MODE2_MAX_TOTAL_BIND_CHANNEL |
#define | MPI_OSD_MAX_POLYGON_POINT_NUM (32) |
#define | MPI_OSD_MAX_LINE_POINT_NUM (2) |
#define | MPI_OSD_MAX_WIDTH (8192) |
#define | MPI_OSD_MAX_HEIGHT (8192) |
#define | MPI_OSD_QP_OFFSET_MAX (6) |
#define | MPI_OSD_QP_OFFSET_MIN (-6) |
#define | MPI_OSD_THICKNESS_MIN (2) |
#define | MPI_OSD_THICKNESS_MAX (8) |
Typedefs | |
typedef INT32 | OSD_HANDLE |
a typedef for OSD handle. | |
typedef INT32 | OSD_MODULE |
a typedef for OSD bind module. | |
Enumerations | |
enum | MPI_OSD_COLOR_FORMAT_E { MPI_OSD_COLOR_FORMAT_AYUV_3544 = 0, MPI_OSD_COLOR_FORMAT_PALETTE_16, MPI_OSD_COLOR_FORMAT_PALETTE_8, MPI_OSD_COLOR_FORMAT_NUM } |
OSD color format. More... | |
enum | MPI_OSD_OVERLAY_E { MPI_OSD_OVERLAY_POLYGON = 0, MPI_OSD_OVERLAY_LINE, MPI_OSD_OVERLAY_BITMAP, MPI_OSD_OVERLAY_BITMAP_BYPASS, MPI_OSD_OVERLAY_U1_POLYGON, MPI_OSD_OVERLAY_L10_BITMAP, MPI_OSD_OVERLAY_L40_BITMAP, MPI_OSD_OVERLAY_NUM, MPI_OSD_OVERLAY_L50_POLYGON = MPI_OSD_OVERLAY_U1_POLYGON, MPI_OSD_OVERLAY_L30_POLYGON = MPI_OSD_OVERLAY_POLYGON, MPI_OSD_OVERLAY_L30_LINE = MPI_OSD_OVERLAY_LINE, MPI_OSD_OVERLAY_L30_BITMAP = MPI_OSD_OVERLAY_BITMAP } |
OSD overlay type. More... | |
Functions | |
INT32 | MPI_createOsdRgn (OSD_HANDLE *handle, const MPI_OSD_RGN_ATTR_S *p_osd_attr) |
Create an OSD region. More... | |
INT32 | MPI_destroyOsdRgn (OSD_HANDLE handle) |
Destroy an OSD region. More... | |
INT32 | MPI_bindOsdToChn (OSD_HANDLE handle, const MPI_OSD_BIND_ATTR_S *p_osd_bind) |
Binding an OSD region to an encoder channel. More... | |
INT32 | MPI_unbindOsdFromChn (OSD_HANDLE handle, const MPI_OSD_BIND_ATTR_S *p_osd_bind) |
Unbind OSD region from an encoder channel. More... | |
INT32 | MPI_getOsdBindAttr (OSD_HANDLE handle, MPI_OSD_BIND_ATTR_S *p_osd_bind) |
Get OSD bind attributes. More... | |
INT32 | MPI_setOsdBindAttr (OSD_HANDLE handle, const MPI_OSD_BIND_ATTR_S *p_osd_bind) |
Set OSD bind attributes. More... | |
INT32 | MPI_getOsdRgnAttr (OSD_HANDLE handle, MPI_OSD_RGN_ATTR_S *p_osd_attr) |
Get OSD region attributes. More... | |
INT32 | MPI_setOsdRgnAttr (OSD_HANDLE handle, const MPI_OSD_RGN_ATTR_S *p_osd_attr) |
Set OSD region attributes. More... | |
INT32 | MPI_getOsdCanvas (OSD_HANDLE handle, MPI_OSD_CANVAS_ATTR_S *p_canvas_attr) |
Get the canvas information. More... | |
INT32 | MPI_updateOsdCanvas (OSD_HANDLE handle) |
Update canvas to OSD. More... | |
MPI for OSD (On-Screen Display)
#define MPI_OSD_MAX_BIND_CHANNEL (4) |
Maximum nubmer of canvas OSDs can be bound in encoder channel.
#define MPI_OSD_MAX_HANDLE (128) |
Maximun number of OSD handle.
#define MPI_OSD_MAX_HEIGHT (8192) |
OSD region max height.
#define MPI_OSD_MAX_LINE_POINT_NUM (2) |
Number of points in OSD line.
#define MPI_OSD_MAX_POLYGON_POINT_NUM (32) |
Maximum number of points in OSD polygon.
#define MPI_OSD_MAX_TOTAL_BIND_CHANNEL (MPI_OSD_MAX_BIND_CHANNEL + MPI_OSD_MAX_U1_POLYGON_BIND_CHANNEL) |
Maximum nubmer of OSDs can be bound in encoder channel.
#define MPI_OSD_MAX_U1_POLYGON_BIND_CHANNEL (8) |
Maximum nubmer of hardware OSDs can be bound in encoder channel.
#define MPI_OSD_MAX_WIDTH (8192) |
OSD region max width.
#define MPI_OSD_MODE2_MAX_L10_BIND_CHANNEL (8) |
Maximum nubmer of OSDs can be bound with mode 2 at layer 10 in encoder channel.
#define MPI_OSD_MODE2_MAX_L30_BIND_CHANNEL (16) |
Maximum nubmer of OSDs can be bound with mode 2 at layer 30 in encoder channel.
#define MPI_OSD_MODE2_MAX_L50_BIND_CHANNEL (8) |
Maximum nubmer of hardware OSDs can be bound with mode 2 at layer 50 in encoder channel.
#define MPI_OSD_MODE2_MAX_TOTAL_BIND_CHANNEL |
Maximum nubmer of canvas OSDs can be bound with mode 2 in encoder channel.
#define MPI_OSD_QP_OFFSET_MAX (6) |
OSD max qp offset.
#define MPI_OSD_QP_OFFSET_MIN (-6) |
OSD min qp offset.
#define MPI_OSD_THICKNESS_MAX (8) |
OSD max thickness.
#define MPI_OSD_THICKNESS_MIN (2) |
OSD min thickness.
OSD color format.
Enumerator | |
---|---|
MPI_OSD_COLOR_FORMAT_AYUV_3544 |
AYUV 3544 color format. |
MPI_OSD_COLOR_FORMAT_PALETTE_16 |
Palette 16 bits color format. |
MPI_OSD_COLOR_FORMAT_PALETTE_8 |
Palette 8 bits color format. |
enum MPI_OSD_OVERLAY_E |
OSD overlay type.
INT32 MPI_bindOsdToChn | ( | OSD_HANDLE | handle, |
const MPI_OSD_BIND_ATTR_S * | p_osd_bind | ||
) |
Binding an OSD region to an encoder channel.
[in] | handle | Handle of the OSD that is to be configured. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[in] | p_osd_bind | the attributes of binding. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_PLAT_INVALID_PARAM | invalid parameters. |
MPI_ERR_INVALID_CHN | invalid OSD handle or encoder channel. |
others | failure |
INT32 MPI_createOsdRgn | ( | OSD_HANDLE * | handle, |
const MPI_OSD_RGN_ATTR_S * | p_osd_attr | ||
) |
Create an OSD region.
[out] | handle | pointer to OSD handle. |
[in] | p_osd_attr | the attributes of an OSD. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_PLAT_INVALID_PARAM | invalid parameters. |
others | failure |
INT32 MPI_destroyOsdRgn | ( | OSD_HANDLE | handle | ) |
Destroy an OSD region.
[in] | handle | Handle of the OSD that is to be destoryed. Range [0, MPI_OSD_MAX_HANDLE - 1] |
MPI_SUCCESS | success |
MPI_ERR_INVALID_CHN | invalid OSD handle. |
others | failure |
INT32 MPI_getOsdBindAttr | ( | OSD_HANDLE | handle, |
MPI_OSD_BIND_ATTR_S * | p_osd_bind | ||
) |
Get OSD bind attributes.
Support chips : HC1703, HC1723, HC1753 and HC1783s or later product chip.
[in] | handle | Handle of the OSD that is to retrieve setting. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[in] | p_osd_bind | the attributes of an OSD. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_INVALID_CHN | invalid OSD handle. |
others | failure |
INT32 MPI_getOsdCanvas | ( | OSD_HANDLE | handle, |
MPI_OSD_CANVAS_ATTR_S * | p_canvas_attr | ||
) |
Get the canvas information.
[in] | handle | Handle of the OSD that is to be configured. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[out] | p_canvas_attr | the information of a canvas. |
MPI_SUCCESS | success |
MPI_ERR_INVALID_CHN | invalid OSD handle. |
others | failure |
INT32 MPI_getOsdRgnAttr | ( | OSD_HANDLE | handle, |
MPI_OSD_RGN_ATTR_S * | p_osd_attr | ||
) |
Get OSD region attributes.
[in] | handle | Handle of the OSD that is to retrieve setting. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[in] | p_osd_attr | the attributes of an OSD. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_INVALID_CHN | invalid OSD handle. |
others | failure |
INT32 MPI_setOsdBindAttr | ( | OSD_HANDLE | handle, |
const MPI_OSD_BIND_ATTR_S * | p_osd_bind | ||
) |
Set OSD bind attributes.
Support chips : HC1703, HC1723, HC1753 and HC1783s or later product chip.
[in] | handle | Handle of the OSD that is to be configured. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[in] | p_osd_bind | the attributes of binding. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_PLAT_INVALID_PARAM | invalid parameters. |
MPI_ERR_INVALID_CHN | invalid OSD handle or encoder channel. |
-ENOTSUP | API is not supported in this chip. |
others | failure |
INT32 MPI_setOsdRgnAttr | ( | OSD_HANDLE | handle, |
const MPI_OSD_RGN_ATTR_S * | p_osd_attr | ||
) |
Set OSD region attributes.
[in] | handle | Handle of the OSD that is to be configured. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[in] | p_osd_attr | the attributes of an OSD. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_PLAT_INVALID_PARAM | invalid parameters. |
MPI_ERR_INVALID_CHN | invalid OSD handle. |
others | failure |
INT32 MPI_unbindOsdFromChn | ( | OSD_HANDLE | handle, |
const MPI_OSD_BIND_ATTR_S * | p_osd_bind | ||
) |
Unbind OSD region from an encoder channel.
[in] | handle | Handle of the OSD that is to be configured. Range [0, MPI_OSD_MAX_HANDLE - 1] |
[in] | p_osd_bind | the attributes of OSD binding info. |
MPI_SUCCESS | success |
MPI_ERR_PLAT_NULL_POINTER | input pointer is NULL. |
MPI_ERR_PLAT_INVALID_PARAM | invalid parameters. |
MPI_ERR_INVALID_CHN | invalid OSD handle or encoder channel. |
others | failure |
INT32 MPI_updateOsdCanvas | ( | OSD_HANDLE | handle | ) |
Update canvas to OSD.
[in] | handle | Handle of the OSD that is to be configured. Range [0, MPI_OSD_MAX_HANDLE - 1] |
MPI_SUCCESS | success |
MPI_ERR_INVALID_CHN | invalid OSD handle. |
others | failure |