• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

libavformat/mpegts.h

Go to the documentation of this file.
00001 /*
00002  * MPEG2 transport stream defines
00003  * Copyright (c) 2003 Fabrice Bellard
00004  *
00005  * This file is part of Libav.
00006  *
00007  * Libav is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * Libav is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with Libav; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 #ifndef AVFORMAT_MPEGTS_H
00023 #define AVFORMAT_MPEGTS_H
00024 
00025 #include "avformat.h"
00026 
00027 #define TS_FEC_PACKET_SIZE 204
00028 #define TS_DVHS_PACKET_SIZE 192
00029 #define TS_PACKET_SIZE 188
00030 #define TS_MAX_PACKET_SIZE 204
00031 
00032 #define NB_PID_MAX 8192
00033 #define MAX_SECTION_SIZE 4096
00034 
00035 /* pids */
00036 #define PAT_PID                 0x0000
00037 #define SDT_PID                 0x0011
00038 
00039 /* table ids */
00040 #define PAT_TID   0x00
00041 #define PMT_TID   0x02
00042 #define M4OD_TID  0x05
00043 #define SDT_TID   0x42
00044 
00045 #define STREAM_TYPE_VIDEO_MPEG1     0x01
00046 #define STREAM_TYPE_VIDEO_MPEG2     0x02
00047 #define STREAM_TYPE_AUDIO_MPEG1     0x03
00048 #define STREAM_TYPE_AUDIO_MPEG2     0x04
00049 #define STREAM_TYPE_PRIVATE_SECTION 0x05
00050 #define STREAM_TYPE_PRIVATE_DATA    0x06
00051 #define STREAM_TYPE_AUDIO_AAC       0x0f
00052 #define STREAM_TYPE_AUDIO_AAC_LATM  0x11
00053 #define STREAM_TYPE_VIDEO_MPEG4     0x10
00054 #define STREAM_TYPE_VIDEO_H264      0x1b
00055 #define STREAM_TYPE_VIDEO_VC1       0xea
00056 #define STREAM_TYPE_VIDEO_DIRAC     0xd1
00057 
00058 #define STREAM_TYPE_AUDIO_AC3       0x81
00059 #define STREAM_TYPE_AUDIO_DTS       0x8a
00060 
00061 typedef struct MpegTSContext MpegTSContext;
00062 
00063 MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s);
00064 int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
00065                            const uint8_t *buf, int len);
00066 void ff_mpegts_parse_close(MpegTSContext *ts);
00067 
00068 typedef struct {
00069     int use_au_start;
00070     int use_au_end;
00071     int use_rand_acc_pt;
00072     int use_padding;
00073     int use_timestamps;
00074     int use_idle;
00075     int timestamp_res;
00076     int timestamp_len;
00077     int ocr_len;
00078     int au_len;
00079     int inst_bitrate_len;
00080     int degr_prior_len;
00081     int au_seq_num_len;
00082     int packet_seq_num_len;
00083 } SLConfigDescr;
00084 
00085 typedef struct {
00086     int es_id;
00087     int dec_config_descr_len;
00088     uint8_t *dec_config_descr;
00089     SLConfigDescr sl;
00090 } Mp4Descr;
00091 
00105 int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
00106                               const uint8_t **pp, const uint8_t *desc_list_end,
00107                               Mp4Descr *mp4_descr, int mp4_descr_count, int pid,
00108                               MpegTSContext *ts);
00109 
00110 #endif /* AVFORMAT_MPEGTS_H */
Generated on Sat Mar 17 2012 12:57:54 for Libav by doxygen 1.7.1