summaryrefslogtreecommitdiff
path: root/libavdevice/avfoundation.m
Commit message (Collapse)AuthorAge
* Revert "all: Don't set AVClass.item_name to its default value"Anton Khirnov2024-01-20
| | | | | | | Some callers assume that item_name is always set, so this may be considered an API break. This reverts commit 0c6203c97a99f69dbaa6e4011d48c331e1111f5e.
* all: Don't set AVClass.item_name to its default valueAndreas Rheinhardt2023-12-22
| | | | | | | | Unnecessary since acf63d5350adeae551d412db699f8ca03f7e76b9; also avoids relocations. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfoundation: Fix version checksMartin Storsjö2023-12-15
| | | | | | | | | | | | | | | | | | | <OS>_VERSION_MAX_ALLOWED indicates what version is available in the SDK, while <OS>_VERSION_MIN_REQUIRED is the version we can assume is available, i.e. similar to what is set with e.g. -miphoneos-version-min on the command line. This fixes build errors like these: src/libavdevice/avfoundation.m:788:37: error: 'AVCaptureDeviceTypeContinuityCamera' is only available on macOS 14.0 or newer [-Werror,-Wunguarded-availability-new] [deviceTypes addObject: AVCaptureDeviceTypeContinuityCamera]; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:551:38: note: 'AVCaptureDeviceTypeContinuityCamera' has been marked as being introduced in macOS 14.0 here, but the deployment target is macOS 13.0.0 AVF_EXPORT AVCaptureDeviceType const AVCaptureDeviceTypeContinuityCamera API_AVAILABLE(macos(14.0), ios(17.0), macCatalyst(17.0), tvos(17.0)) API_UNAVAILABLE(visionos) API_UNAVAILABLE(watchos); ^ Alternatively, we could use these more modern APIs, if enclosed in suitable @available() checks.
* lavd/avfoundation: Use correct preprocessing directiveVittorio Giovara2023-12-11
| | | | | | | Fixes compilation, introduced in e37b15e. src/libavdevice/avfoundation.m:799:10: error: invalid preprocessing directive #elseif (TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED < 140000)
* avdevice/avfoundation: replace deprecated AVCaptureDevicexufuji4562023-12-11
| | | | | | Building with iOS platform, the compiler has a warning: "'devicesWithMediaType:' is deprecated: first deprecated in iOS 10.0 - Use AVCaptureDeviceDiscoverySession instead" Signed-off-by: xufuji456 <839789740@qq.com>
* avdevice/avfoundation: convert to new channel layout-APIJames Almer2022-11-08
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavd/avfoundation: Fix mixed declaration and codeThilo Borgmann2022-02-22
|
* avdevice/avfoundation: check strdupZhao Zhili2022-02-22
|
* avdevice/avfoundation: fix memleakZhao Zhili2022-02-22
|
* libavdevice/avfoundation.m: fix potential unreleased lock issueChengfeng Ye2021-09-17
| | | | | | | | | The problem here is that the lock ctx->frame_lock will become an unreleased lock if the program returns at patched lines. Bug tracker link: https://trac.ffmpeg.org/ticket/9386\#ticket Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
* libavdevice/avfoundation.m: fix protential unreleased lock issueChengfeng Ye2021-09-17
| | | | | | | | | | The problem here is that the lock ctx->frame_lock will become an unreleased lock if the program returns at line 697, line 735 and line744. Bug tracker link: https://trac.ffmpeg.org/ticket/9385\#ticket Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/avfoundation: remove first_audio_pts and first_ptsSteven Liu2021-07-19
| | | | | | Because these two member of AVFContext not be used. Signed-off-by: Steven Liu <liuqi05@kuaishou.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>
* avfoundation: Fix building on iOSMartin Storsjö2020-04-30
| | | | | | | | | | | | 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-22
|
* lavd/avfoundation.m: Remove transport controls for iOS.Thilo Borgmann2020-04-22
|
* lavd/avfoundation: Add basic transport control observation for capable devices.Thilo Borgmann2020-03-16
|
* lavd/avfoundation.m: Add an option to drop late frames.Thilo Borgmann2020-02-07
| | | | Retains current behaviour by the default value.
* libavdevice: Update the class name as uniform styleJun Zhao2019-08-15
| | | | | | | 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/avfoundation: Set correct default value 0 for option capture_raw_data.Thilo Borgmann2019-07-08
|
* lavd/avfoundation: Reindent after last commit.Thilo Borgmann2019-07-08
|
* lavd/avfoundation: Support muxed type of devices including raw muxed data ↵Thilo Borgmann2019-07-08
| | | | capture.
* lavd/avfoundation: Refine some log messages.Thilo Borgmann2019-07-08
|
* lavd/avfoundation: Change binary Options to boolean type.Thilo Borgmann2019-07-08
|
* lavd/avfoundation: Remove useless index increment.Thilo Borgmann2019-07-08
|
* lavd/avfoundation: Fix skewed video outputRick Kern2018-09-14
| | | | | | | | Fixes ticket #5654. The linesize can be greater than the minimum required. This copies the frame taking linesize into account. Signed-off-by: Rick Kern <kernrj@gmail.com>
* avdevice: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice: Fix max value of AV_OPT_TYPE_VIDEO_RATEMichael Niedermayer2016-06-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavd/avfoundation: use AVCodecParametersRick Kern2016-05-05
| | | | | | Fixes "Could not find codec parameters for stream" error (#5494) Signed-off-by: Rick Kern <kernrj@gmail.com>
* avdevice/avfoundation: Fix occured typoMichael Niedermayer2015-03-30
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavdevice/avfoundation: use pts/dts provided by the CMSampleBuffer APIMatthieu Bouron2015-03-29
| | | | | Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavdevice/avfoundation: add capture_mouse_clicks optionMatthieu Bouron2015-03-29
| | | | | | | Support mouse clicks capture while recording a screen on OSX >= 10.7. Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavdevice/avfoundation: add capture_cursor optionMatthieu Bouron2015-03-29
| | | | | | | | Add support for cursor capturing while recording a screen for OSX >= 10.8. Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavdevice/avfoundation: add framerate and video size optionsMatthieu Bouron2015-03-29
| | | | | | | | | | Support framerate ands video size options on AVCaptureDevices for OSX >= 10.7 and iOS >= 7.0. For screen captures, only the framerate option is taken into account. Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Silence warnings when compiling for iOS.Carl Eugen Hoyos2015-03-10
| | | | Reviewed-by: Thilo Borgmann
* lavd/avfoundation: Silence c99 warnings when using gcc.Carl Eugen Hoyos2015-03-10
| | | | Reviewed-by: Thilo Borgmann
* lavd/avfoundation: Add support for 24 and 32bit integer input.John Robinson2015-03-06
| | | | | | Tested on Mac Mini soundflower and built-in line input. Reviewed-by: Thilo Borgmann
* lavd/avfoundation: Add support for 16bit integer input.Carl Eugen Hoyos2015-03-06
| | | | Reviewed-by: Thilo Borgmann
* lavd/avfoundation: Introduce device alias 'none' to allow the user to record ↵Thilo Borgmann2014-11-14
| | | | | | | | only audio or video. Changes the selection of a default device to none instead of the system default device. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Remove unused -frame_rate option.Carl Eugen Hoyos2014-11-12
|
* lavd/avfoundation: Use internal av_strtok instead of std lib strtokThilo Borgmann2014-11-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Fix compilation for non MAC OS devices by conditional ↵Thilo Borgmann2014-10-27
| | | | | | compilation of screen capture capabilities. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Add support for screen capturing.Thilo Borgmann2014-10-25
| | | | | | Patch based on pull-request by Joseph Benden <joe@benden.us> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Add basic PCM audio support.Thilo Borgmann2014-09-28
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Use microseconds as common timebase.Thilo Borgmann2014-09-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Simplify debug message generation.Thilo Borgmann2014-09-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Using the actual stream index instead of hardcoded value.Thilo Borgmann2014-09-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Split adding a device and getting the device ↵Thilo Borgmann2014-09-26
| | | | | | configuration into separate functions. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavd/avfoundation: Add device category.Thilo Borgmann2014-08-05
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>