Commit Graph

302 Commits

Author SHA1 Message Date
Lukasz Marek f79cd98caf examples/avio_list_dir: init/deinit network
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2015-04-06 15:50:26 +02:00
Mariusz Szczepańczyk f10aa0e125 doc/examples: Handle new types in avio_list_dir
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-03 04:09:40 +02:00
Lukasz Marek 56b7aa2138 doc/examples: add directory listing example
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-28 03:13:44 +01:00
Michael Niedermayer e73b3dba3e Merge commit '990e4a6639d0714198583c2812b1074b5751898f'
* commit '990e4a6639d0714198583c2812b1074b5751898f':
  Add a QSV decoding example.

Conflicts:
	configure
	doc/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 00:30:20 +01:00
Anton Khirnov 990e4a6639 Add a QSV decoding example. 2015-02-28 21:51:24 +01:00
Andreas Cadhalpun 078be09dd7 examples/demuxing_decoding: abort decoding when width, height or pix_fmt change
This is necessary, because avcodec_decode_video2 can change
width, height and/or pixel format of the AVCodecContext. Since
video_dst_data and video_dst_linesize are not updated by calling
av_image_alloc again, av_image_copy[_plane] asserts, because the
destination buffer is too small.

In this case, creating a useable rawvideo is not possible anyway, since
it has fixed width/height/pix_fmt.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-10 02:43:47 +01:00
Andreas Cadhalpun 2a3b7a55b5 examples/demuxing_decoding: set stream_idx in open_codec_context only if no error occured
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-31 21:54:36 +01:00
Stefano Sabatini d43c1ec684 examples/filtering: extend comments about setting the filter graph endpoints
That part is a constant source of confusions for readers, this should
help clarify the apparently inverted logic.
2015-01-29 11:12:39 +01:00
Michael Niedermayer e5c28d4f9a Merge commit '3a70c0c95feacb3844d05eebd579fc8189a77eee'
* commit '3a70c0c95feacb3844d05eebd579fc8189a77eee':
  examples/transcode_aac: generate proper PTS and set the muxer timebase

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 13:35:31 +01:00
Michael Niedermayer d078d57fb7 Merge commit 'c9b19ac8928c6c9b7f25c3988177204f110d5e0e'
* commit 'c9b19ac8928c6c9b7f25c3988177204f110d5e0e':
  examples/transcode_aac: fix a typo

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 13:29:46 +01:00
Michael Niedermayer 010311d673 Merge commit '749a89d1b8bb73b4d4f14c48f33259a1300c1761'
* commit '749a89d1b8bb73b4d4f14c48f33259a1300c1761':
  examples/transcode_aac: properly select the output sample format

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 13:21:02 +01:00
Andreas Unterweger 3a70c0c95f examples/transcode_aac: generate proper PTS and set the muxer timebase
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:03:08 +01:00
Andreas Unterweger c9b19ac892 examples/transcode_aac: fix a typo
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:00:23 +01:00
Andreas Unterweger 749a89d1b8 examples/transcode_aac: properly select the output sample format
Makes the example work with all the supported AAC encoders.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 08:58:47 +01:00
Andreas Cadhalpun f97f2a3527 doc/examples: fix lib math dep for decoding_encoding
It uses at least sin().

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 04:50:42 +01:00
Michael Niedermayer a85f033149 doc/examples/transcoding: Use avio_closep() in examples as it avoids leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 05:29:10 +01:00
Michael Niedermayer a63c17cec7 idoc/examples/remuxing: Use avio_closep() in examples as it avoids leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 05:28:59 +01:00
Michael Niedermayer c61b84ccfd doc/examples/transcode_aac: Use avio_closep() in examples as it avoids leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 05:28:51 +01:00
Michael Niedermayer 1d2410639d doc/examples/muxing: Use avio_closep() in examples as it avoids leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 05:28:15 +01:00
Piotr Fusik c99e5191ab doc/examples/filtering_video: fix frame rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-05 16:52:19 +01:00
Michael Niedermayer bde27e1e61 doc/examples/transcoding: check encoder before using it
Fixes null pointer exception

Found-by: stoupeace
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-04 18:58:38 +01:00
Michael Niedermayer e6ea75c5e6 doc/examples/decoding_encoding: fix storing all channels
Fixes Ticket3355

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-24 22:01:33 +01:00
Michael Niedermayer 230aeee94c doc: fix the the typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-22 02:09:09 +01:00
Stefano Sabatini 3a0c70f1e3 doc/examples/transcoding: use av_packet_rescale_ts()
Simplify.
2014-09-16 14:55:33 +02:00
Michael Niedermayer 68bca03951 doc/examples: remove unneeded NULL checks
dst_file cannot be NULL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 16:45:50 +02:00
Clément Bœsch b0352b1997 avcodec: export motion vectors in frame side data on demand
The reasoning behind this addition is that various third party
applications are interested in getting some motion information out of a
video "for free" when it is available.

It was considered to export other information as well (such as the intra
information about the block, or the quantization) but the structure
might have ended up into a half full-generic, half full of codec
specific cruft. If more information is necessary, it should either be
added in the "flags" field of the AVMotionVector structure, or in
another side-data.

This commit also includes an example exporting them in a CSV stream.
2014-08-18 14:13:57 +02:00
Timothy Gu 9f02a2b224 transcode_aac: fix const return value
Fixes Trac #3613.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 04:01:19 +02:00
Michael Niedermayer f1d6fc7794 Merge commit '6a928293dd29c7f0dcf09107980a1d651c9957df'
* commit '6a928293dd29c7f0dcf09107980a1d651c9957df':
  examples: filter_audio: Add missing mem.h header for av_freep()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-03 19:18:25 +02:00
Diego Biurrun 6a928293dd examples: filter_audio: Add missing mem.h header for av_freep() 2014-08-03 01:29:43 -07:00
Michael Niedermayer f285056810 doc/examples/muxing: fix "-flags" option
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 19:58:47 +02:00
Michael Niedermayer c437765be7 doc/examples/muxing: Exchange tmp_frame and frame
Reduces difference to 56f98e340f

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 12:03:51 +02:00
Michael Niedermayer d1ce43a3e8 doc/examples/muxing: mark correct frame as writeable
Bug found from comparing 56f98e340f to HEAD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 01:55:17 +02:00
Michael Niedermayer fbd46e2f1c doc/examples/muxing: Always use swr, simplifies code slightly
Idea-from: 56f98e340f
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 01:32:19 +02:00
Anton Khirnov 22e9fe06eb doc/examples/muxing: add alloc_audio_frame() and use it to simplify code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 01:15:39 +02:00
Michael Niedermayer a98cadef7f doc/examples/muxing: Move samples_count to OutputStream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 01:05:05 +02:00
Michael Niedermayer 8b1d54ba40 doc/examples/muxing: free swr context at the end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 00:50:58 +02:00
Michael Niedermayer 7cf0865551 doc/examples/muxing: Support setting flags, for example for setting bitexact
This would allow the example to be used in regression tests

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 22:49:02 +02:00
Michael Niedermayer 5d2cf1ae86 doc/examples/muxing: select a supported sample rate for the encoder, favor 44100
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 22:27:50 +02:00
Michael Niedermayer ead22f42f4 doc/examples/muxing: pick a supported channel layout if stereo isnt supported by the encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 22:01:08 +02:00
Michael Niedermayer 9ccb9c8df2 doc/examples/muxing: move swr context to OutputStream
Idea from: 56f98e340f
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 21:50:21 +02:00
Michael Niedermayer 1c0c19f8bd Merge commit '884f7c975f0af25febe86660e87bf3b2165a0309'
* commit '884f7c975f0af25febe86660e87bf3b2165a0309':
  output example: set the stream timebase

Conflicts:
	doc/examples/muxing.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-26 21:04:31 +02:00
Anton Khirnov 56f98e340f output example: convert audio to the format supported by the encoder 2014-07-26 14:57:59 +00:00
Anton Khirnov 884f7c975f output example: set the stream timebase
This is required by the new API.
2014-07-26 14:57:45 +00:00
Diego Biurrun 6cc1409ba8 examples/output: Remove unused variable
doc/examples/output.c:460:9: warning: unused variable ‘i’
2014-07-11 07:23:50 -07:00
Timothy Gu 3be90723e7 transcoding: fix Doxygen file path
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 13:15:32 +02:00
Michael Niedermayer cddbf95c5f doc/examples/resampling_audio: use av_freep() for saftey
also its better in examples to use the safer functions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-29 16:26:38 +02:00
Michael Niedermayer 4d3072ada3 doc/examples/muxing: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-28 21:44:38 +02:00
Michael Niedermayer 8469c73576 Merge commit '182d3f8221c23716ea4eafa460bdb94968f71f26'
* commit '182d3f8221c23716ea4eafa460bdb94968f71f26':
  output example: rewrite encoding logic

Conflicts:
	doc/examples/muxing.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 00:57:04 +02:00
Michael Niedermayer 9a2850c26a Merge commit 'a7fcd4122b19b0f934020f4e261d0c44c4c32e11'
* commit 'a7fcd4122b19b0f934020f4e261d0c44c4c32e11':
  output example: store the scaling context in the stream context

Conflicts:
	doc/examples/muxing.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 00:16:34 +02:00
Michael Niedermayer 877716a79c Merge commit '6a927d7aaf5625e83a674072913b9e292a303fd1'
* commit '6a927d7aaf5625e83a674072913b9e292a303fd1':
  output example: use a macro instead of a static variable

Conflicts:
	doc/examples/muxing.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 23:58:00 +02:00