Commit d0cb3378 authored by Alexandre Lision's avatar Alexandre Lision Committed by Philippe Gorley

video: use ffmpeg on OSX

Switch to ffmpeg for video processing on OSX.
FFmpeg provides hardware acceleration for video decoding

Change-Id: I6f4a318e79871c8c9e798d213f1c9deeb80d7398
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 4ff5367c
This diff is collapsed.
This diff is collapsed.
......@@ -5,6 +5,10 @@ ifdef HAVE_WIN32
PKGS += ffmpeg
endif
ifdef HAVE_MACOSX
PKGS += ffmpeg
endif
ifdef HAVE_LINUX
PKGS += ffmpeg
endif
......@@ -85,6 +89,8 @@ FFMPEGCONF += \
--enable-encoder=tiff \
--enable-decoder=tiff
DEPS_ffmpeg = iconv zlib x264 vpx opus speex $(DEPS_vpx)
ifdef HAVE_WIN32
FFMPEGCONF += \
--enable-indev=dshow \
......@@ -198,6 +204,8 @@ ifdef HAVE_IOS
endif
ifdef HAVE_MACOSX
$(APPLY) $(SRC)/ffmpeg/clock_gettime.patch
$(APPLY) $(SRC)/ffmpeg/0004-add-avfcapture-device.patch
$(APPLY) $(SRC)/ffmpeg/0005-add-avfgrab-device.patch
endif
$(MOVE)
......
......@@ -4,9 +4,11 @@ LIBAV_URL := https://git.libav.org/?p=libav.git;a=snapshot;h=$(LIBAV_HASH);sf=tg
ifndef HAVE_LINUX
ifndef HAVE_WIN32
ifndef HAVE_MACOSX
PKGS += libav
endif
endif
endif
#disable everything
#ensure to add this option first
......
......@@ -96,8 +96,8 @@ VideoDeviceImpl::getDeviceParams() const
{
DeviceParams params;
params.name = [[avDevice_ localizedName] UTF8String];
params.input = "[" + device + "]";
params.format = "avfoundation";
params.input = device;
params.format = "avfcapture";
params.width = current_size_.first;
params.height = current_size_.second;
......
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