Commit Graph

564 Commits

Author SHA1 Message Date
James Almer
75aa14b870 Merge commit '0711d142997b2662ba9198e607015b06c6eed0d8'
* commit '0711d142997b2662ba9198e607015b06c6eed0d8':
  examples: Use new API for transcoding example

Merged-by: James Almer <jamrial@gmail.com>
2018-03-15 17:57:18 -03:00
Andreas Unterweger
0711d14299 examples: Use new API for transcoding example
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2018-03-07 12:36:13 +01:00
Mark Thompson
10bcc41bb4 examples: Don't call deprecated functions which don't do anything 2018-02-09 21:38:42 +00:00
Jun Zhao
0519e66a90 examples: Add a VA-API transcode example.
Usage is:
./vaapi_transcode input_stream codec output_stream
For example:
- ./vaapi_transcode input.mp4 h264_vaapi output_h264.mp4
- ./vaapi_transcode input.mp4 vp8_vaapi output_vp8.ivf

Does not handle resolution changes on the input stream.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-02-04 12:56:39 +00:00
Marton Balint
25a2d269bd fftools, tools, examples: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Mark Thompson
725ae0e2d0 Merge commit '1efbbfedcaf4a3cecab980273ad809ba3ade2f74'
* commit '1efbbfedcaf4a3cecab980273ad809ba3ade2f74':
  examples/qsvdec: do not set the deprecated field refcounted_frames

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 22:57:09 +00:00
Jun Zhao
9b955eece6 examples/vaapi_encode: Remove redundancy check when free context.
avcodec_free_context have handle NULL pointer case, so caller doesn't
need to check the NULL before call this function.

Signe-off-by: Jun Zhao <jun.zhao@intel.com>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Zhong Li
1efbbfedca examples/qsvdec: do not set the deprecated field refcounted_frames
It is used by the deprecated API avcodec_decode_video2 and ignored by the
new decode APIs (avcodec_send_packet/avcodec_receive_frame).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-29 16:13:02 +00:00
Mark Thompson
a763d27827 examples/vaapi_encode: Fix leak on hwframe init failure
Fixes CID #1424882.
2017-12-01 21:12:45 +00:00
Mark Thompson
b0d9eab7f2 examples/hw_decode: Use hw-config information to find pixfmt
This removes all remaining device-type specificity.
2017-11-29 23:49:14 +00:00
Jun Zhao
23db3a1ae6 examples: Add a VA-API encode example.
Supports only raw NV12 input.

Example use:
./vaapi_encode 1920 1080 test.yuv test.h264

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-28 22:14:07 +00:00
Jun Zhao
5c51d0edd4 examples/filtering_audio: suppress the build warning.
suppress the "warning: assignment discards ‘const’ qualifier from
pointer target type" build warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-01 02:10:09 +01:00
Jun Zhao
cb6e20f8de examples/filtering_video: suppress the build warning.
suppress the "warning: assignment discards ‘const’ qualifier from
pointer target type" build warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-01 02:10:09 +01:00
Jun Zhao
fdfc51766d examples/transcoding: suppress build warning.
suppress the "warning: assignment discards ‘const’ qualifier from
pointer target type" build warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-01 02:10:09 +01:00
James Almer
91b4d10917 Merge commit 'ecc5c4db2dd3a0f328d95df89daa59f78b4b2810'
* commit 'ecc5c4db2dd3a0f328d95df89daa59f78b4b2810':
  doc/examples/output: Cast pointer to the right (const) type

Merged-by: James Almer <jamrial@gmail.com>
2017-10-30 13:24:51 -03:00
James Almer
4c410a58d7 Merge commit 'f25609ff06b093d82548c92fc2031cd2e66c20d3'
* commit 'f25609ff06b093d82548c92fc2031cd2e66c20d3':
  doc/examples/filter_audio: const correctness

Merged-by: James Almer <jamrial@gmail.com>
2017-10-30 13:20:30 -03:00
Nicolas George
bfb1a94625 examples/avio_reading: return AVERROR_EOF at EOF.
Signed-off-by: Nicolas George <george@nsup.org>
2017-10-29 19:40:52 +02:00
James Almer
8a3d3b6240 Merge commit 'b200a2c8da403b5a5c8b50f8cb4a75fd4f0131b1'
* commit 'b200a2c8da403b5a5c8b50f8cb4a75fd4f0131b1':
  examples: Fixed and extended Doxygen documentation

Merged-by: James Almer <jamrial@gmail.com>
2017-10-26 17:03:09 -03:00
James Almer
99ba85a0e2 Merge commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436'
* commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436':
  lavfi: Drop unused and empty header file

Merged-by: James Almer <jamrial@gmail.com>
2017-10-26 16:46:11 -03:00
James Almer
cafd9d66ed build: add install targets for the examples
Split it off from install-data.

Among other things, this prevents spamming triplicate log lines during install.

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-05 11:35:56 -03:00
James Almer
749b35799c Merge commit 'c483398bb7ef66f61ed2dcb09f3d6160683da0eb'
* commit 'c483398bb7ef66f61ed2dcb09f3d6160683da0eb':
  build: Drop DOC_ prefix from EXAMPLES-related variables

Merged-by: James Almer <jamrial@gmail.com>
2017-10-03 22:11:58 -03:00
James Almer
fd5f4ac081 Merge commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524'
* commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524':
  build: Move cli tool sources to a separate subdirectory

Merged-by: James Almer <jamrial@gmail.com>
2017-10-01 18:26:36 -03:00
James Almer
450cee522e build: fix cleaning compiled unstripped examples
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-30 01:40:08 -03:00
James Almer
3df437c2d1 build: add missing changes to ensure examples build with progs-suffix 2017-09-29 17:56:36 -03:00
James Almer
eace20a862 Merge commit 'ab566cc96bc0c31b34d944214bc06cec8ae8b640'
* commit 'ab566cc96bc0c31b34d944214bc06cec8ae8b640':
  build: Separate logic for building examples from that for building avtools

Merged-by: James Almer <jamrial@gmail.com>
2017-09-29 17:09:46 -03:00
James Almer
b25d6290c6 Merge commit 'acb0dea27efff4b35796015b96570b59fd517078'
* commit 'acb0dea27efff4b35796015b96570b59fd517078':
  build: Split logic for building examples off into a separate Makefile

We already have a Makefile in doc/examples, but it's separate from the build
system and meant to be installed as part of the documentation to help users
compile the installed .c example files.
Move it to Makefile.example to make place for the new build system Makefile.

Merged-by: James Almer <jamrial@gmail.com>
2017-09-29 15:12:43 -03:00
Jesse Liu
8e17cd20b9 add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-10 19:08:33 +02:00
Jun Zhao
1e0c75ea16 examples/hw_decode: Add a HWAccel decoding example.
Works with VAAPI, VDPAU, DXVA2 and D3D11VA.

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-07-30 00:15:05 +01:00
Stefano Sabatini
ddae679458 examples/encode_video: slightly improve error reporting 2017-05-31 15:46:19 +02:00
Stefano Sabatini
002dbc5a1f examples/encode_video: add log
This helps to visualize how the send/receive API works.
2017-05-31 15:46:14 +02:00
Diego Biurrun
ecc5c4db2d doc/examples/output: Cast pointer to the right (const) type
doc/examples/output.c:512:33: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type
2017-04-24 16:10:06 +02:00
Diego Biurrun
f25609ff06 doc/examples/filter_audio: const correctness
doc/examples/filter_audio.c:168:17: warning: assignment discards ‘const’ qualifier from pointer target type
2017-04-24 16:10:05 +02:00
Muhammad Faiz
327a1c0dee examples: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-04-23 14:43:51 +07:00
Andreas Unterweger
b200a2c8da examples: Fixed and extended Doxygen documentation
Added parameter descriptions for all functions
 and converted in-function comments into regular
 (non-Doxygen) comments.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-04-10 10:07:54 -04:00
Michael Niedermayer
23edd41a0d doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-09 03:51:19 +02:00
James Almer
81cc33adc6 Merge commit 'c7ab0eb3050acdd3b8cab2c55fc9c1b2e8610a65'
* commit 'c7ab0eb3050acdd3b8cab2c55fc9c1b2e8610a65':
  examples/decode_video: allocate the packet dynamically

Merged-by: James Almer <jamrial@gmail.com>
2017-04-04 14:47:09 -03:00
James Almer
52bce9a13d Merge commit '728ea23cce07467b732f538c87c13da13dd6dcf3'
* commit '728ea23cce07467b732f538c87c13da13dd6dcf3':
  examples/decode_video: switch to the new decoding API

Merged-by: James Almer <jamrial@gmail.com>
2017-04-04 14:41:23 -03:00
James Almer
fddd6af45c Merge commit 'f78d360bba6dcfb585847a49a84e89c25950fbdb'
* commit 'f78d360bba6dcfb585847a49a84e89c25950fbdb':
  examples/decode_video: use a parser for splitting the input

Merged-by: James Almer <jamrial@gmail.com>
2017-04-04 14:37:27 -03:00
Matthieu Bouron
400378b7b3 doc/examples/extract_mvs: re-indent after previous commit 2017-04-04 14:10:22 +02:00
Matthieu Bouron
1cf93196fc doc/examples/extract_mvs: make pkt local to the main function 2017-04-04 14:10:22 +02:00
Matthieu Bouron
82116bd8a4 doc/examples/extract_mvs: switch to new decoding API 2017-04-04 14:10:22 +02:00
Clément Bœsch
6db36a0227 Merge commit '59ab9e8ba1df7e3347a4cd2bd56c32e74aede802'
* commit '59ab9e8ba1df7e3347a4cd2bd56c32e74aede802':
  examples/encode_video: allocate the packet dynamically

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-04-04 11:48:23 +02:00
Clément Bœsch
4ea942f2ce Merge commit '5f102a9559099429826e84758b8b5182244c52db'
* commit '5f102a9559099429826e84758b8b5182244c52db':
  examples/encode_video: switch to the new encoding API

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-04-04 11:44:45 +02:00
Clément Bœsch
dd0113da3c Merge commit 'fee0f1de2c6a9924acb74013436dbea8f2bd1ecb'
* commit 'fee0f1de2c6a9924acb74013436dbea8f2bd1ecb':
  examples/decode_audio: flush the decoder

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-04-04 11:40:34 +02:00
Clément Bœsch
d1105e8f43 Merge commit '9a38184a143a1560814b084aebe628f8df46e666'
* commit '9a38184a143a1560814b084aebe628f8df46e666':
  examples/decode_audio: allocate the packet dynamically

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-04-04 11:38:56 +02:00
Clément Bœsch
3d12d10677 Merge commit '3d66717f7cb5555257244be8f5bce172ed3af7ac'
* commit '3d66717f7cb5555257244be8f5bce172ed3af7ac':
  examples/decode_audio: use the new audio decoding API

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-04-04 11:33:04 +02:00
Clément Bœsch
87e16e2b44 Merge commit '0946c754d99c05413e813ee515039adcf0f9232a'
* commit '0946c754d99c05413e813ee515039adcf0f9232a':
  examples/decode_audio: use a parser for splitting the input

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-04-04 11:27:37 +02:00
Clément Bœsch
34ec327f69 examples/decode_audio: reduce the scope of 2 variables 2017-04-04 11:17:35 +02:00
Clément Bœsch
a434657de9 Merge commit 'f27e262dbdea1991b22e08b639ac03e642a3482c'
* commit 'f27e262dbdea1991b22e08b639ac03e642a3482c':
  examples/encode_audio: switch to the new audio encoding API

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-03 21:14:16 +02:00
Clément Bœsch
54e195cf52 Merge commit '44c9f374f188f92927b7a4aad2101289d446b814'
* commit '44c9f374f188f92927b7a4aad2101289d446b814':
  examples/qsvdec: convert to the new decoding API

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-03 21:10:07 +02:00
Clément Bœsch
4069394fd4 Merge commit '1dd2b6c91ca5f26207805720d4f5564de60b241b'
* commit '1dd2b6c91ca5f26207805720d4f5564de60b241b':
  examples/qsvdec: switch to the hwcontext API

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-03 21:07:59 +02:00
Clément Bœsch
e181e2909b doc/examples/transcode_aac: replace local get_error_text with av_err2str 2017-04-01 12:45:33 +02:00
James Almer
b27dd80255 doc/decode_audio: use <> to include libav* headers
Found-by: ubitux
2017-03-31 16:50:51 -03:00
James Almer
ebe9808aaa Merge commit '905cdcaa9d081d3d945ce555b27b43a75c3af57b'
* commit '905cdcaa9d081d3d945ce555b27b43a75c3af57b':
  examples/decode_audio: Add missing header for av_free()

Merged-by: James Almer <jamrial@gmail.com>
2017-03-31 15:46:13 -03:00
Michael Niedermayer
59b8c2a4e6 doc/examples/encode_audio: Favor a sample rate close to 44khz instead of the maximum sample rate
This is an example, people will copy and use this. The maximum supported is quite
unreasonable as a default choice

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-30 16:34:06 +02:00
Matthieu Bouron
03372d0a90 doc/examples/filtering_audio: switch to new decoding API 2017-03-30 16:20:13 +02:00
Matthieu Bouron
afd257b43f doc/examples/filtering_video: switch to new decoding API 2017-03-30 16:20:07 +02:00
Clément Bœsch
fdbc29ca70 Merge commit '8191f960a669819db4de33a2439ded1630b8a73e'
* commit '8191f960a669819db4de33a2439ded1630b8a73e':
  examples/decode_video: constify the AVCodec instance

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 14:22:32 +02:00
Clément Bœsch
58f24adc05 Merge commit '5b4d7ac7ae5d821cfa6ab89f8eab4d31851ef32c'
* commit '5b4d7ac7ae5d821cfa6ab89f8eab4d31851ef32c':
  examples/encode_video: use the AVFrame API for allocating the frame

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 14:21:52 +02:00
Clément Bœsch
944e5ce3ec doc/examples/{de,en}code_audio: fix includes
Consistent with other examples.
2017-03-29 14:18:10 +02:00
Clément Bœsch
4726bbb471 Merge commit 'd0a603a534a0ee4b255e5e72742428a7f7f42b83'
* commit 'd0a603a534a0ee4b255e5e72742428a7f7f42b83':
  examples/encode_video: set the framerate

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 14:16:33 +02:00
Clément Bœsch
e9bd457465 Merge commit 'e02524025bce2c8bf8b5bffd96479785c75a70d4'
* commit 'e02524025bce2c8bf8b5bffd96479785c75a70d4':
  examples/encode_video: constify the AVCodec instance

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 14:15:01 +02:00
Clément Bœsch
925ce244d8 Merge commit '7b1f03477f1a43d2261fbd83e50a4ad90c7f806d'
* commit '7b1f03477f1a43d2261fbd83e50a4ad90c7f806d':
  examples/avcodec: split the remaining two examples into separate files

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 14:09:09 +02:00
Clément Bœsch
dcdd52101f Merge commit '90265814f993098d79b0a0f40745ecdb403fbf56'
* commit '90265814f993098d79b0a0f40745ecdb403fbf56':
  examples/decode_audio: constify the AVCodec instance

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 13:45:51 +02:00
Clément Bœsch
9bed10afb8 doc/examples/encode_audio: add missing return 2017-03-29 13:45:09 +02:00
Clément Bœsch
878070cc56 Merge commit 'f5df897c4b61985e3afc89ba1290649712ff438e'
* commit 'f5df897c4b61985e3afc89ba1290649712ff438e':
  examples/avcodec: split audio decoding into a separate example

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 13:43:47 +02:00
Clément Bœsch
780cc080d8 Merge commit 'f76698e759a08e8d3b629c06edb0439f474e7fee'
* commit 'f76698e759a08e8d3b629c06edb0439f474e7fee':
  examples/encode_audio: use the AVFrame API for allocating the data

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 13:31:44 +02:00
Clément Bœsch
f38e7566c6 Merge commit 'c00a11ab383ff276a2ab2fdba577945e48d465be'
* commit 'c00a11ab383ff276a2ab2fdba577945e48d465be':
  examples/encode_audio: constify AVCodec instances

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 13:30:16 +02:00
Clément Bœsch
b785af4868 Merge commit '40aaa8dadfd1c69ff4460d04750e1403b5535a6d'
* commit '40aaa8dadfd1c69ff4460d04750e1403b5535a6d':
  examples/avcodec: split audio encoding into a separate example

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-29 13:29:22 +02:00
James Almer
3b80f73b18 doc/examples/transcoding: convert to codecpar
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-28 12:27:04 -03:00
Matthieu Bouron
64b5539985 doc/examples/extract_mvs: switch to codecpar 2017-03-28 17:46:29 +02:00
Matthieu Bouron
4a946aca7c doc/examples/remuxing: switch to codecpar
Also limits remuxing to audio, video and subtitle streams.
2017-03-28 17:46:23 +02:00
Matthieu Bouron
7e3e0f87e6 doc/examples/muxing: re-indent block 2017-03-28 12:41:46 +02:00
Clément Bœsch
c3706bc255 doc/examples/filtering_*: switch to codecpar 2017-03-28 11:40:57 +02:00
Diego Biurrun
c483398bb7 build: Drop DOC_ prefix from EXAMPLES-related variables 2017-02-27 13:57:35 +01:00
Diego Biurrun
ab566cc96b build: Separate logic for building examples from that for building avtools 2017-02-21 16:10:51 +01:00
Diego Biurrun
acb0dea27e build: Split logic for building examples off into a separate Makefile 2017-02-21 16:10:51 +01:00
Clément Bœsch
126e96533f Merge commit '9833a406d3d743d238e4cbee08ffcaa12e067dd2'
* commit '9833a406d3d743d238e4cbee08ffcaa12e067dd2':
  examples: Properly free AVCodecContext

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-01-31 17:35:41 +01:00
Rostislav Pehlivanov
e05d2dd86a doc/examples/decoder_targeted: move to tools/target_dec_fuzzer.c
Name and purpose are more appropriate there since the code isn't
an ideal example.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-01-29 16:14:18 +00:00
Michael Niedermayer
bbd4d92304 doc/examples/decoder_targeted: Disable error concealment after 20 frames
This allows testing EC and non EC. Avoids spending most time in EC on
high res samples and reduces the likelyhood of hitting timeouts

Fixes: Timeout in 467/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_H263_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-29 16:09:55 +01:00
Michael Niedermayer
89d4d7d759 doc/examples/http_multiclient: Fix resource leak
Fixes CID1396269

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-26 18:29:00 +01:00
Michael Niedermayer
99af260d0b doc/examples/decoder_targeted: Limit max pixels for fuzzing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-19 19:59:06 +01:00
Aleksandr Slobodeniuk
a91f1023bc examples: fix a typo in an error message
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-02 11:59:08 -05:00
Александр Слободенюк
3aa1ff30f3 doc/examples/transcode_aac: fix a typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-01 12:53:45 +01:00
Anton Khirnov
c7ab0eb305 examples/decode_video: allocate the packet dynamically
AVPackets on stack are discouraged.
2016-11-23 13:11:17 +01:00
Anton Khirnov
728ea23cce examples/decode_video: switch to the new decoding API 2016-11-23 13:10:54 +01:00
Anton Khirnov
f78d360bba examples/decode_video: use a parser for splitting the input
Do not rely on the decoder handling this, as it's not guaranteed to
work.
2016-11-23 13:10:28 +01:00
Anton Khirnov
59ab9e8ba1 examples/encode_video: allocate the packet dynamically
AVPackets on stack are discouraged.
2016-11-23 13:10:22 +01:00
Anton Khirnov
5f102a9559 examples/encode_video: switch to the new encoding API 2016-11-23 13:10:16 +01:00
Anton Khirnov
fee0f1de2c examples/decode_audio: flush the decoder 2016-11-23 13:10:10 +01:00
Anton Khirnov
9a38184a14 examples/decode_audio: allocate the packet dynamically
AVPackets on stack are discouraged now.
2016-11-23 13:10:05 +01:00
Anton Khirnov
45a1ce2ff7 examples/decode_audio: handle planar audio now produced by the MP2 decoder 2016-11-23 13:10:00 +01:00
Anton Khirnov
3d66717f7c examples/decode_audio: use the new audio decoding API 2016-11-23 13:09:55 +01:00
Anton Khirnov
0946c754d9 examples/decode_audio: use a parser for splitting the input
Do not rely on the decoder handling this, as it's not guaranteed to
work.
2016-11-23 13:09:41 +01:00
Anton Khirnov
f27e262dbd examples/encode_audio: switch to the new audio encoding API 2016-11-23 13:08:50 +01:00
Anton Khirnov
44c9f374f1 examples/qsvdec: convert to the new decoding API 2016-11-23 13:08:43 +01:00
Anton Khirnov
1dd2b6c91c examples/qsvdec: switch to the hwcontext API
The code now does not depend on VA and will work on windows as well.
2016-11-23 13:08:33 +01:00
Sam Hocevar
3115550abe doc/examples/muxing: Fix av_frame_make_writable usage
This patch moves the av_frame_make_writable() call from fill_yuv_image
to get_video_frame so that its argument can be the actual frame that
will be sent to the encoder.

This fixes data corruption issues in codecs that keep references on
one or several previous frames.

Signed-off-by: Sam Hocevar <sam@hocevar.net>
Reviewed-by: wm4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-23 03:28:04 +01:00
Diego Biurrun
bb265b764a examples/transcode_aac: Drop pointless return value const qualifier
doc/examples/transcode_aac.c:52:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
2016-11-17 16:53:47 +01:00
Diego Biurrun
bfe92dfe60 Ignore all generated example binaries 2016-11-17 10:35:27 +01:00
Diego Biurrun
905cdcaa9d examples/decode_audio: Add missing header for av_free() 2016-11-10 10:33:19 +01:00
Thomas Garnier
c06d923410 doc/examples: add fuzz target for individual ffmpeg APIs for in-process fuzzing with libFuzzer, AFL, and similar fuzzing engines.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-04 22:42:20 +01:00
Anton Khirnov
636515c324 examples/decode_video: remove a stray unrelated comment 2016-11-02 10:20:41 +01:00
Anton Khirnov
8191f960a6 examples/decode_video: constify the AVCodec instance 2016-11-02 10:20:25 +01:00
Anton Khirnov
5b4d7ac7ae examples/encode_video: use the AVFrame API for allocating the frame
It is more efficient and so preferred over allocating the buffers
manually.
2016-11-02 10:20:01 +01:00
Anton Khirnov
d0a603a534 examples/encode_video: set the framerate 2016-11-02 10:19:37 +01:00
Anton Khirnov
e02524025b examples/encode_video: constify the AVCodec instance 2016-11-02 10:18:34 +01:00
Anton Khirnov
7b1f03477f examples/avcodec: split the remaining two examples into separate files 2016-11-02 10:16:04 +01:00
Anton Khirnov
90265814f9 examples/decode_audio: constify the AVCodec instance 2016-11-02 10:13:37 +01:00
Anton Khirnov
f5df897c4b examples/avcodec: split audio decoding into a separate example
The four examples (audio/video encoding/decoding) are completely
independent so it makes little sense to have them all in one file.
2016-11-02 10:13:27 +01:00
Anton Khirnov
f76698e759 examples/encode_audio: use the AVFrame API for allocating the data
It is simpler and more efficient.
2016-11-02 10:12:39 +01:00
Anton Khirnov
c00a11ab38 examples/encode_audio: constify AVCodec instances 2016-11-02 10:11:48 +01:00
Anton Khirnov
40aaa8dadf examples/avcodec: split audio encoding into a separate example
The four examples (audio/video encoding/decoding) are completely
independent so it makes little sense to have them all in one file.
2016-11-02 10:11:46 +01:00
Michael Niedermayer
2bd9956454 doc/examples/demuxing_decoding: Drop AVFrame->pts use
This code is not correct for git master

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-18 15:15:12 +02:00
Michael Niedermayer
7ba7b96dd3 doc/examples/http_multiclient: Fix "doc/examples/http_multiclient.c:43:9: warning: passing argument 4 of av_opt_get from incompatible pointer type"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-09 00:32:39 +02:00
Clément Bœsch
1a9b4bc4c7 doc/examples: build http_multiclient example 2016-09-30 19:35:52 +02:00
Clément Bœsch
1e647d200f doc/examples/gitignore: add forgotten qsvdec entry 2016-09-30 19:35:52 +02:00
Clément Bœsch
f2579f7ee2 doc/examples/http_multiclient: fix mixed declarations and code 2016-09-30 19:35:52 +02:00
Clément Bœsch
fb5e58cd77 doc/examples/http_multiclient: fix compilation
Fixes error: no previous prototype for ‘process_client’ [-Werror=missing-prototypes]
2016-09-30 19:35:52 +02:00
Anton Khirnov
67d28f4a0f examples/output: switch to the new encoding API 2016-09-28 10:01:52 +02:00
James Almer
bba6a03b28 examples/demuxing_decoding: convert to codecpar
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-17 19:17:04 -03:00
Vittorio Giovara
9833a406d3 examples: Properly free AVCodecContext 2016-07-20 17:13:53 +02:00
Clément Bœsch
5558ff3a9f Merge commit '257f00ec1ab06a2a161f535036c6512f3fc8e801'
* commit '257f00ec1ab06a2a161f535036c6512f3fc8e801':
  Split global .gitignore file into per-directory files

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-22 11:28:51 +02:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Michael Niedermayer
3bc060f366 doc/examples/transcoding: Use the decoders pixel format if the encoder does not list which are supported
This affects rawvideo and wraped_avframe, no others are affected atm

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 17:10:15 +02:00
Diego Biurrun
257f00ec1a Split global .gitignore file into per-directory files 2016-05-13 14:55:56 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Michael Niedermayer
0c79c96cf2 doc/examples/muxing: Add support to pass flags to muxer as since codecpar the codec flags are not available to the muxer anymore
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-11 17:57:06 +02:00
Derek Buitenhuis
6bc5ef37cb Merge commit 'ac6d53589f3631ae08467c784fb371a15c957f01'
* commit 'ac6d53589f3631ae08467c784fb371a15c957f01':
  examples/transcode_aac: convert to codecpar

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-11 14:15:28 +01:00
Derek Buitenhuis
030e69b4dc Merge commit 'a9e1f2cc61cbd5606a087a60565e87923c39de5a'
* commit 'a9e1f2cc61cbd5606a087a60565e87923c39de5a':
  examples/qsvdec: convert to codecpar

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-11 14:07:41 +01:00
Derek Buitenhuis
d76972b581 Merge commit '9897d9f4e074cdc6c7f2409885ddefe300f18dc7'
* commit '9897d9f4e074cdc6c7f2409885ddefe300f18dc7':
  examples/output: convert to codecpar

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-11 14:06:43 +01:00
Lou Logan
06eef96b69 fix some a/an typos
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-03-28 14:13:17 -08:00
Anton Khirnov
ac6d53589f examples/transcode_aac: convert to codecpar 2016-02-24 10:08:34 +01:00
Anton Khirnov
a9e1f2cc61 examples/qsvdec: convert to codecpar 2016-02-24 10:08:30 +01:00
Anton Khirnov
9897d9f4e0 examples/output: convert to codecpar 2016-02-24 10:08:24 +01:00
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Hendrik Leppkes
7f5af80ba4 Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
  avpacket: Replace av_free_packet with av_packet_unref

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:28:56 +01:00
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`.
2015-10-26 18:00:55 +01:00
Michael Niedermayer
83fc0b9d48 doc/examples/muxing: Fix mixed declaration and code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-15 00:24:00 +02:00
Hendrik Leppkes
1899b25799 Merge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'
* commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e':
  avformat: Do not use AVFMT_RAWPICTURE

Removal from ffmpeg.c not merged because some parts of avdevice
still use it

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:43:20 +02:00
Luca Barbato
34ed5c2e4d avformat: Do not use AVFMT_RAWPICTURE
There are no formats supporting it anymore and it is deprecated.
Update the documentation accordingly.
2015-10-13 13:43:29 +02:00
Hendrik Leppkes
b1284a4b4a Merge commit '539e5ac2ecfec2e2f441222a43fb0583643ea607'
* commit '539e5ac2ecfec2e2f441222a43fb0583643ea607':
  examples/qsvdec: free the lavc decoder before closing MFX/VAAPI

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:17:29 +02:00
Hendrik Leppkes
d0a1605134 Merge commit '3ee462dca1038e63b8e8d5e751121736d5772a5d'
* commit '3ee462dca1038e63b8e8d5e751121736d5772a5d':
  examples/qsvdec: do not free the surfaces in the frame_free() callback

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:17:23 +02:00
Anton Khirnov
539e5ac2ec examples/qsvdec: free the lavc decoder before closing MFX/VAAPI
lavc expects MFX to still be in a usable state on close.
2015-09-28 15:46:10 +02:00
Anton Khirnov
3ee462dca1 examples/qsvdec: do not free the surfaces in the frame_free() callback
Even though libmfx might not need them anymore, avcodec might still
access the surfaces. So free them separately at the end.
2015-09-28 15:45:29 +02:00
Clément Bœsch
d9464e9c14 doc/examples/demuxing_decoding: simplify api_mode to refcount
This finalizes the quick cleanup of a753e6c9f5.
2015-09-06 12:35:00 +02:00
Michael Niedermayer
a753e6c9f5 doc/examples/demuxing_decoding: Drop old api mode, because the code fails to build otherwise
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 18:25:24 +02:00
Hendrik Leppkes
144fb06806 Remove left-over FF_API_AVFILTERBUFFER cruft 2015-09-05 16:27:19 +02:00
Michael Niedermayer
e9c58033e8 doc/examples/http_multiclient: Fix occured typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-04 11:30:25 +02:00
Harshit Mittal
53bf32fa42 doc/examples/filtering_video: better demo ffmpeg filters; demos chaining the filters
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-28 12:53:35 +02:00