avformat/mpegtsenc: cosmetic

Merge the short lines after the last commit

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2020-05-20 20:22:42 +08:00
parent f1035b99fa
commit 0cc2d09e17
1 changed files with 29 additions and 63 deletions

View File

@ -1966,92 +1966,58 @@ static int mpegts_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt
#define ENC AV_OPT_FLAG_ENCODING_PARAM #define ENC AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = { static const AVOption options[] = {
{ "mpegts_transport_stream_id", "Set transport_stream_id field.", { "mpegts_transport_stream_id", "Set transport_stream_id field.",
OFFSET(transport_stream_id), AV_OPT_TYPE_INT, OFFSET(transport_stream_id), AV_OPT_TYPE_INT, { .i64 = 0x0001 }, 0x0001, 0xffff, ENC },
{ .i64 = 0x0001 }, 0x0001, 0xffff, ENC },
{ "mpegts_original_network_id", "Set original_network_id field.", { "mpegts_original_network_id", "Set original_network_id field.",
OFFSET(original_network_id), AV_OPT_TYPE_INT, OFFSET(original_network_id), AV_OPT_TYPE_INT, { .i64 = DVB_PRIVATE_NETWORK_START }, 0x0001, 0xffff, ENC },
{ .i64 = DVB_PRIVATE_NETWORK_START }, 0x0001, 0xffff, ENC },
{ "mpegts_service_id", "Set service_id field.", { "mpegts_service_id", "Set service_id field.",
OFFSET(service_id), AV_OPT_TYPE_INT, OFFSET(service_id), AV_OPT_TYPE_INT, { .i64 = 0x0001 }, 0x0001, 0xffff, ENC },
{ .i64 = 0x0001 }, 0x0001, 0xffff, ENC },
{ "mpegts_service_type", "Set service_type field.", { "mpegts_service_type", "Set service_type field.",
OFFSET(service_type), AV_OPT_TYPE_INT, OFFSET(service_type), AV_OPT_TYPE_INT, { .i64 = 0x01 }, 0x01, 0xff, ENC, "mpegts_service_type" },
{ .i64 = 0x01 }, 0x01, 0xff, ENC, "mpegts_service_type" },
{ "digital_tv", "Digital Television.", { "digital_tv", "Digital Television.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_DIGITAL_TV }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_DIGITAL_TV }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "digital_radio", "Digital Radio.", { "digital_radio", "Digital Radio.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_DIGITAL_RADIO }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_DIGITAL_RADIO }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "teletext", "Teletext.", { "teletext", "Teletext.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_TELETEXT }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_TELETEXT }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "advanced_codec_digital_radio", "Advanced Codec Digital Radio.", { "advanced_codec_digital_radio", "Advanced Codec Digital Radio.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_ADVANCED_CODEC_DIGITAL_RADIO }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_ADVANCED_CODEC_DIGITAL_RADIO }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "mpeg2_digital_hdtv", "MPEG2 Digital HDTV.", { "mpeg2_digital_hdtv", "MPEG2 Digital HDTV.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_MPEG2_DIGITAL_HDTV }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_MPEG2_DIGITAL_HDTV }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "advanced_codec_digital_sdtv", "Advanced Codec Digital SDTV.", { "advanced_codec_digital_sdtv", "Advanced Codec Digital SDTV.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_ADVANCED_CODEC_DIGITAL_SDTV }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_ADVANCED_CODEC_DIGITAL_SDTV }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "advanced_codec_digital_hdtv", "Advanced Codec Digital HDTV.", { "advanced_codec_digital_hdtv", "Advanced Codec Digital HDTV.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_ADVANCED_CODEC_DIGITAL_HDTV }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_ADVANCED_CODEC_DIGITAL_HDTV }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "hevc_digital_hdtv", "HEVC Digital Television Service.", { "hevc_digital_hdtv", "HEVC Digital Television Service.",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_HEVC_DIGITAL_HDTV }, 0x01, 0xff, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_SERVICE_TYPE_HEVC_DIGITAL_HDTV }, 0x01, 0xff, ENC, "mpegts_service_type" },
ENC, "mpegts_service_type" },
{ "mpegts_pmt_start_pid", "Set the first pid of the PMT.", { "mpegts_pmt_start_pid", "Set the first pid of the PMT.",
OFFSET(pmt_start_pid), AV_OPT_TYPE_INT, OFFSET(pmt_start_pid), AV_OPT_TYPE_INT, { .i64 = 0x1000 }, FIRST_OTHER_PID, LAST_OTHER_PID, ENC },
{ .i64 = 0x1000 }, FIRST_OTHER_PID, LAST_OTHER_PID, ENC },
{ "mpegts_start_pid", "Set the first pid.", { "mpegts_start_pid", "Set the first pid.",
OFFSET(start_pid), AV_OPT_TYPE_INT, OFFSET(start_pid), AV_OPT_TYPE_INT, { .i64 = 0x0100 }, FIRST_OTHER_PID, LAST_OTHER_PID, ENC },
{ .i64 = 0x0100 }, FIRST_OTHER_PID, LAST_OTHER_PID, ENC }, { "mpegts_m2ts_mode", "Enable m2ts mode.", OFFSET(m2ts_mode), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, ENC },
{ "mpegts_m2ts_mode", "Enable m2ts mode.", { "muxrate", NULL, OFFSET(mux_rate), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, ENC },
OFFSET(m2ts_mode), AV_OPT_TYPE_BOOL,
{ .i64 = -1 }, -1, 1, ENC },
{ "muxrate", NULL,
OFFSET(mux_rate), AV_OPT_TYPE_INT,
{ .i64 = 1 }, 0, INT_MAX, ENC },
{ "pes_payload_size", "Minimum PES packet payload in bytes", { "pes_payload_size", "Minimum PES packet payload in bytes",
OFFSET(pes_payload_size), AV_OPT_TYPE_INT, OFFSET(pes_payload_size), AV_OPT_TYPE_INT, { .i64 = DEFAULT_PES_PAYLOAD_SIZE }, 0, INT_MAX, ENC },
{ .i64 = DEFAULT_PES_PAYLOAD_SIZE }, 0, INT_MAX, ENC }, { "mpegts_flags", "MPEG-TS muxing flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, 0, INT_MAX, ENC, "mpegts_flags" },
{ "mpegts_flags", "MPEG-TS muxing flags",
OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, 0, INT_MAX,
ENC, "mpegts_flags" },
{ "resend_headers", "Reemit PAT/PMT before writing the next packet", { "resend_headers", "Reemit PAT/PMT before writing the next packet",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_REEMIT_PAT_PMT }, 0, INT_MAX, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_REEMIT_PAT_PMT }, 0, INT_MAX, ENC, "mpegts_flags" },
ENC, "mpegts_flags" },
{ "latm", "Use LATM packetization for AAC", { "latm", "Use LATM packetization for AAC",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_AAC_LATM }, 0, INT_MAX, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_AAC_LATM }, 0, INT_MAX, ENC, "mpegts_flags" },
ENC, "mpegts_flags" },
{ "pat_pmt_at_frames", "Reemit PAT and PMT at each video frame", { "pat_pmt_at_frames", "Reemit PAT and PMT at each video frame",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_PAT_PMT_AT_FRAMES}, 0, INT_MAX, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_PAT_PMT_AT_FRAMES}, 0, INT_MAX, ENC, "mpegts_flags" },
ENC, "mpegts_flags" },
{ "system_b", "Conform to System B (DVB) instead of System A (ATSC)", { "system_b", "Conform to System B (DVB) instead of System A (ATSC)",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_SYSTEM_B }, 0, INT_MAX, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_SYSTEM_B }, 0, INT_MAX, ENC, "mpegts_flags" },
ENC, "mpegts_flags" },
{ "initial_discontinuity", "Mark initial packets as discontinuous", { "initial_discontinuity", "Mark initial packets as discontinuous",
0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_DISCONT }, 0, INT_MAX, 0, AV_OPT_TYPE_CONST, { .i64 = MPEGTS_FLAG_DISCONT }, 0, INT_MAX, ENC, "mpegts_flags" },
ENC, "mpegts_flags" }, { "mpegts_copyts", "don't offset dts/pts", OFFSET(copyts), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, ENC },
{ "mpegts_copyts", "don't offset dts/pts", { "tables_version", "set PAT, PMT and SDT version", OFFSET(tables_version), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 31, ENC },
OFFSET(copyts), AV_OPT_TYPE_BOOL,
{ .i64 = -1 }, -1, 1, ENC },
{ "tables_version", "set PAT, PMT and SDT version",
OFFSET(tables_version), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, 31, ENC },
{ "omit_video_pes_length", "Omit the PES packet length for video packets", { "omit_video_pes_length", "Omit the PES packet length for video packets",
OFFSET(omit_video_pes_length), AV_OPT_TYPE_BOOL, OFFSET(omit_video_pes_length), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, ENC },
{ .i64 = 1 }, 0, 1, ENC },
{ "pcr_period", "PCR retransmission time in milliseconds", { "pcr_period", "PCR retransmission time in milliseconds",
OFFSET(pcr_period_ms), AV_OPT_TYPE_INT, OFFSET(pcr_period_ms), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, ENC },
{ .i64 = -1 }, -1, INT_MAX, ENC },
{ "pat_period", "PAT/PMT retransmission time limit in seconds", { "pat_period", "PAT/PMT retransmission time limit in seconds",
OFFSET(pat_period_us), AV_OPT_TYPE_DURATION, OFFSET(pat_period_us), AV_OPT_TYPE_DURATION, { .i64 = PAT_RETRANS_TIME * 1000LL }, 0, INT64_MAX, ENC },
{ .i64 = PAT_RETRANS_TIME * 1000LL }, 0, INT64_MAX, ENC },
{ "sdt_period", "SDT retransmission time limit in seconds", { "sdt_period", "SDT retransmission time limit in seconds",
OFFSET(sdt_period_us), AV_OPT_TYPE_DURATION, OFFSET(sdt_period_us), AV_OPT_TYPE_DURATION, { .i64 = SDT_RETRANS_TIME * 1000LL }, 0, INT64_MAX, ENC },
{ .i64 = SDT_RETRANS_TIME * 1000LL }, 0, INT64_MAX, ENC },
{ NULL }, { NULL },
}; };