summaryrefslogtreecommitdiff
path: root/libavformat/mp3enc.c
Commit message (Collapse)AuthorAge
* 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.
* mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_headerAnton Khirnov2015-12-12
| | | | | | Almost all the places from which this function is called already check the header manually and in the two that don't (the mp3 muxer) the check should not cause any problems.
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* 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
* mp3enc: write full LAME frameAnton Khirnov2014-10-24
| | | | Most importantly, it contains the encoder delay and replaygain info.
* Check mp3 header before calling avpriv_mpegaudio_decode_header().Justin Ruggles2014-06-22
| | | | | | | | As indicated in the function documentation, the header MUST be checked prior to calling it because no consistency check is done there. CC:libav-stable@libav.org
* mp3enc: Properly write bitrate value in XING headerMichael Niedermayer2014-04-12
| | | | | | | | | | | | Instead of using a fixed bitrate_idx, calculate a matching bitrate for the XING header. Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1) to report wrong bitrate and bitrate mode when using CBR. Bug-Id: https://bugs.debian.org/736088 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mp3enc: allow omitting the id3v2 header with -id3v2_version 0Anton Khirnov2014-01-17
|
* mp3enc: add an option for disabling the Xing frame.Anton Khirnov2014-01-17
|
* mp3: add .mpa extensionVittorio Giovara2013-09-12
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* mp3enc: write Xing TOCAnton Khirnov2012-09-15
| | | | | | | | | | | | Based on the code by: Peter Belkner <pbelkner@snafu.de>, Michael Niedermayer <michaelni@gmx.at>, Clément Bœsch <clement.boesch@smartjog.com>, Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and Tobias Rapp <t.rapp@noa-audio.com> Alex Converse <alex.converse@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.Clément Bœsch2012-09-15
|
* mp3enc: downgrade some errors in writing Xing frame to warningsReimar Döffinger2012-09-15
| | | | Also clarify the meaning of the log message.
* mp2 muxer: mark as AVFMT_NOTIMESTAMPS.Carl Eugen Hoyos2012-09-07
| | | | Signed-off-by: Alex Converse <alex.converse@gmail.com>
* 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>
* 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
|
* 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>
* mp3enc: write attached pictures (APIC).Anton Khirnov2012-02-29
|
* mp3enc: move mp3_write_xing() further up in the file.Anton Khirnov2012-02-29
| | | | It will be need by new functions called from mp3_write_trailer().
* id3v2enc: split ff_id3v2_write().Anton Khirnov2012-02-29
| | | | | This will allow writing the tag in several steps, needed for writing attached pictures.
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-06
| | | | | | | | | | | All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Martin Storsjö <martin@martin.st>
* Move id3v2 tag writing to a separate file.Michael Karcher2011-10-23
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.Anton Khirnov2011-10-20
| | | | | Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header, ff_mpegaudio_decode_header.
* AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-12
|
* Do not write ID3v1 tags by defaultDiogo Franco2011-08-16
| | | | | | | | | | ID3v1 are legacy tags with several limitations; furthermore avconv/ffmpeg writes the tags in UTF-8 which probably has near-0 software support. Add a -write_id3v1 option to be able to turn it on; disabled by default. 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.
* mp3enc: write a xing frame containing number of frames in the fileAnton Khirnov2011-07-08
|
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* lavf: use designated initializers for AVClasses.Anton Khirnov2011-05-17
|
* AVOptions: make default_val a union, as proposed in AVOption2.Anton Khirnov2011-05-10
| | | | This breaks API and ABI.
* Replace strncpy() with av_strlcpy().Alex Converse2011-05-03
|
* avio: avio_ prefix for url_close_dyn_bufAnton Khirnov2011-04-03
|
* avio: avio_ prefix for url_open_dyn_bufAnton Khirnov2011-04-03
|
* 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>
* mp3enc: remove mp3_write_packet(), use ff_raw_write_packet() insteadAnton Khirnov2011-03-16
| | | | The two functions are identical, no point in duplicating code here.
* 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>
* 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>
* mp3enc: write ISO8859-1 instead of UTF-16 when possibleAnton Khirnov2011-02-05
| | | | 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.
* mp3enc: support for id3v2.3 tags using a per-muxer AVOptionAnton Khirnov2011-01-22
| | | | | | fixes issue2562. Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* id3v2: split tables for various ID3v2 versionsAnton Khirnov2011-01-22
| | | | | | This is needed for upcoming ID3v2.3 muxing support. Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* mp3enc: handle errors in id3v2_put_ttagAnton Khirnov2011-01-22
| | | | | | | | | | make the initialization of put clearer this are the differences between [FFmpeg-devel] [PATCH 1/3] mp3enc: add support for writing UTF-16 tags and the already applied 187e23478bc5c066ff8eef562925471ac179644e Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* mp3enc: add support for writing UTF-16 tagsAnton Khirnov2011-01-21
| | | | | | Also it gets rid of some mysterious magic numbers in code. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Split mp3 demuxer and muxer into separate files.Anton Khirnov2011-01-21
Signed-off-by: Mans Rullgard <mans@mansr.com>