Michael Niedermayer
0f0f626048
avformat/rawdec: Increase probe score when "Content-Type: image/jpeg" is found at the file start
...
Based-on code by: Carl Eugen Hoyos and Andrey Utkin
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b45a451dbe
avformat/rawdec: mark raw vc1 and mjpeg as having no timestamps
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2d3842f541
avformat: add mjpeg_probe()
...
Fixes Ticket3679
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
f66d0c57b1
latm: Add a probe function
11 years ago
Nicolas George
276fcbde6c
lavf: data muxer and demuxer.
...
Allow to use tools designed to work with demuxers, muxers
and packets (for example ffmpeg itself) to process raw byte
streams (like aviocat).
12 years ago
Paul B Mahol
4c76600a8c
rawdec: make use of AV_OPT_TYPE_VIDEO_RATE
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
85a5bc054c
lavf: remove disabled FF_API_R_FRAME_RATE cruft
12 years ago
Janne Grunau
54c7fe6d68
raw demuxer: initialize end of partial packets
12 years ago
Luca Barbato
587874ef1c
rawdec: remove ff_raw_read_header
...
It is not used anymore and is a kludge.
12 years ago
Luca Barbato
5f0e161dd6
g722: refactor out of rawdec.c
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Clément Bœsch
16dc5f2050
Replace various inlined inverse AVRational with av_inv_q().
12 years ago
Anton Khirnov
aba232cfa9
lavf: deprecate r_frame_rate.
...
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.
12 years ago
Michael Niedermayer
fdc371114f
ff_raw_audio_read_header: mark as AVSTREAM_PARSE_FULL_RAW
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9d87c8e6f8
rawdec: use av_assert()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1dd71e1cd5
rawdec: force timestamps from codec to be used
...
This fixes playback timing with at least m4v files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
87d7a92b62
rawdec: set timebase to 1/fps.
13 years ago
Anton Khirnov
f7fe41a04f
lavf: rename AVInputFormat.value to raw_codec_id.
...
It's only used by raw demuxers for storing the codec id.
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Reimar Döffinger
efd6b80b40
rawdec: use av_shrink_packet.
...
This fixes reads of uninitialized data by the parser when running
FATE sample h264-conformance/SL1_SVA_B.264.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Reimar Döffinger
c914038d38
rawdec: Set start_time to 0 for raw audio files.
...
None of the raw audio files have timestamps, thus setting
start_time to 0 should be reasonable.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
e745d7525a
rawdec: don't set codec timebase.
...
It's not supposed to be set outside of lavc. Set r_frame_rate and
avg_frame_rate instead.
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Michael Niedermayer
fca85ce5ec
rawdec: use a default sample rate if none is specified.
...
Fixes "ffmpeg -f s16le -i /dev/zero"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1d23e5246c
mjpeg: support mpo
...
Fixes stereoscopic_photo.mpo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
87c57d807f
Create separate functions for the raw GSM demuxer.
...
Put the new raw GSM demuxer in its own file.
Fixes raw GSM demuxing.
13 years ago
Stefano Sabatini
aa638b4600
rawdec: add check on sample_rate
...
Prevent error condition in case sample_rate is unset or set to a negative
value. In particular, fix divide-by-zero error occurring in ffmpeg due to
sample_rate set to 0 in output_packet(), in code:
ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
ist->st->codec->sample_rate;
Fix trac ticket #324 .
13 years ago
Anton Khirnov
3b3bbdd3e6
lavf,lavd: replace av_new_stream->avformat_new_stream part I.
...
Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
13 years ago
Justin Ruggles
e32dfdaa8d
shn: do not allow seeking in the raw shn demuxer.
...
The demuxer does not read the seektable, a parser is not possible without a
full decode, and no shorten decoder can handle random seeking because it needs
side info from the seektable.
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Janne Grunau
dcb9f6a20d
Add LATM demuxer
...
This is a raw demuxer for the AAC LATM decoder and thus limited to
single stream LOAS.
13 years ago
Anton Khirnov
85d982f1e2
rawdec: refactor private option for raw video demuxers
...
pixel_format/video_size only apply to 'rawvideo' (==uncompressed) demuxer
and make no sense for the other raw (== containerless) demuxers. Keep
only the framerate option for those.
Also use unique classes for all raw video demuxers
13 years ago
Anton Khirnov
34d2bf30a0
pcmdec: use unique classes for all pcm demuxers.
13 years ago
Anton Khirnov
d906f49aa8
rawdec: g722 is always 1 channel/16kHz
13 years ago
Anton Khirnov
c14fe6bc99
lavf,lavd: remove all usage of AVFormatParameters from demuxers.
...
AVFormatParameters are converted into corresponding private options in
av_open_input_file/stream() compat wrappers, so accessing them from
demuxers is redundant.
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
367732832f
lavf,lavc: free avoptions in a generic way.
...
It's simpler and less error-prone.
Fixes some memleaks along the way.
14 years ago
Anton Khirnov
e762b1ce95
rawdec: add framerate private option.
14 years ago
Anton Khirnov
1f94c31f69
rawdec: initialize return value to 0.
14 years ago
Anton Khirnov
a606aa7570
rawdec: don't leak option strings.
14 years ago
Anton Khirnov
2a85f21868
rawdec: add a pixel_format private option.
14 years ago
Anton Khirnov
fa4924a358
rawdec: factor video demuxer definitions into a macro.
14 years ago
Anton Khirnov
973f686a6c
rawdec: add video_size private option.
14 years ago
Anton Khirnov
bffd4dd1d3
lavf: deprecate AVFormatParameters.{channels,sample_rate}.
14 years ago
Anton Khirnov
5b3865fc5f
rawdec: add sample_rate/channels private options.
14 years ago
Reimar Döffinger
7f725f234e
Set start_time to 0 for raw audio files.
...
None of the raw audio files have timestamps, thus setting
start_time to 0 should be reasonable.
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
384c9c2fa7
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712
)
14 years ago