Anton Khirnov
6a927d7aaf
output example: use a macro instead of a static variable
2014-06-26 16:07:23 +02:00
Anton Khirnov
63fd0d866c
output example: allocate the audio frame only once
2014-06-26 16:07:08 +02:00
Anton Khirnov
edd5f95764
output example: use OutputStream for audio streams as well
2014-06-26 16:07:02 +02:00
Anton Khirnov
5e7b125b6a
output example: use the new AVFrame API to allocate audio frames
2014-06-26 16:06:54 +02:00
Anton Khirnov
ac85f631c9
output example: set output channel layout
2014-06-26 16:06:48 +02:00
Anton Khirnov
294daf71a7
output example: use a struct to bundle the video stream variables together
2014-06-26 16:05:24 +02:00
Anton Khirnov
38d044429d
output example: use the new AVFrame API for allocating the video frame
2014-06-26 16:05:19 +02:00
Michael Niedermayer
afa7ab557a
Merge commit '452860d7e056f9a894cac2fe52cdedeae4c38251'
...
* commit '452860d7e056f9a894cac2fe52cdedeae4c38251':
Use av_packet_rescale_ts() to simplify code.
Conflicts:
doc/examples/muxing.c
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 17:03:58 +02:00
Anton Khirnov
452860d7e0
Use av_packet_rescale_ts() to simplify code.
2014-06-20 14:14:48 +02:00
Lou Logan
88f2586adb
fix various typos
...
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 10:58:19 -08:00
Stefano Sabatini
bf411fffd4
examples: rename avcodec.c to decoding_encoding.c
...
Restore the old name, which was more meaningful and consistent with the
names of the other examples.
2014-04-23 10:32:42 +02:00
Michael Niedermayer
9b467d3cd5
examples/transcoding: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-08 15:35:14 +02:00
Michael Niedermayer
419800acc4
examples/avio_reading: fix null dereference on error
...
Fixed CID1197052
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 00:39:58 +02:00
Anshul Maheshwari
6d25e90262
doc/examples/avcodec: information regarding gop_size ignored if frame->pic-type is AV_PICTURE_TYPE_I
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-21 15:21:15 +01:00
Andrey Utkin
e10ab43614
doc/examples: Add example transcoding.c
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 20:56:33 +01:00
compn
84bccae8e9
doc: fix typo
2014-03-07 17:07:37 -05:00
Jason Hsu
8fb4dba89d
doc/examples/remuxing: dont use the input codec_tag, it may be invalid tor the output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 16:10:06 +01:00
Michael Niedermayer
1f2bacc897
Merge commit 'e7dfaf16a403972eb6aed5ce8f84c0085bd2fb5a'
...
* commit 'e7dfaf16a403972eb6aed5ce8f84c0085bd2fb5a':
libavfilter: example audio filtering program
Conflicts:
.gitignore
configure
doc/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-25 20:26:00 +01:00
Anton Khirnov
e7dfaf16a4
libavfilter: example audio filtering program
...
Based on a patch by Andrew Kelley <superjoe30@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-02-25 13:22:10 +01:00
Michael Niedermayer
341639fe80
doc/examples: remove pathes from doxy examples
...
This makes the examples page less cluttered
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-17 13:50:53 +01:00
Michael Niedermayer
1fc74926a5
Merge commit 'b339182eba34f28de5f1a477cdd2c84f1ef35d90'
...
* commit 'b339182eba34f28de5f1a477cdd2c84f1ef35d90':
Move all example programs to doc/examples
Conflicts:
configure
doc/Makefile
doc/doxy-wrapper.sh
doc/examples/avcodec.c
doc/examples/decoding_encoding.c
doc/examples/metadata.c
doc/examples/muxing.c
doc/examples/transcode_aac.c
libavcodec/Makefile
libavcodec/api-example.c
libavformat/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-17 02:22:01 +01:00
Diego Biurrun
b339182eba
Move all example programs to doc/examples
...
Also drop support for building examples in library directories.
2014-02-16 21:37:21 +01:00
Michael Niedermayer
fba1592f35
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
doc/examples: misc Doxygen markup improvements
Conflicts:
doc/examples/muxing.c
doc/examples/transcode_aac.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-14 15:31:14 +01:00
Diego Biurrun
0b9716c455
doc/examples: misc Doxygen markup improvements
...
Add properly formatted @example tag and fix Doxygen syntax.
2014-02-14 12:01:36 +01:00
Stefano Sabatini
60251c13e3
examples/avio_reading: remove stray empty line
2014-02-02 12:35:46 +01:00
Stefano Sabatini
5fc4dea39c
examples: add avio_reading.c example
2014-02-02 11:58:23 +01:00
Michael Niedermayer
a85a718f26
doc/examples/decoding_encoding: Check all av_samples_get_buffer_size() returns
...
Fixed CID1135755
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 03:27:37 +01:00
Stefano Sabatini
ca57659440
examples/filtering_audio,video: do not call avcodec_register_all()
...
It is implied by av_register_all(). Simplify.
2014-01-24 12:20:46 +01:00
Stefano Sabatini
35fe88bb51
examples/muxing: reindent after previous commit
2014-01-23 01:08:24 +01:00
Stefano Sabatini
c92d2f98db
examples/muxing: flush encoders at the end
2014-01-23 00:54:33 +01:00
Stefano Sabatini
b539a72bba
examples/filtering_audio,video: drop call to avcodec_get_frame_defaults()
...
The avcodec_get_frame_defaults() function is deprecated and its use
doesn't seem required.
2014-01-21 20:08:36 +01:00
Stefano Sabatini
e34ad128a3
examples/muxing: reduce duration, remove wrong and misleading comment
...
Set duration to 10 seconds, after it was increased from 5 to 200 seconds
in 8d80f3cb87
.
200 seconds will generate too much data which is annoying especially when
testing.
2014-01-21 11:52:14 +01:00
Stefano Sabatini
9ab8f3738a
examples/muxing: remove redundant {}
2014-01-20 13:10:10 +01:00
Stefano Sabatini
b933c72b5e
examples/muxing: change error checks, from "ret != 0" to "ret < 0"
...
More consistent and more future-proof.
2014-01-20 13:10:10 +01:00
Stefano Sabatini
d72c742d47
examples/muxing: factorize write_interleave code
...
Also log output packet information.
2014-01-20 13:10:10 +01:00
Stefano Sabatini
5e2b8e4934
examples: add remuxing example
...
Show how to perform streamcopy from one container to another.
2014-01-20 13:10:10 +01:00
Stefano Sabatini
d497141b85
examples/muxing: simplify video PTS setting
...
Rely on frame_count. Also more consistent with audio path.
2014-01-12 09:25:48 +01:00
Andre Anjos
23ffc4c70d
doc/examples/muxing: Fixes frame initialization.
...
Fixes use of the example with encoders which use tha AVFrame w/h/pix_fmt fields
FFV1 is one of these codecs
We cannot easily workaround the not set fields in common code because the API
has AVFrame constant for the encoders.
Alternatives would be to fix the API or to duplicate the struct and fill in
missing fields. Or as is to require all user apps to set this correctly and
maybe simplify for that case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 18:12:24 +01:00
Stefano Sabatini
094c500caf
examples/muxing: set timestamps in output audio packet
...
In particular, fix trac ticket #3231 .
2014-01-09 10:54:38 +01:00
Stefano Sabatini
8d22d37e54
examples/muxing: use av_frame_free() in place of av_free()
2014-01-09 10:51:57 +01:00
Stefano Sabatini
9abe4a10fd
examples/muxing: reuse global audio frame
...
Simplify logic, avoid multiple unnecessary alloc/free operations.
2014-01-09 10:51:52 +01:00
Stefano Sabatini
80bca6eabe
examples/muxing: honour distinction between encoder PTS timebase and stream timebase
...
Fix PTS set on the frame when encoding, which must be specified in the
encoder timebase or this will confuse the encoder.
When muxing the packet, the PTS/DTS generated by the encoder is then
rescaled to the stream timebase.
2014-01-09 10:51:47 +01:00
Stefano Sabatini
eadc421259
examples/muxing: set sample formats from list of codec supported sample formats
...
Avoid the need of tweaking, also show how to get list of supported sample
formats.
2014-01-09 10:51:41 +01:00
Stefano Sabatini
2503928a2f
examples/decoding_encoding: fix style nits
2014-01-07 13:08:11 +01:00
Ilya Basin
d1b8e01ef1
examples/muxing: fix memleaks in resampler
...
- do not allocate resample dst buffer when resample is off
- free sample buffers in addition to freeing data pointer arrays
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 12:22:49 +01:00
Ilya Basin
7d1d0b3ecf
examples/muxing: use S16 sample_fmt for resample src regardless of codec sample_fmt
...
We generate S16 samples and we should allocate the right buffer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 12:21:05 +01:00
Ilya Basin
b6714fa077
examples/muxing: fix av_frame_free() not called when got_packet is false
...
Hi list! Since my last patch (fix 2 memleaks in doc/examples/muxing.c)
I found more problems to fix.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 12:20:44 +01:00
Stefano Sabatini
b2a4316287
examples/decoding_encoding: check av_samples_get_buffer_size() for a negative value
...
Fix broken != 0 check.
2013-12-15 20:09:26 +01:00
Timothy Gu
c65fe9e982
examples/decoding_encoding: check av_samples_get_buffer_size() return code
...
Fixes CID1135756.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2013-12-14 14:02:49 +01:00
Timothy Gu
b242c156e5
examples/resample_audio: check av_samples_get_buffer_size() return code
...
Fixes CID1135757.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2013-12-14 14:02:33 +01:00
Clément Bœsch
b02d87936b
examples/demuxing_decoding: print the decoding error when it happens.
2013-12-13 10:37:20 +01:00
Even Wiik Thomassen
43f116d162
examples/demuxing_decoding: return error when no codec found
...
The open_codec_context function, when it fails to find a codec, now
return AVERROR(EINVAL) to signal an error.
Before it would return the stream index, which was always >= 0, and
continue as if a codec was found. This change make it fail faster,
instead of repeated failed tries to decode frames with no codec.
Signed-off-by: Even Wiik Thomassen <e.thomassen@sportradar.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-12-13 09:45:54 +01:00
Michael Niedermayer
525a7d9b78
Merge commit '48d17ee6dc2b2a552f645484f200c2946bf24607'
...
* commit '48d17ee6dc2b2a552f645484f200c2946bf24607':
api-example: remove an unneeded call to avcodec_get_frame_defaults().
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12 00:19:53 +01:00
Michael Niedermayer
4cbf3eb9e6
Merge commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9'
...
* commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9':
Replace all uses of avcodec_free_frame with av_frame_free().
Conflicts:
doc/examples/decoding_encoding.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-11 23:18:51 +01:00
Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
2013-12-11 20:39:54 +01:00
Michael Niedermayer
210a78aeb5
doc/examples/filtering_audio: init packet0.data
...
Fixes use of uinitialized data and crash
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-03 00:01:07 +01:00
Stefano Sabatini
c490cd4c1a
doc/examples/filtering_audio: fix chunked audio decoding
...
Support the case when multiple frames are contained in a single packet.
In particular, fix fate-samples/lossless-audio/luckynight-partial.shn
sample decoding.
2013-12-02 15:21:52 +01:00
Stefano Sabatini
893f33e7f0
doc/examples/filtering_audio: fix style
2013-12-02 15:08:00 +01:00
Stefano Sabatini
c7a99d99bd
doc/examples/filtering_video: do not make use of AVBufferSinkParams
...
Set the value on the filter context instead. Simplify.
2013-12-02 14:35:40 +01:00
Stefano Sabatini
3aa6018010
doc/examples/filtering_video: add some error handling in init_filters()
2013-12-02 14:35:39 +01:00
Stefano Sabatini
a12bf9f50f
doc/examples/README: fix typo
2013-12-02 14:35:39 +01:00
Stefano Sabatini
55c57658d2
doc/examples/filtering_audio: add more error checks
2013-12-02 14:35:39 +01:00
Stefano Sabatini
82e74ee6e4
doc/examples/filtering: make use of av_err2str()
...
Simplify.
2013-12-02 14:35:31 +01:00
Clément Bœsch
0d2c832445
doc/examples: update README.
2013-11-28 14:08:06 +01:00
Clément Bœsch
a8ac2a1530
doc/examples: make fill_samples static.
...
This is required to build with FFmpeg compilation options.
2013-11-28 13:54:44 +01:00
Clément Bœsch
e5102feb6b
doc/examples: add transcode_aac to local Makefile.
2013-11-28 13:19:50 +01:00
Michael Niedermayer
ba728c1a25
doc/examples/transcode_aac: remove non converted codepath
...
This codepath is not implemented and just crashes, also its simpler
without special cases, which makes sense for an example
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 11:22:19 +01:00
Michael Niedermayer
7497c894cd
doc/examples/transcode_aac: switch to swresample
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 11:15:48 +01:00
Michael Niedermayer
02abc905cd
doc/examples/transcode_aac: fix project name
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 10:52:05 +01:00
Michael Niedermayer
715f3623f8
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
Add an audio transcoding example.
Conflicts:
configure
doc/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 10:31:08 +01:00
Andreas Unterweger
10421bcf0a
Add an audio transcoding example.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-27 09:20:05 +01:00
Diego Biurrun
ab81f24ad4
build: Integrate multilibrary examples into the build system
...
This includes moving libavformat/output-example to doc/examples/output.
2013-11-25 11:57:29 -08:00
Stefano Sabatini
50a28b1393
doc/examples: do not check NULL values for avcodec_close()
...
avcodec_close() does nothing in case the argument is NULL. Simplify.
2013-11-21 23:29:56 +01:00
Clément Bœsch
1f7b7d5447
doc/examples: fix mem issues in filtering_video.
2013-11-19 10:31:39 +01:00
Michael Niedermayer
0ee905e243
Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'
...
* commit '5b9c3b4505206143d85398c1410949319fa1180f':
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
Conflicts:
doc/examples/decoding_encoding.c
doc/examples/muxing.c
ffmpeg.c
libavcodec/alacenc.c
libavcodec/libopenjpegenc.c
libavcodec/libvpxenc.c
libavcodec/pcm.c
libavcodec/xbmenc.c
libavcodec/xwdenc.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-16 23:54:10 +01:00
Clément Bœsch
fb10b43fc4
doc/examples: rename demuxing to demuxing_decoding.
...
That example shows how the decoding process works, not only the
demuxing.
2013-11-04 12:53:06 +01:00
Clément Bœsch
d10b1a200d
doc/examples/demuxing: show how to use the reference counting system.
2013-11-04 12:53:06 +01:00
Clément Bœsch
0c6bb53bb2
doc/examples/demuxing: reset got_frame.
...
Fix infinite loop at flushing.
2013-10-30 14:37:58 +01:00
Clément Bœsch
dc8f732292
doc/examples: fix lib math dep for resampling_audio.
...
It uses at least sin()
2013-09-04 15:49:18 +02:00
Clément Bœsch
98b9bbb787
doc/examples: remove extra "the".
...
"into the doc/examples directory" vs "into doc/examples".
2013-09-04 15:46:31 +02:00
Michael Niedermayer
f187390907
doc/examples/filtering_audio: make const arrays also static
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 22:22:03 +02:00
wm4
72f5a6d067
examples: demuxing: print ffplay command even if sample format is planar
...
Adjust the code so that a working ffplay command is printed in the
planar audio case.
2013-07-19 12:14:54 +02:00
wm4
9f31c1608c
examples: demuxing: simplify audio output
...
There is no reason why this should copy the audio data in a very
complicated way. Also, strictly write the first plane, instead of
writing the whole buffer. This is more helpful in context of the
example. This way a user can clearly confirm that it works by playing
the written data as raw audio.
2013-07-19 12:14:46 +02:00
wm4
06b269dacb
examples: demuxing: do partial audio packet decoding
...
This assumes one audio packet is decoded one time. This is not true:
packets can be partially decoded. Then you have to "adjust" the packet
and pass the undecoded part of the packet to the decode function again.
2013-07-19 12:14:23 +02:00
Stefano Sabatini
2aa2b4ac65
examples/muxing: add support to audio resampling
...
Allows to encode to output in case the destination sample format is
different from AV_SAMPLE_FMT_S16.
2013-07-06 12:31:16 +02:00
Stefano Sabatini
838bd73139
lavfi: create Libav-API compatibility layer for avfilter_graph_parse() at the next bump
...
Add function avfilter_graph_parse_ptr() and favor it in place of
avfilter_graph_parse(), which will be restored with the old/Libav
signature at the next bump.
If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the
Libav-compatible signature for avfilter_graph_parse().
At the next major bump the current implementation of
avfilter_graph_parse() should be dropped in favor of the Libav/old
implementation.
Should address trac ticket #2672 .
2013-07-03 13:21:42 +02:00
Stefano Sabatini
759dfd5684
examples/muxing: make more compact audio/video_time computation
2013-07-03 11:31:34 +02:00
Stefano Sabatini
80b56a7bdd
examples/muxing: rename audio/video_pts to audio/video_time
...
The new name is less confusing, since the variables represent times
rather than timestamps.
2013-06-26 23:38:42 +02:00
Stefano Sabatini
c58d535b2f
examples/Makefile: disable -O2 optimizations
...
There is no much point in optimizing example code, and the -O2 flag is
annoying when debugging.
2013-06-26 23:21:39 +02:00
Stefano Sabatini
3aa57e1582
examples/muxing: remove useless instruction
...
Simpler and less confusing.
2013-06-26 23:21:06 +02:00
Stefano Sabatini
4b6cf1ce0e
examples/muxing: vertically align
2013-06-25 21:36:53 +02:00
Nicolas George
300ca0763b
examples/filtering_audio: fix frame leak.
...
The frame is not used after being added to the filter
graph, there is no need to keep the reference.
2013-04-18 17:03:01 +02:00
Pavel Koshevoy
e5644313c5
examples/filtering_audio: get rid of AVABufferSinkParams
...
AVABufferSinkParams are ignored by avfilter_graph_create_filter,
therefore the example is misleading. Use av_opt_set_int_list to
configure abuffersink directly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-17 11:11:57 +02:00
Michael Niedermayer
f2619cbd61
examples/filtering_audio: enable ref counted frames
...
Fixes accessing freed memory
Signe-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-17 11:11:57 +02:00
Clément Bœsch
9ab221f8d8
lavfi: deprecate aconvert.
...
This filter is not required anymore with aformat. Drop it at next bump.
2013-04-11 22:13:45 +02:00
Michael Niedermayer
e7389ed5d0
Merge commit 'bcc94328980e6c56546792ab08b0756abdce310b'
...
* commit 'bcc94328980e6c56546792ab08b0756abdce310b':
opt: check the return values of av_get_token for ENOMEM.
doc: Fix best_nb_channells typo
matroska: pass the lace size to the matroska_parse_rm_audio
Conflicts:
libavformat/matroskadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 13:00:59 +02:00
Stefano Sabatini
66c92a1575
examples/resampling_audio: make use of av_samples_alloc_array_and_samples()
...
Simplify.
2013-03-31 18:00:45 +02:00
Stefano Sabatini
9bb25dbd13
examples/filtering_*: constify AVFrame * for print_frame() and display_frame() functions
2013-03-14 21:39:15 +01:00
Stefano Sabatini
9076a6a943
examples/filtering_audio: update to new API
...
In particular, fix crash.
2013-03-14 21:39:09 +01:00
Stefano Sabatini
f0da370a52
examples/filtering_video: update to new API
...
In particular, fix crash.
2013-03-14 21:39:01 +01:00
Nicolas George
ceac5c54dd
Remove references to the "ff" variant of buffersink.
2013-03-12 23:31:07 +01:00
Michael Niedermayer
5743095ca9
Merge commit '9d3009c6c4b9b6734f07df7c88f6a42ded6cdf38'
...
* commit '9d3009c6c4b9b6734f07df7c88f6a42ded6cdf38':
avconv: print an error on applying options of the wrong type.
atomic: Check for __sync_val_compare_and_swap instead of __sync_synchronize
output-example: Update to use encode_video2 instead of the now dropped encode_video
Conflicts:
doc/examples/muxing.c
ffmpeg_opt.c
libavutil/atomic.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 18:10:35 +01:00
Clément Bœsch
5e4bc96415
doc: fix examples.
2013-03-10 01:41:53 +01:00
Nicolas George
9b211c43dc
examples/muxing: fix memory leak.
...
Do not re-call avcodec_get_context_defaults3(), it is already
called by avformat_new_stream() and it leaks the codec
priv_data that was already allocated.
Use avformat_free_context() instead of freeing (not)
everything manually.
Fix trac ticket #2322 .
2013-03-05 15:43:32 +01:00
Michael Niedermayer
5ade6bfb03
doc/examples/demuxing: use AVFrame accessor functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-01 22:40:50 +01:00
Nicolas George
dcc73aaaa9
doc/examples: do not allocate AVFrame directly.
...
The size of the AVFrame structure is not part of the ABI;
it can grow with later versions. Therefore, applications
are not supposed to allocate AVFrame directly, they are
supposed to use avcodec_alloc_frame() instead.
2013-02-17 15:51:50 +01:00
Stefano Sabatini
772b949d8e
examples/scaling_video: fix typo
2013-02-15 00:28:53 +01:00
Angelo Haller
e7a39e163d
examples/demuxing: free AVPacket after usage
...
Fix leak.
2013-01-15 23:37:30 +01:00
Michael Niedermayer
48a7981e6f
doc/examples: fix assignments in if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 05:05:20 +01:00
Nicolas George
e4f14c32b9
examples/muxing: improve error messages.
...
Illustrate the use of return values, av_err2str and
avcodec_get_name.
2013-01-02 17:42:00 +01:00
Michael Niedermayer
55b243cade
doc/examples/resampling_audio.c: fix path
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-16 21:37:23 +01:00
Stefano Sabatini
89920387da
examples: add resampling_audio.c file
2012-12-06 10:09:37 +01:00
Michael Niedermayer
03b078721c
Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88'
...
* commit '97bf7c03b1338a867da52c159a2afecbdedcfa88':
doc: git-howto: Leave reviewers time to react before pushing patches
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
doc/git-howto.texi
ffmpeg_filter.c
libavcodec/flacdec.c
libavcodec/imc.c
libavcodec/mpegaudiodec.c
libavcodec/utils.c
libavfilter/asrc_anullsrc.c
libavfilter/audio.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/avfiltergraph.c
libavfilter/buffer.c
libavutil/Makefile
libavutil/audioconvert.h
libavutil/channel_layout.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 11:32:11 +01:00
Stefano Sabatini
e8c0b6710c
examples/muxing: fix typo: allocated -> allocate
2012-11-06 11:28:28 +01:00
Stefano Sabatini
7f6f8f642c
examples/demuxing: fix braino
...
s/video/audio/ in a log message.
2012-11-06 01:10:12 +01:00
Stefano Sabatini
794cea588c
examples/demuxing: dump input information *after* trying to open audio stream
...
Implement more logical code flow.
2012-11-06 01:10:12 +01:00
Michael Niedermayer
ca28cb5f83
examples: fix doxy so they appear on the example page
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-26 16:32:32 +02:00
Stefano Sabatini
33c4535db7
examples/decoding_encoding: add and use the decode_write_frame function
...
Allow to factorize code in video_decode_example(), simplify.
2012-10-24 00:29:37 +02:00
Stefano Sabatini
d3b8d56e06
examples/decoding_encoding: prefer 'frame' over 'picture' for an AVFrame
...
Decrease confusion.
2012-10-20 19:42:55 +02:00
Stefano Sabatini
935ecfb002
examples/scaling_video: remove unnecessary intermediary variable in fill_yuv_frame()
2012-10-20 12:06:45 +02:00
Stefano Sabatini
7b116a94af
examples/decoding_encoding: fix misc typos in the usage text
2012-10-20 11:30:13 +02:00
Stefano Sabatini
8c4753f7f5
examples/decoding_encoding: remove misplaced and confusing comment
2012-10-20 11:30:13 +02:00
Stefano Sabatini
6d6ccbae4c
examples/decoding_encoding: add missing checks on avcodec_alloc_context3()
2012-10-20 11:30:13 +02:00
Stefano Sabatini
eebde404bc
examples/muxing: merge add_audio_stream() and add_video_stream()
...
Factorize.
2012-10-17 21:39:13 +02:00
Stefano Sabatini
eda0a52bf1
examples/muxing: check on frame
...
Fix crash in case frame is not defined (e.g. with muxing out.wav).
2012-10-17 21:39:13 +02:00
Stefano Sabatini
d6196d9421
examples/muxing: fix bogus setting of st->id
2012-10-17 21:39:12 +02:00
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.
2012-10-17 21:39:12 +02:00
Stefano Sabatini
1f7962625c
examples/muxing: remove video_outbuf unused and useless code
2012-10-17 21:39:12 +02:00
Michael Niedermayer
7b8fd29816
examples/muxing: fix video pts
...
Fixes Ticket1801
Based on suggestion from AztecC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 02:40:00 +02:00
Stefano Sabatini
7ca102a7d7
examples: add README file with simple compilation instructions
2012-10-16 13:34:48 +02:00
Stefano Sabatini
a726ac9a11
examples/muxing: extend usage notice
2012-10-15 21:36:14 +02:00
Stefano Sabatini
59e31aa2ca
examples/muxing: provide more information in case of avcodec_open2 failure
2012-10-15 15:35:50 +02:00
Stefano Sabatini
6133149e0c
examples/muxing: add missing error checks
2012-10-15 15:35:50 +02:00
Stefano Sabatini
e56b3a5ebb
examples/muxing: fix case inconsistency in message
2012-10-15 15:35:49 +02:00
Michael Niedermayer
ac627b3d38
Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
...
* commit '716d413c13981da15323c7a3821860536eefdbbb':
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Conflicts:
doc/examples/muxing.c
ffmpeg.h
ffmpeg_filter.c
ffmpeg_opt.c
ffplay.c
ffprobe.c
libavcodec/8bps.c
libavcodec/aasc.c
libavcodec/aura.c
libavcodec/avcodec.h
libavcodec/avs.c
libavcodec/bfi.c
libavcodec/bmp.c
libavcodec/bmpenc.c
libavcodec/c93.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dpx.c
libavcodec/dpxenc.c
libavcodec/eatgv.c
libavcodec/escape124.c
libavcodec/ffv1.c
libavcodec/flashsv.c
libavcodec/fraps.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/iff.c
libavcodec/imgconvert.c
libavcodec/indeo3.c
libavcodec/kmvc.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libx264.c
libavcodec/ljpegenc.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc.c
libavcodec/motionpixels.c
libavcodec/mpeg12.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo_enc.c
libavcodec/pamenc.c
libavcodec/pcxenc.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/pnm.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/ptx.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrleenc.c
libavcodec/raw.c
libavcodec/rawdec.c
libavcodec/rl2.c
libavcodec/sgidec.c
libavcodec/sgienc.c
libavcodec/snowdec.c
libavcodec/snowenc.c
libavcodec/sunrast.c
libavcodec/targa.c
libavcodec/targaenc.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/tmv.c
libavcodec/truemotion2.c
libavcodec/utils.c
libavcodec/vb.c
libavcodec/vp3.c
libavcodec/wnv1.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/xwdenc.c
libavcodec/yop.c
libavdevice/v4l2.c
libavdevice/x11grab.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/drawutils.c
libavfilter/formats.c
libavfilter/src_movie.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_format.c
libavfilter/vf_hflip.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_transpose.c
libavfilter/vf_yadif.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/movenc.c
libavformat/mxf.h
libavformat/utils.c
libavformat/yuv4mpeg.c
libavutil/imgutils.c
libavutil/pixdesc.c
libswscale/input.c
libswscale/output.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
libswscale/x86/swscale_template.c
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb_template.c
libswscale/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Michael Niedermayer
46a35959d8
Merge commit '7751e4693dd10ec98c20fbd9887233b575034272'
...
* commit '7751e4693dd10ec98c20fbd9887233b575034272':
ogg: check that the expected number of headers had been parsed
libx264: change default to closed gop to match x264cli
Use avcodec_free_frame() to free AVFrames.
lavf: use a malloced AVFrame in try_decode_frame().
lavc: add avcodec_free_frame().
lavc: ensure extended_data is set properly on decoding
lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
lavc: use av_mallocz to allocate AVFrames.
lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
libavcodec/utils.c
libavcodec/version.h
libavfilter/src_movie.c
libavformat/oggdec.c
libavformat/oggdec.h
libavformat/oggparsetheora.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 15:15:16 +02:00
Stefano Sabatini
51fa653829
examples/decoding_encoding: clarify operations in the usage message
2012-09-13 22:19:45 +02:00
Stefano Sabatini
bcf93f78a5
examples/decoding_encoding: replace "picture" with "frame" in encode_example()
...
The use of "picture" in place of "frame" is confusing.
2012-09-13 20:49:59 +02:00
Stefano Sabatini
70b671a283
examples/decoding_encoding: apply various message log fixes
2012-09-13 20:49:59 +02:00
Stefano Sabatini
34b5b735f9
examples/muxing: add check on avformat_write_header() result
2012-09-11 21:43:27 +02:00
Stefano Sabatini
b3e2975ab3
examples/muxing: apply misc fixes to log messages
2012-09-11 21:43:27 +02:00
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.
2012-09-11 21:43:18 +02:00
Stefano Sabatini
976bb42aca
examples/muxing: merge some declarations and definitions
2012-09-11 21:41:56 +02:00
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.
2012-09-11 21:41:56 +02:00
Stefano Sabatini
2fe8fd3948
examples/demuxing: add audio decoding/demuxing
2012-09-11 17:48:07 +02:00
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.
2012-09-04 11:29:28 +02:00
Stefano Sabatini
c8ef309379
examples: add demuxing.c example
2012-09-02 10:48:01 +02:00
Michael Niedermayer
3061664a57
avoid ambigous buffersink names
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 06:05:08 +02:00
Stefano Sabatini
db0a0aa243
examples/scaling_video: add logging in case of image allocation failure
2012-08-30 23:39:32 +02:00
Stefano Sabatini
952caf11f2
examples/muxing: remove pointless #undef exit
2012-08-30 23:39:32 +02:00