Anton Khirnov
f35ff97f2e
lavf: use designated initializers for all protocols
...
This is more readable and makes it easier to reorder URLProtocol
members.
2011-04-08 11:08:26 +02:00
Anton Khirnov
a6aa7a1a14
applehttp: don't use deprecated url_ functions.
2011-04-08 09:18:48 +02:00
Anton Khirnov
d6bbe76124
avio: move two ff_udp_* functions from avio_internal to url.h
2011-04-08 07:08:22 +02:00
Anton Khirnov
acaceca2f1
asfdec: remove a forgotten declaration of nonexistent function
2011-04-08 07:08:12 +02:00
Anton Khirnov
026e175775
avio: deprecate the typedef for URLInterruptCB
...
There's no particular reason to pollute the namespace with a typedef for
it.
2011-04-08 07:07:58 +02:00
Luca Barbato
a2031251c7
proto: include os_support.h in network.h
...
Fix compilation on systems without poll()
2011-04-07 21:03:12 +02:00
Anton Khirnov
9181976348
matroskaenc: don't write an empty Cues element.
2011-04-07 18:11:24 +02:00
Anton Khirnov
5cec897105
avio: move extern url_interrupt_cb declaration from avio.h to url.h
2011-04-07 18:11:24 +02:00
Anton Khirnov
8e76a19b63
avio: make av_register_protocol2 internal.
2011-04-07 18:11:24 +02:00
Anton Khirnov
80c6e238b0
avio: avio_ prefix for url_set_interrupt_cb.
2011-04-07 18:11:24 +02:00
Anton Khirnov
f87b1b373a
avio: AVIO_ prefixes for URL_ open flags.
2011-04-07 18:07:16 +02:00
Luca Barbato
3d42d4937b
proto: introduce listen option in tcp
...
This way is possible to have simple micro-server act like
ffmpeg -i file.nut -vcodec copy -acodec copy -f nut tcp://foo:1234?listen
2011-04-07 02:54:30 +02:00
Luca Barbato
ebba2b3e2a
proto: factor ff_network_wait_fd and use it on udp
...
Support the URL_FLAG_NONBLOCK semantic and uniform the protocol.
The quick retry loop is already part of retry_transfer_wrapper.
The polling routine is common to the network protocols:
udp, tcp and, once merged, sctp.
2011-04-07 02:53:55 +02:00
Anton Khirnov
6e37b45888
mmst: get rid of deprecated AVERRORs
2011-04-06 14:10:08 +02:00
Anton Khirnov
a2018b5167
lxfdec: use AVERROR(ENOMEM) instead of deprecated AVERROR_NOMEM.
2011-04-06 14:10:08 +02:00
Anton Khirnov
f5b386afab
Reemove remaining uses of deprecated AVERROR_NOTSUPP.
2011-04-06 14:10:08 +02:00
Anton Khirnov
56a1000917
lavf: if id3v2 tag is present and all else fails, guess by file extension
2011-04-06 14:10:08 +02:00
Anton Khirnov
668438a31e
avio: always compile dyn_buf functions
...
Fixes build with --disable-muxers --disable-network.
Thanks to Hendrik Leppkes for noticing.
2011-04-05 19:32:14 +02:00
Anton Khirnov
b840484798
avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
2011-04-05 08:40:57 +02:00
Anton Khirnov
1305d93c42
avio: deprecate av_url_read_seek
...
It's not used anywhere internally.
Salvage its documentation for ffio_read_seek.
2011-04-05 08:40:27 +02:00
Anton Khirnov
fa104e14ab
avio: deprecate av_url_read_pause
...
It's not used anywhere internally.
Salvage its documentation for ffio_read_pause.
2011-04-05 08:39:40 +02:00
Anton Khirnov
727c7aa026
avio: deprecate url_get_filename().
...
URLContext.filename should be used directly.
2011-04-04 17:45:20 +02:00
Anton Khirnov
5958df341d
avio: deprecate url_max_packet_size().
...
URLContext.max_packet_size should be used directly.
2011-04-04 17:45:20 +02:00
Anton Khirnov
1869ea03b7
avio: make url_get_file_handle() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
32a97d4630
avio: make url_filesize() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
e52a9145c8
avio: make url_close() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
58a48c6511
avio: make url_seek() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
230a468679
avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
2011-04-04 17:45:20 +02:00
Anton Khirnov
925e908bc7
avio: make url_write() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
dce3756459
avio: make url_read_complete() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
bc371aca46
avio: make url_read() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
0589da0aa5
avio: make url_open() internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
62eaaeacb5
avio: make url_connect internal.
2011-04-04 17:45:20 +02:00
Anton Khirnov
5652bb9471
avio: make url_alloc internal.
2011-04-04 17:45:19 +02:00
Martin Storsjö
0d8a33b11e
applehttp: Merge two for loops
...
The previous commit didn't do this straight away, to keep the
diff slightly simpler.
2011-04-04 13:01:59 +03:00
Martin Storsjö
6cc7f13982
applehttp: Restructure the demuxer to use a custom AVIOContext
...
This avoids issues where EOF at the end of the segment is given
the variant demuxer. Now the demuxers only see one single data
stream (as when using the applehttp protocol handler).
2011-04-04 12:59:23 +03:00
Martin Storsjö
d3964da2c2
applehttp: Move finished and target_duration to the variant struct
...
This is a preparation for a restructuring of the demuxer, to
minimize the later diff.
2011-04-04 12:44:23 +03:00
Anton Khirnov
333e894363
avio: deprecate url_open_protocol
...
The unbuffered API will be made private and it's not used anywhere
internally.
2011-04-04 07:46:29 +02:00
Anton Khirnov
e230705392
avio: deprecate url_poll and URLPollEntry
...
They're unimplemented and nobody cared to do anything with that for
10 years.
2011-04-04 07:45:44 +02:00
Justin Ruggles
e3c007bb43
flvdec: fix segfault in amf_parse_object() due to NULL key
...
fixes Issue 2674
2011-04-03 20:29:04 -04:00
Anton Khirnov
4dcde00cfc
lavf: bump minor version and add an APIChanges entry for avio changes
2011-04-03 23:38:05 +02:00
Anton Khirnov
8bea72f7eb
avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
2011-04-03 23:33:51 +02:00
Anton Khirnov
724f6a0fa4
avio: make url_fdopen internal.
...
The unbuffered URLContext API will be made private, so there's no point
in this function being public.
2011-04-03 22:47:39 +02:00
Anton Khirnov
403ee835e7
avio: make url_open_dyn_packet_buf internal.
...
It doesn't look fit to be a part of the public API.
Adding a temporary hack to ffserver to be able to use it, should be
cleaned up when somebody is up for it.
2011-04-03 22:47:32 +02:00
Anton Khirnov
6dc7d80de7
avio: avio_ prefix for url_close_dyn_buf
2011-04-03 22:47:05 +02:00
Anton Khirnov
b92c545282
avio: avio_ prefix for url_open_dyn_buf
2011-04-03 22:46:56 +02:00
Anton Khirnov
8978fedaee
avio: introduce an AVIOContext.seekable field
...
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Anton Khirnov
b4b167ecbf
jvdec: don't use deprecated CODEC_TYPE_*/PKT_FLAG_KEY
2011-04-02 16:16:44 +02:00
Anton Khirnov
3c96c64821
avio: document avio_alloc_context.
2011-04-01 20:02:32 +02:00
Anton Khirnov
ab11317c1f
lavf: make compute_chapters_end less picky.
...
In particular, now it assumes that
a) chapters are chronologically ordered
b) chapters have the same timebases
c) duration of the stream is known
and asserts if any of these is not met.
Make it properly deal with harsher conditions.
fixes issue2320
2011-04-01 19:53:55 +02:00
Matthew Hoops
0e635f3e86
sierravmd: fix Indeo3 videos
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-01 19:29:08 +02:00
Kostya Shishkov
29a290439b
ape: check that number of seektable entries is equal to number of frames
...
fixes issue2480
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-01 09:34:44 +02:00
Jindrich Makovicka
e006d71fa8
mpegts: propagate avio EOF in read_packet()
...
Allows distinguishing between EOF and IO error in read_packet return code.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-31 19:46:28 +02:00
Kharkov Alexander
cb7e2c1ca8
flvdec: read index stored in the 'keyframes' tag.
...
'keyframes' metatag is not part of the standard, it is just
convention to use such kind of metatag information for indexing.
Structure is following, it allows to have it inconsistent:
keyframes:
times (array):
time0 (num)
time1 (num)
time2 (num)
filepositions (array)
position0 (num)
position1 (num)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-31 07:31:58 +02:00
Alex Converse
9dd94f8379
mov: Add support for zero-sized stsc runs.
...
A zero sized stsc run doesn't make a lot of sense but the spec does not
prohibit them and MPlayer VLC demuxers support them.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-31 07:28:20 +02:00
Martin Storsjö
229e2631be
rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers
...
According to the RFC, GET_PARAMETER should be used for
this, and according to a report from Tim Ouellette,
OPTIONS doesn't work for keeping the connection alive for some
servers. Also, live555 uses GET_PARAMETER for this purpose.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-30 22:44:07 +02:00
Anton Khirnov
b64030f26d
avio: make get_checksum() internal.
2011-03-30 07:48:55 +02:00
Anton Khirnov
d09cc22d9c
avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h
2011-03-30 07:48:38 +02:00
Anton Khirnov
4c4427a75d
avio: make init_checksum() internal.
2011-03-30 07:47:08 +02:00
Carl Eugen Hoyos
31f00274f8
id3v1: change filesize to int64_t.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-28 21:15:50 -07:00
Carl Eugen Hoyos
13eadbaca4
id3v1: Seek back to old position after reading.
...
FFmpeg did not seek back to the original position, but to "0", making
reading a VBR tag impossible.
(issue 2645)
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-28 21:15:50 -07:00
Kostya Shishkov
42315dabce
Chronomaster DFA decoder
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-28 16:55:03 +02:00
Tyler
bc61920d89
http: header field names are case insensitive
...
Amazon S3 sends header field names all lowercase.
This is actually acceptable according to the HTTP standard.
http://tools.ietf.org/html/rfc2616#section-4.2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-28 04:16:12 +02:00
Justin Ruggles
eb81cf860c
mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
2011-03-25 16:59:09 -04:00
Justin Ruggles
c70a6a41dd
Use audio_service_type to set stream disposition.
2011-03-25 16:58:50 -04:00
John Stebbins
98a7d560b4
matroskadec: set default duration for simple block
...
When a normal Block is parsed, duration is initialized to
AV_NOPTS_VALUE. If it is not changed, then the track's default
duration is used. But for SimpleBlock, duration is initialized to
0 instead of AV_NOPTS_VALUE. This is due to the difference in how
EBML_NEST vs EBML_PASS are processed. Setting duration to 0 leads
eventually to wrongly estimate the frame duration in util.c
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-25 00:34:18 +01:00
Ronald S. Bultje
cd256c3b89
ffmetadec.c: fix compiler warnings.
2011-03-24 08:06:39 -04:00
Anton Khirnov
4ec153bb66
avio: make udp_set_remote_url/get_local_port internal.
2011-03-23 17:32:13 +01:00
Vladimir Pantelic
4377fafda1
asfdec: also subtract preroll when reading simple index object
...
This was missed when ASF was changed to return timestamps
without preroll.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-23 13:46:19 +00:00
Anton Khirnov
264935c962
matroskaenc: remove a variable that's unused after bc17bd9
.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-23 09:01:49 -04:00
Anton Khirnov
491653ed90
avio: cosmetics - nicer vertical alignment.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-23 12:40:10 +00:00
Martin Storsjö
28e9c42afb
rtsp: Don't use a locale dependent format string
...
In this particular case, we aren't ever printing anything else than
0.000 anyway.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-23 07:30:16 -04:00
Tomas Härdin
1b7ecc1662
Add xd55 codec tag for XDCAM HD422 720p25 CBR files.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-23 07:30:15 -04:00
Anton Khirnov
bc17bd90f5
matroskaenc: simplify get_aac_sample_rates by using ff_mpeg4audio_get_config
...
This also fixes broken SBR detection, which produced files with double
sample rate since 8ae0fa2
.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-22 21:39:14 -04:00
Carl Eugen Hoyos
78e99e0f32
Do not use format string "%0.3f" for RTSP Range field.
...
The format string was locale-depending.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-22 21:30:35 -04:00
Anton Khirnov
c5f4c0fd5c
id3v2: skip broken tags with invalid size
...
fixes issue2649.
2011-03-22 09:08:59 -04:00
Anton Khirnov
1885488757
id3v2: don't explicitly skip padding
...
It's pointless, since there's a seek to the end of tag later.
2011-03-22 09:08:59 -04:00
Martin Storsjö
af79dd36f3
amr: Set the AVFMT_GENERIC_INDEX flag
...
This makes the amr demuxer support seeking, closing roundup
issue 2593.
2011-03-21 21:31:34 +01:00
Martin Storsjö
026fa81de4
amr: Set the pkt->pos field properly to the start of the packet
...
Previously, the field pointed to the second byte of the packet
(which is the first byte of the actual AMR payload).
2011-03-21 21:31:34 +01:00
Martin Storsjö
2890cba8b5
amr: Set the codec->bit_rate field based on the last packet
...
This allows libavformat to guess an estimated duration for
amr files.
For streams with varying bit rates (or with silence descriptors
or "no frame" blocks) the guess is, of course, inaccurate.
2011-03-21 21:31:33 +01:00
Martin Storsjö
895678f823
rtsp: Specify unicast for TCP interleaved streams, too
...
According to the RFC, the default is multicast if nothing is
specified, which doesn't make sense for TCP.
According to a bug report, some Axis camera models give a
"400 Bad Request" error if this is omitted.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-21 20:58:33 +01:00
Martin Storsjö
dc8b73c069
applehttp: Change the variable for stream position in seconds into int64_t
...
A similar variable for the total stream duration was changed to
int64_t in b79c3df088
, due to overflows in some odd
streams.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-21 20:16:53 +01:00
Anton Khirnov
eb1e7f78ea
id3v2: simplify error handling.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 15:08:01 -04:00
Anton Khirnov
bca6dee386
id3v2: explicitly seek to the end of the tag after reading
...
Current code might stop in the middle of an invalid tag.
fixes issue2650
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 14:56:59 -04:00
Anton Khirnov
933e90a69a
avio: make av_url_read_fseek/fpause internal.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 14:54:52 -04:00
Anton Khirnov
8d9769a77b
avio: deprecate url_fileno
...
It's an evil hack that assumes an AVIOContext is always based on top of
an URLContext.
It's also not used anywhere.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-20 20:33:05 -04:00
Anton Khirnov
447fe33691
rmenc: replace avio_seek(0) with avio_tell()
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-20 20:33:05 -04:00
Anton Khirnov
e42500cb4f
lavf: replace some more avio_seek(SEEK_CUR) with avio_skip
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-20 20:33:05 -04:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Anton Khirnov
2cface71ca
nutenc: fix a memleak
...
This fixes a minor memory leak introduced in 073f8b1
.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-17 16:25:54 +00:00
Vladimir Pantelic
de11ee906e
asfdec: subtract the preroll value and thus output 0 based timestamps
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-17 16:25:54 +00:00
Martin Storsjö
f1f60f5252
lavf: Make make_absolute_url a lavf internal function
...
This is shared by both applehttp demuxer and protocol.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-17 12:28:37 +01:00
Martin Storsjö
bc040cb3e2
applehttp: Fix a typo in a comment
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-17 11:20:21 +00:00
Stefano Sabatini
68d875addc
lavf: make av_interleave_packet() return meaningful error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c5dcb3d493
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-17 07:30:09 +01:00
Stefano Sabatini
70abc32314
lavf: enable av_dlog message in av_interleaved_write_frame()
...
Help debugging timestamp issues.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d541c8b468
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-17 07:29:57 +01:00
Stefano Sabatini
79f43a8cb6
lavf: enable av_dlog() in compute_pkt_fields2()
...
Turns a comment into an av_dlog() instruction, also add a commented
issues.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 77f21ce464
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-17 07:29:47 +01:00
Anton Khirnov
b7f2fdde74
avio: rename put_flush_packet -> avio_flush
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov
35f1023592
avio: deprecate url_close_buf
...
It's not used anywhere and its return value looks broken.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov
83fddaeb81
avio: deprecate url_open_buf
...
It's only used in one place and does the same thing as
avio_alloc_context.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov
eda4cf92d7
avio: always compile avio_printf, rather than on CONFIG_MUXERS
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00