trunk 20080912
[gitenigma.git] / include / lib / dvb / lowlevel / avp.h
blob09caaa1fe1d8e46bdc6acaf48dc2219dcff18212
2 /*
3 * Audio Video PES
5 * Copyright (C) 1999 Thomas Mirlacher
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * The author may be reached as dent@cosy.sbg.ac.at, or
22 * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
23 * Austria
25 *------------------------------------------------------------
30 #ifndef __AVP_H__
31 #define __AVP_H__
33 #include <sys/types.h>
35 typedef struct {
36 u_char prefix1 :8; // 'A'
37 u_char prefix2 :8; // 'V'
38 u_char stream_id :8; // 0x01 ... Video, 0x02 ... Audio
39 u_char cont_count :8; // continuity counter
40 u_char reserved :8; // 0x55
42 #if BYTE_ORDER == BIG_ENDIAN
43 u_char :3;
44 u_char pts_present :1; // presentation time stamp
45 u_char pad_length :2; // bytes left for 4 byte pad
46 u_char pad_length :2; // bytes left for 4 byte pad (last pkt)
47 #else
48 u_char :3;
49 u_char pts_present :1; // presentation time stamp
50 u_char pad_length :2; // bytes left for 4 byte pad
51 u_char pad_length :2; // bytes left for 4 byte pad (last pkt)
52 #endif
54 u_char length_hi :8; // payload length (high byte)
55 u_char length_lo :8; // payload length (low byte)
56 } avp_hdr_t;
58 #define AVP_HDR_LEN 8
60 #endif