summaryrefslogtreecommitdiffstats
path: root/doc/examples/muxing.c
Commit message (Collapse)AuthorAgeFilesLines
* doc/examples/muxing: Use avio_closep() in examples as it avoids leaving ↵Michael Niedermayer2015-01-081-1/+1
| | | | | | stale pointers Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: fix "-flags" optionMichael Niedermayer2014-07-271-1/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: Exchange tmp_frame and frameMichael Niedermayer2014-07-271-11/+12
| | | | | | Reduces difference to 56f98e340fca894a76d1ddbe33118b8d8c4db34a Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: mark correct frame as writeableMichael Niedermayer2014-07-271-9/+9
| | | | | Bug found from comparing 56f98e340fca894a76d1ddbe33118b8d8c4db34a to HEAD Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: Always use swr, simplifies code slightlyMichael Niedermayer2014-07-271-6/+0
| | | | | Idea-from: 56f98e340fca894a76d1ddbe33118b8d8c4db34a Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: add alloc_audio_frame() and use it to simplify code.Anton Khirnov2014-07-271-29/+35
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: Move samples_count to OutputStreamMichael Niedermayer2014-07-271-4/+3
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: free swr context at the endMichael Niedermayer2014-07-271-0/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: Support setting flags, for example for setting bitexactMichael Niedermayer2014-07-261-8/+19
| | | | | | This would allow the example to be used in regression tests Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: select a supported sample rate for the encoder, favor 44100Michael Niedermayer2014-07-261-0/+8
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: pick a supported channel layout if stereo isnt ↵Michael Niedermayer2014-07-261-1/+9
| | | | | | supported by the encoder Signed-off-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: move swr context to OutputStreamMichael Niedermayer2014-07-261-14/+13
| | | | | Idea from: 56f98e340fca894a76d1ddbe33118b8d8c4db34a Signed-off-by: Michael Niedermayer <[email protected]>
* Merge commit '884f7c975f0af25febe86660e87bf3b2165a0309'Michael Niedermayer2014-07-261-2/+4
| | | | | | | | | | * commit '884f7c975f0af25febe86660e87bf3b2165a0309': output example: set the stream timebase Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* doc/examples/muxing: remove unused variableMichael Niedermayer2014-06-281-1/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* Merge commit '182d3f8221c23716ea4eafa460bdb94968f71f26'Michael Niedermayer2014-06-271-80/+108
| | | | | | | | | | * commit '182d3f8221c23716ea4eafa460bdb94968f71f26': output example: rewrite encoding logic Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit 'a7fcd4122b19b0f934020f4e261d0c44c4c32e11'Michael Niedermayer2014-06-271-7/+10
| | | | | | | | | | * commit 'a7fcd4122b19b0f934020f4e261d0c44c4c32e11': output example: store the scaling context in the stream context Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '6a927d7aaf5625e83a674072913b9e292a303fd1'Michael Niedermayer2014-06-261-2/+2
| | | | | | | | | | * commit '6a927d7aaf5625e83a674072913b9e292a303fd1': output example: use a macro instead of a static variable Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '63fd0d866c8300a8f251a15b1535e9ce40a407fb'Michael Niedermayer2014-06-261-42/+45
| | | | | | | | | | * commit '63fd0d866c8300a8f251a15b1535e9ce40a407fb': output example: allocate the audio frame only once Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit 'edd5f957646dcbf1bb55718bc7bf1e5481c25bcb'Michael Niedermayer2014-06-261-46/+40
| | | | | | | | | | * commit 'edd5f957646dcbf1bb55718bc7bf1e5481c25bcb': output example: use OutputStream for audio streams as well Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '5e7b125b6ae36893dfd9cb5661c99b67363cbb38'Michael Niedermayer2014-06-261-69/+47
| | | | | | | | | | * commit '5e7b125b6ae36893dfd9cb5661c99b67363cbb38': output example: use the new AVFrame API to allocate audio frames Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit 'ac85f631c9a9cc59aaca1c8dd6894fb1f701c594'Michael Niedermayer2014-06-261-0/+2
| | | | | | | | | | * commit 'ac85f631c9a9cc59aaca1c8dd6894fb1f701c594': output example: set output channel layout Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '294daf71a7a1303b5ddd3cbefebed3b732d610f3'Michael Niedermayer2014-06-261-45/+58
| | | | | | | | | | * commit '294daf71a7a1303b5ddd3cbefebed3b732d610f3': output example: use a struct to bundle the video stream variables together Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '38d044429dabcd28928693240e955c6d4430cca9'Michael Niedermayer2014-06-261-33/+49
| | | | | | | | | | * commit '38d044429dabcd28928693240e955c6d4430cca9': output example: use the new AVFrame API for allocating the video frame Conflicts: doc/examples/muxing.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '452860d7e056f9a894cac2fe52cdedeae4c38251'Michael Niedermayer2014-06-201-3/+1
| | | | | | | | | | | * commit '452860d7e056f9a894cac2fe52cdedeae4c38251': Use av_packet_rescale_ts() to simplify code. Conflicts: doc/examples/muxing.c ffmpeg.c Merged-by: Michael Niedermayer <[email protected]>
* doc/examples: remove pathes from doxy examplesMichael Niedermayer2014-02-171-1/+1
| | | | | | | This makes the examples page less cluttered Reviewed-by: Clément Bœsch <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-141-2/+2
| | | | | | | | | | | * qatar/master: doc/examples: misc Doxygen markup improvements Conflicts: doc/examples/muxing.c doc/examples/transcode_aac.c Merged-by: Michael Niedermayer <[email protected]>
* examples/muxing: reindent after previous commitStefano Sabatini2014-01-231-32/+32
|
* examples/muxing: flush encoders at the endStefano Sabatini2014-01-231-23/+30
|
* examples/muxing: reduce duration, remove wrong and misleading commentStefano Sabatini2014-01-211-2/+1
| | | | | | | | Set duration to 10 seconds, after it was increased from 5 to 200 seconds in 8d80f3cb877b890889b1673029387229648901ed. 200 seconds will generate too much data which is annoying especially when testing.
* examples/muxing: remove redundant {}Stefano Sabatini2014-01-201-6/+4
|
* examples/muxing: change error checks, from "ret != 0" to "ret < 0"Stefano Sabatini2014-01-201-2/+3
| | | | More consistent and more future-proof.
* examples/muxing: factorize write_interleave codeStefano Sabatini2014-01-201-17/+28
| | | | Also log output packet information.
* examples/muxing: simplify video PTS settingStefano Sabatini2014-01-121-3/+1
| | | | Rely on frame_count. Also more consistent with audio path.
* doc/examples/muxing: Fixes frame initialization.Andre Anjos2014-01-091-0/+3
| | | | | | | | | | | | | 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 <[email protected]>
* examples/muxing: set timestamps in output audio packetStefano Sabatini2014-01-091-0/+7
| | | | In particular, fix trac ticket #3231.
* examples/muxing: use av_frame_free() in place of av_free()Stefano Sabatini2014-01-091-1/+1
|
* examples/muxing: reuse global audio frameStefano Sabatini2014-01-091-7/+13
| | | | Simplify logic, avoid multiple unnecessary alloc/free operations.
* examples/muxing: honour distinction between encoder PTS timebase and stream ↵Stefano Sabatini2014-01-091-1/+5
| | | | | | | | | | 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.
* examples/muxing: set sample formats from list of codec supported sample formatsStefano Sabatini2014-01-091-1/+2
| | | | | Avoid the need of tweaking, also show how to get list of supported sample formats.
* examples/muxing: fix memleaks in resamplerIlya Basin2013-12-211-12/+18
| | | | | | | - 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 <[email protected]>
* examples/muxing: use S16 sample_fmt for resample src regardless of codec ↵Ilya Basin2013-12-211-1/+1
| | | | | | | | sample_fmt We generate S16 samples and we should allocate the right buffer Signed-off-by: Michael Niedermayer <[email protected]>
* examples/muxing: fix av_frame_free() not called when got_packet is falseIlya Basin2013-12-211-1/+2
| | | | | | | 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 <[email protected]>
* Merge commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9'Michael Niedermayer2013-12-111-1/+1
| | | | | | | | | | * commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9': Replace all uses of avcodec_free_frame with av_frame_free(). Conflicts: doc/examples/decoding_encoding.c Merged-by: Michael Niedermayer <[email protected]>
* Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'Michael Niedermayer2013-11-161-2/+2
| | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* examples/muxing: add support to audio resamplingStefano Sabatini2013-07-061-28/+93
| | | | | Allows to encode to output in case the destination sample format is different from AV_SAMPLE_FMT_S16.
* examples/muxing: make more compact audio/video_time computationStefano Sabatini2013-07-031-9/+2
|
* examples/muxing: rename audio/video_pts to audio/video_timeStefano Sabatini2013-06-261-8/+8
| | | | | The new name is less confusing, since the variables represent times rather than timestamps.
* examples/muxing: remove useless instructionStefano Sabatini2013-06-261-1/+0
| | | | Simpler and less confusing.
* examples/muxing: vertically alignStefano Sabatini2013-06-251-2/+1
|
* Merge commit '9d3009c6c4b9b6734f07df7c88f6a42ded6cdf38'Michael Niedermayer2013-03-121-11/+5
| | | | | | | | | | | | | | * 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 <[email protected]>