Skip to content

Commit

Permalink
avfoundation: Simple capture
Browse files Browse the repository at this point in the history
Originally based on the capture written by
Thilo Borgmann <thilo.borgmann@mail.de>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
  • Loading branch information
Alexandre Lision authored and lu-zero committed Nov 26, 2015
1 parent 9f57f13 commit 4f97941
Show file tree
Hide file tree
Showing 6 changed files with 697 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ version <next>:
- libkvazaar HEVC encoder
- innoHeim/Rsupport Screen Capture Codec decoder
- support encoding 16-bit RLE SGI images
- support Apple AVFoundation video capture


version 11:
Expand Down
7 changes: 7 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,7 @@ HAVE_LIST_PUB="
"

HEADERS_LIST="
AVFoundation_AVFoundation_h
alsa_asoundlib_h
altivec_h
arpa_inet_h
Expand Down Expand Up @@ -2264,6 +2265,7 @@ xwma_demuxer_select="riffdec"
# indevs / outdevs
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
alsa_outdev_deps="alsa_asoundlib_h"
avfoundation_indev_deps="AVFoundation_AVFoundation_h"
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
dv1394_indev_deps="dv1394"
dv1394_indev_select="dv_demuxer"
Expand Down Expand Up @@ -4560,6 +4562,11 @@ check_header linux/fb.h
check_header linux/videodev2.h
check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete

check_header AVFoundation/AVFoundation.h &&
check_objcflags -fobjc-arc &&
add_extralibs -framework Foundation -framework AVFoundation -framework CoreMedia || \
disable AVFoundation_AVFoundation_h

check_header sys/videoio.h

check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
Expand Down
1 change: 1 addition & 0 deletions libavdevice/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ OBJS = alldevices.o \
# input/output devices
OBJS-$(CONFIG_ALSA_INDEV) += alsa_dec.o alsa.o
OBJS-$(CONFIG_ALSA_OUTDEV) += alsa_enc.o alsa.o
OBJS-$(CONFIG_AVFOUNDATION_INDEV) += avfoundation_dec.o
OBJS-$(CONFIG_BKTR_INDEV) += bktr.o
OBJS-$(CONFIG_DV1394_INDEV) += dv1394.o
OBJS-$(CONFIG_FBDEV_INDEV) += fbdev.o
Expand Down
1 change: 1 addition & 0 deletions libavdevice/alldevices.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void avdevice_register_all(void)

/* devices */
REGISTER_INOUTDEV(ALSA, alsa);
REGISTER_INDEV (AVFOUNDATION, avfoundation);
REGISTER_INDEV (BKTR, bktr);
REGISTER_INDEV (DV1394, dv1394);
REGISTER_INDEV (FBDEV, fbdev);
Expand Down
Loading

0 comments on commit 4f97941

Please sign in to comment.