DVB OSD Device
The DVB OSD device controls the OnScreen-Display of the AV7110 based DVB-cards with hardware MPEG2 decoder. It can be accessed through /dev/dvb/adapter?/osd0. Data types and ioctl definitions can be accessed by including linux/dvb/osd.h in your application.
The OSD is not a frame-buffer like on many other cards. It is a kind of canvas one can draw on. The color-depth is limited depending on the memory size installed. An appropriate palette of colors has to be set up. The installed memory size can be identified with the OSD_GET_CAPABILITY ioctl.
OSD Data Types #
OSD_Command #
Synopsis #
typedef enum OSD_Command;
Commands #
|
Command |
Used variables of |
Description |
||
|---|---|---|---|---|
|
|
|
Disables OSD and releases the buffers. |
||
|
|
x0,y0,x1,y1, |
Opens OSD with this size and bit depth |
||
|
|
|
Enables OSD mode. |
||
|
|
|
Disables OSD mode. |
||
|
|
|
Sets all pixel to color 0. |
||
|
|
color |
Sets all pixel to color <color>. |
||
|
|
color, |
Set palette entry <num> to <r,g,b>, <mix> and <trans> apply |
||
|
|
firstcolor{color}, |
Set a number of entries in the palette. |
||
|
|
transparency{color} |
Sets transparency of mixed pixel (0..15). |
||
|
|
x0,y0,color |
Sets pixel <x>,<y> to color number <color>. |
||
|
|
x0,y0 |
Returns color number of pixel <x>,<y>, or -1. |
||
|
|
x0,y0,x1,data |
Fills pixels x0,y through x1,y with the content of data[]. |
||
|
|
x0,y0,x1,y1, |
Fills pixels x0,y0 through x1,y1 with the content of data[]. |
||
|
|
x0,y0,x1,color |
Fills pixels x0,y through x1,y with the color <color>. |
||
|
|
x0,y0,x1,y1,color |
Fills pixels x0,y0 through x1,y1 with the color <color>. |
||
|
|
x0,y0,x1,y1,color |
Draw a line from x0,y0 to x1,y1 with the color <color>. |
||
|
|
x0,y0,x1,y1, |
Fills parameters with the picture dimensions and the pixel
aspect ratio. |
||
|
|
|
Draws a test picture. |
||
|
|
x0,y0,size,color,text |
Draws a text at position x0,y0 with the color <color>. |
||
|
|
x0 |
Set window with number 0<x0<8 as current. |
||
|
|
x0,y0 |
Move current window to (x0, y0). |
||
|
|
x0,y0,x1,y1, |
Open other types of OSD windows. |
||
Description #
The OSD_Command data type is used with the OSD_SEND_CMD ioctl to tell the driver which OSD_Command to execute.
osd_cmd_t #
Synopsis #
typedef struct osd_cmd_s osd_cmd_t;
Variables #
|
|
OSD_Command to be executed. |
|
|
First horizontal position. |
|
|
First vertical position. |
|
|
Second horizontal position. |
|
|
Second vertical position. |
|
|
Number of the color in the palette. |
|
|
Command specific Data. |
Description #
The osd_cmd_t data type is used with the OSD_SEND_CMD ioctl. It contains the data for the OSD_Command and the OSD_Command itself. The structure has to be passed to the driver and the components may be modified by it.
osd_raw_window_t #
Synopsis #
typedef enum osd_raw_window_t;
Constants #
|
|
1 bit bitmap |
|
|
|
2 bit bitmap |
|
|
|
4 bit bitmap |
|
|
|
8 bit bitmap |
|
|
|
1 Bit bitmap half resolution |
|
|
|
2 Bit bitmap half resolution |
|
|
|
4 Bit bitmap half resolution |
|
|
|
8 Bit bitmap half resolution |
|
|
|
4:2:2 YCRCB Graphic Display |
|
|
|
4:4:4 YCRCB Graphic Display |
|
|
|
4:4:4 YCRCB graphic half resolution |
|
|
|
True Size Normal MPEG Video Display |
|
|
|
MPEG Video Display Half Resolution |
|
|
|
MPEG Video Display Quarter Resolution |
|
|
|
MPEG Video Display Double Resolution |
|
|
|
True Size MPEG Video Display Half Resolution |
|
|
|
True Size MPEG Video Display Quarter Resolution |
|
|
|
True Size MPEG Video Display Double Resolution |
|
|
|
Full Size MPEG Video Display |
|
|
|
Cursor |
|
Description #
The osd_raw_window_t data type is used with the OSD_Command OSD_OpenRaw to tell the driver which type of OSD to open.
osd_cap_t #
Synopsis #
typedef struct osd_cap_s osd_cap_t;
Variables #
|
|
Capability to query. |
|
|
Used to store the Data. |
Supported capabilities #
|
|
Memory size installed on the card. |
Description #
This structure of data used with the OSD_GET_CAPABILITY call.
OSD Function Calls #
OSD_SEND_CMD #
Synopsis #
int Arguments #
|
|
File descriptor returned by a previous call to open(). |
|
|
|
Pointer to the location of the structure osd_cmd_t for this command. |
|
Description #
This ioctl sends the OSD_Command to the card.
Return Value #
On success 0 is returned, on error -1 and the errno variable is set appropriately. The generic error codes are described at the Generic Error Codes chapter.
|
|
Command is out of range. |
OSD_GET_CAPABILITY #
Synopsis #
int Arguments #
|
|
File descriptor returned by a previous call to open(). |
|
|
|
Equals |
|
|
|
Pointer to the location of the structure osd_cap_t for this command. |
|
Description #
This ioctl is used to get the capabilities of the OSD of the AV7110 based DVB-decoder-card in use.
Return Value #
On success 0 is returned, on error -1 and the errno variable is set appropriately. The generic error codes are described at the Generic Error Codes chapter.
|
|
Unsupported capability. |
open() #
Synopsis #
int Arguments #
|
|
Name of specific OSD device. |
|
|
|
A bit-wise OR of the following flags: |
|
|
|
read-only access |
|
|
|
read/write access |
|
|
|
Open in non-blocking mode |
|
Description #
This system call opens a named OSD device (e.g. /dev/dvb/adapter?/osd0) for subsequent use.
Return Value #
|
|
Device driver not loaded/available. |
|
|
Internal error. |
|
|
Device or resource busy. |
|
|
Invalid argument. |
close() #
Synopsis #
int Arguments #
|
|
File descriptor returned by a previous call to open() . |
|
Description #
This system call closes a previously opened OSD device.
Return Value #
|
|
fd is not a valid open file descriptor. |