sd_ass: initialize structs for external tracks properly
[mplayer.git] / libmpdemux / mpeg_hdr.h
blobccd84bcdb05d048612512dc80701eb5effdbc9ce
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_MPEG_HDR_H
20 #define MPLAYER_MPEG_HDR_H
22 typedef struct {
23 // video info:
24 int mpeg1; // 0=mpeg2 1=mpeg1
25 int display_picture_width;
26 int display_picture_height;
27 int aspect_ratio_information;
28 int frame_rate_code;
29 float fps;
30 int frame_rate_extension_n;
31 int frame_rate_extension_d;
32 int bitrate; // 0x3FFFF==VBR
33 // timing:
34 int picture_structure;
35 int progressive_sequence;
36 int repeat_first_field;
37 int progressive_frame;
38 int top_field_first;
39 int display_time; // secs*100
40 //the following are for mpeg4
41 unsigned int timeinc_resolution, timeinc_bits, timeinc_unit;
42 int picture_type;
43 } mp_mpeg_header_t;
45 int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigned char * buffer);
46 int mp_header_process_extension (mp_mpeg_header_t * picture, unsigned char * buffer);
47 float mpeg12_aspect_info(mp_mpeg_header_t *picture);
48 int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer);
49 void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer);
50 int h264_parse_sps(mp_mpeg_header_t * picture, unsigned char * buf, int len);
51 int mp_vc1_decode_sequence_header(mp_mpeg_header_t * picture, unsigned char * buf, int len);
53 unsigned char mp_getbits(unsigned char *buffer, unsigned int from, unsigned char len);
55 #endif /* MPLAYER_MPEG_HDR_H */