summaryrefslogtreecommitdiff
path: root/libavformat/flvenc.c
Commit message (Collapse)AuthorAge
* flvenc: Provide output bytestream markersMartin Storsjö2016-05-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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.
* flv: Validate and reject unsupported codecsLuca Barbato2015-03-04
| | | | | | And provide a more informative message in case of failure. CC: libav-stable@libav.org
* flvenc: Remove an unused variableMichael Niedermayer2014-11-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.Andrew Stone2014-11-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* flvenc: move metadata updates into a single functionAndrew Stone2014-11-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* flvenc: Don't over-count metadata.Josh Allmann2014-06-17
| | | | | | Over-counting occurs if framerate is not set. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* flvenc: only write the framerate tag based on avg_frame_rateAnton Khirnov2014-05-29
| | | | | Do not fall back on the codec timebase, since that can be anything for VFR video.
* flv: Use the correct type to hold the file offsetLuca Barbato2013-12-20
|
* flvenc: Write proper cropping for VP6 even if there's no extradataMartin Storsjö2013-10-10
| | | | | | This keeps cropping when remuxing from F4V to FLV. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: Support muxing VP6A as wellMartin Storsjö2013-10-10
| | | | | | Handle it in the same way as VP6F, except for the codec tag. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: Don't pretend to support muxing "plain" VP6Martin Storsjö2013-10-10
| | | | | | | | The plain VP6 format is vertically flipped compared to VP6F/VP6A. Support for the plain VP6 format was added in 09d8c0ae831 (which also introduced support for muxing VP6F properly in general). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Don't explicitly flush after each written packet in muxersClément Bœsch2013-09-16
| | | | | | | | Since 596e5d4783, this is not necessary anymore. It also allows to actually disable the flushing, improving write performance (but possibly giving worse latency in real-time streaming). Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: do not mux more than one stream per typeRafaël Carré2013-04-16
| | | | | | FLV does not support multiple audio or video streams. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* flvenc: Check whether seeking back to the header succeededBjörn Axelsson2012-12-20
| | | | | | | | The FLV muxer tries to update the header in write_trailer, which is impossible if writing to a pipe or network stream. Don't write header data if seeking to the header fails. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Remove non-compiling and/or silly commented-out printf/av_log ↵Diego Biurrun2012-10-01
| | | | statements
* flvenc: silence bogus warningBenjamin Larsson2012-09-18
| | | | | | | | | The compiler fails to figure out that enc->codec_type can only have 3 different values. Thus when an if/else is encountered it triggers on the possibility of the else case has not initialized the flags variable. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* 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
|
* lavf: deprecate r_frame_rate.Anton Khirnov2012-07-29
| | | | | | | | | | | | | | | | | | | | According to its description, it is supposed to be the LCM of all the frame durations. The usability of such a thing is vanishingly small, especially since we cannot determine it with any amount of reliability. Therefore get rid of it after the next bump. Replace it with the average framerate where it makes sense. FATE results for the wtv and xmv demux tests change. In the wtv case this is caused by the file being corrupted (or possibly badly cut) and containing invalid timestamps. This results in lavf estimating the framerate wrong and making up wrong frame durations. In the xmv case the file contains pts jumps, so again the estimated framerate is far from anything sane and lavf again makes up different frame durations. In some other tests lavf starts making up frame durations from different frame.
* lavf: use conditional notation for default codec in muxer declarations.Ronald S. Bultje2012-07-22
| | | | | This removes the use of macro nesting in these code constructs, which makes it easier to parse in pre-processors.
* flv: add support for G.711Damien Fetis2012-06-28
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* flvenc: K&R formatting cosmeticsLuca Barbato2012-06-28
|
* flv: support stream text data as onTextDataLuca Barbato2012-06-03
| | | | | | | Adobe specifies onTextData as the standard message to use to deliver text information. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.James Zern2012-05-20
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* flvenc: use AVFormatContext, not AVCodecContext for logging.Anton Khirnov2012-05-07
| | | | Encoder tag being used for muxer messages is confusing.
* 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>
* flvenc: Support muxing 16 kHz nellymoserMartin Storsjö2011-12-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavu: replace int/float punning functionsMans Rullgard2011-12-11
| | | | | | | | | | | | | | | | | | The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
* 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.
* flvenc: use first packet delay as global delay.Justin Ruggles2011-11-02
| | | | This keeps the streams sychronized. The packets must be interleaved per-DTS.
* flvenc: store delay and last_ts per-stream.Justin Ruggles2011-10-21
|
* flvenc: check packet duration in speex using timestampsJustin Ruggles2011-10-20
| | | | Using AVCodecContext.frame_size is not reliable.
* flvenc: adjust for negative DTS for all codecs, not just H.264Justin Ruggles2011-10-20
|
* flvenc: Write the right metadata entry countMartin Storsjö2011-10-12
| | | | | | | | No application rely on this count being correct as far as I know, but if we write a nonzero count value, it might just as well be the right one. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvenc: use int64_t to store offsetsLuca Barbato2011-08-16
| | | | | | | | Metadata currently is written only at the start of the file in normal cases, when transcoding from a rtmp source metadata could be written later and the offset recorded can exceed 32bit. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-17
| | | | It's more readable and less prone to breakage.
* Do not include intfloat_readwrite.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* flvenc: propagate error properlyLuca Barbato2011-06-06
| | | | | avio_flush can fail, in particular when used with the rtmp/librtmp protocol.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: rename put_flush_packet -> avio_flushAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes senseAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-04
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefix for url_fseekAnton Khirnov2011-03-01
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavf: replace remaining uses of put_tag with avio_writeAnton Khirnov2011-02-25
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio: avio_ prefixes for put_* functionsAnton Khirnov2011-02-21
| | | | | | | | | | | | In the name of consistency: put_byte -> avio_w8 put_<type> -> avio_w<type> put_buffer -> avio_write put_nbyte will be made private put_tag will be merged with avio_put_str Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-20
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.