Commit Graph

180 Commits

Author SHA1 Message Date
Diego Biurrun daf8cf358a avformat: Don't anonymously typedef structs 2015-02-14 10:13:47 -08:00
Anton Khirnov 194be1f43e lavf: switch to AVStream.time_base as the hint for the muxer timebase
Previously, AVStream.codec.time_base was used for that purpose, which
was quite confusing for the callers. This change also opens the path for
removing AVStream.codec.

The change in the lavf-mkv test is due to the native timebase (1/1000)
being used instead of the default one (1/90000), so the packets are now
sent to the crc muxer in the same order in which they are demuxed
(previously some of them got reordered because of inexact timestamp
conversion).
2014-06-18 15:12:34 +02:00
Anton Khirnov d754ed4172 riffenc: take an AVStream instead of an AVCodecContext
It will be useful in the following commits.

Also, rename the AVCodecContext pointer name from 'stream' to 'codec'.
2014-06-18 15:03:55 +02:00
Anton Khirnov c3311d472a avienc: sanitize variable naming in write_header()
Do not call an AVCodecContext 'stream', that is highly confusing.
Also, add a local variable for the current AVStream in the loop over all
streams.
2014-05-18 10:24:02 +02:00
Keiji Costantini 3407172b36 avienc: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-03-04 18:53:58 +01:00
Anton Khirnov d42db44cfe avienc: drop the vfr flag.
AVI does not really support vfr properly, only by padding with null
packets.
2013-11-08 21:02:29 +01:00
Martin Storsjö d872fb0f7f lavf: Reset the entry count and allocation size variables on av_reallocp failures
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.

Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:14:03 +03:00
Alexandra Khirnova 5626f994f2 avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-18 18:28:38 +02:00
Clément Bœsch 7308439158 lavf: Don't explicitly flush after each written packet in muxers
Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:17:33 +03:00
Victor Vasiliev 71e92414bf lavf: move RIFF INFO tag writing from avienc to riff
It will be useful in the wav muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:50:36 +02:00
Diego Biurrun 11d4e92ed9 avformat: Remove non-compiling and/or silly commented-out printf/av_log statements 2012-10-01 10:24:28 +02:00
Anton Khirnov 3b4bb19e63 lavf: flush the output AVIOContext in av_write_trailer().
This is consistent with stdio and is what we want to do in all cases.

Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.
2012-09-15 18:25:07 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Diego Biurrun 0177b7d23a Improve descriptiveness of a number of codec and container long names 2012-07-30 20:46:55 +02:00
Ronald S. Bultje fd48721849 lavf: use conditional notation for default codec in muxer declarations.
This removes the use of macro nesting in these code constructs, which
makes it easier to parse in pre-processors.
2012-07-22 16:10:21 -07:00
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>
2012-04-06 19:19:59 +03:00
Anton Khirnov c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Victor Vasiliev 12bc20502a Generalize RIFF INFO tag support; support reading INFO tag in wav
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 17:14:13 -08:00
Anton Khirnov b71389cbae avienc: saner default audio codec.
libmp3lame if available, ac3 otherwise.
2011-08-22 07:17:19 +02:00
Anton Khirnov dfc2c4d900 lavf: use designated initialisers for all (de)muxers.
It's more readable and less prone to breakage.
2011-07-17 06:58:37 +02:00
Anton Khirnov d2d67e424f Remove all uses of now deprecated metadata functions. 2011-06-08 07:43:45 +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
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 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 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 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 99f42c27ab avienc: replace &tag[0] with tag.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:55 -05:00
Anton Khirnov 0abdb29317 lavf: use a new ffio_wfourcc macro instead of put_tag() where possible
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:22 -05:00
longstone 4acc94e97a avienc: fix AVI stream index for files with >10 streams
Fixes issue 2563.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:44:26 -05:00
Anton Khirnov 77eb5504d3 avio: avio: avio_ prefixes for put_* functions
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>
2011-02-21 14:25:15 -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
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
Anton Khirnov 4efd5cf34b avio: add av_put_str and deprecate put_strz in favor of it
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 20:21:03 +00:00
Anton Khirnov ad7768f4c4 add ff_ prefix to metadata_conv()
patch by Anton Khirnov  anton _at_ khirnov _dot_ net

Originally committed as revision 25505 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 13:20:41 +00:00
Anton Khirnov 03700d399b Export metadata in the generic format. Deprecate old conversion API.
patch by Anton Khirnov  anton _at_ khirnov _dot_ net

Originally committed as revision 25493 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 19:04:25 +00:00
Jai Menon d6a9349062 avienc : Avoid creating invalid AVI files when muxing subtitle streams
other than XSUB.

Originally committed as revision 23766 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-25 04:29:02 +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
Anton Khirnov ed7694d8cf Set lavf identification string globally in av_write_header(), rather
than inside the muxers. Remove special handling of "encoder" tags from
AVI and MP3 muxers.

Patch by Anton Khirnov <wyskas gmail com>.

Originally committed as revision 21850 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-16 16:32:25 +00:00
Anton Khirnov 04d2540c4b Add AVI metadata conversion table.
Patch by Anton Khirnov (gmail{wyskas}).

Originally committed as revision 21653 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-06 12:32:44 +00:00
Michael Niedermayer ffdf0d48fc strn muxing in avi support.
untested as ffmpeg.c has no means to set AVStream metadata (patchwelcome)

Originally committed as revision 21644 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-05 15:14:56 +00:00
Michael Niedermayer 12f1b1fec4 Remove last MAX_STREAMS from avienc.c
Originally committed as revision 21500 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 03:37:22 +00:00
Michael Niedermayer b4f0e04c99 Introduce AVIStream struct and move stream based variables to it.
This removes all but one MAX_STREAM from avienc.c.

Originally committed as revision 21498 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 02:45:17 +00:00
Daniel Verkamp 1a40491ef2 Add ff_ prefixes to exported symbols in libavformat/riff.h.
patch by Daniel Verkamp, aniel drv nu

Originally committed as revision 19254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-22 23:09:34 +00:00
Reimar Döffinger 2a04d6e772 Add support for muxing XSUB subtitles to AVI muxer.
Originally committed as revision 19223 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-19 13:26:10 +00:00
Aurelien Jacobs b02d3aef94 use av_freep() instead of av_free() + =NULL.
Originally committed as revision 18349 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-07 12:31:28 +00:00
Michael Niedermayer 2591821213 Add AVFMT_VARIABLE_FPS to specify which muxers do not need duplicated frames.
Originally committed as revision 17554 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-24 15:04:18 +00:00
Diego Biurrun 67164b0c13 Remove pointless #if around the file, it is already conditionally compiled.
Originally committed as revision 17208 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-13 09:39:04 +00:00