]> git.sesse.net Git - vlc/blob - plugins/mpeg/input_ps.h
e28bdb5624d15e132b72d73334b5b75d594f07d8
[vlc] / plugins / mpeg / input_ps.h
1 /*****************************************************************************
2  * input_ps.h: thread structure of the PS plugin
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  * $Id: input_ps.h,v 1.5 2001/04/16 12:34:28 asmax Exp $
6  *
7  * Authors: Christophe Massiot <massiot@via.ecp.fr>
8  *          Cyril Deguet <asmax@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
23  *****************************************************************************/
24
25 /*****************************************************************************
26  * thread_ps_data_t: extension of input_thread_t
27  *****************************************************************************/
28 typedef struct thread_ps_data_s
29 {
30     /* We're necessarily reading a file. */
31     FILE *                  stream;
32 } thread_ps_data_t;
33
34
35 #define DATA_CACHE_SIZE 150
36 #define PES_CACHE_SIZE 150
37 #define SMALL_CACHE_SIZE 150
38 #define LARGE_CACHE_SIZE 150
39 #define MAX_SMALL_SIZE 50     // frontier between small and large packets
40
41 typedef struct
42 {
43     data_packet_t **        p_stack;
44     long                    l_index;
45 } data_packet_cache_t;
46
47
48 typedef struct
49 {
50     pes_packet_t **         p_stack;
51     long                    l_index;
52 } pes_packet_cache_t;
53
54
55 typedef struct
56 {
57     byte_t *                p_data;
58     long                    l_size;
59 } packet_buffer_t;
60
61
62 typedef struct
63 {
64     packet_buffer_t *       p_stack;
65     long                    l_index;
66 } small_buffer_cache_t;
67
68
69 typedef struct
70 {
71     packet_buffer_t *       p_stack;
72     long                    l_index;
73 } large_buffer_cache_t;
74
75
76 typedef struct
77 {
78     data_packet_cache_t     data;
79     pes_packet_cache_t      pes;
80     small_buffer_cache_t    small;
81     large_buffer_cache_t    large;
82 } packet_cache_t;
83
84