summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
Commit message (Collapse)AuthorAge
* mpegtsenc: stop impersonating ses in sdtFrancois Cartegnie2016-05-17
| | | | | | | Unless specified, users must use non registered range for network id Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* mpegtsenc: add flag to embed an AC-3 ES the DVB wayStefan Pöschel2015-12-14
| | | | | | | | | | | | | So far an AC-3 elementary stream is refered to in the PMT according to System A (ATSC). However System B (DVB) has a different way to signal an AC-3 ES within the PMT. This different way can be enabled by a new flag. The flag is more generally named 'system_b' as there are further differences between ATSC and DVB (e.g. the signalling of E-AC-3) which should then also be covered by it in the future. Bug-Id: 73 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mpegts: Mark the muxer as supporting variable fpsLuca Barbato2015-07-15
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | This applies to every library where performance is not critical.
* mpegtsenc: Take max_delay into account when buffering multiple audio packets ↵Martin Storsjö2015-04-03
| | | | | | | | | | into one PES packet Make sure we don't buffer up more than max_delay worth of data before writing a PES packet, even if pes_payload_size is set to a larger value. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Use ffio_free_dyn_buf where applicableMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Support running the write_trailer function without an AVIOContextMartin Storsjö2014-12-19
| | | | | | | | If opening and closing dynamic buffers as AVIOContext, we may not have any AVIOContext available when wanting to close and deallocate the muxer. Allow calling write_trailer despite this. Signed-off-by: Martin Storsjö <martin@martin.st>
* Drop the unofficial extension prefix for MPEG and MPEG-TS formatsFlorent Le Coz2014-12-02
| | | | | | | | As per the RFCs: http://tools.ietf.org/html/rfc3555#page-38 http://tools.ietf.org/html/rfc3003 CC: libav-stable@libav.org
* mpegtsenc: recognize .mts as MPEG Transport StreamJean-Baptiste Mardelle2014-12-02
|
* Add support for BDAV/m2ts-mode muxingFredrik Axelsson2014-12-02
| | | | | Signed-off-by: Fredrik Axelsson <fraxbe@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: Set the stream time base hint properly for chained muxersMartin Storsjö2014-10-06
| | | | | | | This avoids warnings about using the codec time base as time base hint. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Do not try to write a PMT larger than SECTION_SIZELuca Barbato2014-08-13
| | | | | | | | | | | Prevent out of array writes. Similar to what Michael Niedermayer did to address the same issue. Bug-Id: CVE-2014-2263 CC: libav-stable@libav.org Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mpegts: Return proper error code on invalid input dataNidhi Makhijani2014-08-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mpegts: Use av_free() to free memory allocated by av_strdup()Diego Biurrun2014-08-08
|
* mpegts: Fix memory leaks and related crashes in mpegs_write_header()Diego Biurrun2014-08-07
|
* mpegts: Avoid unnecessary variable shadowingDiego Biurrun2014-08-07
|
* mpegts: Drop some unnecessary parenthesesDiego Biurrun2014-08-07
|
* mpegts: K&R formatting cosmeticsDiego Biurrun2014-08-07
|
* mpegts: Add HEVC definitionsFemi Adeyemi-Ejeye2014-08-05
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mpegts: Define the section length with a constantLuca Barbato2014-08-04
| | | | | The specification says the value is expressed in 10 bits including the 4-byte CRC.
* lavf: switch to AVStream.time_base as the hint for the muxer timebaseAnton Khirnov2014-06-18
| | | | | | | | | | | | Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion).
* mpegts: Provide an option to override the pcr periodLuca Barbato2014-06-10
| | | | Certain hardware demuxer have specific restrictions for PCR periodicity.
* mpegts: Move the option section to the bottomLuca Barbato2014-06-10
| | | | | Makes it consistent with the rest of the formats and ease usage of macros constants for the defaults.
* lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideoMartin Storsjö2013-03-26
| | | | | | | Also move the declaration to internal.h, and add restrict qualifiers to the declaration (as in the implementation). Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: add support for stream_type 0x42, which is CAVSCan Wu2013-03-15
| | | | | | This allows demuxing and muxing of CAVS TS streams. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegtsenc: set muxing type notification to verboseLuca Barbato2012-10-10
|
* avformat: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
|
* mpegtsenc: use avio_open_dyn_buf(), zero pointers after freeingJindřich Makovička2012-06-04
| | | | | | | Per suggestion by Michael Niedermayer. Signed-off-by: Jindřich Makovička <makovick@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegtsenc: Support LATM packetization for AACJindrich Makovicka2012-06-03
| | | | | | | | | This adds the avoption mpegts_flags and converts the existing resend_headers option into a flag, keeping the old option as fallback for now. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegtsenc: use AVFormatContext for AAC packetizationJindrich Makovicka2012-06-03
| | | | | | | | This removes the dependency on adts.c internals, and simplifies adding other packetization formats. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegtsenc: use AVERROR() for return codesJindrich Makovicka2012-06-03
| | | | | Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-06
| | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegtsenc: allow user triggered PES packet flushingJindrich Makovicka2012-03-26
| | | | | Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv> Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Set the default for the max_delay option to -1Martin Storsjö2012-03-20
| | | | | | | | | | Make the muxers/demuxers that use the field handle the default -1 in the same way as 0. This allows distinguishing an intentionally set 0 from the default value where the user hasn't set it. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegtsenc: Add an AVOption for forcing a new PAT/PMT/SDT to be writtenMartin Storsjö2012-02-13
| | | | | | | | When segmenting the output from the mpegts muxer, one can now set this option when cutting to a new segment, to make sure the next segment starts with PAT/PMT/SDT. Signed-off-by: Martin Storsjö <martin@martin.st>
* s/vbsf/bsf/Mike Melanson2012-01-30
| | | | | | | -vbsf doesn't exist anymore. It got renamed to -bsf somewhere along the line. Update print statement accordingly. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: remove disabled FF_API_MUXRATE cruftAnton Khirnov2012-01-27
|
* mpegts: adjustable minimum PES payloadJindřich Makovička2011-12-28
| | | | | | | | | | | | With the current default PES packet size, and very small audio bitrates, audio packet duration gets too long. For players, which wait for a whole audio packet (or more) it takes a very long time to start playing sound. For 24kbps audio, one PES packet is about 1 second long. On Motorola STBs, we observe about 3 second delay before the playback starts with the default setting. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegts: properly output large audio packetsJindřich Makovička2011-12-28
| | | | | | | | Do not assume the audio packets being always smaller than DEFAULT_PES_PAYLOAD_SIZE. Signed-off-by: Jindřich Makovička <makovick@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegts: rename payload_index to payload_sizeLuca Barbato2011-12-19
| | | | It holds the size of the current payload.
* Fix a bunch of common typos.Diego Biurrun2011-12-11
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* adtsenc: Check frame size.Alex Converse2011-11-28
| | | | | | Inspired by work from: Michael Niedermayer <michaelni@gmx.at>. Signed-off-by: Alex Converse <alex.converse@gmail.com>