Diego Biurrun
5afb94c817
Mark read-only tables as static
9 years ago
Anton Khirnov
9200514ad8
lavf: replace AVStream.codec with AVStream.codecpar
...
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
9 years ago
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Martin Storsjö
4f373a5111
vfwcap: Unbreak building after c201069fa
...
These headers can't be included in any arbitrary order.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
4d0f6d3fb4
avdevice/vfwcap: revert header reordering from c201069fac
...
This should fix build on vs2013
Found-by: Ferdinand Oeinck <ferdo@bigroses.demon.nl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
259fd4c7cf
avdevice/vfwcap: put the headers back in the order in which they need to be
...
This avoids build failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
c201069fac
avdevice: Add missing header for NULL_IF_CONFIG_SMALL
...
Also reshuffle headers into canonical order where appropriate.
10 years ago
Diego Biurrun
ab56fabe62
vfwcap: Add fallback define for HWND_MESSAGE
...
Some obsolete versions of the MinGW32 runtime (<4.0.0) lack the definition.
10 years ago
Diego Biurrun
8bc52dbd9d
vfwcap: Drop fallback VfW defines
...
The defines were added long ago when MinGW still lacked them.
10 years ago
Diego Biurrun
a6a27fede9
vfwcap: Replace deprecated av_destruct_packet() by av_free_packet()
10 years ago
Lukasz Marek
f607767d93
lavd: add categories to device implementations
...
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
11 years ago
Michael Niedermayer
c0ef5d6c16
avdevice/vfwcap: make constant arrays static
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 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
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
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
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
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Diego Biurrun
30b4ee7901
Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
13 years ago
Ramiro Polla
0a333001a2
vfwcap: actually use framerate option
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
177aec1257
Do not free BITMAPINFOHEADER before we are done using it.
...
Fixes trac ticket #396 .
Completely untested.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
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
Stefano Sabatini
a4bda40544
vfwcap: prefer "framerate_q" over "fps" in vfw_read_header()
...
The variable is used for containing the parsed value of framerate,
using a lexically consistent name eases readability/understanding.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
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
Diego Biurrun
f190f676bc
Replace custom DEBUG preprocessor trickery by the standard one.
14 years ago
Anton Khirnov
4078ed2631
vfwcap: add a framerate private option.
14 years ago
Stefano Sabatini
6b899e16de
lavdev: prefer the inclusion of avdevice.h over that of libavformat/avformat.h
14 years ago
Anton Khirnov
3e15ea2150
vfwcap: add video_size private option.
14 years ago
Ramiro Polla
95eb2e3a38
DirectShow capture support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
66355be3c3
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.
(cherry picked from commit c6610a216e
)
14 years ago
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.
14 years ago
Ramiro Polla
1973e1018e
vfwcap: add option to print list of supported drivers
...
Originally committed as revision 25552 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Ramiro Polla
faa2989e0f
vfwcap: flip RGB rawvideo.
...
Originally committed as revision 22989 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
2874c81cc8
Replace all remaining occurrences of AVERROR_NOMEM with
...
AVERROR(ENOMEM).
AVERROR_NOMEM is deprecated and will be dropped at the next libavutil
major bump.
Originally committed as revision 22791 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
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
15 years ago
Ramiro Polla
ad8eede7b1
vfwcap: Free remaining packets on vfw_read_close().
...
Originally committed as revision 22575 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ramiro Polla
ce03ed4df1
Do not store a copy of AVFormatContext *s in vfw_ctx.
...
Save *s directly in SetWindowLongPtr instead.
Originally committed as revision 22574 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
5ae092ee34
Replace all the occurrences of AVERROR_EIO with AVERROR(EIO), and mark
...
AVERROR_EIO for deletion at the next major bump.
Originally committed as revision 22513 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ramiro Polla
e24080f00e
vfwcap: Add support for UYVY pixel format.
...
Originally committed as revision 22424 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Nash Tsai
d7a4961e53
vfwcap: support MJPG compressed streams.
...
Patch by Nash Tsai <nash dot tsai at gmail dot com>
Originally committed as revision 22004 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
kemuri
420755dd28
vfwcap: Include windows.h before vfw.h since the latter requires defines
...
from the former.
Patch by kemuri <kemuri9 at gmail dot com>
Originally committed as revision 21411 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ramiro Polla
315fa33f29
Indent.
...
Originally committed as revision 19757 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ramiro Polla
a9decf0041
Use if(0){} instead of #if 0 to prevent debug code to rot.
...
Originally committed as revision 19756 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
c959c6ee3d
vfwcap: Move vfw_read_close to avoid forward declaration.
...
Patch by Diego.
Originally committed as revision 19567 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Ramiro Polla
155b0f00d4
vfwcap: Indent.
...
Originally committed as revision 19545 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Ramiro Polla
1c0b9215ac
vfwcap: Support compressed streams.
...
Originally committed as revision 19544 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Ramiro Polla
42477de59e
vfwcap: Reorder some code to simplify next patch.
...
Originally committed as revision 19543 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago