Michael Niedermayer
370bb893d2
mp3enc: fix const correctness
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bd6ece4609
mp3enc: fix CODEC_ID/CodecID that leaked in from older patch
...
Found-by: jamal <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7fd467f708
mp3/mp2: identify the video codecs as APIC through query_codec.
...
Fixes Ticket1408
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Michael Niedermayer
57d5a224ce
mp3enc: add lame tag with start padding info
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
ca297513f0
lavf/mp3enc: support MPEG-2 and MPEG-2.5 sample rates when writing Xing header.
13 years ago
Michael Niedermayer
f14f3bae6b
mp3enc: avoid ifdef
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tobias Rapp
8da0a6cda1
mp3enc: Fix Xing tag identification string for CBR files
...
Fixes the Xing tag identification string to be "Info" for MP3 files with
constant bitrate. The previous "Xing" caused some decoders to recognize the
file as VBR.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
4c53c66a21
mp3enc: clarify meaning of "Unsupported" messages.
...
They will only cause us to skip writing the Xing header,
not cause any serious breakage.
Related to trac issue #1027 .
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Martin Storsjö
20234a4bd7
cosmetics: Align muxer/demuxer declarations
...
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>
13 years ago
Anton Khirnov
2dfea12058
mp3enc: write attached pictures (APIC).
13 years ago
Anton Khirnov
c68148b1ea
mp3enc: move mp3_write_xing() further up in the file.
...
It will be need by new functions called from mp3_write_trailer().
13 years ago
Anton Khirnov
411225aabc
id3v2enc: split ff_id3v2_write().
...
This will allow writing the tag in several steps, needed for writing
attached pictures.
13 years ago
Michael Niedermayer
4dbdd3ec6f
mp3enc: fix "warning: best_bitrate_idx may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
e1a8164d62
mp3enc: fix playback with mp3 encoded files on some devices.
...
This partially reverts 1fea432b; header variable needs to keep its value
in case it triggers "if (needed <= c.frame_size)".
13 years ago
Paul B Mahol
73ba2c1e62
mp3enc: remove unused variable
13 years ago
Michael Niedermayer
40176fc314
mp3enc: Try to use a matching bitrate in the xing header.
...
Might Fix Ticket431
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1fea432b7a
mp3enc: simplify mp3_write_xing()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
bb3244dee2
Replace all usage of strcasecmp/strncasecmp
...
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>
13 years ago
Reimar Döffinger
96949dafcc
Replace all strcasecmp/strncasecmp usages.
...
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: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Tobias Rapp
0f39fa0279
mp3enc: avoid truncating id3v1 tags by one byte
...
Avoid writing the trailing null-byte for id3v1 tags if length reaches max length.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Karcher
16ad77b357
Move id3v2 tag writing to a separate file.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Anton Khirnov
82ab61f901
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
...
Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header,
ff_mpegaudio_decode_header.
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Carl Eugen Hoyos
262ab1c59a
Do not assume timestamps for mp2 format.
13 years ago
Diogo Franco
f1f298cd32
Do not write ID3v1 tags by default
...
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>
13 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Anton Khirnov
bda168d2b0
mp3enc: write a xing frame containing number of frames in the file
14 years ago
Anton Khirnov
d2d67e424f
Remove all uses of now deprecated metadata functions.
14 years ago
Anton Khirnov
f0029cbcf6
lavf: use designated initializers for AVClasses.
14 years ago
Anton Khirnov
b66752790a
AVOptions: make default_val a union, as proposed in AVOption2.
...
This breaks API and ABI.
14 years ago
Reimar Döffinger
5ce33e6bc5
Move ifdef to avoid unused variable warnings.
14 years ago
Michael Niedermayer
c60d2be551
mp3enc:simplify
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
e1e8a8ded4
mp3enc:better variable name for the frames field file postion.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
4382bc2ceb
mp3enc: drop nested structs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
f2a90c3b34
mp3enc:use FFMIN()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
01be9331c7
mp3enc:Drop unneeded floating point math.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
ec9a5deb20
mp3enc: drop sum and count bytes instead of bitrates from decoded headers.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
7d62475656
mp3enc: remove unneeded ifdef
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
173c975ead
mp3enc: remove unneeded static const variables.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Peter Belkner
d62bf5d4e7
mp3enc: mux a XING header
...
The patch below provides exactly that to the MP3 muxer. A XING header
containing
* the numer of frames,
* the size, and
* a TOC
is generated.
It's based on an idea by Anton Khirnov (restricted to the number of
frames) found at
http://patches.ffmpeg.org/patch/1891/
The TOC is generated as found in lame's "VbrTag.c".
According to my tests the following reproduces the number of frames, the
size and the TOC in "c.mp3" from "b.mp3" (except a shift due to shorter
XING header generated by FFmpeg):
lame -V2 a.wav b.mp3
ffmpeg -i b.mp3 -acodec copy -y c.mp3
14 years ago
Alex Converse
1a5e4fd8c5
Replace strncpy() with av_strlcpy().
14 years ago
Anton Khirnov
85770f2a26
AVOptions: make default_val a union, as proposed in AVOption2.
...
This breaks API and ABI.
14 years ago
Anton Khirnov
4a7a1b7def
lavf: use designated initializers for AVClasses.
14 years ago
Anton Khirnov
6dc7d80de7
avio: avio_ prefix for url_close_dyn_buf
14 years ago
Anton Khirnov
b92c545282
avio: avio_ prefix for url_open_dyn_buf
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
b7f2fdde74
avio: rename put_flush_packet -> avio_flush
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
fed5676ffe
mp3enc: remove mp3_write_packet(), use ff_raw_write_packet() instead
...
The two functions are identical, no point in duplicating code here.
14 years ago