James Almer
f5ef91e020
doc/examples: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
James Almer
3191bb5c35
examples/demuxing_decoding: add missing header
...
Fixed compilation broken by e67e02d156
.
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Andreas Rheinhardt
933308a290
doc/examples/demuxing_decoding: Remove unused options
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
4 years ago
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>
4 years ago
James Almer
07b788c8af
doc/examples/demuxing_decoding: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Anton Khirnov
3bfe20389d
doc/examples/demuxing_decoding: convert to new decoding API
5 years ago
Anton Khirnov
e4edf220e5
doc/examples/demuxing_decoding: drop -refcount
...
Non-refcounted frames are deprecated and there is no good reason to use
them.
5 years ago
Mark Thompson
10bcc41bb4
examples: Don't call deprecated functions which don't do anything
7 years ago
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>
8 years ago
James Almer
bba6a03b28
examples/demuxing_decoding: convert to codecpar
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Hendrik Leppkes
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
9 years ago
Clément Bœsch
d9464e9c14
doc/examples/demuxing_decoding: simplify api_mode to refcount
...
This finalizes the quick cleanup of a753e6c9f5
.
9 years ago
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>
9 years ago
Andreas Cadhalpun
dd6c8575db
examples/demuxing_decoding: use properties from frame instead of video_dec_ctx
...
This is more robust.
And only check if there is actually a frame returned.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
10 years ago
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>
10 years ago
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>
10 years ago
compn
84bccae8e9
doc: fix typo
11 years ago
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>
11 years ago
Clément Bœsch
b02d87936b
examples/demuxing_decoding: print the decoding error when it happens.
11 years ago
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>
11 years ago
Stefano Sabatini
50a28b1393
doc/examples: do not check NULL values for avcodec_close()
...
avcodec_close() does nothing in case the argument is NULL. Simplify.
11 years ago
Clément Bœsch
fb10b43fc4
doc/examples: rename demuxing to demuxing_decoding.
...
That example shows how the decoding process works, not only the
demuxing.
11 years ago
Clément Bœsch
d10b1a200d
doc/examples/demuxing: show how to use the reference counting system.
11 years ago
Clément Bœsch
0c6bb53bb2
doc/examples/demuxing: reset got_frame.
...
Fix infinite loop at flushing.
11 years ago
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.
12 years ago
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.
12 years ago
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.
12 years ago
Michael Niedermayer
5ade6bfb03
doc/examples/demuxing: use AVFrame accessor functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Angelo Haller
e7a39e163d
examples/demuxing: free AVPacket after usage
...
Fix leak.
12 years ago
Michael Niedermayer
48a7981e6f
doc/examples: fix assignments in if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
e8c0b6710c
examples/muxing: fix typo: allocated -> allocate
12 years ago
Stefano Sabatini
7f6f8f642c
examples/demuxing: fix braino
...
s/video/audio/ in a log message.
12 years ago
Stefano Sabatini
794cea588c
examples/demuxing: dump input information *after* trying to open audio stream
...
Implement more logical code flow.
12 years ago
Michael Niedermayer
ca28cb5f83
examples: fix doxy so they appear on the example page
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
2fe8fd3948
examples/demuxing: add audio decoding/demuxing
12 years ago
Stefano Sabatini
c8ef309379
examples: add demuxing.c example
12 years ago