Commit Graph

1452 Commits

Author SHA1 Message Date
Marton Balint 2a118a71cf avdevice/opengl: add support of wrapped avframe codec
Also change the default to that.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-04-16 23:52:12 +02:00
Marton Balint e4ce40d25b avdevice/xv: add support of wrapped avframe codec
Also change the default to that.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-04-16 23:52:12 +02:00
Marton Balint f04fe8aa4e avdevice/decklink_dec: increase autodetect timeout to 3 sec
1 sec might not be enough for the cards to detect the format...

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-04-04 22:28:05 +02:00
Paul B Mahol d64cbd4fda remove CHAR_MIN/CHAR_MAX usage
It is not needed at all.
2020-03-17 22:46:36 +01:00
Thilo Borgmann 39fbd06314 lavd/avfoundation: Add basic transport control observation for capable devices. 2020-03-16 10:26:03 +01:00
Marton Balint f32f9231dd avdevice/decklink: add support for SDK version 11.5
Fixes ticket #8534.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-26 21:32:56 +01:00
Marton Balint 95324ecf23 avdevice/decklink_dec: fix stopping streams in read_close
The capture_started variable was never set, it is simpler to call the stop
functions unconditionally if the interface is available.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-26 21:32:56 +01:00
Nicolas George 26ae9c9f8a lavd/opengl_enc: check strings before parsing them.
Fix a segfault if OpenGL was not initialized before calling
write_header().
2020-02-20 14:37:11 +01:00
Nicolas George fbb36d74ac lavd/opengl_enc: use proper context for logging.
Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].
2020-02-20 14:27:11 +01:00
Thilo Borgmann 2ca14d84ee lavd/avfoundation.m: Add an option to drop late frames.
Retains current behaviour by the default value.
2020-02-07 11:09:20 +01:00
Marton Balint e931119a41 avdevice/xcbgrab: check if frame size fits in INT_MAX
Also fixes a possible overflow and sets stream bitrate.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-24 01:17:14 +01:00
Marton Balint b7e94adb4e avdevice/xcbgrab: move some initialization code from pixfmt_from_pixmap_format to create_stream
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-24 01:17:14 +01:00
Carl Eugen Hoyos 96fab29e96 Silence "string-plus-int" warning shown by clang.
libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
2020-01-06 22:38:56 +01:00
Marton Balint 944203270d avdevice/decklink: deprecate the -list_devices option
The user should use ffmpeg -sources decklink or ffmpeg -sinks decklink instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 18:13:22 +01:00
Marton Balint 2b7097ef27 avdevice/decklink_dec: remove -bm_v210 option
Deprecated since Sep 28, 2017.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 18:13:22 +01:00
Marton Balint 78a233e6e9 avdevice/decklink_dec: remove the @mode syntax
Deprecated since March 28, 2017.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 18:13:22 +01:00
Marton Balint f1353ce222 avdevice/xcbgrab: capture the full desktop if video_size is not specified
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-30 23:32:27 +01:00
Marton Balint f6845269c6 avdevice/xcbgrab: fix packet timestamps
Since 648b8cca6c and
c991e9cd91 timestamps were not set properly.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-30 21:09:24 +01:00
Marton Balint c991e9cd91 avdevice/xcbgrab: use a buffer pool for shared memory segments
Also by wrapping the SHM buffer in an AVBufferRef we eliminate yet another
possible memcpy improving performance.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-26 00:47:24 +01:00
Marton Balint 648b8cca6c avdevice/xcbgrab: wrap non-shm image replies in a buffer ref
This avoids a memcpy improving performance if SHM is not used.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-06 10:09:49 +01:00
Kusanagi Kouichi 12bbfc4cca avdevice/xcbgrab: Handle reply and error properly
Fix a NULL dereference and leaks.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-03 21:13:00 +01:00
Zhao Zhili 19956d01cc libavdevice/lavfi: check avfilter_graph_dump return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-29 19:58:35 +01:00
Gyan Doshi d831edc387 avdevice/decklink: add option to drop frames till timecode is seen
Option wait_for_tc only takes effect if tc_format is set
2019-11-18 10:01:03 +05:30
Andriy Gelman 7b2ce27e56 avdevice/v4l2: Remove av_assert0 when format not supported
Before this commit an av_assert0 would fail if a v4l2 device did not
support a target format.
For example,
./ffmpeg -f v4l2 -codec:v h264 -i /dev/video0 -f mpegts -
would signal an abort if /dev/video0 did not support h264.

The new behaviour is to return an AVERROR(EINVAL) error code. An
av_assert0 has been added to verify this return.

Fixes #6629

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-06 20:38:03 +01:00
Jun Zhao 3aeb681f07 libavdevice: Update the class name as uniform style
Update the class name to uniform indev/outdev style.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-08-15 09:29:55 +08:00
Stephan Hilb b761ae072a lavd/v4l2: produce a 0 byte packet when a dequeued buffer's size is unexpected
Behave like we do for V4L2_BUF_FLAG_ERROR, implemented in commit 28f20d2ff4 .

For some devices (probably also related to the V4L driver implementation)
it happens that when invoking the ioctl DQBUF, the returned buffer is not
of the expected size. Here are two examples for such occurrences:

    [video4linux2,v4l2 @ 0x258b440] Dequeued v4l2 buffer contains 609596 bytes, but 614400 were expected. Flags: 0x00000001.
    /dev/video1: Invalid data found when processing input

    [video4linux2,v4l2 @ 0x225f440] Dequeued v4l2 buffer contains 609508 bytes, but 614400 were expected. Flags: 0x00000001.
    /dev/video1: Invalid data found when processing input

For the ffmpeg CLI tool this means it will stop capturing and exit.

The described behaviour was observed at least with one OmniVision USB
web cam and with some stk1160 devices.

If you search the web for the error message, you will find quite a few
instances of this problem. Some of them experienced on other devices.

Probably fixes ticket #4795

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2019-07-30 12:05:52 +02:00
Michael Niedermayer 80bb65fafa Bump minor versions again on master to keep 4.2 versions separate from master
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-07-21 18:36:31 +02:00
Michael Niedermayer 22db337a40 Bump minor versions to separate 4.2 from master
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-07-21 18:36:18 +02:00
Thilo Borgmann 70a4f46e48 lavd/avfoundation: Set correct default value 0 for option capture_raw_data. 2019-07-08 20:02:41 +02:00
Thilo Borgmann 5c2e0e417a lavd/avfoundation: Reindent after last commit. 2019-07-08 20:02:41 +02:00
Thilo Borgmann 02f65678ba lavd/avfoundation: Support muxed type of devices including raw muxed data capture. 2019-07-08 20:02:41 +02:00
Thilo Borgmann 3a5f9ab814 lavd/avfoundation: Refine some log messages. 2019-07-08 20:02:41 +02:00
Thilo Borgmann 7d4df4b339 lavd/avfoundation: Change binary Options to boolean type. 2019-07-08 20:02:41 +02:00
Thilo Borgmann 48cf952411 lavd/avfoundation: Remove useless index increment. 2019-07-08 20:02:41 +02:00
Jun Zhao 206f72d0f2 libavdevice/gdigrab: fix ffmpeg -devices doesn't show gdigrab
missed the category AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT lead to
ffmpeg -devices doesn't show gdigrab as a input device

FIx #7848

Found-by: dangibson
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-17 21:51:20 +08:00
Marton Balint 15b8f36be1 avdevice/decklink: fix checking video mode in SDK version 11
Apparently in the new SDK one cannot query if VANC output is supported, so we
will fall back to non-VANC output if enabling the video output with VANC fails.

Fixes ticket #7867.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-05 20:07:35 +02:00
Takayuki 'January June' Suwa f9a061a31c avdevice/alsa: fix indefinite stop on closing PCM capture
Fixes: https://bugs.archlinux.org/task/58619

Found-by: Elias (Bleuzen) https://bugs.archlinux.org/user/26956
Signed-off-by: Nicolas George <george@nsup.org>
2019-04-23 14:01:23 -08:00
Marton Balint 63c2c83f6e avdevice/decklink_common: add support for DeckLink SDK 11
Fixes ticket #7789.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-15 22:22:31 +02:00
Marton Balint f3e22e3201 avdevice/decklink_common: properly check DoesSupportVideoMode result when trying VANC flag
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-15 22:22:31 +02:00
Marton Balint e036b8dcf4 avdevice/decklink_dec: set configs before listing formats
Format list can be input and profile dependant.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-15 22:22:31 +02:00
Don C. Bigler 2be7c388db avdevice/opengl_enc: fix build error using msvc compiler 2019-04-10 12:41:58 +02:00
Octavio Alvarez f4f40cbb57 lavd/x11grab: fix vertical repositioning
There is a calculation error in xcbgrab_reposition() that breaks
vertical repositioning on follow_mouse. It made the bottom
reposition occur when moving the mouse lower than N pixels after
the capture bottom edge, instead of before.

This commit fixes the calculation to match the documentation.

follow_mouse: centered or number of pixels. The documentation says:

When it is specified with "centered", the grabbing region follows
the mouse pointer and keeps the pointer at the center of region;
otherwise, the region follows only when the mouse pointer reaches
within PIXELS (greater than zero) to the edge of region.
2019-04-06 15:20:36 +02:00
Carl Eugen Hoyos 5fceac1cdb lavd/v4l2: Fix the type of the probe function. 2019-03-23 23:42:09 +01:00
Carl Eugen Hoyos e704070f61 lavd/v4l2-common: Add an entry for Z16. 2019-03-22 12:30:47 +01:00
Carl Eugen Hoyos 4b32f8b3eb lavd: Remove libndi_newtek 2019-03-20 10:42:10 +00:00
Dilshod Mukhtarov 1100862a94 libavdevice/gdigrab: fix HIDPI support for mouse positioning
Mouse position was not calculated properly in area or window mode

Signed-off-by: Dilshod Mukhtarov <dilshodm@gmail.com>
2019-01-30 21:55:22 +01:00
Dilshod Mukhtarov d7c9ddd0c4 libavdevice/gdigrab: fix HIDPI support for window capture
In Windows if using scaling other than 100% then the grabbed window was not captured fully (cropped)

Signed-off-by: Dilshod Mukhtarov <dilshodm@gmail.com>
2019-01-30 21:55:11 +01:00
Carl Eugen Hoyos 70c68e654d lavd/iec61883: Fix the include path for poll.h. 2019-01-16 00:13:49 +01:00
Oliver Collyer bf96937a96 avdevice/dshow: Fixed some minor memory leaks
Signed-off-by: James Almer <jamrial@gmail.com>
2019-01-03 13:15:45 -03:00
Carl Eugen Hoyos 73251678c8 lavd/v4l2: Use "int request" as second parameter for ioctl() on Android.
Fixes build with new Android toolchain.
2018-12-11 00:49:22 +01:00