annotate libmpeg2/mpeg2.h @ 8786:605c85c27e68

Not checking it caused SIGSEV when uninitning after vesa init failed.
author filon
date Sat, 04 Jan 2003 22:41:52 +0000
parents 18f4dd5d568f
children 47984e3f54ce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * mpeg2.h
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
3 * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
6 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 * mpeg2dec is free software; you can redistribute it and/or modify
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
10 * (at your option) any later version.
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
11 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 * mpeg2dec is distributed in the hope that it will be useful,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 * GNU General Public License for more details.
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
16 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
18 * along with this program; if not, write to the Free Software
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
22 /* Structure for the mpeg2dec decoder */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
23
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
24 typedef struct mpeg2dec_s {
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
25 // vo_instance_t * output;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
26
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
27 /* this is where we keep the state of the decoder */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
28 struct picture_s * picture;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
29
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
30 uint32_t shift;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
31 int is_display_initialized;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
32 int is_sequence_needed;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
33 int drop_flag;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
34 int drop_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
35 int in_slice;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
37 /* the maximum chunk size is determined by vbv_buffer_size */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
38 /* which is 224K for MP@ML streams. */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
39 /* (we make no pretenses of decoding anything more than that) */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
40 /* allocated in init - gcc has problems allocating such big structures */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
41 uint8_t * chunk_buffer;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
42 /* pointer to current position in chunk_buffer */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
43 uint8_t * chunk_ptr;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
44 /* last start code ? */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
45 uint8_t code;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
47 /* ONLY for 0.2.0 release - will not stay there later */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
48 int frame_rate_code;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
49 } mpeg2dec_t ;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 void mpeg2_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 //void mpeg2_allocate_image_buffers (picture_t * picture);
967
5f07e67982d6 -framedrop worx fro mpeg files
arpi_esp
parents: 36
diff changeset
54 int mpeg2_decode_data (vo_functions_t *, uint8_t * data_start, uint8_t * data_end,int framedrop);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 //void mpeg2_close (vo_functions_t *);
967
5f07e67982d6 -framedrop worx fro mpeg files
arpi_esp
parents: 36
diff changeset
56 //void mpeg2_drop (int flag);
2050
18f4dd5d568f -Wall warnings fixed
arpi
parents: 1291
diff changeset
57 //void mpeg2_free_image_buffers (picture_t * picture)
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
58
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
59 /* initialize mpegdec with a opaque user pointer */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
60 //void mpeg2_init (mpeg2dec_t * mpeg2dec, uint32_t mm_accel
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
61 // ,vo_instance_t * output
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
62 // );
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
63
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
64 /* destroy everything which was allocated, shutdown the output */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
65 //void mpeg2_close (mpeg2dec_t * mpeg2dec);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
66
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
67 //int mpeg2_decode_data (mpeg2dec_t * mpeg2dec,
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
68 // uint8_t * data_start, uint8_t * data_end);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
69
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
70 //void mpeg2_drop (mpeg2dec_t * mpeg2dec, int flag);