summaryrefslogtreecommitdiff
path: root/libavdevice/lavfi.c
Commit message (Collapse)AuthorAge
* avdevice/lavfi: pass forward video framerateTimo Rothenpieler2022-07-18
|
* avdevice/lavfi: output wrapped AVFramesTimo Rothenpieler2022-07-18
| | | | | | | | | | | | | This avoids an extra copy of potentially quite big video frames. Instead of copying the entire frames data into a rawvideo packet it packs the frame into a wrapped avframe packet and passes it through as-is. Unfortunately, wrapped avframes are set up to be video frames, so the audio frames continue to be copied. Additionally, this enabled passing through video frames that previously were impossible to process, like hardware frames or other special formats that couldn't be packed into a rawvideo packet.
* avdevice/lavfi: remove call to deprecated function ↵James Almer2022-03-15
| | | | | | av_buffersink_get_channel_layout() Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/lavfi: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/lavfi: Don't require AV_PIX_FMT_NONE == -1Andreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Simplify setting sample_fmtsAndreas Rheinhardt2021-12-03
| | | | | | | | | The length of this list is a compile-time constant, so there is no need to calculate it again at runtime. (This also avoids an implicit requirement of -1 == AV_SAMPLE_FMT_NONE.) Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Make array static constAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Avoid calling av_buffersink_get_* multiple timesAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Use dedicated pointer to access st->codecparAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Don't unnecessarily write '\0' to AVBPrintAndreas Rheinhardt2021-12-03
| | | | | | | | | An AVBPrint's internal string is always already zero-terminated; writing another '\0' is unnecessary as long as one treats the string only as a C-string. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Properly free an AVDictionaryAndreas Rheinhardt2021-12-03
| | | | | | | | It is not documented that freeing the last (and only) entry of an AVDictionary frees the dictionary. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Cleanup generically on read_header failureAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavd/lavfi.c: Set time_base for 608 cc to container time_base.Yun Zhang2021-08-02
| | | | Suggested-By: ffmpeg@fb.com
* avdevice: Constify all devicesAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt2021-04-27
| | | | | | | Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet: Also change av_packet_pack/unpack_dictionary to size_tAndreas Rheinhardt2021-03-19
| | | | | | | | | These are auxiliary side-data functions, so they should have been switched to size_t in d79e0fe65c51491f9bf8a470bbe36fb09f3e1280, but this has been forgotten. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* Remove double ';'Andreas Rheinhardt2021-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/lavfi: av_malloc -> av_malloc_arrayLimin Wang2020-09-21
| | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/lavfi: unref the frame on failureLimin Wang2020-09-21
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/lavfi: fix FIXME and check a/v type by codec_typeLimin Wang2020-09-21
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/lavfi: Remove redundant av_packet_unref()Andreas Rheinhardt2020-09-06
| | | | | | | | | Since bae8844e35147f92e612a9e0b44e939a293e5bc9, the AVPacket that is intended to be used to return the demuxed packet is automatically unreferenced when the demuxer returns an error. This makes an av_packet_unref() in the lavfi demuxer redundant. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/lavfi: Use av_packet_pack_dictionary() to pack dictionaryAndreas Rheinhardt2020-09-06
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/lavfi: Don't set pkt->size to the value it already hasAndreas Rheinhardt2020-09-01
| | | | | | | | | | av_new_packet() already sets the size. And if the packet is not allocated by av_new_packet() (which seems to be impossible atm), both pkt->size as well as size are 0, so setting it again is unnecessary in this scenario, too. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/lavfi: Don't reimplement av_frame_get_side_data()Andreas Rheinhardt2020-09-01
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/lavfi: Use av_packet_move_ref() for packet ownership transferAndreas Rheinhardt2020-09-01
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavdevice/lavfi: check avfilter_graph_dump return valueZhao Zhili2019-11-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack). Signed-off-by: Josh de Kock <josh@itanimul.li>
* avdevice: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436'James Almer2017-10-26
| | | | | | | * commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436': lavfi: Drop unused and empty header file Merged-by: James Almer <jamrial@gmail.com>
* lavd/lavfi: Constify two variables.Carl Eugen Hoyos2017-10-21
| | | | | | Fixes the following warnings: libavdevice/lavfi.c:136:16: warning: assignment discards 'const' qualifier from pointer target type libavdevice/lavfi.c:137:17: warning: assignment discards 'const' qualifier from pointer target type
* avdevice: do not use AVFrame accessorMuhammad Faiz2017-04-23
| | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* lavd/lavfi: use buffersink accessors.Nicolas George2017-01-12
|
* avdevice/lavfi: Do not set avg_frame_rate to the timebaseMichael Niedermayer2016-06-04
| | | | | | | Fixes regression Fixes Ticket5422 (The timebase is 1/25k but the fps are not 25k) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
| | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Update demuxers and protocols for protocol whitelist supportMichael Niedermayer2016-02-02
| | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/lavfi: replace deprecated avpicture_layoutPaul B Mahol2016-02-01
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* remove all uses of the deprecated avpicture_get_size() functionEddie Hao2016-01-17
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/lavfi: fix self assignment warningGanesh Ajjanagadde2015-08-23
| | | | | | | | | FAIL(ret) expands to statements including a silly ret=ret. This triggers a -Wself-assign on confirmed clang 3.6, and so we fix it. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Replace av_dlog with ff_dlog.Ronald S. Bultje2015-08-18
| | | | | ff_dlog checks compilability, and is non-public. av_dlog is deprecated and no longer exists if FF_API_DLOG=0.
* use avfilter_pad_get_{type,name} accessor functionsAndreas Cadhalpun2015-08-08
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avdevice/lavfi: do not rescale AV_NOPTS_VALUE in lavfi_read_packet()Michael Niedermayer2015-06-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avdevice/lavfi: Use avio_closep() to avoid leaving stale pointers in memoryMichael Niedermayer2015-01-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/lavfi: allow to extract subcc.Nicolas George2015-01-02
| | | | | Signed-off-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avdevice/lavfi: dont assign variables to themselfsMichael Niedermayer2014-09-13
| | | | | | Fixes "warning: explicitly assigning a variable of type int to itself" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avdevice/lavfi: Simplify non-AV stream checkMichael Niedermayer2014-08-07
| | | | | Fixes a clang warning Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/lavfi: work with non-mappable files for graph_file optionAndrey Utkin2014-07-23
| | | | | | | Example of non-mappable file is /dev/stdin. Previously passing it as graph_file value returned error. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil & avdevice: remove av_bprint_fd_contents()Michael Niedermayer2014-07-15
| | | | | | | | | | | | MSVC does not allow passing file pointers between libs This API can thus not work with MSVC and as it was very recently added and its it was in no release its removial should not cause any problems A better API will be implemented, but its not finished yet, this revert is to avoid potentially blocking the release Found-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avdevice/lavfi: add io.h, should fix msvc buildMichael Niedermayer2014-07-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* protect unistd.h with #if HAVE_UNISTD_H in code from recent ↵Michael Niedermayer2014-07-08
| | | | | | | | av_bprint_fd_contents() patches Should fix build failure on MSVC Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avdevice/lavfi: allow non-mmappable files for graph_fileAndrey Utkin2014-07-07
| | | | | | Use av_bprint_fd_contents() instead of av_file_map() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>