summaryrefslogtreecommitdiff
path: root/libavdevice
Commit message (Collapse)AuthorAgeFilesLines
* avdevice/lavfi: Remove redundant av_packet_unref()Andreas Rheinhardt2020-09-061-1/+0
| | | | | | | | | 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-061-17/+8
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/lavfi: Don't set pkt->size to the value it already hasAndreas Rheinhardt2020-09-011-1/+0
| | | | | | | | | | 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-011-6/+2
| | | | | 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-011-4/+1
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avdevice/xcbgrab: check return values of xcb query functionsMoritz Barsnick2020-08-151-0/+9
| | | | | | | | | | | | Fixes #7312, segmentation fault on close of X11 server xcb_query_pointer_reply() and xcb_get_geometry_reply() can return NULL if e.g. the X server closes or the connection is lost. This needs to be checked in order to cleanly exit, because the returned pointers are dereferenced later. Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
* kmsgrab: Add more supported formatsMark Thompson2020-08-091-0/+9
| | | | | | | X2RGB10 tested on both Intel Gen9 and AMD Polaris 11. NV12 tested on Intel Gen9 only - since it has multiple planes, this requires GetFB2. Also add some comments to split the list up a bit.
* kmsgrab: Don't require the user to set framebuffer formatMark Thompson2020-08-091-15/+40
| | | | | This is provided by GetFB2, but we still need the option for cases where that isn't available.
* kmsgrab: Use GetFB2 if availableMark Thompson2020-08-091-19/+199
| | | | | | | | | | | | The most useful feature here is the ability to automatically extract the framebuffer format and modifiers. It also makes support for multi-plane framebuffers possible, though none are added to the format table in this patch. This requires libdrm 2.4.101 (from April 2020) to build, so it includes a configure check to allow compatibility with existing distributions. Even with libdrm support, it still won't do anything at runtime if you are running Linux < 5.7 (before June 2020).
* kmsgrab: Refactor and clean error casesMark Thompson2020-08-091-61/+100
|
* avdevice/decklink_dec: export timecode with s12m side dataLimin Wang2020-07-151-0/+14
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink_dec: add support for extracting and outputing klv from vancMilos Zivkovic2020-07-035-1/+128
| | | | | Signed-off-by: Milos Zivkovic <zivkovic@teralogics.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* lavdevice: Add AudioToolbox output device.Thilo Borgmann2020-06-153-0/+310
|
* Bump minor versions after branching 4.3n4.4-devMichael Niedermayer2020-06-081-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions to separate 4.3 from masterMichael Niedermayer2020-06-081-2/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/v4l2enc: Allow writing non-rawvideos to v4l2.David Manouchehri2020-05-091-3/+7
| | | | Signed-off-by: David Manouchehri <david.manouchehri@riseup.net>
* avfoundation: Fix building on iOSMartin Storsjö2020-04-301-0/+4
| | | | | | | | | | | | Apparently the changes from 3c9185bf3a83395d12a987f626dbdb985eac4320 aren't enough; even with that in place, I got errors like this when trying to build for iOS: src/libavdevice/avfoundation.m:135:5: error: 'AVCaptureDeviceTransportControlsPlaybackMode' is unavailable: not available on iOS AVCaptureDeviceTransportControlsPlaybackMode observed_mode; ^
* lavd/avfoundation.m: Do not use transport controls for screen capture devices.Thilo Borgmann2020-04-221-9/+11
|
* lavd/avfoundation.m: Remove transport controls for iOS.Thilo Borgmann2020-04-221-2/+10
|
* avdevice/opengl: add support of wrapped avframe codecMarton Balint2020-04-161-5/+12
| | | | | | Also change the default to that. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/xv: add support of wrapped avframe codecMarton Balint2020-04-161-8/+14
| | | | | | Also change the default to that. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: increase autodetect timeout to 3 secMarton Balint2020-04-041-2/+2
| | | | | | 1 sec might not be enough for the cards to detect the format... Signed-off-by: Marton Balint <cus@passwd.hu>
* remove CHAR_MIN/CHAR_MAX usagePaul B Mahol2020-03-171-1/+1
| | | | It is not needed at all.
* lavd/avfoundation: Add basic transport control observation for capable devices.Thilo Borgmann2020-03-161-8/+59
|
* avdevice/decklink: add support for SDK version 11.5Marton Balint2020-02-261-1/+16
| | | | | | Fixes ticket #8534. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: fix stopping streams in read_closeMarton Balint2020-02-262-2/+1
| | | | | | | 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>
* lavd/opengl_enc: check strings before parsing them.Nicolas George2020-02-201-0/+4
| | | | | Fix a segfault if OpenGL was not initialized before calling write_header().
* lavd/opengl_enc: use proper context for logging.Nicolas George2020-02-201-9/+10
| | | | Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].
* lavd/avfoundation.m: Add an option to drop late frames.Thilo Borgmann2020-02-071-1/+3
| | | | Retains current behaviour by the default value.
* avdevice/xcbgrab: check if frame size fits in INT_MAXMarton Balint2020-01-241-6/+14
| | | | | | Also fixes a possible overflow and sets stream bitrate. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/xcbgrab: move some initialization code from ↵Marton Balint2020-01-241-11/+13
| | | | | | pixfmt_from_pixmap_format to create_stream Signed-off-by: Marton Balint <cus@passwd.hu>
* Silence "string-plus-int" warning shown by clang.Carl Eugen Hoyos2020-01-061-1/+1
| | | | libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
* avdevice/decklink: deprecate the -list_devices optionMarton Balint2020-01-033-1/+3
| | | | | | The user should use ffmpeg -sources decklink or ffmpeg -sinks decklink instead. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: remove -bm_v210 optionMarton Balint2020-01-033-7/+0
| | | | | | Deprecated since Sep 28, 2017. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: remove the @mode syntaxMarton Balint2020-01-033-24/+12
| | | | | | Deprecated since March 28, 2017. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/xcbgrab: capture the full desktop if video_size is not specifiedMarton Balint2019-12-302-7/+7
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/xcbgrab: fix packet timestampsMarton Balint2019-12-301-5/+9
| | | | | | | Since 648b8cca6c56a4fa1760efc72dfe1363a5c6e31e and c991e9cd91845044e93a9c89dd25b48ae707461b timestamps were not set properly. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/xcbgrab: use a buffer pool for shared memory segmentsMarton Balint2019-12-261-32/+47
| | | | | | | 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>
* avdevice/xcbgrab: wrap non-shm image replies in a buffer refMarton Balint2019-12-061-6/+15
| | | | | | This avoids a memcpy improving performance if SHM is not used. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/xcbgrab: Handle reply and error properlyKusanagi Kouichi2019-12-031-0/+5
| | | | | | | Fix a NULL dereference and leaks. Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Signed-off-by: Marton Balint <cus@passwd.hu>
* libavdevice/lavfi: check avfilter_graph_dump return valueZhao Zhili2019-11-291-3/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/decklink: add option to drop frames till timecode is seenGyan Doshi2019-11-185-1/+14
| | | | Option wait_for_tc only takes effect if tc_format is set
* avdevice/v4l2: Remove av_assert0 when format not supportedAndriy Gelman2019-11-061-1/+2
| | | | | | | | | | | | | | | | | 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>
* libavdevice: Update the class name as uniform styleJun Zhao2019-08-1512-12/+12
| | | | | | | 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>
* lavd/v4l2: produce a 0 byte packet when a dequeued buffer's size is unexpectedStephan Hilb2019-07-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Bump minor versions again on master to keep 4.2 versions separate from mastern4.3-devMichael Niedermayer2019-07-211-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions to separate 4.2 from masterMichael Niedermayer2019-07-211-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavd/avfoundation: Set correct default value 0 for option capture_raw_data.Thilo Borgmann2019-07-081-1/+1
|
* lavd/avfoundation: Reindent after last commit.Thilo Borgmann2019-07-081-54/+54
|
* lavd/avfoundation: Support muxed type of devices including raw muxed data ↵Thilo Borgmann2019-07-081-9/+80
| | | | capture.