Jun Zhao
3497362be1
doc/examples/muxing: Remove unnecessary ret
...
Remove unnecessary ret and make the code more compact
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-10-29 12:26:30 +08:00
Andreas Rheinhardt
23cb87bb3c
doc/examples/muxing: Remove outdated comment
...
This comment only applies to the scenario in which one uses
the AVCodecContexts embedded in AVStreams. Yet this code sample
stopped doing so in 9897d9f4e074cdc6c7f2409885ddefe300f18dc7;
and the last major version bump even removed the public
AVCodecContexts in AVStreams. So just remove this comment.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-25 19:22:55 +01:00
James Almer
f5ef91e020
doc/examples: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:47 -03:00
Andreas Rheinhardt
0230d125cb
examples/muxing: Don't use stack packet
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-03 20:50:49 +02:00
Andreas Rheinhardt
8a23159797
fftools/ffmpeg, doc/examples: Remove redundant av_packet_unref
...
av_interleaved_write_frame() already returns blank packets.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-03 20:50:49 +02:00
James Almer
ae0863b91d
examples/muxing: add missing header
...
Fixed compilation broken by e67e02d156
.
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 21:19:39 -03:00
Andreas Rheinhardt
626535f6a1
avcodec/codec, allcodecs: Constify the AVCodec API
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:14 -03:00
Andreas Rheinhardt
56450a0ee4
avformat: Constify the API wrt AV(In|Out)putFormat
...
Also constify AVProbeData.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:08 -03:00
Jun Zhao
ef868fa4a1
examples/muxing: misc style fixes
...
misc style fixes.
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-09-28 09:11:21 +08:00
Anton Khirnov
f30a41a608
Stop hardcoding align=32 in av_frame_get_buffer() calls.
...
Use 0, which selects the alignment automatically.
2020-05-22 14:38:57 +02:00
Anton Khirnov
d8de9d46f2
doc/examples/muxing: convert to new encoding API
2020-05-12 09:37:47 +02:00
Paul B Mahol
4a51075f4d
doc/examples/muxing: fix underflow in duration of encoded streams
...
Now they are exactly 10 seconds long.
Fixes #5684 .
2019-09-29 20:41:29 +02:00
Mark Thompson
10bcc41bb4
examples: Don't call deprecated functions which don't do anything
2018-02-09 21:38:42 +00: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
Matthieu Bouron
7e3e0f87e6
doc/examples/muxing: re-indent block
2017-03-28 12:41:46 +02: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
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
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
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
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
Michael Niedermayer
444e9874a7
Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
...
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
lavc: AV-prefix all codec capabilities
Conflicts:
cmdutils.c
ffmpeg.c
ffplay.c
libavcodec/8svx.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/adpcm.c
libavcodec/alac.c
libavcodec/atrac3plusdec.c
libavcodec/bink.c
libavcodec/dnxhddec.c
libavcodec/dvdec.c
libavcodec/dvenc.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/fic.c
libavcodec/flacdec.c
libavcodec/flacenc.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/hevc.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopenjpegdec.c
libavcodec/libvo-aacenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpegaudiodec_float.c
libavcodec/msmpeg4dec.c
libavcodec/mxpegdec.c
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
libavcodec/pngdec.c
libavcodec/qpeg.c
libavcodec/ra288.c
libavcodec/rv10.c
libavcodec/s302m.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tiff.c
libavcodec/tta.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/vp9.c
libavcodec/wavpack.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Michael Niedermayer
94d68a41fa
Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
...
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
lavc: AV-prefix all codec flags
Conflicts:
doc/examples/muxing.c
ffmpeg.c
ffmpeg_opt.c
ffplay.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/ac3enc_float.c
libavcodec/atrac1.c
libavcodec/atrac3.c
libavcodec/atrac3plusdec.c
libavcodec/dcadec.c
libavcodec/ffv1enc.c
libavcodec/h264.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mb.c
libavcodec/imc.c
libavcodec/libmp3lame.c
libavcodec/libtheoraenc.c
libavcodec/libtwolame.c
libavcodec/libvpxenc.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpegaudiodec_template.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/nellymoserdec.c
libavcodec/nellymoserenc.c
libavcodec/nvenc.c
libavcodec/on2avc.c
libavcodec/options_table.h
libavcodec/opus_celt.c
libavcodec/pngenc.c
libavcodec/ra288.c
libavcodec/ratecontrol.c
libavcodec/twinvq.c
libavcodec/vc1_block.c
libavcodec/vc1_loopfilter.c
libavcodec/vc1_mc.c
libavcodec/vc1dec.c
libavcodec/vorbisdec.c
libavcodec/vp3.c
libavcodec/wma.c
libavcodec/wmaprodec.c
libavcodec/x86/hpeldsp_init.c
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02: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
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
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
Michael Niedermayer
5a55d5e445
Merge commit '63fd0d866c8300a8f251a15b1535e9ce40a407fb'
...
* commit '63fd0d866c8300a8f251a15b1535e9ce40a407fb':
output example: allocate the audio frame only once
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 23:22:08 +02:00
Michael Niedermayer
b9bfd888e5
Merge commit 'edd5f957646dcbf1bb55718bc7bf1e5481c25bcb'
...
* commit 'edd5f957646dcbf1bb55718bc7bf1e5481c25bcb':
output example: use OutputStream for audio streams as well
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 23:01:52 +02:00
Michael Niedermayer
11991a7d90
Merge commit '5e7b125b6ae36893dfd9cb5661c99b67363cbb38'
...
* commit '5e7b125b6ae36893dfd9cb5661c99b67363cbb38':
output example: use the new AVFrame API to allocate audio frames
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 22:46:11 +02:00
Michael Niedermayer
a1c4635558
Merge commit 'ac85f631c9a9cc59aaca1c8dd6894fb1f701c594'
...
* commit 'ac85f631c9a9cc59aaca1c8dd6894fb1f701c594':
output example: set output channel layout
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 22:13:46 +02:00
Michael Niedermayer
8eb1174a9e
Merge commit '294daf71a7a1303b5ddd3cbefebed3b732d610f3'
...
* commit '294daf71a7a1303b5ddd3cbefebed3b732d610f3':
output example: use a struct to bundle the video stream variables together
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 21:55:11 +02:00
Michael Niedermayer
c9083d85df
Merge commit '38d044429dabcd28928693240e955c6d4430cca9'
...
* commit '38d044429dabcd28928693240e955c6d4430cca9':
output example: use the new AVFrame API for allocating the video frame
Conflicts:
doc/examples/muxing.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 21:30:37 +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
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
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
Stefano Sabatini
35fe88bb51
examples/muxing: reindent after previous commit
2014-01-23 01:08:24 +01:00