1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-12 12:25:32 +02:00
Commit Graph

143 Commits

Author SHA1 Message Date
Anton Khirnov
d2d67e424f Remove all uses of now deprecated metadata functions. 2011-06-08 07:43:45 +02:00
Alex Converse
13220b1856 flvdec: clenup debug code 2011-05-17 22:08:11 +02:00
Martin Storsjö
578d6861a7 flvdec: Allow parsing keyframes metadata without seeking in most cases
Stop the avio input at a point where amf_parse_object can
continue parsing the end of the object seamlessly, when all
data is available.

If unsupported data is encountered within the keyframes object,
try seeking to the start of the keyframes object - if the seek
back was successful, the caller can continue parsing the rest
of the AMF data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-12 23:08:55 +03:00
Anton Khirnov
ff1ec0c3f8 avio: undeprecate av_url_read_fseek/fpause under nicer names
It seems their replacements won't be ready anytime soon.
2011-04-12 19:17:05 +02:00
Kharkov Alexander
b5304f7b2e flvdec: Fix support for flvtool2 "keyframes based" generated index
Current keyframes data parser unconditionally rewind metadata to
the end at the end of function. As result ALL metadata located
after keyframes index not parsed, and as metadata object can have
ANY placement inside metadata it can lead to unpredictable result
(bitrate can not be found, etc.). As result FLV movie will not
play at all in such situation.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-12 12:38:45 +03: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
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
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
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
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
45a8a02a41 lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:24:51 -04:00
Anton Khirnov
66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anton Khirnov
76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov
e356fc57a2 lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:22:16 -05:00
Anton Khirnov
6b4aa5dac8 avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:12:33 -05:00
Anton Khirnov
b7effd4e83 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 11:23:22 -05:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Luca Barbato
dfd2a005eb Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
2011-01-29 23:55:37 +01:00
Diego Elio Pettenò
c6610a216e Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
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.
2011-01-26 22:10:09 +00:00
Thierry Foucu
caa7ad5dc6 Fix 16kHz Mono NellyMoser in flv.
Patch by Thierry Foucu, tfoucu gmail

Originally committed as revision 25667 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:12:07 +00:00
Baptiste Coudurier
7d6096e42e Use ext sample from mpeg4audio config if set with AAC SBR
Originally committed as revision 23947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 22:31:31 +00:00
Stefano Sabatini
2ef6c1242a Mark av_metadata_set() as deprecated, and use av_metadata_set2()
in its place.

av_metadata_set() is going to be dropped at the next major bump.

Originally committed as revision 22961 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-25 14:27:42 +00:00
Howard Chu
fc8fa007fb Implement librtmp seek support.
Implement flv_read_seek(), add a missing check on stream_index
and fix timestamp rounding in rtmp_read_seek().

Also add the flv_read_seek2() function, which is not enabled but is
useful as reference.
To actually implement flv_read_seek2() correctly, there would need to
be some corresponding av_url_read_fseek2() function to propagate the
timestamps down to the ByteIOContext and URLContext.

Patch by Howard Chu <hyc <at> highlandsun.com>.

See the thread:
Subject: [FFmpeg-devel] RTMP seek support
Date: 2010-03-28 23:35:02 GMT

Originally committed as revision 22904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-18 19:09:25 +00:00
Howard Chu
7e939205d9 Set audio bit rate.
Patch by Howard Chu, hyc highlandsun com

Originally committed as revision 22835 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 12:21:30 +00:00
Howard Chu
527c2e6429 Fix flvdec start-of-frame.
Patch by Howard Chu hyc highlandsun com

Originally committed as revision 22757 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 08:02:20 +00:00
Jean-Daniel Dupas
cc947f04cc Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.
Patch by Jean-Daniel Dupas, devlists shadowlab org

Originally committed as revision 22744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 12:29:58 +00:00
Stefano Sabatini
72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Baptiste Coudurier
fdf4662211 fetch flv duration from file if it is set to 0 in metadata
Originally committed as revision 21329 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 19:41:24 +00:00
Michael Niedermayer
cc38e063be Revert flvdec.c part of r20836
Log:
	Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strduped
	arrays of fixed length.
	Code from ffmbc with changes to adapt to our metadata API.
Reason: memleak & fix is not trivial

Originally committed as revision 20866 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 15:59:19 +00:00
Daniel Verkamp
8e9efe4392 FLV 8-bit PCM is unsigned, not signed
Fixes issue #1569

Originally committed as revision 20853 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 03:30:25 +00:00
Michael Niedermayer
12ad66712a Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strduped
arrays of fixed length.
Code from ffmbc with changes to adapt to our metadata API.

Originally committed as revision 20836 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 20:27:29 +00:00
Daniel Verkamp
0aa6a518ad Add codec id for Flash screen codec v2 and hook it up in FLV demuxer
Originally committed as revision 20563 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-20 19:16:42 +00:00
Alex Converse
5aea268d14 Add a channels field to MPEG4AudioConfig.
Originally committed as revision 20512 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-11 20:24:23 +00:00
Michael Niedermayer
37e34df5a5 Check offset in flv_probe()
Originally committed as revision 19858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-15 14:56:09 +00:00
Martin Storsjö
b126dee964 Use all 32 bits of the timestamp when calculating flv duration.
At the moment, duration is mainly set from the metadata packet. If that is not
available, the fallback is checking the low 24 bits of the last packet. This is
not enough for files over 4,6 hours in length, so read all 32 bits instead.
patch by Martin Storsjö, martin martin st

Originally committed as revision 19791 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-07 10:49:51 +00:00
Justin Ruggles
d2a47a578e Remove fake Speex header creation from FLV demuxer. Having it there was not the
correct solution to the problem.  A better solution might be possible later once
Speex is supported in muxers.

Originally committed as revision 19761 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-04 21:43:41 +00:00
Måns Rullgård
63613fe615 Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-26 12:20:04 +00:00
Aurelien Jacobs
df2bd71aeb flvdec: expose metadata through the generic metadata API
original patch from Art Clarke  aclarke _at_ xuggle _dot_ com

Originally committed as revision 19364 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-06 21:54:37 +00:00
Aurelien Jacobs
09e54e1ff8 flvdec: re-enable metadata parsing
duration and videodatarate values are actually useful
original patch from Art Clarke  aclarke _at_ xuggle _dot_ com

Originally committed as revision 19363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-06 21:49:33 +00:00
Aurelien Jacobs
8caa0f0651 flvdec: don't set format and codec context from metadata values
This has proven to be useless and even harmfull since r18460 (expect
for duration and videodatarate).
original patch from Art Clarke  aclarke _at_ xuggle _dot_ com

Originally committed as revision 19362 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-06 21:46:37 +00:00
Justin Ruggles
c1c206b343 flvdec: Build a Speex header during FLV demuxing using required and
default values. This is needed because FLV files with Speex do not
contain a Speex header, which is necessary for stream copy.

Originally committed as revision 19267 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-24 22:10:53 +00:00
Art Clarke
e1d8d7bb4b Downgrade message log level (from AV_LOG_ERROR to AV_LOG_DEBUG) about
skipped metadata packet in FLV demuxer.

Patch by Art Clarke a${surname} At xuggle - com.

Originally committed as revision 19210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-16 23:14:59 +00:00
Michael Niedermayer
4eec260642 Remove unused variable from flv_read_metabody() found by CSA.
Originally committed as revision 18571 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 17:42:41 +00:00
Michael Niedermayer
77daaf6748 Disable metadata reading. Yes, I would like to know what this code is good for
and this is the easiest way to. It would be a lot of messy code we can drop
if it is useless.
As a sideeffect this fixes issue977.

Originally committed as revision 18460 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-12 04:01:03 +00:00
Michael Niedermayer
634b927f82 Do not fail on zero packets.
Originally committed as revision 18328 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-03 15:32:31 +00:00
Baptiste Coudurier
fcb4228c86 skip empty data packets in flv, fix input.flv
Originally committed as revision 18306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-02 03:52:19 +00:00
Michael Niedermayer
ded0149948 Replace two 'return AVERROR(EAGAIN);' by continue. The latter are nicer
and the EAGAIN were just added as example not because they made sense.

Originally committed as revision 17783 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 20:24:17 +00:00
Baptiste Coudurier
d2718187b9 parse aac extradata to fetch channels and sample rate, patch from Netgem
Originally committed as revision 17506 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-21 23:54:50 +00:00
Peter Ross
0e9602ef93 FLV demuxer: return AVERROR_EOF upon detection of end of file.
Originally committed as revision 17457 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-19 12:19:55 +00:00