James Almer
ac36080b2d
avdevice/alldevices: stop using deprecated linked list API
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Limin Wang
6c8ff1838d
avdevice/lavfi: av_malloc -> av_malloc_array
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Limin Wang
a554adaab8
avdevice/lavfi: unref the frame on failure
...
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Limin Wang
7786d795c2
avdevice/lavfi: fix FIXME and check a/v type by codec_type
...
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Marton Balint
36c582f515
avdevice/decklink_dec: fix build with older SDK
...
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 f1b908d20a
.
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Marton Balint
96907e84dd
avdevice/decklink_dec: add support for querying RP188 High Frame Rate timecode
...
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Marton Balint
f1b908d20a
avdevice/decklink_dec: add support for rgb/yuv pixel format autodetection
...
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Marton Balint
e33c0d8c69
avdevice/decklink_dec: use decklink_ctx->raw_format as bmdPixelFormat
...
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Marton Balint
a9ede0bde4
avdevice/decklink_common.h: remove unsupported decklink version ifdef
...
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Andreas Rheinhardt
5c2c35da12
avdevice/lavfi: Remove redundant av_packet_unref()
...
Since bae8844e35
, 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>
4 years ago
Andreas Rheinhardt
26469aebd3
avdevice/lavfi: Use av_packet_pack_dictionary() to pack dictionary
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
901251d59b
avdevice/lavfi: Don't set pkt->size to the value it already has
...
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>
4 years ago
Andreas Rheinhardt
ebd485db92
avdevice/lavfi: Don't reimplement av_frame_get_side_data()
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
e4a650b61a
avdevice/lavfi: Use av_packet_move_ref() for packet ownership transfer
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Moritz Barsnick
2250dc4044
avdevice/xcbgrab: check return values of xcb query functions
...
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>
4 years ago
Mark Thompson
6e951d0cf8
kmsgrab: Add more supported formats
...
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.
4 years ago
Mark Thompson
ff14858a60
kmsgrab: Don't require the user to set framebuffer format
...
This is provided by GetFB2, but we still need the option for cases where
that isn't available.
4 years ago
Mark Thompson
ef934dba2d
kmsgrab: Use GetFB2 if available
...
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).
4 years ago
Mark Thompson
fa0b064cf2
kmsgrab: Refactor and clean error cases
4 years ago
Limin Wang
a54b367c78
avdevice/decklink_dec: export timecode with s12m side data
...
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years ago
Milos Zivkovic
c4e0868243
avdevice/decklink_dec: add support for extracting and outputing klv from vanc
...
Signed-off-by: Milos Zivkovic <zivkovic@teralogics.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Thilo Borgmann
b737575c76
lavdevice: Add AudioToolbox output device.
4 years ago
Michael Niedermayer
c5079bf3bc
Bump minor versions after branching 4.3
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
0a8a96c251
Bump minor versions to separate 4.3 from master
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
David Manouchehri
d0705ecb2b
avdevice/v4l2enc: Allow writing non-rawvideos to v4l2.
...
Signed-off-by: David Manouchehri <david.manouchehri@riseup.net>
5 years ago
Martin Storsjö
c810a9502c
avfoundation: Fix building on iOS
...
Apparently the changes from 3c9185bf3a
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;
^
5 years ago
Thilo Borgmann
64b80cb04b
lavd/avfoundation.m: Do not use transport controls for screen capture devices.
5 years ago
Thilo Borgmann
3c9185bf3a
lavd/avfoundation.m: Remove transport controls for iOS.
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
Paul B Mahol
d64cbd4fda
remove CHAR_MIN/CHAR_MAX usage
...
It is not needed at all.
5 years ago
Thilo Borgmann
39fbd06314
lavd/avfoundation: Add basic transport control observation for capable devices.
5 years ago
Marton Balint
f32f9231dd
avdevice/decklink: add support for SDK version 11.5
...
Fixes ticket #8534 .
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
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>
5 years ago
Nicolas George
26ae9c9f8a
lavd/opengl_enc: check strings before parsing them.
...
Fix a segfault if OpenGL was not initialized before calling
write_header().
5 years ago
Nicolas George
fbb36d74ac
lavd/opengl_enc: use proper context for logging.
...
Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].
5 years ago
Thilo Borgmann
2ca14d84ee
lavd/avfoundation.m: Add an option to drop late frames.
...
Retains current behaviour by the default value.
5 years ago
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>
5 years ago
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>
5 years ago
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]
5 years ago
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>
5 years ago
Marton Balint
2b7097ef27
avdevice/decklink_dec: remove -bm_v210 option
...
Deprecated since Sep 28, 2017.
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
Marton Balint
78a233e6e9
avdevice/decklink_dec: remove the @mode syntax
...
Deprecated since March 28, 2017.
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
Marton Balint
f1353ce222
avdevice/xcbgrab: capture the full desktop if video_size is not specified
...
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
Zhao Zhili
19956d01cc
libavdevice/lavfi: check avfilter_graph_dump return value
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago