summaryrefslogtreecommitdiff
path: root/libavdevice
Commit message (Collapse)AuthorAge
* avdevice/v4l2: fix leak of timefilterZhao Zhili2022-08-03
| | | | | | Fixes ticket #9844. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* lavd: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* 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/avdevice: fix return value of avdevice_list_devices()Marton Balint2022-07-17
| | | | | | | | | | | | | | According to API docs avdevice_list_devices(), avdevice_list_input_sources() and avdevice_list_input_sinks() should return the number of autodetected devices on success. This is redundant with AVDeviceInfoList->nb_devices so it was not noticed earlier that none of the underlying device list functions work like that. Let's fix it in generic code to make it in line with the API docs. Fixes ticket #9820. Signed-off-by: Marton Balint <cus@passwd.hu>
* Bump versions after 5.1 branchMichael Niedermayer2022-07-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump Versions for 5.1 branchMichael Niedermayer2022-07-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* av(format|device): Add const to muxer packet data pointersAndreas Rheinhardt2022-07-09
| | | | | | | The packets given to muxers need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/oss_dec: account for sample size when computing timestampMatt Jacobson2022-06-19
| | | | | | | | | Don't assume each sample is one byte in size. Doing so results in wrong and occasionally non-monotonically-increasing timestamps. Fix nearby cosmetic typo. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: deprecate frame_size optionMarton Balint2022-06-16
| | | | | | It does not do anything. Frame sizes can be controlled by using fragment_size. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: reduce default fragment sizeMarton Balint2022-06-16
| | | | | | | | | | | | | Reduces default fragment size from the pulse audio default of 2 sec to 50 ms. This also has an effect on the size of the returned frames, which will be around 50 ms as well, making timestamps more accurate. This should fix the regression in ticket #9776. Pulseaudio timestamps for monitor sources are still pretty inaccurate for me, but I don't see how else should we query latencies from the library. Signed-off-by: Marton Balint <cus@passwd.hu>
* Revert "avdevice/pulse_audio_dec: only set adjust latency flag if ↵Marton Balint2022-06-16
| | | | | | | | | | fragment_size is not set" This reverts commit 7f059a250bb7bcbf7bba537c1a059a5934413035. Apparently adjusting latency makes a difference even if fragment size is specifed. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/dshow: reuse unused variables.Diederick Niehorster2022-05-12
| | | | | | | | Fix for f125c504d8fece6420bb97767f9e72414c26312a, requested_sample_rate and such should be used. Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/v4l2*: Improve included headersAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move parser functions to a new file, demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | This file is both for the various public APIs that are demuxer-only as well as for the demuxer-only internal functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/demux: Add new demux.h headerAndreas Rheinhardt2022-05-10
| | | | | | And move those stuff already in demuxer-only files to it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Move muxing-only functions to new mux.h headerAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version: Move library version functions into files of their ownAndreas Rheinhardt2022-05-10
| | | | | | | This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/dshow: Fix dshow device name/descriptionRomain Beauxis2022-04-09
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/dshow: fix regressionDiederick Niehorster2022-03-29
| | | | | | | | | a1c4929f accidentally undid part of d9a9b4c8, so the bug in ticket #9420 resurfaced. Fixing again. Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Reviewed-by: Roger Pack <rogerdpack2@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Keep including the full version.h when headers are included externallyMartin Storsjö2022-03-19
| | | | | | | | | This avoids unnecessary churn and build breakage for users, by making sure the whole version.h is included like it has been so far, while keeping the benefit of not needing to rebuild most files in the ffmpeg tree on minor/micro bumps. Signed-off-by: Martin Storsjö <martin@martin.st>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* doc: Add an entry to APIchanges about changes to version.h and version_major.hMartin Storsjö2022-03-16
| | | | | | | | Also bump the minor versions of all libraries, to signify the API change of splitting the version.h headers and adding the new version_major.h header. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavdevice: Split version.hMartin Storsjö2022-03-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Split version.hMartin Storsjö2022-03-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avdevice/lavfi: remove call to deprecated function ↵James Almer2022-03-15
| | | | | | av_buffersink_get_channel_layout() Signed-off-by: James Almer <jamrial@gmail.com>
* sndio: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* pulseaudio: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* oss: port to new channel layout APIAnton Khirnov2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* openal: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libcdio: port to new channel layout APIAnton Khirnov2022-03-15
| | | | 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>
* jack: port to new channel layout APIAnton Khirnov2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* dshow: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* decklink: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* alsa: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec, libavdevice: Remove unnecessary includes of version.hMartin Storsjö2022-02-24
| | | | | | | | | | | | | | | xvmc.h used FF_API_* macros before, but they were removed in 1c63aed232febf4404659bf006237ee4f7f17c9c, leaving the include unused. The ones in android_camera.c and mediacodec_wrapper.c have been added due to a misunderstanding, fixed in c0bce367e4932f0fb09195e6978ac1a5a60480a4 and 13b77af2f0b56d6c87bb147947337981c21f4245. The one in mediacodec.c seems to never have been used at all. Signed-off-by: Martin Storsjö <martin@martin.st>
* Remove unnecessary libavutil/(avutil|common|internal).h inclusionsAndreas Rheinhardt2022-02-24
| | | | | | | | | | Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavd/avfoundation: Fix mixed declaration and codeThilo Borgmann2022-02-22
|
* avdevice/avfoundation: check strdupZhao Zhili2022-02-22
|
* avdevice/avfoundation: fix memleakZhao Zhili2022-02-22
|
* avdevice/decklink_(common_c|dec|enc).h: Fix checkheadersAndreas Rheinhardt2022-02-21
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavd/jack: switch to the new FIFO APIAnton Khirnov2022-02-07
|
* avdevice/iec61883: #if unused code away, fix -O0 compilationAndreas Rheinhardt2022-01-08
| | | | | | | | | | | | iec61883_parse_queue_hdv() is only called when the mpegts-demuxer is available and can be optimized away when not. Yet this optimization is not a given and it fails with e.g. GCC 11 when using -O0 in which case one will get a compilation error because the call to the unavailable avpriv_mpegts_parse_packet() is not optimized away. Therefore #if the offending code away in this case. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version.h: Bump Versions after release/5.0 branchAndreas Rheinhardt2022-01-04
| | | | | | | This is done a second time for 5.0 because master was merged into 5.0 so that it contains the recent DOVI additions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version.h: Bump Versions before release/5.0 branchAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/packet_internal: Add proper PacketList structAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | Up until now, we had a PacketList structure which is actually a PacketListEntry; a proper PacketList did not exist and all the related functions just passed pointers to pointers to the head and tail elements around. All these pointers were actually consecutive elements of their containing structs, i.e. the users already treated them as if they were a struct. So add a proper PacketList struct and rename the current PacketList to PacketListEntry; also make the functions use this structure instead of the pair of pointers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure, avcodec/Makefile: Add new mpeg4audio CONFIG_EXTRA groupAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | This group is mainly for the users of *_mpeg4audio_get_config2(); it is not for those who only use avpriv_mpeg4audio_sample_rates. This is in preparation for splitting the latter into a file of its own; if there were no CONFIG_EXTRA group for *_mpeg4audio_get_config2() users, one would have to add a dependency to the new file for all these users on top of the existing dependency on mpeg4audio.o. Adding a new CONFIG_EXTRA group only takes effect after a reconfigure; so in order to force a reconfigure some unnecessary headers from libavdevice/alldevices.c have been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/raw: Reduce number of avpriv symbolsAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libavcodec currently exports four avpriv symbols that deal with PixelFormatTags: avpriv_get_raw_pix_fmt_tags, avpriv_find_pix_fmt, avpriv_pix_fmt_bps_avi and avpriv_pix_fmt_bps_mov. The latter two are lists of PixelFormatTags, the former returns such a list and the second searches a list for a pixel format that matches a given fourcc; only one of the aforementioned three lists is ever searched. Yet for avpriv_pix_fmt_bps_avi, avpriv_pix_fmt_bps_mov and avpriv_find_pix_fmt the overhead of exporting these functions actually exceeds the size of said objects (at least for ELF; the following numbers are for x64 Ubuntu 20.10): The code size of avpriv_find_pix_fmt is small (GCC 10.2 37B, Clang 11 41B), yet exporting it adds a 20B string for the name alone to the exporting as well as to each importing library; there is more: Four bytes in the exporting libraries .gnu.hash; two bytes each for the exporting as well as each importing libraries .gnu.version; 24B in the exporting as well as each importing libraries .dynsym; 16B+24B for an entry in .plt as well as the accompanying relocation entry in .rela.plt for each importing library. The overhead for the lists is similar: The strings are 23B and the .plt+.rela.plt pair is replaced by 8B+24B for an entry in .got and a relocation entry in .rela.dyn. These lists have a size of 80 resp. 72 bytes. Yet for ff_raw_pix_fmt_tags, exporting it is advantageous compared to duplicating it into libavformat and potentially libavdevice. Therefore this commit replaces all library uses of the four symbols with a single function that is exported for shared builds. It has an enum parameter to choose the desired list besides the parameter for the fourcc. New lists can be supported with new enum values. Unfortunately, avpriv_get_raw_pix_fmt_tags could not be removed, as the fourcc2pixfmt tool uses the table of raw pix fmts. No other user of this function remains. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/dshow: ensure pin's default format is setDiederick Niehorster2022-01-04
| | | | | | | | | | | | Fixes regression in a1c4929f: there apparently are devices out there that expose a pin default format that has parameters outside the capabilities of any of the formats exposed on the pin (sic?). The VirtualCam plugin (v 2.0.5) of OBS-Studio (v 27.1.3) is such a device. Now when a default format was found, but not selected when iterating all formats, fall back to directly setting the default format. Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Reviewed-by: Roger Pack <rogerdpack2@gmail.com>