Go to the source code of this file.
AVFoundation input device
- Author
- Thilo Borgmann thilo.nosp@m..bor.nosp@m.gmann.nosp@m.@mai.nosp@m.l.de
Definition in file avfoundation.m.
◆ INTERLEAVE_OUTPUT
#define INTERLEAVE_OUTPUT |
( |
|
bps | ) |
|
Value: { \
for (
c = 0;
c <
ctx->audio_channels;
c++) { \
src[
c] = ((
int##
bps##_t*)
ctx->audio_buffer) +
c * num_samples; \
} \
for (
c = 0;
c <
ctx->audio_channels;
c++) \
}
◆ lock_frames()
◆ unlock_frames()
◆ destroy_context()
◆ parse_device_name()
◆ configure_video_device()
static int configure_video_device |
( |
AVFormatContext * |
s, |
|
|
AVCaptureDevice * |
video_device |
|
) |
| |
|
static |
Configure the video device.
Configure the video device using a run-time approach to access properties since formats, activeFormat are available since iOS >= 7.0 or OSX >= 10.7 and activeVideoMaxFrameDuration is available since i0S >= 7.0 and OSX >= 10.9.
The NSUndefinedKeyException must be handled by the caller of this function.
Definition at line 343 of file avfoundation.m.
Referenced by add_video_device().
◆ add_video_device()
static int add_video_device |
( |
AVFormatContext * |
s, |
|
|
AVCaptureDevice * |
video_device |
|
) |
| |
|
static |
◆ add_audio_device()
static int add_audio_device |
( |
AVFormatContext * |
s, |
|
|
AVCaptureDevice * |
audio_device |
|
) |
| |
|
static |
◆ get_video_config()
◆ get_audio_config()
◆ getDevicesWithMediaType()
static NSArray* getDevicesWithMediaType |
( |
AVMediaType |
mediaType | ) |
|
|
static |
◆ avf_read_header()
◆ copy_cvpixelbuffer()
◆ avf_read_packet()
◆ avf_close()
◆ avf_time_base
const int avf_time_base = 1000000 |
|
static |
◆ avf_time_base_q
◆ avf_pixel_formats
◆ options
◆ avf_class
Initial value:= {
.class_name = "AVFoundation indev",
}
Definition at line 1290 of file avfoundation.m.
◆ ff_avfoundation_demuxer
Initial value:= {
.p.name = "avfoundation",
}
Definition at line 1298 of file avfoundation.m.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
@ AV_OPT_TYPE_VIDEO_RATE
Underlying C type is AVRational.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
static int avf_close(AVFormatContext *s)
static const int avf_time_base
static av_cold int read_close(AVFormatContext *ctx)
#define AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV422P16
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static const AVOption options[]
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
#define LIBAVUTIL_VERSION_INT
static int read_header(FFV1Context *f)
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
@ AV_OPT_TYPE_IMAGE_SIZE
Underlying C type is two consecutive integers.
const char * av_default_item_name(void *ptr)
Return the context name.
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
#define AV_PIX_FMT_YUV422P10
static int avf_read_packet(AVFormatContext *s, AVPacket *pkt)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int shift(int a, int b)
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
static int avf_read_header(AVFormatContext *s)
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_PIXEL_FMT
Underlying C type is enum AVPixelFormat.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
static const AVClass avf_class
@ AV_PIX_FMT_BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...