summaryrefslogtreecommitdiff
path: root/libavdevice
Commit message (Collapse)AuthorAge
* avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer2021-05-07
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.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>
* Bump major versions of all libraries.Anton Khirnov2021-04-27
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/avdevice: Constify av_*_device_next APIAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/avdevice: Constify avdevice_list_input_sources/output_sinksAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/codec, allcodecs: Constify the AVCodec APIAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.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: Remove deprecated AVCodecContext.coded_frameAndreas Rheinhardt2021-04-27
| | | | | | | | | | Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370. (The currently disabled filter vf_mcdeint and vf_uspp were users of this field; they have not been changed, so that whoever wants to fix them can see the state of these filters when they were disabled.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify the API wrt AV(In|Out)putFormatAndreas Rheinhardt2021-04-27
| | | | | | | Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libavdevice/gdigrab: fix capture of windows with non-ASCII titlesHe Yang2021-04-13
| | | | | | | Properly convert the UTF-8 input string to Windows wchar, and utilize the wchar version of FindWindow. Signed-off-by: He Yang <1160386205@qq.com>
* Bump minor versions after release branchMichael Niedermayer2021-03-20
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump Versions before release/4.4 branchMichael Niedermayer2021-03-20
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* 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>
* avdevice/xcbgrab: stop using av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_dec: stop using av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet_internal: make avpriv_packet_list_* functions use an internal ↵James Almer2021-03-17
| | | | | | | | | struct The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front. Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/xcbgrab: Add option for grabbing a windowsgerwk2021-03-14
| | | | | | | | The option allows to select a specific window instead of the whole screen. Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avdevice/pulse_audio_dec: do not read undersized framesMarton Balint2021-03-12
| | | | | | | | | | | Keep on reading fragments until we got fragment_size amount of data, otherwise we might get frames with 1-2 samples only if pa_stream_peek is called slightly less frequently than sample rate. Note that fragments might contain a lot less data than fragment_size, so reading multiple fragments to get fragment_size amount of data is intentional. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is ↵Marton Balint2021-03-12
| | | | | | | | not set Otherwise fragment_size is ignored. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: query actual fragment sizeMarton Balint2021-03-12
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/alsa_dec: make sure we have enough data in non-blocking modeMarton Balint2021-03-12
| | | | | | | Otherwise we might return 1-2 samples per packet if av_read_frame() call rate is only sligthly less than the stream sample rate. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: add missing include for buffer_size_tJames Almer2021-03-11
| | | | | | | Should fix compilation broken in f7abb53cb427515faac582f114ab97cbbd590280. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice: use the buffer_size_t typedef where requiredJames Almer2021-03-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Remove double ';'Andreas Rheinhardt2021-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice: use av_gettime_relative() for elapsed time calculationsMarton Balint2021-02-27
| | | | | | | | | | av_gettime_relative() is using the monotonic clock therefore more suitable for elapsed time calculations. Packet timestamps are still kept absolute, although that should be configurable in the future. Related to ticket #9089. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/timefilter: remove obsolete comments from the docsMarton Balint2021-02-27
| | | | | | Also rename the parameters of the function to match with the implementation. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/avdevice: Deprecate AVDevice Capabilities APIAndreas Rheinhardt2021-02-14
| | | | | | | | | | | | | | It has been added in 6db42a2b6b22e6f1928fafcf3faa67ed78201004, yet since then none of the necessary create/free_device_capabilities functions has been implemented, making this API completely useless. Because of this one can already simplify avdevice_capabilities_free/create and can already remove the function pointers at the next major bump; given that the documentation explicitly states that av_device_capabilities is not to be used by a user, it's options can already be removed (save for the sentinel). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/xcbgrab: don't assume xserver endiannessAndriy Gelman2021-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xserver defines the endianness of the grabbed images. Use this information to set the correct pixel format. This also fixes format selection in configuration depth=32/bpp=32 with xserver on a little endian machine. Before the patch, the big endian layout 0RGB was always selected which is incorrect because BGR0 should be used. RGB24 was also incorrectly assumed (but this format was removed in xserver 1.20). The big-endian settings can be tested using docker+qemu from a little-endian machine: $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes $ docker run --rm -it -v /tmp:/tmp powerpc64/debian /bin/bash In docker container $ apt-get update $ apt-get install xvfb $ apt-get install x11-apps To test AV_PIX_FMT_0RGB32 $ Xvfb :2 -screen 0 720x480x24 & $ export DISPLAY=:2 $ xclock -geometry 720x480 -bg green #test different colors On your host machine grab the frames using the following command. View output to check that colors are rendered correctly $ ./ffmpeg -y -f x11grab -i :2.0 -codec:v mpeg2video out.mp4 Other pixel formats can be tested by modifying how Xvfb is started in the docker container: AV_PIX_FMT_RGB565 $ Xvfb :2 -screen 0 720x480x16 AV_PIX_FMT_RGB555 $ Xvfb :2 -screen 0 720x480x15 AV_PIX_FMT_BGR24 / AV_PIX_FMT_RGB24 This is difficult to test because bpp=24 support was removed in xserver 1.20 https://lists.x.org/archives/xorg-devel/2018-February/056175.html?hmsr=joyk.com&utm_source=joyk.com&utm_medium=referral However, I was able to run previous version of Xvfb (with some modifications to force 24bpp) to check that images are rendered correctly. Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avdevice/dshow: Add namespace prefix to the remaining global symbolsJames Almer2021-01-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavd/dshow: Add namespace prefix to global functionsMark Thompson2021-01-21
|
* kmsgrab: Do not require the modifier to stay constant.Bas Nieuwenhuizen2021-01-13
| | | | | | | | | | As we get a new set of objects each frame anyway, we do not gain anything by keeping the modifier constant. This helps with capturing when switching your setup a bit, e.g. from ingame to desktop or from X11 to wayland. Signed-off-by: Mark Thompson <sw@jkqxz.net>
* kmsgrab: Use invalid modifier if modifiers weren't used.Bas Nieuwenhuizen2021-01-13
| | | | | | | | | | | | The kernel defaults to initializing the field to 0 when modifiers are not used and this happens to be linear. If we end up actually passing the modifier to a driver, tiling issues happen. So if the kernel doesn't return a modifier set it explicitly to INVALID. That way later processing knows there is no explicit modifier. Signed-off-by: Mark Thompson <sw@jkqxz.net>
* avdevice/decklink_dec: mark get_frame_timecode and get_bmd_timecode staticChristopher Degawa2021-01-09
| | | | | | | | | | | The function is not used anywhere else and is causing mingw-w64 clang builds to fail with ffmpeg-git/libavdevice/decklink_dec.cpp:792:5: error: no previous prototype for function 'get_bmd_timecode' [-Werror,-Wmissing-prototypes] int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame) Signed-off-by: Christopher Degawa <ccom@randomderp.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* lavd/decklink_dec: Do not set codec_tags.Carl Eugen Hoyos2020-12-24
| | | | | | | | Only set the pix_fmt for rawvideo. Fixes ticket #9005. Reviewed-by: Marton Balint
* lavd/caca: do not access deprecated codec contextAnton Khirnov2020-12-10
| | | | Use the stream timebase instead.
* avdevice/decklink: remove the duplicated warning messageLimin Wang2020-12-05
| | | | | | | | | | | ./ffmpeg -list_devices true -f decklink -i dummy [Blackmagic DeckLink indev @ 0x2f96d00] The "list_devices" option is deprecated: list available devices [decklink @ 0x2f96400] The -list_devices option is deprecated and will be removed. Please use ffmpeg -sources decklink instead. -> [Blackmagic DeckLink indev @ 0x306ed00] The "list_devices" option is deprecated: use ffmpeg -sources decklink instead Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink: warn about too old decklink API versionMarton Balint2020-12-03
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_enc: simplify usage of buffercount typeMarton Balint2020-12-03
| | | | | | Also remove some leftover declaration of CreateDeckLinkIteratorInstance(). Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: add support for 50/60 fps timecodeMarton Balint2020-12-03
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: fix warning for unused variableLimin Wang2020-11-23
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink: add AV_OPT_FLAG_DEPRECATED flag for list_devicesLimin Wang2020-11-23
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink: use boolean for list_devices optionLimin Wang2020-11-23
| | | | | | | For the document(indevs.texi and outdevs.texi) used it as boolean. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink_dec: map the raw_format instead of hardcodeLimin Wang2020-11-21
| | | | | | | | The patch will change the numerical values for the string constants so bump micro version. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/xcbgrab: Add select_region optionOmar Emara2020-11-06
| | | | | | | | | | | | | | | | | | | | This patch adds a select_region option to the xcbgrab input device. If set to 1, the user will be prompted to select the grabbing area graphically by clicking and dragging. A rectangle will be drawn to mark the grabbing area. A single click with no dragging will select the whole screen. The option overwrites the video_size, grab_x, and grab_y options if set by the user. For testing, just set the select_region option as follows: ffmpeg -f x11grab -select_region 1 -i :0.0 output.mp4 The drawing happens directly on the root window using standard rubber banding techniques, so it is very efficient and doesn't depend on any X extensions or compositors. Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Omar Emara <mail@OmarEmara.dev>
* avdevice/alldevices: stop using deprecated linked list APIJames Almer2020-10-19
| | | | Signed-off-by: James Almer <jamrial@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/decklink_dec: fix build with older SDKMarton Balint2020-09-15
| | | | | | | | | Apparently bmdFormatUnspecified needs SDK 11.0. It is just a fancy way of checking for zero, so let's do that instead. Fixes build issue since f1b908d20a8. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: add support for querying RP188 High Frame Rate timecodeMarton Balint2020-09-13
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>