1 /*****************************************************************************
2  * spudec.h : sub picture unit decoder thread interface
3  *****************************************************************************
4  * Copyright (C) 1999, 2000, 2006 VLC authors and VideoLAN
5  * $Id: 7f492696554ee52dbef2704b059cd51ec0a2b492 $
6  *
7  * Authors: Sam Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 /* #define DEBUG_SPUDEC 1 */
25 
26 struct decoder_sys_t
27 {
28     bool b_packetizer;
29     bool b_disabletrans;
30 
31     mtime_t i_pts;
32     unsigned int i_spu_size;
33     unsigned int i_rle_size;
34     unsigned int i_spu;
35 
36     block_t *p_block;
37 
38     /* We will never overflow */
39     uint8_t buffer[65536];
40 };
41 
42 /*****************************************************************************
43  * Amount of bytes we GetChunk() in one go
44  *****************************************************************************/
45 #define SPU_CHUNK_SIZE              0x200
46 
47 /*****************************************************************************
48  * SPU commands
49  *****************************************************************************/
50 #define SPU_CMD_FORCE_DISPLAY       0x00
51 #define SPU_CMD_START_DISPLAY       0x01
52 #define SPU_CMD_STOP_DISPLAY        0x02
53 #define SPU_CMD_SET_PALETTE         0x03
54 #define SPU_CMD_SET_ALPHACHANNEL    0x04
55 #define SPU_CMD_SET_COORDINATES     0x05
56 #define SPU_CMD_SET_OFFSETS         0x06
57 #define SPU_CMD_SET_COLCON          0x07
58 #define SPU_CMD_END                 0xff
59 
60 /*****************************************************************************
61  * Prototypes
62  *****************************************************************************/
63 void ParsePacket( decoder_t *, void(*pf_queue)(decoder_t *, subpicture_t *) );
64