logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

osd.h (5200B)


  1. /* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
  2. /*
  3. * osd.h - DEPRECATED On Screen Display API
  4. *
  5. * NOTE: should not be used on future drivers
  6. *
  7. * Copyright (C) 2001 Ralph Metzler <ralph@convergence.de>
  8. * & Marcus Metzler <marcus@convergence.de>
  9. * for convergence integrated media GmbH
  10. */
  11. #ifndef _DVBOSD_H_
  12. #define _DVBOSD_H_
  13. typedef enum {
  14. /* All functions return -2 on "not open" */
  15. OSD_Close = 1, /* () */
  16. /*
  17. * Disables OSD and releases the buffers
  18. * returns 0 on success
  19. */
  20. OSD_Open, /* (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0)) */
  21. /*
  22. * Opens OSD with this size and bit depth
  23. * returns 0 on success, -1 on DRAM allocation error, -2 on "already open"
  24. */
  25. OSD_Show, /* () */
  26. /*
  27. * enables OSD mode
  28. * returns 0 on success
  29. */
  30. OSD_Hide, /* () */
  31. /*
  32. * disables OSD mode
  33. * returns 0 on success
  34. */
  35. OSD_Clear, /* () */
  36. /*
  37. * Sets all pixel to color 0
  38. * returns 0 on success
  39. */
  40. OSD_Fill, /* (color) */
  41. /*
  42. * Sets all pixel to color <col>
  43. * returns 0 on success
  44. */
  45. OSD_SetColor, /* (color,R{x0},G{y0},B{x1},opacity{y1}) */
  46. /*
  47. * set palette entry <num> to <r,g,b>, <mix> and <trans> apply
  48. * R,G,B: 0..255
  49. * R=Red, G=Green, B=Blue
  50. * opacity=0: pixel opacity 0% (only video pixel shows)
  51. * opacity=1..254: pixel opacity as specified in header
  52. * opacity=255: pixel opacity 100% (only OSD pixel shows)
  53. * returns 0 on success, -1 on error
  54. */
  55. OSD_SetPalette, /* (firstcolor{color},lastcolor{x0},data) */
  56. /*
  57. * Set a number of entries in the palette
  58. * sets the entries "firstcolor" through "lastcolor" from the array "data"
  59. * data has 4 byte for each color:
  60. * R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel
  61. */
  62. OSD_SetTrans, /* (transparency{color}) */
  63. /*
  64. * Sets transparency of mixed pixel (0..15)
  65. * returns 0 on success
  66. */
  67. OSD_SetPixel, /* (x0,y0,color) */
  68. /*
  69. * sets pixel <x>,<y> to color number <col>
  70. * returns 0 on success, -1 on error
  71. */
  72. OSD_GetPixel, /* (x0,y0) */
  73. /* returns color number of pixel <x>,<y>, or -1 */
  74. OSD_SetRow, /* (x0,y0,x1,data) */
  75. /*
  76. * fills pixels x0,y through x1,y with the content of data[]
  77. * returns 0 on success, -1 on clipping all pixel (no pixel drawn)
  78. */
  79. OSD_SetBlock, /* (x0,y0,x1,y1,increment{color},data) */
  80. /*
  81. * fills pixels x0,y0 through x1,y1 with the content of data[]
  82. * inc contains the width of one line in the data block,
  83. * inc<=0 uses blockwidth as linewidth
  84. * returns 0 on success, -1 on clipping all pixel
  85. */
  86. OSD_FillRow, /* (x0,y0,x1,color) */
  87. /*
  88. * fills pixels x0,y through x1,y with the color <col>
  89. * returns 0 on success, -1 on clipping all pixel
  90. */
  91. OSD_FillBlock, /* (x0,y0,x1,y1,color) */
  92. /*
  93. * fills pixels x0,y0 through x1,y1 with the color <col>
  94. * returns 0 on success, -1 on clipping all pixel
  95. */
  96. OSD_Line, /* (x0,y0,x1,y1,color) */
  97. /*
  98. * draw a line from x0,y0 to x1,y1 with the color <col>
  99. * returns 0 on success
  100. */
  101. OSD_Query, /* (x0,y0,x1,y1,xasp{color}}), yasp=11 */
  102. /*
  103. * fills parameters with the picture dimensions and the pixel aspect ratio
  104. * returns 0 on success
  105. */
  106. OSD_Test, /* () */
  107. /*
  108. * draws a test picture. for debugging purposes only
  109. * returns 0 on success
  110. * TODO: remove "test" in final version
  111. */
  112. OSD_Text, /* (x0,y0,size,color,text) */
  113. OSD_SetWindow, /* (x0) set window with number 0<x0<8 as current */
  114. OSD_MoveWindow, /* move current window to (x0, y0) */
  115. OSD_OpenRaw, /* Open other types of OSD windows */
  116. } OSD_Command;
  117. typedef struct osd_cmd_s {
  118. OSD_Command cmd;
  119. int x0;
  120. int y0;
  121. int x1;
  122. int y1;
  123. int color;
  124. void *data;
  125. } osd_cmd_t;
  126. /* OSD_OpenRaw: set 'color' to desired window type */
  127. typedef enum {
  128. OSD_BITMAP1, /* 1 bit bitmap */
  129. OSD_BITMAP2, /* 2 bit bitmap */
  130. OSD_BITMAP4, /* 4 bit bitmap */
  131. OSD_BITMAP8, /* 8 bit bitmap */
  132. OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */
  133. OSD_BITMAP2HR, /* 2 bit bitmap half resolution */
  134. OSD_BITMAP4HR, /* 4 bit bitmap half resolution */
  135. OSD_BITMAP8HR, /* 8 bit bitmap half resolution */
  136. OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */
  137. OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */
  138. OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */
  139. OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */
  140. OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */
  141. OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */
  142. OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */
  143. OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */
  144. OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/
  145. OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */
  146. OSD_VIDEONSIZE, /* Full Size MPEG Video Display */
  147. OSD_CURSOR /* Cursor */
  148. } osd_raw_window_t;
  149. typedef struct osd_cap_s {
  150. int cmd;
  151. #define OSD_CAP_MEMSIZE 1 /* memory size */
  152. long val;
  153. } osd_cap_t;
  154. #define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t)
  155. #define OSD_GET_CAPABILITY _IOR('o', 161, osd_cap_t)
  156. #endif