Stefano Sabatini
7b116a94af
examples/decoding_encoding: fix misc typos in the usage text
12 years ago
Stefano Sabatini
8c4753f7f5
examples/decoding_encoding: remove misplaced and confusing comment
12 years ago
Stefano Sabatini
6d6ccbae4c
examples/decoding_encoding: add missing checks on avcodec_alloc_context3()
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
7ca102a7d7
examples: add README file with simple compilation instructions
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
51fa653829
examples/decoding_encoding: clarify operations in the usage message
12 years ago
Stefano Sabatini
bcf93f78a5
examples/decoding_encoding: replace "picture" with "frame" in encode_example()
...
The use of "picture" in place of "frame" is confusing.
12 years ago
Stefano Sabatini
70b671a283
examples/decoding_encoding: apply various message log fixes
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
2fe8fd3948
examples/demuxing: add audio decoding/demuxing
12 years ago
Stefano Sabatini
3b34cbce19
examples/scaling_video: write to rawvideo file
...
This is more useful for testing purposes. Also allow to specify the name
of the output file.
12 years ago
Stefano Sabatini
c8ef309379
examples: add demuxing.c example
13 years ago
Michael Niedermayer
3061664a57
avoid ambigous buffersink names
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
db0a0aa243
examples/scaling_video: add logging in case of image allocation failure
13 years ago
Stefano Sabatini
952caf11f2
examples/muxing: remove pointless #undef exit
13 years ago
Stefano Sabatini
cb6defb053
examples/scaling_video: consistently use printf rather than av_log()
13 years ago
Stefano Sabatini
078e203379
examples/scaling_video: add file doxy
13 years ago
Stefano Sabatini
e53becc70f
examples/Makefile: give priority to pkg-config flags
...
In case CFLAGS/LDLIBS are already defined and conflicting with the
pkg-config flags, give priority to the latter since they are used to
detect compilation flags.
This should fix for example the case where there are many different
instances of a library, CFLAGS=-I/foo/include and pkg-config cflags say
-I/bar/include.
13 years ago
Stefano Sabatini
2cbffc6706
examples/Makefile: remove duplicated -f switch
...
$(RM) already includes that flag.
Spotted-by: ubitux
13 years ago
Stefano Sabatini
74419fcf45
examples: add scaling_video example
...
This example should be useful to show the basic functionality of the
libswscale API.
More advanced features (scaling options etc., colorspace tweaking) may be
added later.
13 years ago
Stefano Sabatini
60924dfe55
examples/decoding_encoding: make operation logic more self-evident / predictable
...
Add a switch which controls which operation to perform. Useful to test
only a single feature. Also the new behavior is more self-consistent.
13 years ago
Stefano Sabatini
3b0e2763f4
examples/Makefile: apply misc minor fixes to the RM rule
...
Use $(RM) in place of rm, drop useless "-r" for removing files.
13 years ago
Stefano Sabatini
c0bca6425d
examples/decoding_encoding: store temporary files in current dir
...
Do not clutter the temporary directory with files, also "/tmp" is not
always available, e.g. in Windows.
Also add the clean-test Makefile rule, which will clean the generated
files.
13 years ago
Stefano Sabatini
fef9e84114
examples/decoding_encoding.c: tell where the decoding output files are printed
13 years ago
Stefano Sabatini
864e8adcf1
examples/muxing: update to the new avcodec_encode_video2() API
13 years ago
Stefano Sabatini
a7219529d1
examples/decoding_encoding: flush audio frames in the encoder
13 years ago
Stefano Sabatini
535df748c5
examples/decoding_encoding: re-organize frame configuration code
...
Put the relevant code in one chunk, also check for frame allocation
failures.
13 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]
13 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.
13 years ago
Stefano Sabatini
b907655303
examples/muxing: drop duplicated code in add_video_stream()
13 years ago
Stefano Sabatini
66747a6160
examples/muxing: simplify alloc_picture()
...
Use avpicture_alloc() high level function.
13 years ago
Gavin Kinsey
37b5959d96
examples/filtering: fix packet memleak
...
Free packets unconditionally after demuxing, and not only when the
packets belong to a given stream.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Gavin Kinsey
9ebed95db6
examples/filtering_video: update to the new API
...
Update the video filtering example program based on the audio one.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Michael Niedermayer
11f2cad127
examples/filtering_audio: update for avfilter API "cleanup"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Andrew Wason
1ef802d038
update filtering_audio example
...
The filtering_audio.c example needs to be updated for the new
"abuffer" filter args.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
4fd573970a
doc/examples: make use of the parameter filters_descr parameter in init_filters().
13 years ago
Clément Bœsch
e692b9d564
doc/examples: fix pts heuristic in filtering_video.
...
Note: the condition looked wrong in the first place ("if DTS is not
defined, then set PTS to that undefined value [...]").
13 years ago