/*
 * xine_osd_command.h:  
 *
 * See the README file for copyright information and how to reach the author.
 *
 */

#ifndef __XINE_OSD_COMMAND_H_
#define __XINE_OSD_COMMAND_H_

#define MAX_OSD_OBJECT 50

typedef enum {
  OSD_Nop        = 0,    /* Do nothing ; used to initialize delay_ms counter */
  OSD_Size       = 1,    /* Set size of VDR OSD area (usually 720x576) */
  OSD_Set_RLE    = 2,    /* Create/update OSD window. Data is rle-compressed. */
  OSD_SetPalette = 3,    /* Modify palette of already created OSD window */ 
  OSD_Move       = 4,    /* Change x/y position of already created OSD window */ 
  OSD_Close      = 5,    /* Close OSD window */
  OSD_Set_YUV    = 6     /* Create/update OSD window. Data is in YUV420 format. */
} osd_command_id_t;

typedef struct {
  osd_command_id_t cmd;
  int wnd;       /* OSD window handle */

  int64_t pts;   /* execute at given pts */
  int delay_ms;  /* execute 'delay_ms' ms after previous command (for same window). */

  int x;         /* Window position, x */
  int y;         /* Window position, y */
  int w;         /* Window width */
  int h;         /* Window height */

  int datalen;   /* size of image data, in bytes */
  /* struct rle_elem { uint16_t len; uint16_t val; } */
  void *data;     /* RLE compressed image: pair of uint16 's / rle item. */

  int colors;             /* palette size */
  unsigned int *palette;  /* argb palette */

} osd_command_t;


#endif /*__XINE_OSD_COMMAND_H_*/
