#include "libavutil/bswap.h"
#include "libavutil/crc.h"
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "libavcodec/mpegvideo.h"
#include "avformat.h"
#include "internal.h"
#include "mpegts.h"
Go to the source code of this file.
#define DEFAULT_PES_HEADER_FREQ 16 |
Definition at line 90 of file mpegtsenc.c.
#define DEFAULT_PES_PAYLOAD_SIZE ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170) |
Definition at line 91 of file mpegtsenc.c.
#define DEFAULT_PROVIDER_NAME "FFmpeg" |
#define DEFAULT_SERVICE_NAME "Service01" |
#define MPEGTS_FLAG_AAC_LATM 0x02 |
Definition at line 84 of file mpegtsenc.c.
Referenced by mpegts_write_header(), and mpegts_write_pmt().
#define MPEGTS_FLAG_REEMIT_PAT_PMT 0x01 |
#define PAT_RETRANS_TIME 100 |
#define PCR_RETRANS_TIME 20 |
#define PCR_TIME_BASE 27000000 |
#define SDT_RETRANS_TIME 500 |
static int64_t get_pcr | ( | const MpegTSWrite * | ts, | |
AVIOContext * | pb | |||
) | [static] |
Definition at line 480 of file mpegtsenc.c.
Referenced by mpegts_insert_pcr_only(), mpegts_prefix_m2ts_header(), and mpegts_write_pes().
static MpegTSService* mpegts_add_service | ( | MpegTSWrite * | ts, | |
int | sid, | |||
const char * | provider_name, | |||
const char * | name | |||
) | [static] |
static void mpegts_insert_null_packet | ( | AVFormatContext * | s | ) | [static] |
static void mpegts_insert_pcr_only | ( | AVFormatContext * | s, | |
AVStream * | st | |||
) | [static] |
static void mpegts_prefix_m2ts_header | ( | AVFormatContext * | s | ) | [static] |
Definition at line 486 of file mpegtsenc.c.
Referenced by mpegts_insert_null_packet(), mpegts_insert_pcr_only(), mpegts_write_pes(), and section_write_packet().
static int mpegts_write_end | ( | AVFormatContext * | s | ) | [static] |
Definition at line 1223 of file mpegtsenc.c.
static void mpegts_write_flush | ( | AVFormatContext * | s | ) | [static] |
Definition at line 1195 of file mpegtsenc.c.
Referenced by mpegts_write_end(), and mpegts_write_packet().
static int mpegts_write_header | ( | AVFormatContext * | s | ) | [static] |
Definition at line 505 of file mpegtsenc.c.
static int mpegts_write_packet | ( | AVFormatContext * | s, | |
AVPacket * | pkt | |||
) | [static] |
Definition at line 1213 of file mpegtsenc.c.
static int mpegts_write_packet_internal | ( | AVFormatContext * | s, | |
AVPacket * | pkt | |||
) | [static] |
static void mpegts_write_pat | ( | AVFormatContext * | s | ) | [static] |
static void mpegts_write_pes | ( | AVFormatContext * | s, | |
AVStream * | st, | |||
const uint8_t * | payload, | |||
int | payload_size, | |||
int64_t | pts, | |||
int64_t | dts, | |||
int | key | |||
) | [static] |
Definition at line 837 of file mpegtsenc.c.
Referenced by mpegts_write_flush(), and mpegts_write_packet_internal().
static void mpegts_write_pmt | ( | AVFormatContext * | s, | |
MpegTSService * | service | |||
) | [static] |
static void mpegts_write_sdt | ( | AVFormatContext * | s | ) | [static] |
static void mpegts_write_section | ( | MpegTSSection * | s, | |
uint8_t * | buf, | |||
int | len | |||
) | [static] |
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 189 of file mpegtsenc.c.
Referenced by mpegts_write_pat(), mpegts_write_pmt(), and mpegts_write_sdt().
Definition at line 180 of file mpegtsenc.c.
Referenced by main(), mpegts_write_pat(), mpegts_write_pmt(), mpegts_write_sdt(), mpegts_write_section1(), and put_wav_header().
static void putstr8 | ( | uint8_t ** | q_ptr, | |
const char * | str | |||
) | [static] |
static void retransmit_si_info | ( | AVFormatContext * | s, | |
int | force_pat | |||
) | [static] |
static void section_write_packet | ( | MpegTSSection * | s, | |
const uint8_t * | packet | |||
) | [static] |
Definition at line 729 of file mpegtsenc.c.
Referenced by mpegts_insert_pcr_only(), and mpegts_write_pes().
Initial value:
{ .name = "mpegts", .long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"), .mime_type = "video/x-mpegts", .extensions = "ts,m2t,m2ts,mts", .priv_data_size = sizeof(MpegTSWrite), .audio_codec = AV_CODEC_ID_MP2, .video_codec = AV_CODEC_ID_MPEG2VIDEO, .write_header = mpegts_write_header, .write_packet = mpegts_write_packet, .write_trailer = mpegts_write_end, .flags = AVFMT_ALLOW_FLUSH, .priv_class = &mpegts_muxer_class, }
Definition at line 1252 of file mpegtsenc.c.
const AVClass mpegts_muxer_class [static] |
Initial value:
{ .class_name = "MPEGTS muxer", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, }
Definition at line 126 of file mpegtsenc.c.
Definition at line 93 of file mpegtsenc.c.