Commit d2417061 authored by Thilo Borgmann's avatar Thilo Borgmann Committed by Michael Niedermayer

Add AVFoundation input device.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c02e3dca
......@@ -16,6 +16,7 @@ version <next>:
- support decoding 16-bit RLE SGI images
- GDI screen grabbing for Windows
- alternative rendition support for HTTP Live Streaming
- AVFoundation input device
version 2.2:
......
......@@ -303,6 +303,7 @@ libavdevice
libavdevice/avdevice.h
avfoundation.m Thilo Borgmann
dshow.c Roger Pack (CC rogerdpack@gmail.com)
fbdev_enc.c Lukasz Marek
gdigrab.c Roger Pack (CC rogerdpack@gmail.com)
......
......@@ -2366,6 +2366,8 @@ xwma_demuxer_select="riffdec"
# indevs / outdevs
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
alsa_outdev_deps="alsa_asoundlib_h"
avfoundation_indev_extralibs="-framework AVFoundation -framework CoreMedia"
avfoundation_indev_select="avfoundation"
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
caca_outdev_deps="libcaca"
decklink_outdev_deps="decklink pthreads"
......@@ -4579,6 +4581,7 @@ for func in $MATH_FUNCS; do
done
# these are off by default, so fail if requested and not available
enabled avfoundation_indev && { check_header_oc AVFoundation/AVFoundation.h || disable avfoundation_indev; }
enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } ||
{ check_lib2 "dlfcn.h" dlopen -ldl; } ||
die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
......
......@@ -51,6 +51,36 @@ ffmpeg -f alsa -i hw:0 alsaout.wav
For more information see:
@url{http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html}
@section avfoundation
AVFoundation input device.
AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX >= 10.7 as well as on iOS.
The older QTKit framework has been marked deprecated since OSX version 10.7.
The filename passed as input is parsed to contain either a device name or index.
The device index can also be given by using -video_device_index.
A given device index will override any given device name.
If the desired device consists of numbers only, use -video_device_index to identify it.
The default device will be chosen if an empty string or the device name "default" is given.
The available devices can be enumerated by using -list_devices.
@example
ffmpeg -f avfoundation -i "0" out.mpg
@end example
@example
ffmpeg -f avfoundation -video_device_index 0 -i "" out.mpg
@end example
@example
ffmpeg -f avfoundation -i "default" out.mpg
@end example
@example
ffmpeg -f avfoundation -list_devices true -i ""
@end example
@section bktr
BSD video input device.
......
......@@ -15,6 +15,7 @@ OBJS-$(CONFIG_ALSA_INDEV) += alsa-audio-common.o \
alsa-audio-dec.o timefilter.o
OBJS-$(CONFIG_ALSA_OUTDEV) += alsa-audio-common.o \
alsa-audio-enc.o
OBJS-$(CONFIG_AVFOUNDATION_INDEV) += avfoundation.o
OBJS-$(CONFIG_BKTR_INDEV) += bktr.o
OBJS-$(CONFIG_CACA_OUTDEV) += caca.o
OBJS-$(CONFIG_DECKLINK_OUTDEV) += decklink_enc.o decklink_enc_c.o
......
......@@ -47,6 +47,7 @@ void avdevice_register_all(void)
/* devices */
REGISTER_INOUTDEV(ALSA, alsa);
REGISTER_INDEV (AVFOUNDATION, avfoundation);
REGISTER_INDEV (BKTR, bktr);
REGISTER_OUTDEV (CACA, caca);
REGISTER_OUTDEV (DECKLINK, decklink);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment