Merge commit '3f7e94eccd1c0d64679f2c4eda8bb942a158dfac'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 10 Jun 2014 21:27:16 +0000 (23:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 10 Jun 2014 21:27:16 +0000 (23:27 +0200)
* commit '3f7e94eccd1c0d64679f2c4eda8bb942a158dfac':
  mpegts: Move the option section to the bottom

Conflicts:
libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/mpegtsenc.c

@@@ -1390,6 -1129,41 +1346,50 @@@ static int mpegts_write_end(AVFormatCon
      return 0;
  }
  
 -      offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT, {.i64 = 0x1000 }, 0x1000, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM},
+ static const AVOption options[] = {
+     { "mpegts_transport_stream_id", "Set transport_stream_id field.",
+       offsetof(MpegTSWrite, transport_stream_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
+     { "mpegts_original_network_id", "Set original_network_id field.",
+       offsetof(MpegTSWrite, original_network_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
+     { "mpegts_service_id", "Set service_id field.",
+       offsetof(MpegTSWrite, service_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
+     { "mpegts_pmt_start_pid", "Set the first pid of the PMT.",
++      offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT, {.i64 = 0x1000 }, 0x0010, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM},
+     { "mpegts_start_pid", "Set the first pid.",
+       offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT, {.i64 = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM},
++    {"mpegts_m2ts_mode", "Enable m2ts mode.",
++        offsetof(MpegTSWrite, m2ts_mode), AV_OPT_TYPE_INT, {.i64 = -1 },
++        -1,1, AV_OPT_FLAG_ENCODING_PARAM},
+     { "muxrate", NULL, offsetof(MpegTSWrite, mux_rate), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
+     { "pes_payload_size", "Minimum PES packet payload in bytes",
+       offsetof(MpegTSWrite, pes_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT_PES_PAYLOAD_SIZE}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
+     { "mpegts_flags", "MPEG-TS muxing flags", offsetof(MpegTSWrite, flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, INT_MAX,
+       AV_OPT_FLAG_ENCODING_PARAM, "mpegts_flags" },
+     { "resend_headers", "Reemit PAT/PMT before writing the next packet",
+       0, AV_OPT_TYPE_CONST, {.i64 = MPEGTS_FLAG_REEMIT_PAT_PMT}, 0, INT_MAX,
+       AV_OPT_FLAG_ENCODING_PARAM, "mpegts_flags"},
+     { "latm", "Use LATM packetization for AAC",
+       0, AV_OPT_TYPE_CONST, {.i64 = MPEGTS_FLAG_AAC_LATM}, 0, INT_MAX,
+       AV_OPT_FLAG_ENCODING_PARAM, "mpegts_flags"},
+     // backward compatibility
+     { "resend_headers", "Reemit PAT/PMT before writing the next packet",
+       offsetof(MpegTSWrite, reemit_pat_pmt), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
++    { "mpegts_copyts", "don't offset dts/pts",
++      offsetof(MpegTSWrite, copyts), AV_OPT_TYPE_INT, {.i64=-1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM},
++    { "tables_version", "set PAT, PMT and SDT version",
++      offsetof(MpegTSWrite, tables_version), AV_OPT_TYPE_INT, {.i64=0}, 0, 31, AV_OPT_FLAG_ENCODING_PARAM},
++    { "omit_video_pes_length", "Omit the PES packet length for video packets",
++      offsetof(MpegTSWrite, omit_video_pes_length), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
+     { NULL },
+ };
+ static const AVClass mpegts_muxer_class = {
+     .class_name     = "MPEGTS muxer",
+     .item_name      = av_default_item_name,
+     .option         = options,
+     .version        = LIBAVUTIL_VERSION_INT,
+ };
  AVOutputFormat ff_mpegts_muxer = {
      .name              = "mpegts",
      .long_name         = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"),