Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

spudec.h

00001 /*****************************************************************************
00002  * spudec.h : sub picture unit decoder thread interface
00003  *****************************************************************************
00004  * Copyright (C) 1999, 2000 the VideoLAN team
00005  * $Id: spudec.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Samuel Hocevar <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  * 
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 struct decoder_sys_t
00025 {
00026     int b_packetizer;
00027 
00028     mtime_t i_pts;
00029     int i_spu_size;
00030     int i_rle_size;
00031     int i_spu;
00032 
00033     block_t *p_block;
00034 
00035     /* We will never overflow more than 11 bytes if I'm right */
00036     uint8_t buffer[65536 + 20 ];
00037 };
00038 
00039 typedef struct subpicture_data_t
00040 {
00041     mtime_t i_pts;                                 /* presentation timestamp */
00042 
00043     int   pi_offset[2];                              /* byte offsets to data */
00044     void *p_data;
00045 
00046     /* Color information */
00047     vlc_bool_t b_palette;
00048     uint8_t    pi_alpha[4];
00049     uint8_t    pi_yuv[4][3];
00050 
00051     /* Auto crop fullscreen subtitles */
00052     vlc_bool_t b_auto_crop;
00053     int i_y_top_offset;
00054     int i_y_bottom_offset;
00055 
00056 } subpicture_data_t;
00057 
00058 /*****************************************************************************
00059  * Amount of bytes we GetChunk() in one go
00060  *****************************************************************************/
00061 #define SPU_CHUNK_SIZE              0x200
00062 
00063 /*****************************************************************************
00064  * SPU commands
00065  *****************************************************************************/
00066 #define SPU_CMD_FORCE_DISPLAY       0x00
00067 #define SPU_CMD_START_DISPLAY       0x01
00068 #define SPU_CMD_STOP_DISPLAY        0x02
00069 #define SPU_CMD_SET_PALETTE         0x03
00070 #define SPU_CMD_SET_ALPHACHANNEL    0x04
00071 #define SPU_CMD_SET_COORDINATES     0x05
00072 #define SPU_CMD_SET_OFFSETS         0x06
00073 #define SPU_CMD_END                 0xff
00074 
00075 /*****************************************************************************
00076  * Prototypes
00077  *****************************************************************************/
00078 subpicture_t * E_(ParsePacket)( decoder_t * );

Generated on Tue Dec 20 10:14:30 2005 for vlc-0.8.4a by  doxygen 1.4.2