June 2025 | ||||||
Mo | Tu | We | Th | Fr | Sa | Su |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
001: /* 002: * osd.h 003: * 004: * Copyright (C) 2001 Ralph Metzler <ralph@convergence.de> 005: * & Marcus Metzler <marcus@convergence.de> 006: * for convergence integrated media GmbH 007: * 008: * This program is free software; you can redistribute it and/or 009: * modify it under the terms of the GNU General Lesser Public License 010: * as published by the Free Software Foundation; either version 2.1 011: * of the License, or (at your option) any later version. 012: * 013: * This program is distributed in the hope that it will be useful, 014: * but WITHOUT ANY WARRANTY; without even the implied warranty of 015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016: * GNU General Public License for more details. 017: * 018: * You should have received a copy of the GNU Lesser General Public License 019: * along with this program; if not, write to the Free Software 020: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 021: * 022: */ 023: 024: #ifndef _DVBOSD_H_ 025: #define _DVBOSD_H_ 026: 027: 028: 029: typedef enum { 030: // All functions return -2 on "not open" 031: OSD_Close=1, // () 032: // Disables OSD and releases the buffers 033: // returns 0 on success 034: OSD_Open, // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0)) 035: // Opens OSD with this size and bit depth 036: // returns 0 on success, -1 on DRAM allocation error, -2 on "already open" 037: OSD_Show, // () 038: // enables OSD mode 039: // returns 0 on success 040: OSD_Hide, // () 041: // disables OSD mode 042: // returns 0 on success 043: OSD_Clear, // () 044: // Sets all pixel to color 0 045: // returns 0 on success 046: OSD_Fill, // (color) 047: // Sets all pixel to color <col> 048: // returns 0 on success 049: OSD_SetColor, // (color,R{x0},G{y0},B{x1},opacity{y1}) 050: // set palette entry <num> to <r,g,b>, <mix> and <trans> apply 051: // R,G,B: 0..255 052: // R=Red, G=Green, B=Blue 053: // opacity=0: pixel opacity 0% (only video pixel shows) 054: // opacity=1..254: pixel opacity as specified in header 055: // opacity=255: pixel opacity 100% (only OSD pixel shows) 056: // returns 0 on success, -1 on error 057: OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data) 058: // Set a number of entries in the palette 059: // sets the entries "firstcolor" through "lastcolor" from the array "data" 060: // data has 4 byte for each color: 061: // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel 062: OSD_SetTrans, // (transparency{color}) 063: // Sets transparency of mixed pixel (0..15) 064: // returns 0 on success 065: OSD_SetPixel, // (x0,y0,color) 066: // sets pixel <x>,<y> to color number <col> 067: // returns 0 on success, -1 on error 068: OSD_GetPixel, // (x0,y0) 069: // returns color number of pixel <x>,<y>, or -1 070: OSD_SetRow, // (x0,y0,x1,data) 071: // fills pixels x0,y through x1,y with the content of data[] 072: // returns 0 on success, -1 on clipping all pixel (no pixel drawn) 073: OSD_SetBlock, // (x0,y0,x1,y1,increment{color},data) 074: // fills pixels x0,y0 through x1,y1 with the content of data[] 075: // inc contains the width of one line in the data block, 076: // inc<=0 uses blockwidth as linewidth 077: // returns 0 on success, -1 on clipping all pixel 078: OSD_FillRow, // (x0,y0,x1,color) 079: // fills pixels x0,y through x1,y with the color <col> 080: // returns 0 on success, -1 on clipping all pixel 081: OSD_FillBlock, // (x0,y0,x1,y1,color) 082: // fills pixels x0,y0 through x1,y1 with the color <col> 083: // returns 0 on success, -1 on clipping all pixel 084: OSD_Line, // (x0,y0,x1,y1,color) 085: // draw a line from x0,y0 to x1,y1 with the color <col> 086: // returns 0 on success 087: OSD_Query, // (x0,y0,x1,y1,xasp{color}}), yasp=11 088: // fills parameters with the picture dimensions and the pixel aspect ratio 089: // returns 0 on success 090: OSD_Test, // () 091: // draws a test picture. for debugging purposes only 092: // returns 0 on success 093: // TODO: remove "test" in final version 094: OSD_Text, // (x0,y0,size,color,text) 095: OSD_SetWindow, // (x0) set window with number 0<x0<8 as current 096: OSD_MoveWindow, // move current window to (x0, y0) 097: OSD_OpenRaw, // Open other types of OSD windows 098: } OSD_Command; 099: 100: typedef struct osd_cmd_s { 101: OSD_Command cmd; 102: int x0; 103: int y0; 104: int x1; 105: int y1; 106: int color; 107: void *data; 108: } osd_cmd_t; 109: 110: /* OSD_OpenRaw: set 'color' to desired window type */ 111: typedef enum { 112: OSD_BITMAP1, /* 1 bit bitmap */ 113: OSD_BITMAP2, /* 2 bit bitmap */ 114: OSD_BITMAP4, /* 4 bit bitmap */ 115: OSD_BITMAP8, /* 8 bit bitmap */ 116: OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */ 117: OSD_BITMAP2HR, /* 2 bit bitmap half resolution */ 118: OSD_BITMAP4HR, /* 4 bit bitmap half resolution */ 119: OSD_BITMAP8HR, /* 8 bit bitmap half resolution */ 120: OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */ 121: OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */ 122: OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */ 123: OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */ 124: OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */ 125: OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */ 126: OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */ 127: OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */ 128: OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/ 129: OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */ 130: OSD_VIDEONSIZE, /* Full Size MPEG Video Display */ 131: OSD_CURSOR /* Cursor */ 132: } osd_raw_window_t; 133: 134: typedef struct osd_cap_s { 135: int cmd; 136: #define OSD_CAP_MEMSIZE 1 /* memory size */ 137: long val; 138: } osd_cap_t; 139: 140: 141: #define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t) 142: #define OSD_GET_CAPABILITY _IOR('o', 161, osd_cap_t) 143: 144: #endif 145: