annotate mpegts.h @ 1311:d35cbb48d76d libavformat

add a VP6F fourcc for apps which rely on fourcc
author aurel
date Tue, 12 Sep 2006 00:06:44 +0000
parents d89d7ef290da
children 0899bfe4105c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
1 /*
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
2 * MPEG2 transport stream defines
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
3 * Copyright (c) 2003 Fabrice Bellard.
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
4 *
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
5 * This library is free software; you can redistribute it and/or
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
7 * License as published by the Free Software Foundation; either
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
8 * version 2 of the License, or (at your option) any later version.
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
9 *
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
10 * This library is distributed in the hope that it will be useful,
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
13 * Lesser General Public License for more details.
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
14 *
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
16 * License along with this library; if not, write to the Free Software
896
edbe5c3717f9 Update licensing information: The FSF changed postal address.
diego
parents: 891
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
18 */
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
19
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
20 #define TS_FEC_PACKET_SIZE 204
891
6e45fbd73a52 added support for DVHS (192) packet size
nicodvb
parents: 885
diff changeset
21 #define TS_DVHS_PACKET_SIZE 192
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
22 #define TS_PACKET_SIZE 188
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
23 #define NB_PID_MAX 8192
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
24 #define MAX_SECTION_SIZE 4096
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
25
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
26 /* pids */
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
27 #define PAT_PID 0x0000
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
28 #define SDT_PID 0x0011
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
29
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
30 /* table ids */
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
31 #define PAT_TID 0x00
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 819
diff changeset
32 #define PMT_TID 0x02
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
33 #define SDT_TID 0x42
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
34
819
a6c035e7f429 DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)
michael
parents: 496
diff changeset
35 /* descriptor ids */
a6c035e7f429 DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)
michael
parents: 496
diff changeset
36 #define DVB_SUBT_DESCID 0x59
a6c035e7f429 DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)
michael
parents: 496
diff changeset
37
160
9bde37b1a5ce try to filter _all_ PATs if no SDT could be found patch by (<gbazin at altern dot org>)
michaelni
parents: 152
diff changeset
38 #define STREAM_TYPE_VIDEO_MPEG1 0x01
9bde37b1a5ce try to filter _all_ PATs if no SDT could be found patch by (<gbazin at altern dot org>)
michaelni
parents: 152
diff changeset
39 #define STREAM_TYPE_VIDEO_MPEG2 0x02
9bde37b1a5ce try to filter _all_ PATs if no SDT could be found patch by (<gbazin at altern dot org>)
michaelni
parents: 152
diff changeset
40 #define STREAM_TYPE_AUDIO_MPEG1 0x03
9bde37b1a5ce try to filter _all_ PATs if no SDT could be found patch by (<gbazin at altern dot org>)
michaelni
parents: 152
diff changeset
41 #define STREAM_TYPE_AUDIO_MPEG2 0x04
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
42 #define STREAM_TYPE_PRIVATE_SECTION 0x05
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
43 #define STREAM_TYPE_PRIVATE_DATA 0x06
313
622892a75ddb support more codecs in MPEG-TS patch by (mru at kth dot se (Mns Rullgrd))
michael
parents: 292
diff changeset
44 #define STREAM_TYPE_AUDIO_AAC 0x0f
622892a75ddb support more codecs in MPEG-TS patch by (mru at kth dot se (Mns Rullgrd))
michael
parents: 292
diff changeset
45 #define STREAM_TYPE_VIDEO_MPEG4 0x10
493
166b71445aec h264 in mpeg-ts fix by (Mns Rullgrd <mru at kth dot se>)
michael
parents: 313
diff changeset
46 #define STREAM_TYPE_VIDEO_H264 0x1b
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
47
165
e4d2f704bf80 - Looks a tiny bit harder in mpegps_probe() for a valid start code. This is
michaelni
parents: 160
diff changeset
48 #define STREAM_TYPE_AUDIO_AC3 0x81
496
112057e05179 libdts support by (Benjamin Zores <ben at geexbox dot org>)
michael
parents: 493
diff changeset
49 #define STREAM_TYPE_AUDIO_DTS 0x8a
165
e4d2f704bf80 - Looks a tiny bit harder in mpegps_probe() for a valid start code. This is
michaelni
parents: 160
diff changeset
50
819
a6c035e7f429 DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)
michael
parents: 496
diff changeset
51 #define STREAM_TYPE_SUBTITLE_DVB 0x100
a6c035e7f429 DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)
michael
parents: 496
diff changeset
52
152
cc03a75cbde4 mpeg ts demux uses DVB SI info and generates correct PTS info - added prototype mpeg ts mux
bellard
parents:
diff changeset
53 unsigned int mpegts_crc32(const uint8_t *data, int len);
1167
d89d7ef290da give AVInput/OutputFormat structs consistent names
mru
parents: 896
diff changeset
54 extern AVOutputFormat mpegts_muxer;
292
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
55
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
56 typedef struct MpegTSContext MpegTSContext;
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
57
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
58 MpegTSContext *mpegts_parse_open(AVFormatContext *s);
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
59 int mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
60 const uint8_t *buf, int len);
155ce13f1033 mpeg TS demux API (called from RTP layer) - raw mpeg TS reader (uses fake codec MPEG2TS)
bellard
parents: 165
diff changeset
61 void mpegts_parse_close(MpegTSContext *ts);