1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00
Commit Graph

1749 Commits

Author SHA1 Message Date
James Almer
b478037423 avdevice/lavfi: stop setting deprecated buffersink options
Signed-off-by: James Almer <jamrial@gmail.com>
2025-11-13 21:02:10 -03:00
Michael Niedermayer
638b521c7b Bump versions for master after release/8.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-09 18:03:05 +02:00
Michael Niedermayer
7eaa0f799a Bump versions for release/8.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-09 17:30:39 +02:00
Timo Rothenpieler
262d41c804 all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
wangbin
7b13d17b6d avdevice/android_camera: Set image linesize aligment to 1
Can't read alignment from packet, codecpar or decoded frame linesizes, so don't
set it. My test device redmi k60 produces images in 4624x3472, not 32 aligned

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-07-18 10:37:53 +08:00
Clément Péron
90424a4475 various: fix typos
usefull -> useful
seperately -> separately
reciever -> receiver

Signed-off-by: Clément Péron <peron.clem@gmail.com>
2025-06-15 21:00:38 +05:30
Leo Izen
5fea5e3e11 configure: rename POSIX ioctl check
Commit 00b64fca55 introduced configure
detection for HAVE_POSIX_IOCTL but unfortunately this conflicts with
v4l-utils version 1.30, which itself checks for #ifdef HAVE_POSIX_IOCTL
in a public header and erroneously determines it to be true because we
define this to be 0.

Since this is only used for avdevice/v4l2, we rename this to something
else, namely ioctl_posix, simply to prevent the name conflict with the
file /usr/include/libv4l2.h at least until they can upstream a fix on
their end.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-06-08 19:42:56 -04:00
Martin Storsjö
69bab4e74f avfoundation: Fix compilation for OSes other than macOS and iOS
E.g. tvOS doesn't have devicesWithMediaType.

In principle, we could probably disable building the whole
input device on such OSes, but that would either require
testing explicitly for the OS type in configure (which we don't
do anywhere so far), or test for individual objective C methods.

This approach allows the code to compile, but no input devices
will be found at runtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-04-04 17:12:33 +03:00
James Almer
b338d1b35b libs: bump major version for all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:44:34 -03:00
James Almer
ebd6d07ab9 avutil: remove deprecated FF_API_FRAME_PKT
Deprecated since 2023-03-20.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:08 -03:00
James Almer
c153238275 avformat: remove deprecated FF_API_ALLOW_FLUSH
Deprecated since 2023-10-02.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:07 -03:00
James Almer
8a7ce397bc avdevice/version_major: postpone some deprecations until the next bump
They are too recent.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:07 -03:00
James Almer
17b31065f0 avdevice: remove deprecated FF_API_SDL2_DEVICE
Deprecated since 2024-02-28.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:07 -03:00
James Almer
9283c5251f avdevice: remove deprecated FF_API_OPENGL_DEVICE
Deprecated since 2024-02-28.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:07 -03:00
James Almer
a5064a72ff avdevice: remove deprecated FF_API_BKTR_DEVICE
Deprecated since 2024-02-02.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:33:07 -03:00
Andreas Rheinhardt
e5d62e20c8 avdevice/sdl2: Suppress macro redefinition warning
SDL2's headers #define HAVE_PTHREAD_SETNAME_NP (to one here);
we also have a config define which leads the compiler to
warn about this when the values are distinct (as they are here).
Suppress this warning by including config.h before SDL.h.
The latter will then redefine our define which doesn't matter
and which does not lead to warnings because compilers don't warn
about system headers by default (depending upon -Wsystem-headers).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-03-21 04:30:09 +01:00
James Almer
eb3d507b7f avdevice/alsa: simplify passing ff_alsa_open a channel layout
This also ensures the layout set during the indev init is used instead of the
blank one in st->codecpar.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-12 18:49:07 -03:00
James Almer
c6194b50b1 avdevice/alsa_dec: add a ch_layout option
Missed in ffc4fd3cc2, which after
e78173557d broke setting channel count.

Should fix ticket #11434.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-01 01:12:17 -03:00
Ramiro Polla
d2ed52dc02 avdevice/dshow: fix unused variable warning
The acaps variable was used outside of the #if DSHOWDEBUG block with
a1c4929f, but it is no longer used outside of the block since f125c504.
2024-10-17 13:04:17 +02:00
Anton Khirnov
461a359abc lavf: add a header for generic-layer interfaces
Analogous to what was previously done in avcodec and avfilter.
2024-10-16 16:29:12 +02:00
Marvin Scholz
8e76c99301 avdevice/decklink_dec: fix leaks on error
In case of errors in this function, the allocated context
was not properly freed in several cases.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-29 10:12:41 +02:00
Marvin Scholz
7554346cb5 avdevice/decklink_dec: fix leak on error
In the early return when both draw_bars and signal_loss_action
options are used, the context allocated previously was not
properly freed.

Introduced in 9bcb86b0fa

Fixes CID1619296

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-29 10:12:41 +02:00
Anton Khirnov
d3f76dbca1 lavd/lavfi: stop using avfilter_graph_create_filter() incorrectly
See previous commits for details.
2024-09-28 17:04:33 +02:00
Marvin Scholz
399bf3f040 avdevice/avfoundation: remove write-only variable
The block_buffer was only ever written to but then never used in the
following code, making it unnecessary.

Fixes a "variable 'block_buffer' set but not used" compiler warning.
2024-09-26 00:17:24 +02:00
Michael Niedermayer
38e224c2ba */version.h: bump after release/7.1 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:10:35 +02:00
Michael Niedermayer
e1094ac45d */version.h: bump minor versions for release/7.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:07:30 +02:00
Marvin Scholz
0c84b977a9 avdevice/jack: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:30:48 +02:00
Michael Riedl
9bcb86b0fa avdevice/decklink_dec: extend available actions on signal loss
Deprecate the option 'draw_bars' in favor of the new option 'signal_loss_action',
which controls the behavior when the input signal is not available
(including the behavior previously available through draw_bars).
The default behavior remains unchanged to be backwards compatible.
The new option is more flexible for extending now and in the future.

The new value 'repeat' repeats the last video frame.
This is useful for very short dropouts and was not available before.

Signed-off-by: Michael Riedl <michael.riedl@nativewaves.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-09 23:47:49 +02:00
Ramiro Polla
00b64fca55 configure: improve check for POSIX ioctl
Instead of relying on system #ifdefs which may or may not be correct,
detect the POSIX ioctl signature at configure time.
2024-09-01 18:01:43 +02:00
eaphone
7897b0beed libavdevice/gdigrab: change hwnd tail check fail logic to !=null
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-08-15 20:10:33 +08:00
Michael Niedermayer
43cde54fc1 avdevice/dshow: Initialize 2 pointers
Coverity claims these are used uninitilaized in CID1598561 Uninitialized pointer write and CID1598565 Uninitialized pointer write

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-11 13:21:16 +02:00
Jens Frederich
60b1750134 avdevice/dshow: Don't skip audio devices if no video device is present
The search of the current DirectShow device list has been customized so
that audio devices are always found even if no video device is connected.

Signed-off-by: Jens Frederich <jens.frederich@vector.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-24 14:45:20 +02:00
Michael Niedermayer
348968e9f7 avdevice/dshow_capture: Fix error handling in ff_dshow_##prefix##_Create()
Untested, needs review

Fixes: CID1591856 Resource leak
Fixes: CID1591887 Resource leak
Fixes: CID1591874 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-15 01:59:40 +02:00
Michael Niedermayer
989e11acb6 avdevice/dshow: Remove NULL check on pin
The pointer is used before the check

Fixes: CID1591884 Dereference before null check

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-15 01:59:39 +02:00
Michael Niedermayer
2c2e727088 avdevice/dshow: check ff_dshow_pin_ConnectionMediaType() for failure
Maybe Fixes: CID1598557 Explicit null dereferenced

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-15 01:59:38 +02:00
Michael Niedermayer
175c191668 avdevice/dshow: Check device_filter_unique_name before use
Fixes: CID1591931 Explicit null dereferenced

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-15 01:59:38 +02:00
Michael Niedermayer
25f9211bdd avdevice/dshow: Cleanup also on av_log case
Fixes: CID1598550 Resource leak

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-15 01:59:38 +02:00
Michael Niedermayer
daf61dddc8 avdevice/dshow_filter: Use wcscpy_s()
Fixes: CID1591929 Copy into fixed size buffer

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-15 01:59:37 +02:00
Alexander Strasser
36aee69f0d libavdevice: Improve example in deprecation message for opengl and sdl
When piping ffmpeg into ffplay both programs write a status line in
the terminal. That causes flickering and invisibility of one or the
other status line.

As compromise set ffplay log level to warning, so it doesn't show
the status line.

The user is usually testing ffmpeg command lines and want's a
preview of the result. This way the user can see the ffmpeg output
and still see errors and warnings from ffplay, should they occur.

Additionally set PTS to zero in ffplay to lessen the delay until
the frames are displayed. Without it delay is quite observable
when e.g. live capturing with low frame rates.
2024-07-14 13:31:03 +02:00
Ramiro Polla
7eb37c142a avdevice/v4l2: add limited support for multiplanar API
This commit adds support for V4L2's multiplanar API, but only when the
number of planes is 1.

Adding full support for the multiplanar API would require a device that
actually uses more than 1 plane, which I have not found yet.
2024-07-04 11:09:53 +02:00
Michael Niedermayer
4c285bb278 avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure
Fixes: CID1591939 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-02 21:57:22 +02:00
Ramiro Polla
cc6fb1643d avdevice/v4l2: add NV16 and NV24 pixel formats 2024-07-01 13:43:07 +02:00
Theo Fabi
d6d14b3a15 avdevice/avfoundation: add external video devices
Video devices categorized by AVFoundation as
'AVCaptureDeviceTypeExternal(Unknown)' (like USB video streams) were not
recognized by libavdevice.

Signed-off-by: Theo Fabi <fabi.theo@gmail.com>
2024-06-20 18:52:06 +02:00
Michael Niedermayer
78d6d13bab avdevice/xcbgrab: Check sscanf() return
Alot more input checking can be performed, this is only checking the obvious missing case

Fixes: CID1598562 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-06-12 00:39:11 +02:00
Rémi Denis-Courmont
378d1b06c3 riscv: probe for Zbb extension at load time
Due to hysterical raisins, most RISC-V Linux distributions target a
RV64GC baseline excluding the Bit-manipulation ISA extensions, most
notably:
- Zba: address generation extension and
- Zbb: basic bit manipulation extension.
Most CPUs that would make sense to run FFmpeg on support Zba and Zbb
(including the current FATE runner), so it makes sense to optimise for
them. In fact a large chunk of existing assembler optimisations relies
on Zba and/or Zbb.

Since we cannot patch shared library code, the next best thing is to
carry a flag initialised at load-time and check it on need basis.
This results in 3 instructions overhead on isolated use, e.g.:
1:  AUIPC rd, %pcrel_hi(ff_rv_zbb_supported)
    LBU   rd, %pcrel_lo(1b)(rd)
    BEQZ  rd, non_Zbb_fallback_code
    // Zbb code here

The C compiler will typically load the flag ahead of time to reducing
latency, and can also keep it around if Zbb is used multiple times in a
single optimisation scope. For this to work, the flag symbol must be
hidden; otherwise the optimisation degrades with a GOT look-up to
support interposition:
1:  AUIPC rd, GOT_OFFSET_HI
    LD    rd, GOT_OFFSET_LO(rd)
    LBU   rd, (rd)
    BEQZ  rd, non_Zbb_fallback_code
    // Zbb code here

This patch adds code to provision the flag in libraries using bit
manipulation functions from libavutil: byte-swap, bit-weight and
counting leading or trailing zeroes.
2024-06-11 20:12:37 +03:00
Michael Niedermayer
6f52b64bcc avdevice/pulse_audio_enc: Use av_rescale() to avoid integer overflow
Fixes: CID1503075 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-06-01 18:01:05 +02:00
Michael Niedermayer
c4004605b2 avdevice/dshow: fix badly indented line
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-28 03:48:04 +02:00
Brad Smith
9e674b3160 lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's
The proper type was used until 73251678c8.

This covers all of the OS's that currently have V4L2 support, permutations
of Linux glibc/musl, Android bionic, FreeBSD, NetBSD, OpenBSD, Solaris.

Copied from FreeBSD ports patch.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-05-08 21:33:32 +02:00
Andreas Rheinhardt
790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt
b616be1649 lib*/version: Use static_assert for static asserts
Also update the checks that guard against inserting
a new enum entry in the middle of a range.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:42 +01:00