Nicolas George
e4f14c32b9
examples/muxing: improve error messages.
...
Illustrate the use of return values, av_err2str and
avcodec_get_name.
12 years ago
Michael Niedermayer
ca28cb5f83
examples: fix doxy so they appear on the example page
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
eebde404bc
examples/muxing: merge add_audio_stream() and add_video_stream()
...
Factorize.
12 years ago
Stefano Sabatini
eda0a52bf1
examples/muxing: check on frame
...
Fix crash in case frame is not defined (e.g. with muxing out.wav).
12 years ago
Stefano Sabatini
d6196d9421
examples/muxing: fix bogus setting of st->id
12 years ago
Stefano Sabatini
5ca298df2d
examples/muxing: remove misleading comment about pending API change
...
The API was never changed since 2003. Replace with a comment about the
performed operation.
12 years ago
Stefano Sabatini
1f7962625c
examples/muxing: remove video_outbuf unused and useless code
12 years ago
Michael Niedermayer
7b8fd29816
examples/muxing: fix video pts
...
Fixes Ticket1801
Based on suggestion from AztecC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
a726ac9a11
examples/muxing: extend usage notice
12 years ago
Stefano Sabatini
59e31aa2ca
examples/muxing: provide more information in case of avcodec_open2 failure
12 years ago
Stefano Sabatini
6133149e0c
examples/muxing: add missing error checks
12 years ago
Stefano Sabatini
e56b3a5ebb
examples/muxing: fix case inconsistency in message
12 years ago
Stefano Sabatini
34b5b735f9
examples/muxing: add check on avformat_write_header() result
12 years ago
Stefano Sabatini
b3e2975ab3
examples/muxing: apply misc fixes to log messages
12 years ago
Stefano Sabatini
1d0048cfe3
examples/muxing: rename img_convert_ctx to sws_ctx
...
The new name is more consistent with the codebase, and more
self-consistent with the libswscale API.
12 years ago
Stefano Sabatini
976bb42aca
examples/muxing: merge some declarations and definitions
12 years ago
Stefano Sabatini
bdd9bfbbab
examples/muxing: prefer AVPicture to AVFrame, when feasible
...
Favor the use of plain AVPicture over AVFrame, especially when the use of
AVFrame is not required like in the case of tmp_picture.
Also adopt more straightforward names, to avoid frame/picture confusion.
12 years ago
Stefano Sabatini
952caf11f2
examples/muxing: remove pointless #undef exit
12 years ago
Stefano Sabatini
864e8adcf1
examples/muxing: update to the new avcodec_encode_video2() API
12 years ago
Stefano Sabatini
005af8ce61
examples/muxing: cast sws_scale() argument to the expected one
...
Fix warnings:
muxing.c: In function ‘write_video_frame’:
muxing.c:326:23: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [enabled by default]
12 years ago
Stefano Sabatini
13bbc464ed
examples/muxing: set codec in the codec context
...
Make add_{audio,video}_stream return the found codec, and pass it to
avcodec_open2() through open_{audio,video} functions.
Fix failure:
No codec provided to avcodec_open2().
could not open codec
This is also consistent with the use of the avcodec_open2() API in the
codebase.
12 years ago
Stefano Sabatini
b907655303
examples/muxing: drop duplicated code in add_video_stream()
12 years ago
Stefano Sabatini
66747a6160
examples/muxing: simplify alloc_picture()
...
Use avpicture_alloc() high level function.
12 years ago
Clément Bœsch
6c211085bb
doc/examples: use system headers in decoding_encoding and muxing.
...
All the other examples already use the system installed headers.
13 years ago
Michael Niedermayer
afe9105f66
example: update muxing example to purple API
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
cf257f30b9
doc/example/muxing: fix video timestamps
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
096701d9b2
muxing example: set encoder defaults
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
0e5ecd806e
Replace remaining av_new_stream() with avformat_new_stream().
13 years ago
Stefano Sabatini
c617d7b86a
examples/muxing.c: apply misc style fixes
14 years ago
Stefano Sabatini
90b043a698
examples/muxing.c: fix typo, futur -> future
14 years ago
Stefano Sabatini
58174293d8
examples/muxing.c: remove doxy reference to unexisting file
14 years ago
Stefano Sabatini
79f3384ce1
examples: rename "-example" suffix from examples files
...
The suffix is redundant since the containing directory itself is
called "examples". Simplify.
14 years ago
Stefano Sabatini
ca858ab77d
doc/examples: give meaningful names to the example files
...
Rename:
api-example.c -> encoding-example.c
output-example.c -> muxing-example.c
14 years ago
Stefano Sabatini
f501c74d99
output-example: create @file doxy from text in the copyright header
14 years ago
Stefano Sabatini
9362b50941
examples: move API examples to a dedicated dir in doc
14 years ago
Stefano Sabatini
5ecdfd008b
lavf: deprecate avformat_alloc_output_context() in favor of avformat_alloc_output_context2()
...
The new function accepts a slightly more intuitive order of paramters,
and returns an error code, thus allowing applications to report a
meaningful error message.
14 years ago
Michael Niedermayer
ce62b35c31
output_example: use avformat_alloc_output_context()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Stefano Sabatini
59d96941f0
avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
...
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.
This breaks API.
14 years ago
Anton Khirnov
f87b1b373a
avio: AVIO_ prefixes for URL_ open flags.
14 years ago
Anton Khirnov
ebb92e0768
avio: rename url_fopen/fclose -> avio_open/close.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 22a3212e32
)
14 years ago
Anton Khirnov
22a3212e32
avio: rename url_fopen/fclose -> avio_open/close.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
0ebf475494
lavf: add av_ prefix to dump_format()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 610219a598
)
14 years ago
Anton Khirnov
610219a598
lavf: add av_ prefix to dump_format()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
5d6e4c160a
Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
...
SampleFormat with AVSampleFormat.
Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Ramiro Polla
1f1916cea2
output-example: Set sample_fmt to SAMPLE_FMT_S16.
...
Originally committed as revision 23597 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
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
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
Stefano Sabatini
54a4f36d6e
Remove conditional M_PI definition, it is already defined in
...
libavutil/mathematics.h indirectly included by libavformat/avformat.h.
Originally committed as revision 21388 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
a52ce57d4e
Replace deprecated guess_format() with av_guess_format().
...
Patch by Martin Storsjö reverse(<ts.nitram@nitram>).
Originally committed as revision 21387 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
073189917e
Make output-example.c handle AAC audio.
...
Patch by Martin Storsjö martin martin st
Originally committed as revision 21367 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago