libavformat/mpegtsenc.c File Reference

#include "avformat.h"
#include "crc.h"
#include "mpegts.h"

Go to the source code of this file.

Data Structures

struct  MpegTSSection
struct  MpegTSWriteStream
struct  MpegTSService
struct  MpegTSWrite

Defines

#define DEFAULT_PMT_START_PID   0x1000
#define DEFAULT_START_PID   0x0100
#define DEFAULT_PROVIDER_NAME   "FFmpeg"
#define DEFAULT_SERVICE_NAME   "Service01"
#define DEFAULT_ONID   0x0001
#define DEFAULT_TSID   0x0001
#define DEFAULT_SID   0x0001
#define DEFAULT_PES_HEADER_FREQ   16
#define DEFAULT_PES_PAYLOAD_SIZE   ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170)
#define SDT_RETRANS_TIME   500
#define PAT_RETRANS_TIME   100
#define PCR_RETRANS_TIME   20

Functions

static void mpegts_write_section (MpegTSSection *s, uint8_t *buf, int len)
static void put16 (uint8_t **q_ptr, int val)
static int mpegts_write_section1 (MpegTSSection *s, int tid, int id, int version, int sec_num, int last_sec_num, uint8_t *buf, int len)
static void mpegts_write_pat (AVFormatContext *s)
static void mpegts_write_pmt (AVFormatContext *s, MpegTSService *service)
static void putstr8 (uint8_t **q_ptr, const char *str)
static void mpegts_write_sdt (AVFormatContext *s)
static MpegTSServicempegts_add_service (MpegTSWrite *ts, int sid, const char *provider_name, const char *name)
static void section_write_packet (MpegTSSection *s, const uint8_t *packet)
static int mpegts_write_header (AVFormatContext *s)
static void retransmit_si_info (AVFormatContext *s)
static void write_pts (uint8_t *q, int fourbits, int64_t pts)
static void mpegts_write_pes (AVFormatContext *s, AVStream *st, const uint8_t *payload, int payload_size, int64_t pts, int64_t dts)
static int mpegts_write_packet (AVFormatContext *s, AVPacket *pkt)
static int mpegts_write_end (AVFormatContext *s)

Variables

AVOutputFormat mpegts_muxer


Define Documentation

#define DEFAULT_ONID   0x0001

Definition at line 127 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define DEFAULT_PES_HEADER_FREQ   16

Definition at line 132 of file mpegtsenc.c.

#define DEFAULT_PES_PAYLOAD_SIZE   ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170)

Definition at line 133 of file mpegtsenc.c.

Referenced by mpegts_write_packet().

#define DEFAULT_PMT_START_PID   0x1000

Definition at line 121 of file mpegtsenc.c.

Referenced by mpegts_add_service().

#define DEFAULT_PROVIDER_NAME   "FFmpeg"

Definition at line 123 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define DEFAULT_SERVICE_NAME   "Service01"

Definition at line 124 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define DEFAULT_SID   0x0001

Definition at line 129 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define DEFAULT_START_PID   0x0100

Definition at line 122 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define DEFAULT_TSID   0x0001

Definition at line 128 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define PAT_RETRANS_TIME   100

Definition at line 137 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define PCR_RETRANS_TIME   20

Definition at line 138 of file mpegtsenc.c.

Referenced by mpegts_write_header().

#define SDT_RETRANS_TIME   500

Definition at line 136 of file mpegtsenc.c.

Referenced by mpegts_write_header().


Function Documentation

static MpegTSService* mpegts_add_service ( MpegTSWrite ts,
int  sid,
const char *  provider_name,
const char *  name 
) [static]

Definition at line 334 of file mpegtsenc.c.

Referenced by mpegts_write_header().

static int mpegts_write_end ( AVFormatContext s  )  [static]

Definition at line 654 of file mpegtsenc.c.

static int mpegts_write_header ( AVFormatContext s  )  [static]

Definition at line 359 of file mpegtsenc.c.

static int mpegts_write_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 616 of file mpegtsenc.c.

static void mpegts_write_pat ( AVFormatContext s  )  [static]

Definition at line 173 of file mpegtsenc.c.

Referenced by mpegts_write_header(), and retransmit_si_info().

static void mpegts_write_pes ( AVFormatContext s,
AVStream st,
const uint8_t payload,
int  payload_size,
int64_t  pts,
int64_t  dts 
) [static]

Definition at line 480 of file mpegtsenc.c.

Referenced by mpegts_write_end(), and mpegts_write_packet().

static void mpegts_write_pmt ( AVFormatContext s,
MpegTSService service 
) [static]

Definition at line 190 of file mpegtsenc.c.

Referenced by mpegts_write_header(), and retransmit_si_info().

static void mpegts_write_sdt ( AVFormatContext s  )  [static]

Definition at line 296 of file mpegtsenc.c.

Referenced by mpegts_write_header(), and retransmit_si_info().

static void mpegts_write_section ( MpegTSSection s,
uint8_t buf,
int  len 
) [static]

Definition at line 38 of file mpegtsenc.c.

Referenced by mpegts_write_section1().

static int mpegts_write_section1 ( MpegTSSection s,
int  tid,
int  id,
int  version,
int  sec_num,
int  last_sec_num,
uint8_t buf,
int  len 
) [static]

Definition at line 93 of file mpegtsenc.c.

Referenced by mpegts_write_pat(), mpegts_write_pmt(), and mpegts_write_sdt().

static void put16 ( uint8_t **  q_ptr,
int  val 
) [inline, static]

static void putstr8 ( uint8_t **  q_ptr,
const char *  str 
) [static]

Definition at line 280 of file mpegtsenc.c.

Referenced by mpegts_write_sdt().

static void retransmit_si_info ( AVFormatContext s  )  [static]

Definition at line 447 of file mpegtsenc.c.

Referenced by mpegts_write_pes().

static void section_write_packet ( MpegTSSection s,
const uint8_t packet 
) [static]

Definition at line 353 of file mpegtsenc.c.

Referenced by mpegts_write_header().

static void write_pts ( uint8_t q,
int  fourbits,
int64_t  pts 
) [static]

Definition at line 465 of file mpegtsenc.c.

Referenced by mpegts_write_pes().


Variable Documentation

Initial value:

 {
    "mpegts",
    "MPEG2 transport stream format",
    "video/x-mpegts",
    "ts",
    sizeof(MpegTSWrite),
    CODEC_ID_MP2,
    CODEC_ID_MPEG2VIDEO,
    mpegts_write_header,
    mpegts_write_packet,
    mpegts_write_end,
}

Definition at line 684 of file mpegtsenc.c.


Generated on Fri Oct 3 22:47:00 2008 for ffmpeg by  doxygen 1.5.6