summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/curl/Makefile4
-rw-r--r--package/kodi/Makefile14
-rw-r--r--package/kodi/patches/patch-tools_Linux_xbmc_sh_in59
-rw-r--r--package/kodi/patches/patch-xbmc_Application_cpp41
-rw-r--r--package/libcec/Makefile12
-rw-r--r--package/libcec/patches/imx6.patch3051
-rw-r--r--package/libcec/patches/patch-src_lib_adapter_RPi_RPiCECAdapterCommunication_cpp12
-rw-r--r--package/libcec/patches/patch-src_lib_libcec_pc_in4
-rw-r--r--package/libcec/patches/patch-src_lib_platform_posix_serialport_cpp11
-rw-r--r--package/libpng/patches/libpng-1.6.14-apng.patch1701
-rw-r--r--package/mesalib/Makefile4
-rw-r--r--package/nginx/Makefile4
-rw-r--r--package/php/Makefile4
13 files changed, 1723 insertions, 3198 deletions
diff --git a/package/curl/Makefile b/package/curl/Makefile
index 53d32c6a1..c30302cee 100644
--- a/package/curl/Makefile
+++ b/package/curl/Makefile
@@ -4,9 +4,9 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= curl
-PKG_VERSION:= 7.38.0
+PKG_VERSION:= 7.39.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= b6e3ea55bb718f2270489581efa50a8a
+PKG_MD5SUM:= 88c5650122873712296d4b1db3f12e6c
PKG_DESCR:= client-side url transfer tool
PKG_SECTION:= net/http
PKG_DEPENDS:= libcurl
diff --git a/package/kodi/Makefile b/package/kodi/Makefile
index 74a240bd2..08b230cc9 100644
--- a/package/kodi/Makefile
+++ b/package/kodi/Makefile
@@ -4,13 +4,13 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= kodi
-PKG_VERSION:= 14.0alpha4
-PKG_RELEASE:= 5
-PKG_MD5SUM:= 88a68db6e653b2029efddbfa0a855e1c
+PKG_VERSION:= 14.0rc2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= f56aeb81db6878fcac6631f6a3e2c702
PKG_DESCR:= software media player
PKG_SECTION:= mm/video
PKG_DEPENDS:= boost python2 libstdcxx glibc-gconv
-PKG_DEPENDS+= libglew mesalib libass libmpeg2 libmad libdbus
+PKG_DEPENDS+= libass libmpeg2 libmad libdbus
PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl
PKG_DEPENDS+= libflac libopenssl libbz2 libtiff liblzo
PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng libncurses
@@ -18,7 +18,7 @@ PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate
PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd
PKG_DEPENDS+= libgpg-error libudev python2-mod-sqlite libffmpeg
PKG_DEPENDS+= libxslt libvorbisenc alsa-lib glib libglu librt
-PKG_BUILDDEP:= boost python2 mesalib libglew libass ffmpeg
+PKG_BUILDDEP:= boost python2 libass ffmpeg
PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis
PKG_BUILDDEP+= curl flac openssl bzip2 libtiff liblzo yajl
PKG_BUILDDEP+= tinyxml sqlite pcre libpng libcdio freetype
@@ -61,8 +61,8 @@ PKGFD_WITH_WEBSERVER:= enable internal webserver support
PKG_LIBC_DEPENDS:= glibc
-PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc
-PKG_BUILDDEP_RASPBERRY_PI:= bcm2835-vc
+PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc libglew mesalib
+PKG_BUILDDEP_RASPBERRY_PI:= bcm2835-vc libglew mesalib
PKG_DEPENDS_SOLIDRUN_IMX6:= libfslvpuwrap gpu-viv-bin-mx6q
PKG_BUILDDEP_SOLIDRUN_IMX6:= libfslvpuwrap gpu-viv-bin-mx6q
PKG_SYSTEM_DEPENDS:= raspberry-pi solidrun-imx6
diff --git a/package/kodi/patches/patch-tools_Linux_xbmc_sh_in b/package/kodi/patches/patch-tools_Linux_xbmc_sh_in
deleted file mode 100644
index 30804493f..000000000
--- a/package/kodi/patches/patch-tools_Linux_xbmc_sh_in
+++ /dev/null
@@ -1,59 +0,0 @@
---- kodi-14.0alpha4.orig/tools/Linux/xbmc.sh.in 2014-09-05 14:09:59.000000000 +0200
-+++ kodi-14.0alpha4/tools/Linux/xbmc.sh.in 2014-09-08 13:26:02.745294460 +0200
-@@ -58,7 +58,7 @@ single_stacktrace()
-
- print_crash_report()
- {
-- FILE="$CRASHLOG_DIR/xbmc_crashlog-`date +%Y%m%d_%H%M%S`.log"
-+ FILE="/tmp/xbmc_crashlog-`date +%Y%m%d_%H%M%S`.log"
- echo "############## XBMC CRASH LOG ###############" >> $FILE
- echo >> $FILE
- echo "################ SYSTEM INFO ################" >> $FILE
-@@ -70,15 +70,6 @@ print_crash_report()
- echo -n " Kernel: " >> $FILE
- uname -rvs >> $FILE
- echo -n " Release: " >> $FILE
-- if [ -f /etc/os-release ]; then
-- . /etc/os-release
-- echo $NAME $VERSION >> $FILE
-- elif command_exists lsb_release; then
-- echo >> $FILE
-- lsb_release -a 2> /dev/null | sed -e 's/^/ /' >> $FILE
-- else
-- echo "lsb_release not available" >> $FILE
-- fi
- echo "############## END SYSTEM INFO ##############" >> $FILE
- echo >> $FILE
- echo "############### STACK TRACE #################" >> $FILE
-@@ -100,31 +91,8 @@ print_crash_report()
- echo "gdb not installed, can't get stack trace." >> $FILE
- fi
- echo "############# END STACK TRACE ###############" >> $FILE
-- echo >> $FILE
-- echo "################# LOG FILE ##################" >> $FILE
-- echo >> $FILE
-- if [ -f ~/.xbmc/temp/xbmc.log ]
-- then
-- cat ~/.xbmc/temp/xbmc.log >> $FILE
-- echo >> $FILE
-- else
-- echo "Logfile not found in the usual place." >> $FILE
-- echo "Please attach it seperately." >> $FILE
-- echo "Use pastebin.com or similar for forums or IRC." >> $FILE
-- fi
-- echo >> $FILE
-- echo "############### END LOG FILE ################" >> $FILE
-- echo >> $FILE
-- echo "############ END XBMC CRASH LOG #############" >> $FILE
-- echo "Crash report available at $FILE"
- }
-
--python @datadir@/xbmc/FEH.py $SAVED_ARGS
--RET=$?
--if [ $RET -ne 0 ]; then
-- exit $RET
--fi
--
- if command_exists gdb; then
- # Output warning in case ulimit is unsupported by shell
- eval ulimit -c unlimited
diff --git a/package/kodi/patches/patch-xbmc_Application_cpp b/package/kodi/patches/patch-xbmc_Application_cpp
deleted file mode 100644
index a90c36f89..000000000
--- a/package/kodi/patches/patch-xbmc_Application_cpp
+++ /dev/null
@@ -1,41 +0,0 @@
---- kodi-14.0alpha4.orig/xbmc/Application.cpp 2014-10-06 11:34:37.000000000 -0500
-+++ kodi-14.0alpha4/xbmc/Application.cpp 2014-10-08 01:25:47.880436000 -0500
-@@ -642,7 +642,7 @@ bool CApplication::Create()
-
- if (!CLog::Init(CSpecialProtocol::TranslatePath(g_advancedSettings.m_logFolder).c_str()))
- {
-- fprintf(stderr,"Could not init logging classes. Permission errors on ~/.xbmc (%s)\n",
-+ fprintf(stderr,"Could not init logging classes. Permission errors on %s\n",
- CSpecialProtocol::TranslatePath(g_advancedSettings.m_logFolder).c_str());
- return false;
- }
-@@ -1064,10 +1064,13 @@ bool CApplication::InitDirectoriesLinux(
- userName = "root";
-
- CStdString userHome;
-+ userHome = "/data/xbmc";
-+/*
- if (getenv("HOME"))
- userHome = getenv("HOME");
- else
- userHome = "/root";
-+*/
-
- CStdString xbmcBinPath, xbmcPath;
- CUtil::GetHomePath(xbmcBinPath, "XBMC_BIN_HOME");
-@@ -1099,11 +1102,11 @@ bool CApplication::InitDirectoriesLinux(
- // map our special drives
- CSpecialProtocol::SetXBMCBinPath(xbmcBinPath);
- CSpecialProtocol::SetXBMCPath(xbmcPath);
-- CSpecialProtocol::SetHomePath(userHome + "/.xbmc");
-- CSpecialProtocol::SetMasterProfilePath(userHome + "/.xbmc/userdata");
-+ CSpecialProtocol::SetHomePath(userHome);
-+ CSpecialProtocol::SetMasterProfilePath(userHome + "/userdata");
-
-- CStdString strTempPath = userHome;
-- strTempPath = URIUtils::AddFileToFolder(strTempPath, ".xbmc/temp");
-+ CStdString strTempPath = "/tmp";
-+ strTempPath = URIUtils::AddFileToFolder(strTempPath, "/xbmc");
- if (getenv("XBMC_TEMP"))
- strTempPath = getenv("XBMC_TEMP");
- CSpecialProtocol::SetTempPath(strTempPath);
diff --git a/package/libcec/Makefile b/package/libcec/Makefile
index d48adda31..0d7502bc5 100644
--- a/package/libcec/Makefile
+++ b/package/libcec/Makefile
@@ -4,22 +4,20 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= libcec
-PKG_VERSION:= 2.1.4
-PKG_RELEASE:= 6
-PKG_MD5SUM:= faa58944f87e9beda165f615d4b46766
+PKG_VERSION:= 2.2.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 17d6ec05d2ac9e6779eb8d2986a62688
PKG_DESCR:= control your device with your tv remote control
PKG_SECTION:= libs/video
PKG_DEPENDS:= libudev
PKG_BUILDDEP:= eudev
PKG_URL:= http://libcec.pulse-eight.com/
-PKG_SITES:= http://packages.pulse-eight.net/pulse/sources/libcec/
+PKG_SITES:= http://openadk.org/distfiles/
PKG_OPTS:= dev
-DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
-
PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc
PKG_BUILDDEP_RASPBERRY_PI:= bcm2835-vc
-PKG_SYSTEM_DEPENDS:= raspberry-pi ibm-x40 solidrun-imx6
+PKG_SYSTEM_DEPENDS:= raspberry-pi solidrun-imx6
include $(ADK_TOPDIR)/mk/package.mk
diff --git a/package/libcec/patches/imx6.patch b/package/libcec/patches/imx6.patch
deleted file mode 100644
index aadb217e8..000000000
--- a/package/libcec/patches/imx6.patch
+++ /dev/null
@@ -1,3051 +0,0 @@
-diff -Nur libcec-2.1.4/ChangeLog libcec-imx6/ChangeLog
---- libcec-2.1.4/ChangeLog 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/ChangeLog 2014-09-01 13:48:53.610430917 +0200
-@@ -1,3 +1,10 @@
-+libcec (2.1.4-2) unstable; urgency=low
-+
-+ * fixed:
-+ * OS X build
-+
-+ -- Pulse-Eight Packaging <packaging@pulse-eight.com> Wed, 18 Dec 2013 02:14:00 +0100
-+
- libcec (2.1.4-1) unstable; urgency=low
-
- * changed / added:
-diff -Nur libcec-2.1.4/configure.ac libcec-imx6/configure.ac
---- libcec-2.1.4/configure.ac 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/configure.ac 2014-09-01 13:48:53.610430917 +0200
-@@ -93,6 +93,14 @@
- esac
- fi
-
-+## i.MX6 support
-+AC_ARG_ENABLE([imx6],
-+ [AS_HELP_STRING([--enable-imx6],
-+ [enable support for freescale i.MX6 (default is no)])],
-+ [use_imx6=$enableval],
-+ [use_imx6=no])
-+
-+
- ## add the top dir and include to the include path, so we can include config.h and cec.h
- CPPFLAGS="$CPPFLAGS -I\$(abs_top_srcdir)/src -I\$(abs_top_srcdir)/include"
-
-@@ -130,6 +138,7 @@
- use_udev="no"
- use_adapter_detection="yes"
- use_lockdev="no"
-+SUPPRESS_MANGLING_WARNINGS=" -Wno-psabi"
- case "${host}" in
- *-*-linux*)
- ## search for udev if pkg-config was found
-@@ -210,6 +219,7 @@
- AC_CHECK_HEADER(mach/mach_time.h,,AC_MSG_ERROR($msg_required_header_missing))
- AC_CHECK_HEADER(CoreVideo/CVHostTime.h,,AC_MSG_ERROR($msg_required_header_missing))
- AC_DEFINE([TARGET_DARWIN], [1], [Darwin target])
-+ SUPPRESS_MANGLING_WARNINGS=""
- ;;
- esac
-
-@@ -268,6 +278,17 @@
- features="$features\n TDA995x support :\t\t\tno"
- fi
-
-+## mark i.MX6 support as available
-+if test "x$use_imx6" != "xno"; then
-+ AC_DEFINE([HAVE_IMX_API],[1],[Define to 1 to include i.MX6 support])
-+ AM_CONDITIONAL(USE_IMX_API, true)
-+ features="$features\n i.MX6 support :\t\t\tyes"
-+ LIB_INFO="$LIB_INFO 'i.MX6'"
-+else
-+ AM_CONDITIONAL(USE_IMX_API, false)
-+ features="$features\n i.MX6 support :\t\t\tno"
-+fi
-+
- ## check if our build system is complete
- AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR($msg_required_header_missing))
- AC_CHECK_HEADER(ctype.h,,AC_MSG_ERROR($msg_required_header_missing))
-@@ -342,7 +363,7 @@
- LIBS_LIBCEC="$LIBS"
- LIBS="$libs_client"
-
--CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Wno-missing-field-initializers -Wno-psabi"
-+CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Wno-missing-field-initializers $SUPPRESS_MANGLING_WARNINGS"
-
- if test "x$use_debug" = "xyes"; then
- CXXFLAGS="$CXXFLAGS -g"
-diff -Nur libcec-2.1.4/debian/changelog libcec-imx6/debian/changelog
---- libcec-2.1.4/debian/changelog 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/debian/changelog 2014-09-01 13:48:53.698431426 +0200
-@@ -1,3 +1,10 @@
-+libcec (2.1.4-2) unstable; urgency=low
-+
-+ * fixed:
-+ * OS X build
-+
-+ -- Pulse-Eight Packaging <packaging@pulse-eight.com> Wed, 18 Dec 2013 02:14:00 +0100
-+
- libcec (2.1.4-1) unstable; urgency=low
-
- * changed / added:
-diff -Nur libcec-2.1.4/driver/p8usb-cec.inf libcec-imx6/driver/p8usb-cec.inf
---- libcec-2.1.4/driver/p8usb-cec.inf 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/driver/p8usb-cec.inf 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,89 @@
-+; Copyright (c) 2012 Pulse-Eight Limited
-+
-+[Version]
-+Signature="$Windows NT$"
-+Class=Ports
-+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
-+Provider=%MFGNAME%
-+LayoutFile=layout.inf
-+CatalogFile=%MFGFILENAME%.cat
-+DriverVer=08/29/2012,1.1.0.0
-+
-+[Manufacturer]
-+%MFGNAME%=DeviceList, NTamd64
-+
-+[DestinationDirs]
-+FakeModemCopyFileSection=12
-+DefaultDestDir=12
-+
-+
-+;------------------------------------------------------------------------------
-+; Windows 2000/XP/Vista-32bit Sections
-+;------------------------------------------------------------------------------
-+
-+[DriverInstall.nt]
-+include = mdmcpq.inf
-+CopyFiles = FakeModemCopyFileSection
-+AddReg = DriverInstall.nt.AddReg
-+
-+[DriverInstall.nt.AddReg]
-+HKR,,DevLoader,,*ntkern
-+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
-+HKR,,PortSubClass,1,01
-+
-+[DriverInstall.nt.Services]
-+AddService = usbser, 0x00000002, DriverService.nt
-+
-+[DriverService.nt]
-+DisplayName = %SERVICE%
-+ServiceType = 1 ; SERVICE_KERNEL_DRIVER
-+StartType = 3 ; SERVICE_DEMAND_START
-+ErrorControl = 1 ; SERVICE_ERROR_NORMAL
-+ServiceBinary = %12%\%DRIVERFILENAME%.sys
-+LoadOrderGroup = Base
-+
-+;------------------------------------------------------------------------------
-+; Vista-64bit Sections
-+;------------------------------------------------------------------------------
-+
-+[DriverInstall.NTamd64]
-+include = mdmcpq.inf
-+CopyFiles = FakeModemCopyFileSection
-+AddReg = DriverInstall.NTamd64.AddReg
-+
-+[DriverInstall.NTamd64.AddReg]
-+HKR,,DevLoader,,*ntkern
-+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
-+HKR,,PortSubClass,1,01
-+
-+[DriverInstall.NTamd64.Services]
-+AddService = usbser, 0x00000002, DriverService.NTamd64
-+
-+[DriverService.NTamd64]
-+DisplayName = %SERVICE%
-+ServiceType = 1 ; SERVICE_KERNEL_DRIVER
-+StartType = 3 ; SERVICE_DEMAND_START
-+ErrorControl = 1 ; SERVICE_ERROR_NORMAL
-+ServiceBinary = %12%\%DRIVERFILENAME%.sys
-+LoadOrderGroup = Base
-+
-+[SourceDisksFiles]
-+[SourceDisksNames]
-+[DeviceList]
-+%DESCRIPTION2% = DriverInstall, USB\VID_2548&PID_1002&MI_00
-+%DESCRIPTION% = DriverInstall, USB\VID_2548&PID_1001
-+
-+[DeviceList.NTamd64]
-+%DESCRIPTION2% = DriverInstall, USB\VID_2548&PID_1002&MI_00
-+%DESCRIPTION% = DriverInstall, USB\VID_2548&PID_1001
-+
-+[Strings]
-+MFGFILENAME = "p8usb-cec"
-+DRIVERFILENAME = "usbser"
-+MFGNAME = "Pulse-Eight Limited"
-+INSTDISK = "Pulse-Eight USB-CEC Installation Disc"
-+DESCRIPTION = "Pulse-Eight USB to HDMI CEC Adapter"
-+DESCRIPTION2 = "Pulse-Eight USB to HDMI CEC Adapter (rev.2)"
-+SERVICE = "USB to HDMI-CEC"
-diff -Nur libcec-2.1.4/.gitignore libcec-imx6/.gitignore
---- libcec-2.1.4/.gitignore 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/.gitignore 2014-09-01 13:48:53.610430917 +0200
-@@ -0,0 +1,117 @@
-+/build
-+/.cproject
-+/.project
-+/.settings
-+*.dll
-+*.exe
-+*.exp
-+*.ilk
-+*.lib
-+*.manifest
-+*.metagen
-+*.ncb
-+*.opensdf
-+*.pdb
-+*.suo
-+*.user
-+*.aps
-+
-+*~
-+
-+/support/private
-+
-+/driver/p8usb-cec.cat
-+/bootloader-driver/p8_usb_dfu.cat
-+
-+aclocal.m4
-+autom4te.cache
-+config.guess
-+config.log
-+config.status
-+config.sub
-+depcomp
-+configure
-+install-sh
-+INSTALL
-+libtool
-+ltmain.sh
-+Makefile
-+Makefile.in
-+missing
-+config.h
-+config.h.in
-+config.h.in~
-+stamp-h1
-+
-+/debian/*.log
-+/debian/*.substvars
-+/debian/*.debhelper
-+/debian/files
-+/debian/cec-utils
-+/debian/libcec-dev
-+/debian/libcec
-+/debian/libcec2
-+/debian/tmp
-+
-+include/boost
-+
-+project/bin
-+project/Debug/
-+project/*.exe
-+project/Release/
-+project/ipch/
-+project/libcec.sdf
-+project/obj
-+project/Properties
-+project/_*
-+project/x64
-+project/LibCecSharp/x64
-+project/LibCecSharp/Debug
-+project/LibCecSharp/Release
-+project/libcec/x64
-+project/libcec/Debug
-+project/libcec/Release
-+project/testclient/x64
-+project/testclient/Debug
-+project/testclient/Release
-+
-+project/RPi/toolchain
-+project/RPi/firmware
-+project/RPi/deps
-+
-+src/lib/.deps
-+src/lib/.libs
-+src/lib/*.a
-+src/lib/*.la
-+src/lib/*.lo
-+src/lib/*.o
-+src/lib/*.P
-+src/lib/libcec.pc
-+src/lib/Makefile
-+src/lib/Makefile.in
-+
-+src/lib/util/*.d
-+src/lib/util/*.o
-+src/lib/util/*.a
-+src/lib/util/*.P
-+
-+src/testclient/.deps
-+src/testclient/.libs
-+src/testclient/cec-client
-+src/testclient/*.o
-+
-+src/CecSharpTester/bin
-+src/CecSharpTester/obj
-+
-+src/cec-config-gui/obj
-+src/cec-config/cec-config
-+src/cec-config/*.o
-+src/cec-config/.deps
-+
-+src/libcec-wmc/bin
-+src/libcec-wmc/obj
-+
-+/dpinst-x86.exe
-+/dpinst-amd64.exe
-+
-+/documentation
-diff -Nur libcec-2.1.4/include/cectypes.h libcec-imx6/include/cectypes.h
---- libcec-2.1.4/include/cectypes.h 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/include/cectypes.h 2014-09-01 13:48:53.702431449 +0200
-@@ -295,6 +295,17 @@
- #define CEC_TDA995x_VIRTUAL_COM "CuBox"
-
- /*!
-+ * the path to use for the i.MX CEC wire
-+ */
-+#define CEC_IMX_PATH "/dev/mxc_hdmi_cec"
-+
-+/*!
-+ * the name of the virtual COM port to use for the i.MX CEC wire
-+ */
-+#define CEC_IMX_VIRTUAL_COM "i.MX"
-+
-+
-+/*!
- * Mimimum client version
- */
- #define CEC_MIN_LIB_VERSION 2
-@@ -858,7 +869,8 @@
- ADAPTERTYPE_P8_EXTERNAL = 0x1,
- ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
- ADAPTERTYPE_RPI = 0x100,
-- ADAPTERTYPE_TDA995x = 0x200
-+ ADAPTERTYPE_TDA995x = 0x200,
-+ ADAPTERTYPE_IMX = 0x300,
- } cec_adapter_type;
-
- typedef struct cec_menu_language
-Binärdateien libcec-2.1.4/project/favicon.ico und libcec-imx6/project/favicon.ico sind verschieden.
-Binärdateien libcec-2.1.4/project/libcec/libcec.rc und libcec-imx6/project/libcec/libcec.rc sind verschieden.
-diff -Nur libcec-2.1.4/project/libcec/libcec.vcxproj libcec-imx6/project/libcec/libcec.vcxproj
---- libcec-2.1.4/project/libcec/libcec.vcxproj 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/libcec/libcec.vcxproj 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,281 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\include\cec.h" />
-+ <ClInclude Include="..\..\include\cecc.h" />
-+ <ClInclude Include="..\..\include\cecloader.h" />
-+ <ClInclude Include="..\..\include\cectypes.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\AdapterCommunication.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\AdapterFactory.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommands.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommunication.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterDetection.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessage.h" />
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessageQueue.h" />
-+ <ClInclude Include="..\..\src\lib\CECClient.h" />
-+ <ClInclude Include="..\..\src\lib\CECInputBuffer.h" />
-+ <ClInclude Include="..\..\src\lib\CECProcessor.h" />
-+ <ClInclude Include="..\..\src\lib\CECTypeUtils.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECAudioSystem.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECBusDevice.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECDeviceMap.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECPlaybackDevice.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECRecordingDevice.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECTuner.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECTV.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\ANCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\CECCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\PHCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\RLCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\SLCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\VLCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\RHCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\implementations\AQCommandHandler.h" />
-+ <ClInclude Include="..\..\src\lib\LibCEC.h" />
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl-edid.h" />
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl_defines.h" />
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl_sdk.h" />
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl_structures.h" />
-+ <ClInclude Include="..\..\src\lib\platform\nvidia\nv-edid.h" />
-+ <ClInclude Include="..\..\src\lib\platform\os.h" />
-+ <ClInclude Include="..\..\src\lib\platform\sockets\serialport.h" />
-+ <ClInclude Include="..\..\src\lib\platform\sockets\socket.h" />
-+ <ClInclude Include="..\..\src\lib\platform\sockets\tcp.h" />
-+ <ClInclude Include="..\..\src\lib\platform\threads\mutex.h" />
-+ <ClInclude Include="..\..\src\lib\platform\threads\threads.h" />
-+ <ClInclude Include="..\..\src\lib\platform\util\baudrate.h" />
-+ <ClInclude Include="..\..\src\lib\platform\util\buffer.h" />
-+ <ClInclude Include="..\..\src\lib\platform\util\edid.h" />
-+ <ClInclude Include="..\..\src\lib\platform\util\StdString.h" />
-+ <ClInclude Include="..\..\src\lib\platform\util\timeutils.h" />
-+ <ClInclude Include="..\..\src\lib\platform\windows\dlfcn-win32.h" />
-+ <ClInclude Include="..\..\src\lib\platform\windows\os-socket.h" />
-+ <ClInclude Include="..\..\src\lib\platform\windows\os-threads.h" />
-+ <ClInclude Include="..\..\src\lib\platform\windows\os-types.h" />
-+ <ClInclude Include="..\..\src\lib\platform\windows\stdint.h" />
-+ <ClInclude Include="resource.h" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\src\lib\adapter\AdapterFactory.cpp" />
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommands.cpp" />
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommunication.cpp" />
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterDetection.cpp" />
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessage.cpp" />
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessageQueue.cpp" />
-+ <ClCompile Include="..\..\src\lib\CECClient.cpp" />
-+ <ClCompile Include="..\..\src\lib\CECProcessor.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECAudioSystem.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECBusDevice.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECDeviceMap.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECPlaybackDevice.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECRecordingDevice.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECTuner.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECTV.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\ANCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\CECCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\PHCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\RLCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\SLCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\VLCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\RHCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\AQCommandHandler.cpp" />
-+ <ClCompile Include="..\..\src\lib\LibCEC.cpp" />
-+ <ClCompile Include="..\..\src\lib\LibCECC.cpp" />
-+ <ClCompile Include="..\..\src\lib\LibCECDll.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\adl\adl-edid.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\nvidia\nv-edid.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\windows\dlfcn-win32.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\windows\os-edid.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\windows\os-threads.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\windows\serialport.cpp" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="libcec.rc" />
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}</ProjectGuid>
-+ <RootNamespace>libcec</RootNamespace>
-+ <ProjectName>libcec</ProjectName>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseDebugLibraries>true</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseDebugLibraries>true</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseDebugLibraries>false</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <UseDebugLibraries>false</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <OutDir>$(SolutionDir)..\build\</OutDir>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <OutDir>$(SolutionDir)..\build\x64\</OutDir>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <TargetName>libcec</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <TargetName>$(ProjectName)</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <IncludePath>$(SolutionDir)..\include;$(IncludePath)</IncludePath>
-+ <LibraryPath>C:\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath)</LibraryPath>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <IncludePath>$(SolutionDir)..\include;$(IncludePath)</IncludePath>
-+ <LibraryPath>C:\WinDDK\7600.16385.1\lib\win7\amd64;$(LibraryPath)</LibraryPath>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <OutDir>$(SolutionDir)..\build\</OutDir>
-+ <TargetName>libcec</TargetName>
-+ <IncludePath>$(SolutionDir)..\include;$(IncludePath)</IncludePath>
-+ <LibraryPath>C:\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath)</LibraryPath>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <OutDir>$(SolutionDir)..\build\x64\</OutDir>
-+ <TargetName>$(ProjectName)</TargetName>
-+ <IncludePath>$(SolutionDir)..\include;$(IncludePath)</IncludePath>
-+ <LibraryPath>C:\WinDDK\7600.16385.1\lib\win7\amd64;$(LibraryPath)</LibraryPath>
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <WarningLevel>Level4</WarningLevel>
-+ <Optimization>Disabled</Optimization>
-+ <PreprocessorDefinitions>CEC_DEBUGGING;HAVE_P8_USB;_USE_32BIT_TIME_T;_DEBUG;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ </ClCompile>
-+ <Link>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <Version>
-+ </Version>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <ClCompile>
-+ <WarningLevel>Level4</WarningLevel>
-+ <Optimization>Disabled</Optimization>
-+ <PreprocessorDefinitions>CEC_DEBUGGING;HAVE_P8_USB;_WIN64;_DEBUG;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>
-+ </AdditionalDependencies>
-+ <IgnoreSpecificDefaultLibraries>
-+ </IgnoreSpecificDefaultLibraries>
-+ <Version>
-+ </Version>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <WarningLevel>Level4</WarningLevel>
-+ <Optimization>Full</Optimization>
-+ <FunctionLevelLinking>true</FunctionLevelLinking>
-+ <IntrinsicFunctions>true</IntrinsicFunctions>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>HAVE_P8_USB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-+ </ClCompile>
-+ <Link>
-+ <GenerateDebugInformation>false</GenerateDebugInformation>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <Version>
-+ </Version>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <ClCompile>
-+ <WarningLevel>Level4</WarningLevel>
-+ <Optimization>Full</Optimization>
-+ <IntrinsicFunctions>true</IntrinsicFunctions>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>HAVE_P8_USB;_WIN64;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-+ </ClCompile>
-+ <Link>
-+ <GenerateDebugInformation>false</GenerateDebugInformation>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <AdditionalDependencies>
-+ </AdditionalDependencies>
-+ <IgnoreSpecificDefaultLibraries>
-+ </IgnoreSpecificDefaultLibraries>
-+ <Version>
-+ </Version>
-+ </Link>
-+ <ProjectReference />
-+ <Lib>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
-+ <SubSystem>Windows</SubSystem>
-+ </Lib>
-+ </ItemDefinitionGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project>
-\ Kein Zeilenumbruch am Dateiende.
-diff -Nur libcec-2.1.4/project/libcec/libcec.vcxproj.filters libcec-imx6/project/libcec/libcec.vcxproj.filters
---- libcec-2.1.4/project/libcec/libcec.vcxproj.filters 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/libcec/libcec.vcxproj.filters 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,281 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup>
-+ <Filter Include="exports">
-+ <UniqueIdentifier>{01b9c84a-dcfe-4bdc-b983-69e3e3929b0f}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="implementations">
-+ <UniqueIdentifier>{03bd59df-ccac-4664-b61b-3151bb219efa}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="devices">
-+ <UniqueIdentifier>{bfc43a58-636d-4c1a-b191-486cb8509c7c}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="adapter">
-+ <UniqueIdentifier>{51614b77-8a0e-47a8-8500-5beb0fd12d49}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform">
-+ <UniqueIdentifier>{7d05b1b5-e728-4f9e-b78f-d63cac4ded8e}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform\sockets">
-+ <UniqueIdentifier>{6cfe4bad-ed3a-4a16-8c59-4489089f5fe5}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform\util">
-+ <UniqueIdentifier>{39a56ebf-ba93-4e7b-bf72-2f57b99a1ee1}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform\threads">
-+ <UniqueIdentifier>{be183456-d61e-4283-b642-fe25ed71e9c5}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform\windows">
-+ <UniqueIdentifier>{65c4a590-4577-40e4-91ad-339e20b99ebe}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform\adl">
-+ <UniqueIdentifier>{4fbd02e2-5671-4132-9b37-964c17fb3b0d}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform\nvidia">
-+ <UniqueIdentifier>{685e2589-204d-4f9a-a637-a7ba1b61c669}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="adapter\Pulse-Eight">
-+ <UniqueIdentifier>{a5e91a49-0595-49bd-9bdb-d729d63f024e}</UniqueIdentifier>
-+ </Filter>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\src\lib\CECProcessor.h" />
-+ <ClInclude Include="..\..\src\lib\LibCEC.h" />
-+ <ClInclude Include="..\..\include\cec.h">
-+ <Filter>exports</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\include\cecc.h">
-+ <Filter>exports</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\include\cecloader.h">
-+ <Filter>exports</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\include\cectypes.h">
-+ <Filter>exports</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\ANCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\CECCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\SLCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\devices\CECBusDevice.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\VLCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\RHCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\ANCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\devices\CECAudioSystem.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\devices\CECPlaybackDevice.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\devices\CECRecordingDevice.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\devices\CECTuner.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\devices\CECTV.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\os.h">
-+ <Filter>platform</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\sockets\serialport.h">
-+ <Filter>platform\sockets</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\sockets\socket.h">
-+ <Filter>platform\sockets</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\sockets\tcp.h">
-+ <Filter>platform\sockets</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\util\baudrate.h">
-+ <Filter>platform\util</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\util\buffer.h">
-+ <Filter>platform\util</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\util\StdString.h">
-+ <Filter>platform\util</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\util\timeutils.h">
-+ <Filter>platform\util</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\threads\mutex.h">
-+ <Filter>platform\threads</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\threads\threads.h">
-+ <Filter>platform\threads</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\windows\os-socket.h">
-+ <Filter>platform\windows</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\windows\os-threads.h">
-+ <Filter>platform\windows</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\windows\os-types.h">
-+ <Filter>platform\windows</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\windows\stdint.h">
-+ <Filter>platform\windows</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\RLCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\implementations\PHCommandHandler.h">
-+ <Filter>implementations</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\CECClient.h" />
-+ <ClInclude Include="..\..\src\lib\CECInputBuffer.h" />
-+ <ClInclude Include="..\..\src\lib\devices\CECDeviceMap.h">
-+ <Filter>devices</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\CECTypeUtils.h" />
-+ <ClInclude Include="..\..\src\lib\platform\util\edid.h">
-+ <Filter>platform\util</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl_defines.h">
-+ <Filter>platform\adl</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl_sdk.h">
-+ <Filter>platform\adl</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl_structures.h">
-+ <Filter>platform\adl</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\adl\adl-edid.h">
-+ <Filter>platform\adl</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\windows\dlfcn-win32.h">
-+ <Filter>platform\windows</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\nvidia\nv-edid.h">
-+ <Filter>platform\nvidia</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\AdapterCommunication.h">
-+ <Filter>adapter</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommands.h">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommunication.h">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterDetection.h">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessage.h">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessageQueue.h">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\adapter\AdapterFactory.h">
-+ <Filter>adapter</Filter>
-+ </ClInclude>
-+ <ClInclude Include="resource.h" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\src\lib\CECProcessor.cpp" />
-+ <ClCompile Include="..\..\src\lib\LibCEC.cpp" />
-+ <ClCompile Include="..\..\src\lib\LibCECC.cpp" />
-+ <ClCompile Include="..\..\src\lib\LibCECDll.cpp" />
-+ <ClCompile Include="..\..\src\lib\implementations\ANCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\CECCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\SLCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\devices\CECBusDevice.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\VLCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\RHCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\AQCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\devices\CECAudioSystem.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\devices\CECPlaybackDevice.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\devices\CECRecordingDevice.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\devices\CECTuner.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\devices\CECTV.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\platform\windows\os-threads.cpp">
-+ <Filter>platform\windows</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\platform\windows\serialport.cpp">
-+ <Filter>platform\windows</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\RLCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\implementations\PHCommandHandler.cpp">
-+ <Filter>implementations</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\CECClient.cpp" />
-+ <ClCompile Include="..\..\src\lib\devices\CECDeviceMap.cpp">
-+ <Filter>devices</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\platform\windows\os-edid.cpp">
-+ <Filter>platform\windows</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\platform\adl\adl-edid.cpp">
-+ <Filter>platform\adl</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\platform\windows\dlfcn-win32.cpp">
-+ <Filter>platform\windows</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\platform\nvidia\nv-edid.cpp">
-+ <Filter>platform\nvidia</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommands.cpp">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterCommunication.cpp">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterDetection.cpp">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessage.cpp">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\adapter\Pulse-Eight\USBCECAdapterMessageQueue.cpp">
-+ <Filter>adapter\Pulse-Eight</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\lib\adapter\AdapterFactory.cpp">
-+ <Filter>adapter</Filter>
-+ </ClCompile>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="libcec.rc" />
-+ </ItemGroup>
-+</Project>
-\ Kein Zeilenumbruch am Dateiende.
-Binärdateien libcec-2.1.4/project/libcec/resource.h und libcec-imx6/project/libcec/resource.h sind verschieden.
-diff -Nur libcec-2.1.4/project/libCEC.nsi libcec-imx6/project/libCEC.nsi
---- libcec-2.1.4/project/libCEC.nsi 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/libCEC.nsi 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,342 @@
-+;libCEC installer
-+;Copyright (C) 2011-2013 Pulse-Eight Ltd.
-+;http://www.pulse-eight.com/
-+
-+!include "MUI2.nsh"
-+!include "nsDialogs.nsh"
-+!include "LogicLib.nsh"
-+!include "x64.nsh"
-+
-+Name "Pulse-Eight libCEC"
-+OutFile "..\build\libCEC-installer.exe"
-+
-+XPStyle on
-+InstallDir "$PROGRAMFILES\Pulse-Eight\USB-CEC Adapter"
-+InstallDirRegKey HKLM "Software\Pulse-Eight\USB-CEC Adapter software" ""
-+RequestExecutionLevel admin
-+Var StartMenuFolder
-+Var VSRedistSetupError
-+Var VSRedistInstalled
-+
-+!define MUI_FINISHPAGE_LINK "Visit http://libcec.pulse-eight.com/ for more information."
-+!define MUI_FINISHPAGE_LINK_LOCATION "http://libcec.pulse-eight.com/"
-+!define MUI_ABORTWARNING
-+
-+!insertmacro MUI_PAGE_WELCOME
-+!insertmacro MUI_PAGE_LICENSE "..\COPYING"
-+!insertmacro MUI_PAGE_COMPONENTS
-+!insertmacro MUI_PAGE_DIRECTORY
-+
-+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
-+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Pulse-Eight\USB-CEC Adapter sofware"
-+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
-+
-+!insertmacro MUI_PAGE_INSTFILES
-+!insertmacro MUI_PAGE_FINISH
-+
-+!insertmacro MUI_UNPAGE_WELCOME
-+!insertmacro MUI_UNPAGE_CONFIRM
-+!insertmacro MUI_UNPAGE_INSTFILES
-+!insertmacro MUI_UNPAGE_FINISH
-+
-+!insertmacro MUI_LANGUAGE "English"
-+
-+InstType "USB-CEC Driver & libCEC"
-+InstType "USB-CEC Driver Only"
-+InstType "Full installation"
-+
-+Section "USB-CEC Driver" SecDriver
-+ SetShellVarContext current
-+ SectionIn RO
-+ SectionIn 1 2 3
-+
-+ ; Uninstall the old unsigned software if it's found
-+ ReadRegStr $1 HKCU "Software\libCEC" ""
-+ ${If} $1 != ""
-+ MessageBox MB_OK \
-+ "A previous libCEC and USB-CEC Driver was found. This update requires the old version to be uninstalled. Press OK to uninstall the old version."
-+ ExecWait '"$1\Uninstall.exe" /S _?=$1'
-+ Delete "$1\Uninstall.exe"
-+ RMDir "$1"
-+ ${EndIf}
-+
-+ ; Delete libcec.dll and libcec.x64.dll from the system directory
-+ ; Let a seperate installer do this, when we need it
-+ Delete "$SYSDIR\libcec.dll"
-+ ${If} ${RunningX64}
-+ Delete "$SYSDIR\libcec.x64.dll"
-+ ${EndIf}
-+
-+ ; Copy to the installation directory
-+ SetOutPath "$INSTDIR"
-+ File "..\AUTHORS"
-+ File "..\COPYING"
-+
-+ ; Copy the driver installer
-+ SetOutPath "$INSTDIR\driver"
-+ File "..\build\p8-usbcec-driver-installer.exe"
-+
-+ ;Store installation folder
-+ WriteRegStr HKLM "Software\Pulse-Eight\USB-CEC Adapter software" "" $INSTDIR
-+
-+ ;Create uninstaller
-+ WriteUninstaller "$INSTDIR\Uninstall.exe"
-+
-+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-+ SetOutPath "$INSTDIR"
-+
-+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
-+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall Pulse-Eight USB-CEC Adapter software.lnk" "$INSTDIR\Uninstall.exe" \
-+ "" "$INSTDIR\Uninstall.exe" 0 SW_SHOWNORMAL \
-+ "" "Uninstall Pulse-Eight USB-CEC Adapter software."
-+
-+ WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Visit Pulse-Eight.url" "InternetShortcut" "URL" "http://www.pulse-eight.com/"
-+ !insertmacro MUI_STARTMENU_WRITE_END
-+
-+ ;add entry to add/remove programs
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "DisplayName" "Pulse-Eight USB-CEC Adapter software"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "UninstallString" "$INSTDIR\uninstall.exe"
-+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "NoModify" 1
-+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "NoRepair" 1
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "InstallLocation" "$INSTDIR"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "DisplayIcon" "$INSTDIR\cec-client.exe,0"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "Publisher" "Pulse-Eight Limited"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "HelpLink" "http://www.pulse-eight.com/"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware" \
-+ "URLInfoAbout" "http://www.pulse-eight.com"
-+
-+ ;install driver
-+ ExecWait '"$INSTDIR\driver\p8-usbcec-driver-installer.exe" /S'
-+ Delete "$INSTDIR\driver\p8-usbcec-driver-installer.exe"
-+SectionEnd
-+
-+Section "libCEC" SecLibCec
-+ SetShellVarContext current
-+ SectionIn 1 3
-+
-+ ; Copy to the installation directory
-+ SetOutPath "$INSTDIR"
-+ File "..\ChangeLog"
-+ File "..\README"
-+ File "..\build\*.dll"
-+ File "..\build\*.xml"
-+ SetOutPath "$INSTDIR\x64"
-+ File /nonfatal "..\build\x64\*.dll"
-+ File /nonfatal "..\build\x64\*.xml"
-+
-+ ; Copy to XBMC\system
-+ ReadRegStr $1 HKCU "Software\XBMC" ""
-+ ${If} $1 != ""
-+ SetOutPath "$1\system"
-+ File "..\build\libcec.dll"
-+ ${EndIf}
-+
-+ ; Copy the headers
-+ SetOutPath "$INSTDIR\include"
-+ File /r /x *.so "..\include\cec*.*"
-+SectionEnd
-+
-+Section "CEC Debug Client" SecCecClient
-+ SetShellVarContext current
-+ SectionIn 3
-+
-+ ; Copy to the installation directory
-+ SetOutPath "$INSTDIR"
-+ File /x p8-usbcec-driver-installer.exe /x cec-tray.exe "..\build\*.exe"
-+ SetOutPath "$INSTDIR\x64"
-+ File /nonfatal "..\build\x64\*.exe"
-+
-+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-+ SetOutPath "$INSTDIR"
-+
-+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
-+ ${If} ${RunningX64}
-+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\CEC Test client (x64).lnk" "$INSTDIR\x64\cec-client.exe" \
-+ "" "$INSTDIR\x64\cec-client.exe" 0 SW_SHOWNORMAL \
-+ "" "Start the CEC Test client (x64)."
-+ ${Else}
-+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\CEC Test client.lnk" "$INSTDIR\cec-client.exe" \
-+ "" "$INSTDIR\cec-client.exe" 0 SW_SHOWNORMAL \
-+ "" "Start the CEC Test client."
-+ ${EndIf}
-+ !insertmacro MUI_STARTMENU_WRITE_END
-+
-+SectionEnd
-+
-+Section "libCEC Tray Application" SecCecTray
-+ SetShellVarContext current
-+ SectionIn 1 3
-+
-+ ; Uninstall previous beta builds of the tray application
-+ ReadRegStr $1 HKLM "Software\Pulse-Eight\libCECTray" ""
-+ ${If} $1 != ""
-+ MessageBox MB_OK \
-+ "A previous beta build of the libCEC Tray Application was found. Press OK to uninstall the old version. Do not uninstall the driver when asked to. Thank you for participating in the beta test."
-+ ExecWait '"$1\Uninstall.exe" /S _?=$1'
-+ Delete "$1\Uninstall.exe"
-+ ${EndIf}
-+
-+ ; Replace cec-config-gui.exe
-+ Delete "$INSTDIR\cec-config-gui.exe"
-+ ${If} ${RunningX64}
-+ Delete "$INSTDIR\x64\cec-config-gui.exe"
-+ ${EndIf}
-+ Delete "$SMPROGRAMS\$StartMenuFolder\CEC Adapter Configuration.lnk"
-+ ${If} ${RunningX64}
-+ Delete "$SMPROGRAMS\$StartMenuFolder\CEC Adapter Configuration (x64).lnk"
-+ ${EndIf}
-+
-+ ; Copy to the installation directory
-+ SetOutPath "$INSTDIR"
-+ File "..\build\cec-tray.exe"
-+ SetOutPath "$INSTDIR\x64"
-+ File /nonfatal "..\build\x64\cec-tray.exe"
-+
-+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-+ SetOutPath "$INSTDIR"
-+
-+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
-+ ${If} ${RunningX64}
-+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\libCEC Tray (x64).lnk" "$INSTDIR\x64\cec-tray.exe" \
-+ "" "$INSTDIR\x64\cec-tray.exe" 0 SW_SHOWNORMAL \
-+ "" "Start the libCEC Tray (x64)."
-+ ${Else}
-+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\libCEC Tray.lnk" "$INSTDIR\cec-tray.exe" \
-+ "" "$INSTDIR\cec-tray.exe" 0 SW_SHOWNORMAL \
-+ "" "Start the libCEC Tray."
-+ ${EndIf}
-+ !insertmacro MUI_STARTMENU_WRITE_END
-+
-+SectionEnd
-+
-+!define REDISTRIBUTABLE_SECTIONNAME "Microsoft Visual C++ 2010 Redistributable Package"
-+Section "" SecVCRedist
-+ SetShellVarContext current
-+ SectionIn 1 3
-+
-+
-+ ${If} $VSRedistInstalled != "Yes"
-+ ; Download redistributable
-+ SetOutPath "$TEMP\vc20XX"
-+ ${If} ${RunningX64}
-+ NSISdl::download http://packages.pulse-eight.net/windows/vcredist_x64.exe vcredist_x64.exe
-+ ExecWait '"$TEMP\vc20XX\vcredist_x64.exe" /q' $VSRedistSetupError
-+ ${Else}
-+ NSISdl::download http://packages.pulse-eight.net/windows/vcredist_x86.exe vcredist_x86.exe
-+ ExecWait '"$TEMP\vc20XX\vcredist_x86.exe" /q' $VSRedistSetupError
-+ ${Endif}
-+ RMDIR /r "$TEMP\vc20XX"
-+ ${Endif}
-+
-+SectionEnd
-+
-+Function .onInit
-+
-+ ; SP0 x86
-+ ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{196BB40D-1578-3D01-B289-BEFC77A11A1E}" "Version"
-+ ${If} $1 != ""
-+ StrCpy $VSRedistInstalled "Yes"
-+ ${Endif}
-+
-+ ; SP0 x64
-+ ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}" "Version"
-+ ${If} $1 != ""
-+ StrCpy $VSRedistInstalled "Yes"
-+ ${Endif}
-+
-+ ; SP0 ia64
-+ ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C1A35166-4301-38E9-BA67-02823AD72A1B}" "Version"
-+ ${If} $1 != ""
-+ StrCpy $VSRedistInstalled "Yes"
-+ ${Endif}
-+
-+ ; SP1 x86
-+ ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" "Version"
-+ ${If} $1 != ""
-+ StrCpy $VSRedistInstalled "Yes"
-+ ${Endif}
-+
-+ ; SP1 x64
-+ ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1D8E6291-B0D5-35EC-8441-6616F567A0F7}" "Version"
-+ ${If} $1 != ""
-+ StrCpy $VSRedistInstalled "Yes"
-+ ${Endif}
-+
-+ ; SP1 ia64
-+ ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{88C73C1C-2DE5-3B01-AFB8-B46EF4AB41CD}" "Version"
-+ ${If} $1 != ""
-+ StrCpy $VSRedistInstalled "Yes"
-+ ${Endif}
-+
-+ ${If} $VSRedistInstalled == "Yes"
-+ !insertMacro UnSelectSection ${SecVCRedist}
-+ SectionSetText ${SecVCRedist} ""
-+ ${Else}
-+ !insertMacro SelectSection ${SecVCRedist}
-+ SectionSetText ${SecVCRedist} "${REDISTRIBUTABLE_SECTIONNAME}"
-+ ${Endif}
-+
-+FunctionEnd
-+
-+;--------------------------------
-+;Uninstaller Section
-+
-+Section "Uninstall"
-+
-+ SetShellVarContext current
-+
-+ Delete "$INSTDIR\AUTHORS"
-+ Delete "$INSTDIR\*.exe"
-+ Delete "$INSTDIR\ChangeLog"
-+ Delete "$INSTDIR\COPYING"
-+ Delete "$INSTDIR\*.dll"
-+ Delete "$INSTDIR\*.lib"
-+ Delete "$INSTDIR\*.xml"
-+ Delete "$INSTDIR\x64\*.dll"
-+ Delete "$INSTDIR\x64\*.lib"
-+ Delete "$INSTDIR\x64\*.exe"
-+ Delete "$INSTDIR\x64\*.xml"
-+ Delete "$INSTDIR\README"
-+ Delete "$SYSDIR\libcec.dll"
-+ ${If} ${RunningX64}
-+ Delete "$SYSDIR\libcec.x64.dll"
-+ ${EndIf}
-+
-+ ; Uninstall the driver
-+ ReadRegStr $1 HKLM "Software\Pulse-Eight\USB-CEC Adapter driver" ""
-+ ${If} $1 != ""
-+ ExecWait '"$1\Uninstall.exe" /S _?=$1'
-+ ${EndIf}
-+
-+ RMDir /r "$INSTDIR\include"
-+ Delete "$INSTDIR\Uninstall.exe"
-+ RMDir /r "$INSTDIR"
-+ RMDir "$PROGRAMFILES\Pulse-Eight"
-+
-+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
-+ Delete "$SMPROGRAMS\$StartMenuFolder\libCEC Tray.lnk"
-+ ${If} ${RunningX64}
-+ Delete "$SMPROGRAMS\$StartMenuFolder\libCEC Tray (x64).lnk"
-+ ${EndIf}
-+ Delete "$SMPROGRAMS\$StartMenuFolder\CEC Test client.lnk"
-+ ${If} ${RunningX64}
-+ Delete "$SMPROGRAMS\$StartMenuFolder\CEC Test client (x64).lnk"
-+ ${EndIf}
-+ Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall Pulse-Eight USB-CEC Adapter software.lnk"
-+ Delete "$SMPROGRAMS\$StartMenuFolder\Visit Pulse-Eight.url"
-+ RMDir "$SMPROGRAMS\$StartMenuFolder"
-+
-+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter software"
-+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver"
-+ DeleteRegKey /ifempty HKLM "Software\Pulse-Eight\USB-CEC Adapter software"
-+ DeleteRegKey /ifempty HKLM "Software\Pulse-Eight"
-+SectionEnd
-Binärdateien libcec-2.1.4/project/LibCecSharp/LibCecSharp.rc und libcec-imx6/project/LibCecSharp/LibCecSharp.rc sind verschieden.
-diff -Nur libcec-2.1.4/project/LibCecSharp/LibCecSharp.vcxproj libcec-imx6/project/LibCecSharp/LibCecSharp.vcxproj
---- libcec-2.1.4/project/LibCecSharp/LibCecSharp.vcxproj 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/LibCecSharp/LibCecSharp.vcxproj 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,208 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{E54D4581-CD59-4687-BB10-694B8192EABA}</ProjectGuid>
-+ <RootNamespace>LibCecSharp</RootNamespace>
-+ <Keyword>ManagedCProj</Keyword>
-+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <PlatformToolset>v90</PlatformToolset>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <CLRSupport>true</CLRSupport>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <PlatformToolset>v90</PlatformToolset>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <CLRSupport>true</CLRSupport>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <PlatformToolset>v90</PlatformToolset>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <CLRSupport>true</CLRSupport>
-+ <WholeProgramOptimization>true</WholeProgramOptimization>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>DynamicLibrary</ConfigurationType>
-+ <PlatformToolset>v90</PlatformToolset>
-+ <CharacterSet>Unicode</CharacterSet>
-+ <CLRSupport>true</CLRSupport>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup>
-+ <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ReferencePath>$(SolutionDir)..;$(ReferencePath)</ReferencePath>
-+ <OutDir>$(SolutionDir)..\build\</OutDir>
-+ <IntDir>$(Configuration)\</IntDir>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <ReferencePath>$(SolutionDir)..;$(ReferencePath)</ReferencePath>
-+ <OutDir>$(SolutionDir)..\build\x64\</OutDir>
-+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
-+ <LinkIncremental>true</LinkIncremental>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ReferencePath>$(SolutionDir)..;$(ReferencePath)</ReferencePath>
-+ <OutDir>$(SolutionDir)..\build\</OutDir>
-+ <IntDir>$(Configuration)\</IntDir>
-+ <LinkIncremental>false</LinkIncremental>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <ReferencePath>$(SolutionDir)..;$(ReferencePath)</ReferencePath>
-+ <OutDir>$(SolutionDir)..\build\x64\</OutDir>
-+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;$(SolutionDir)..\src\lib\platform\windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <PrecompiledHeader />
-+ <GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
-+ <WarningLevel>Level3</WarningLevel>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>$(OutDir)libcec.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <AssemblyDebug>true</AssemblyDebug>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <Optimization>Disabled</Optimization>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;$(SolutionDir)..\src\lib\platform\windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-+ <PrecompiledHeader />
-+ <GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
-+ <WarningLevel>Level3</WarningLevel>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>$(OutDir)libcec.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <AssemblyDebug>true</AssemblyDebug>
-+ <TargetMachine>MachineX64</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;$(SolutionDir)..\src\lib\platform\windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <PrecompiledHeader />
-+ <GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
-+ <WarningLevel>Level3</WarningLevel>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>$(OutDir)libcec.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <TargetMachine>MachineX86</TargetMachine>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <Midl>
-+ <TargetEnvironment>X64</TargetEnvironment>
-+ </Midl>
-+ <ClCompile>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;$(SolutionDir)..\src\lib\platform\windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-+ <PrecompiledHeader />
-+ <GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
-+ <WarningLevel>Level3</WarningLevel>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-+ </ClCompile>
-+ <Link>
-+ <AdditionalDependencies>$(OutDir)libcec.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <Reference Include="System">
-+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-+ </Reference>
-+ <Reference Include="System.Data">
-+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-+ </Reference>
-+ <Reference Include="System.Xml">
-+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-+ </Reference>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\src\LibCecSharp\AssemblyInfo.cpp" />
-+ <ClCompile Include="..\..\src\LibCecSharp\LibCecSharp.cpp" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\include\cec.h" />
-+ <ClInclude Include="..\..\src\LibCecSharp\CecSharpTypes.h" />
-+ <ClInclude Include="..\..\include\cectypes.h" />
-+ <ClInclude Include="..\..\src\lib\platform\windows\stdint.h" />
-+ <ClInclude Include="resource.h" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="LibCecSharp.rc" />
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project>
-\ Kein Zeilenumbruch am Dateiende.
-diff -Nur libcec-2.1.4/project/LibCecSharp/LibCecSharp.vcxproj.filters libcec-imx6/project/LibCecSharp/LibCecSharp.vcxproj.filters
---- libcec-2.1.4/project/LibCecSharp/LibCecSharp.vcxproj.filters 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/LibCecSharp/LibCecSharp.vcxproj.filters 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,41 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup>
-+ <Filter Include="Source Files">
-+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-+ </Filter>
-+ <Filter Include="Header Files">
-+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-+ </Filter>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\src\LibCecSharp\AssemblyInfo.cpp">
-+ <Filter>Source Files</Filter>
-+ </ClCompile>
-+ <ClCompile Include="..\..\src\LibCecSharp\LibCecSharp.cpp">
-+ <Filter>Source Files</Filter>
-+ </ClCompile>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\include\cec.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\LibCecSharp\CecSharpTypes.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\include\cectypes.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\src\lib\platform\windows\stdint.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ <ClInclude Include="resource.h">
-+ <Filter>Header Files</Filter>
-+ </ClInclude>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="LibCecSharp.rc" />
-+ </ItemGroup>
-+</Project>
-\ Kein Zeilenumbruch am Dateiende.
-Binärdateien libcec-2.1.4/project/LibCecSharp/resource.h und libcec-imx6/project/LibCecSharp/resource.h sind verschieden.
-diff -Nur libcec-2.1.4/project/libcec.sln libcec-imx6/project/libcec.sln
---- libcec-2.1.4/project/libcec.sln 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/libcec.sln 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,74 @@
-+
-+Microsoft Visual Studio Solution File, Format Version 12.00
-+# Visual Studio 2012
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcec", "libcec\libcec.vcxproj", "{C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}"
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testclient", "testclient\testclient.vcxproj", "{F01222BF-6B3D-43BD-B254-434031CB9887}"
-+ ProjectSection(ProjectDependencies) = postProject
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0} = {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}
-+ EndProjectSection
-+EndProject
-+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibCecSharp", "LibCecSharp\LibCecSharp.vcxproj", "{E54D4581-CD59-4687-BB10-694B8192EABA}"
-+ ProjectSection(ProjectDependencies) = postProject
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0} = {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}
-+ EndProjectSection
-+EndProject
-+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B119505D-5CD1-48E4-BED1-9C2BF26153D5}"
-+EndProject
-+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CecSharpTester", "..\src\CecSharpTester\CecSharpTester.csproj", "{B6A7F3A9-F47C-41E5-9754-0BFF233B1172}"
-+EndProject
-+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibCECTray", "..\src\LibCecTray\LibCECTray.csproj", "{58C106FE-C159-46D3-97E1-73AB83232670}"
-+EndProject
-+Global
-+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
-+ Debug|x64 = Debug|x64
-+ Debug|x86 = Debug|x86
-+ Release|x64 = Release|x64
-+ Release|x86 = Release|x86
-+ EndGlobalSection
-+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x64.ActiveCfg = Debug|x64
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x64.Build.0 = Debug|x64
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x86.ActiveCfg = Debug|Win32
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Debug|x86.Build.0 = Debug|Win32
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x64.ActiveCfg = Release|x64
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x64.Build.0 = Release|x64
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x86.ActiveCfg = Release|Win32
-+ {C04B0FB1-667D-4F1C-BDAE-A07CDFFAAAA0}.Release|x86.Build.0 = Release|Win32
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x64.ActiveCfg = Debug|x64
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x64.Build.0 = Debug|x64
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x86.ActiveCfg = Debug|Win32
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Debug|x86.Build.0 = Debug|Win32
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x64.ActiveCfg = Release|x64
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x64.Build.0 = Release|x64
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x86.ActiveCfg = Release|Win32
-+ {F01222BF-6B3D-43BD-B254-434031CB9887}.Release|x86.Build.0 = Release|Win32
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x64.ActiveCfg = Debug|x64
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x64.Build.0 = Debug|x64
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x86.ActiveCfg = Debug|Win32
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Debug|x86.Build.0 = Debug|Win32
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x64.ActiveCfg = Release|x64
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x64.Build.0 = Release|x64
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x86.ActiveCfg = Release|Win32
-+ {E54D4581-CD59-4687-BB10-694B8192EABA}.Release|x86.Build.0 = Release|Win32
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x64.ActiveCfg = Debug|x64
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x64.Build.0 = Debug|x64
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x86.ActiveCfg = Debug|x86
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Debug|x86.Build.0 = Debug|x86
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x64.ActiveCfg = Release|x64
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x64.Build.0 = Release|x64
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x86.ActiveCfg = Release|x86
-+ {B6A7F3A9-F47C-41E5-9754-0BFF233B1172}.Release|x86.Build.0 = Release|x86
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Debug|x64.ActiveCfg = Debug|x64
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Debug|x64.Build.0 = Debug|x64
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Debug|x86.ActiveCfg = Debug|x86
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Debug|x86.Build.0 = Debug|x86
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Release|x64.ActiveCfg = Release|x64
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Release|x64.Build.0 = Release|x64
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Release|x86.ActiveCfg = Release|x86
-+ {58C106FE-C159-46D3-97E1-73AB83232670}.Release|x86.Build.0 = Release|x86
-+ EndGlobalSection
-+ GlobalSection(SolutionProperties) = preSolution
-+ HideSolutionNode = FALSE
-+ EndGlobalSection
-+EndGlobal
-diff -Nur libcec-2.1.4/project/p8-usbcec-driver.nsi libcec-imx6/project/p8-usbcec-driver.nsi
---- libcec-2.1.4/project/p8-usbcec-driver.nsi 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/p8-usbcec-driver.nsi 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,118 @@
-+;p8-usbcec-driver installer
-+;Copyright (C) 2011-2013 Pulse-Eight Ltd.
-+;http://www.pulse-eight.com/
-+
-+!include "MUI2.nsh"
-+!include "nsDialogs.nsh"
-+!include "LogicLib.nsh"
-+!include "x64.nsh"
-+
-+Name "Pulse-Eight USB-CEC Adapter"
-+OutFile "..\build\p8-usbcec-driver-installer.exe"
-+
-+XPStyle on
-+InstallDir "$PROGRAMFILES\Pulse-Eight\USB-CEC Adapter\driver"
-+InstallDirRegKey HKLM "Software\Pulse-Eight\USB-CEC Adapter driver" ""
-+RequestExecutionLevel admin
-+
-+!define MUI_FINISHPAGE_LINK "Visit http://www.pulse-eight.com/ for more information."
-+!define MUI_FINISHPAGE_LINK_LOCATION "http://www.pulse-eight.com/"
-+!define MUI_ABORTWARNING
-+
-+!insertmacro MUI_PAGE_WELCOME
-+!insertmacro MUI_PAGE_LICENSE "..\COPYING"
-+!insertmacro MUI_PAGE_DIRECTORY
-+
-+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
-+!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Pulse-Eight\USB-CEC Adapter driver"
-+
-+!insertmacro MUI_PAGE_INSTFILES
-+!insertmacro MUI_PAGE_FINISH
-+
-+!insertmacro MUI_UNPAGE_WELCOME
-+!insertmacro MUI_UNPAGE_CONFIRM
-+!insertmacro MUI_UNPAGE_INSTFILES
-+!insertmacro MUI_UNPAGE_FINISH
-+
-+!insertmacro MUI_LANGUAGE "English"
-+
-+InstType "USB-CEC driver only"
-+
-+Section "USB-CEC driver" SecDriver
-+ SetShellVarContext current
-+ SectionIn RO
-+ SectionIn 1
-+
-+ ; Copy to the installation directory
-+ SetOutPath "$INSTDIR"
-+ File "..\AUTHORS"
-+ File "..\COPYING"
-+
-+ ; Copy the driver installer and .inf file
-+ File "..\build\dpinst-amd64.exe"
-+ File "..\build\dpinst-x86.exe"
-+ File "..\driver\p8usb-cec.inf"
-+ File "..\driver\p8usb-cec.cat"
-+
-+ ;Store installation folder
-+ WriteRegStr HKLM "Software\Pulse-Eight\USB-CEC Adapter driver" "" $INSTDIR
-+
-+ ;Create uninstaller
-+ WriteUninstaller "$INSTDIR\Uninstall.exe"
-+
-+ ;add entry to add/remove programs
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "DisplayName" "Pulse-Eight USB-CEC Adapter driver"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "UninstallString" "$INSTDIR\uninstall.exe"
-+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "NoModify" 1
-+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "NoRepair" 1
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "InstallLocation" "$INSTDIR"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "Publisher" "Pulse-Eight Limited"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "HelpLink" "http://www.pulse-eight.com/"
-+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver" \
-+ "URLInfoAbout" "http://www.pulse-eight.com"
-+
-+ ;install driver
-+ ${If} ${RunningX64}
-+ ExecWait '"$INSTDIR\dpinst-amd64.exe" /lm /sa /sw /PATH "$INSTDIR"'
-+ ${Else}
-+ ExecWait '"$INSTDIR\dpinst-x86.exe" /lm /sa /sw /PATH "$INSTDIR"'
-+ ${EndIf}
-+SectionEnd
-+
-+;--------------------------------
-+;Uninstaller Section
-+
-+Section "Uninstall"
-+
-+ SetShellVarContext current
-+
-+ ${If} ${RunningX64}
-+ ExecWait '"$INSTDIR\dpinst-amd64.exe" /u "$INSTDIR\p8usb-cec.inf"'
-+ ${Else}
-+ ExecWait '"$INSTDIR\dpinst-x64.exe" /u "$INSTDIR\p8usb-cec.inf"'
-+ ${EndIf}
-+ Delete "$INSTDIR\AUTHORS"
-+ Delete "$INSTDIR\COPYING"
-+ Delete "$INSTDIR\p8usb-cec.inf"
-+ Delete "$INSTDIR\p8usb-cec.cat"
-+ Delete "$INSTDIR\dpinst-amd64.exe"
-+ Delete "$INSTDIR\dpinst-x86.exe"
-+
-+ RMDir /r "$INSTDIR\include"
-+ Delete "$INSTDIR\Uninstall.exe"
-+ RMDir /r "$INSTDIR"
-+ RMDir "$PROGRAMFILES\Pulse-Eight\USB-CEC Adapter"
-+ RMDir "$PROGRAMFILES\Pulse-Eight"
-+
-+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver"
-+ DeleteRegKey /ifempty HKLM "Software\Pulse-Eight\USB-CEC Adapter driver"
-+ DeleteRegKey /ifempty HKLM "Software\Pulse-Eight"
-+
-+SectionEnd
-diff -Nur libcec-2.1.4/project/RPi/bootstrap.sh libcec-imx6/project/RPi/bootstrap.sh
---- libcec-2.1.4/project/RPi/bootstrap.sh 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/RPi/bootstrap.sh 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,32 @@
-+#!/bin/bash
-+
-+_usage()
-+{
-+ echo "Usage: $0 /path/to/toolchain /source/path"
-+ exit 1
-+}
-+
-+if [[ -z "$2" || ! -d "$1" || ! -d "$2" ]]; then
-+ echo "1 = '$1'"
-+ echo "2 = '$2'"
-+ _usage
-+fi
-+
-+SCRIPT_PATH=`dirname $0`
-+cd $SCRIPT_PATH
-+SCRIPT_PATH=`pwd`
-+cd -
-+
-+source $SCRIPT_PATH/config
-+mkdir -p $SCRIPT_PATH/deps
-+
-+cd "$2"
-+
-+if [ -f "configure.ac" ]; then
-+ _set_toolchain_path "$1"
-+ autoreconf -vif
-+ exit $?
-+fi
-+
-+exit 0
-+
-diff -Nur libcec-2.1.4/project/RPi/build-deps.sh libcec-imx6/project/RPi/build-deps.sh
---- libcec-2.1.4/project/RPi/build-deps.sh 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/RPi/build-deps.sh 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,36 @@
-+#!/bin/bash
-+
-+SCRIPT_PATH=`dirname $0`
-+cd $SCRIPT_PATH
-+SCRIPT_PATH=`pwd`
-+cd -
-+
-+source $SCRIPT_PATH/config
-+
-+mkdir -p $SCRIPT_PATH/deps/build
-+cd $SCRIPT_PATH/deps/build
-+
-+if [ ! -d lockdev ]; then
-+ wget ${TARBALL_LOCATION}${LOCKDEV_TARBALL}
-+ tar -Jxf $LOCKDEV_TARBALL
-+
-+ mv `echo $LOCKDEV_TARBALL | sed 's/.tar.xz//'` lockdev
-+ rm $LOCKDEV_TARBALL
-+
-+ cd $SCRIPT_PATH/deps/build/lockdev && \
-+ $SCRIPT_PATH/bootstrap.sh $SCRIPT_PATH/toolchain .
-+
-+ if [ $? -eq 0 ]; then
-+ _set_toolchain_path "$SCRIPT_PATH/toolchain"
-+ ./configure --host=$TARGET_HOST --build=`cc -dumpmachine` --prefix=$SCRIPT_PATH/deps && \
-+ make && \
-+ make install
-+
-+ exit $?
-+ else
-+ exit 1
-+ fi
-+fi
-+
-+exit 0
-+
-diff -Nur libcec-2.1.4/project/RPi/build.sh libcec-imx6/project/RPi/build.sh
---- libcec-2.1.4/project/RPi/build.sh 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/RPi/build.sh 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,37 @@
-+#!/bin/bash
-+
-+SCRIPT_PATH=`dirname $0`
-+cd $SCRIPT_PATH
-+SCRIPT_PATH=`pwd`
-+cd -
-+
-+if [ -z "$1" ]; then
-+ DEST_DIR="/opt/libcec-rpi"
-+else
-+ DEST_DIR="$1"
-+fi
-+
-+source $SCRIPT_PATH/config
-+
-+$SCRIPT_PATH/get-toolchain.sh && \
-+$SCRIPT_PATH/build-deps.sh && \
-+$SCRIPT_PATH/bootstrap.sh $SCRIPT_PATH/toolchain .
-+
-+if [ $? -eq 0 ]; then
-+ _set_toolchain_path "$SCRIPT_PATH/toolchain"
-+ # configure with --enable-rpi-cec-api so we bug out if we can't find Pi support or can't build it
-+ ./configure --host=$TARGET_HOST \
-+ --build=`cc -dumpmachine` \
-+ --prefix=$DEST_DIR \
-+ --enable-debug \
-+ --enable-rpi \
-+ --with-rpi-include-path="${SCRIPT_PATH}/firmware/hardfp/opt/vc/include" \
-+ --with-rpi-lib-path="${SCRIPT_PATH}/firmware/hardfp/opt/vc/lib" && \
-+ make clean && \
-+ make V=0
-+
-+ exit $?
-+else
-+ exit 1
-+fi
-+
-diff -Nur libcec-2.1.4/project/RPi/config libcec-imx6/project/RPi/config
---- libcec-2.1.4/project/RPi/config 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/RPi/config 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,37 @@
-+TOOLCHAIN_GIT="git://github.com/raspberrypi/tools.git"
-+FIRMWARE_GIT="git://github.com/raspberrypi/firmware.git"
-+TARBALL_LOCATION="http://sources.openelec.tv/devel/"
-+LOCKDEV_TARBALL="lockdev-16b8996.tar.xz"
-+
-+_set_toolchain_path()
-+{
-+ echo "Setting toolchain path to: '$1'"
-+
-+ export TARGET_TOOLCHAIN_PATH="$1/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin"
-+ export TARGET_TOOLCHAIN_LIB_PATH="$1/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/lib"
-+ export TARGET_HOST="arm-bcm2708hardfp-linux-gnueabi"
-+
-+ export CC=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-gcc
-+ export CXX=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-g++
-+ export LD=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-ld
-+ export AS=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-as
-+ export AR=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-ar
-+ export NM=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-nm
-+ export RANLIB=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-ranlib
-+ export OBJCOPY=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-objcopy
-+ export OBJDUMP=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-objdump
-+ export STRIP=${TARGET_TOOLCHAIN_PATH}/${TARGET_HOST}-strip
-+
-+ export CPPFLAGS="-I${SCRIPT_PATH}/deps/include"
-+ export CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard -Wno-psabi -Wa,-mno-warn-deprecated -O3 -fexcess-precision=fast -ffast-math -I${SCRIPT_PATH}/deps/include"
-+ export CXXFLAGS="$CFLAGS"
-+ export LDFLAGS="-march=armv6 -mtune=arm1176jzf-s -L${SCRIPT_PATH}/deps/lib"
-+
-+ #export PKG_CONFIG_PATH="$TARGET_PKG_CONFIG_PATH"
-+ export PKG_CONFIG_LIBDIR="${SCRIPT_PATH}/deps/lib/pkgconfig:${SCRIPT_PATH}/deps/lib/share/pkgconfig"
-+ export PKG_CONFIG_SYSROOT_DIR="${SCRIPT_PATH}/deps"
-+
-+ export PATH="$TARGET_TOOLCHAIN_PATH:$PATH"
-+ export LD_LIBRARY_PATH="$TARGET_TOOLCHAIN_LIB_PATH:$LD_LIBRARY_PATH"
-+}
-+
-diff -Nur libcec-2.1.4/project/RPi/get-toolchain.sh libcec-imx6/project/RPi/get-toolchain.sh
---- libcec-2.1.4/project/RPi/get-toolchain.sh 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/RPi/get-toolchain.sh 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,29 @@
-+#!/bin/bash
-+
-+SCRIPT_PATH=`dirname $0`
-+cd $SCRIPT_PATH
-+SCRIPT_PATH=`pwd`
-+cd -
-+
-+source $SCRIPT_PATH/config
-+
-+if [ ! -d $SCRIPT_PATH/toolchain ]; then
-+ git clone $TOOLCHAIN_GIT $SCRIPT_PATH/toolchain
-+else
-+ cd $SCRIPT_PATH/toolchain
-+# git pull
-+fi
-+
-+if [ ! -d $SCRIPT_PATH/firmware ]; then
-+ git clone $FIRMWARE_GIT $SCRIPT_PATH/firmware
-+else
-+ cd $SCRIPT_PATH/firmware
-+# git pull
-+fi
-+
-+if [[ -d $SCRIPT_PATH/toolchain && -d $SCRIPT_PATH/firmware ]]; then
-+ exit 0
-+else
-+ exit 1
-+fi
-+
-Binärdateien libcec-2.1.4/project/testclient/resource.h und libcec-imx6/project/testclient/resource.h sind verschieden.
-Binärdateien libcec-2.1.4/project/testclient/testclient.rc und libcec-imx6/project/testclient/testclient.rc sind verschieden.
-diff -Nur libcec-2.1.4/project/testclient/testclient.vcxproj libcec-imx6/project/testclient/testclient.vcxproj
---- libcec-2.1.4/project/testclient/testclient.vcxproj 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/testclient/testclient.vcxproj 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,187 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup Label="ProjectConfigurations">
-+ <ProjectConfiguration Include="Debug|Win32">
-+ <Configuration>Debug</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Debug|x64">
-+ <Configuration>Debug</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|Win32">
-+ <Configuration>Release</Configuration>
-+ <Platform>Win32</Platform>
-+ </ProjectConfiguration>
-+ <ProjectConfiguration Include="Release|x64">
-+ <Configuration>Release</Configuration>
-+ <Platform>x64</Platform>
-+ </ProjectConfiguration>
-+ </ItemGroup>
-+ <PropertyGroup Label="Globals">
-+ <ProjectGuid>{F01222BF-6B3D-43BD-B254-434031CB9887}</ProjectGuid>
-+ <Keyword>Win32Proj</Keyword>
-+ <RootNamespace>testclient</RootNamespace>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <UseDebugLibraries>true</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <UseDebugLibraries>true</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <UseDebugLibraries>false</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-+ <ConfigurationType>Application</ConfigurationType>
-+ <UseDebugLibraries>false</UseDebugLibraries>
-+ <CharacterSet>MultiByte</CharacterSet>
-+ <PlatformToolset>v100</PlatformToolset>
-+ </PropertyGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-+ <ImportGroup Label="ExtensionSettings">
-+ </ImportGroup>
-+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-+ </ImportGroup>
-+ <PropertyGroup Label="UserMacros" />
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <OutDir>$(SolutionDir)..\build\</OutDir>
-+ <TargetName>cec-client</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <OutDir>$(SolutionDir)..\build\x64\</OutDir>
-+ <TargetName>cec-client</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <OutDir>$(SolutionDir)..\build\</OutDir>
-+ <TargetName>cec-client</TargetName>
-+ </PropertyGroup>
-+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <OutDir>$(SolutionDir)..\build\x64\</OutDir>
-+ <TargetName>cec-client</TargetName>
-+ </PropertyGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-+ <ClCompile>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <WarningLevel>Level4</WarningLevel>
-+ <Optimization>Disabled</Optimization>
-+ <PreprocessorDefinitions>_USE_32BIT_TIME_T;_DEBUG;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <AdditionalIncludeDirectories>$(SolutiontDir)..\..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ </ClCompile>
-+ <Link>
-+ <SubSystem>Console</SubSystem>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <Version>
-+ </Version>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-+ <ClCompile>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <WarningLevel>Level4</WarningLevel>
-+ <Optimization>Disabled</Optimization>
-+ <PreprocessorDefinitions>_WIN64;_DEBUG;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <AdditionalIncludeDirectories>$(SolutiontDir)..\..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ </ClCompile>
-+ <Link>
-+ <SubSystem>Console</SubSystem>
-+ <GenerateDebugInformation>true</GenerateDebugInformation>
-+ <AdditionalDependencies>
-+ </AdditionalDependencies>
-+ <Version>
-+ </Version>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-+ <ClCompile>
-+ <WarningLevel>Level4</WarningLevel>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <Optimization>Full</Optimization>
-+ <FunctionLevelLinking>false</FunctionLevelLinking>
-+ <IntrinsicFunctions>true</IntrinsicFunctions>
-+ <PreprocessorDefinitions>_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-+ </ClCompile>
-+ <Link>
-+ <SubSystem>Console</SubSystem>
-+ <GenerateDebugInformation>false</GenerateDebugInformation>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <Version>
-+ </Version>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-+ <ClCompile>
-+ <WarningLevel>Level4</WarningLevel>
-+ <PrecompiledHeader>
-+ </PrecompiledHeader>
-+ <Optimization>Full</Optimization>
-+ <IntrinsicFunctions>true</IntrinsicFunctions>
-+ <PreprocessorDefinitions>_WIN64;_CRT_SECURE_NO_WARNINGS;_WINSOCKAPI_;__STDC_CONSTANT_MACROS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-+ <TreatWarningAsError>true</TreatWarningAsError>
-+ <DisableSpecificWarnings>
-+ </DisableSpecificWarnings>
-+ <AdditionalIncludeDirectories>$(SolutionDir)..\include;$(SolutionDir)..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-+ </ClCompile>
-+ <Link>
-+ <SubSystem>Console</SubSystem>
-+ <GenerateDebugInformation>false</GenerateDebugInformation>
-+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
-+ <OptimizeReferences>true</OptimizeReferences>
-+ <AdditionalDependencies>
-+ </AdditionalDependencies>
-+ <Version>
-+ </Version>
-+ </Link>
-+ </ItemDefinitionGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\include\cec.h" />
-+ <ClInclude Include="..\..\include\cecloader.h" />
-+ <ClInclude Include="resource.h" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\src\lib\platform\windows\os-threads.cpp" />
-+ <ClCompile Include="..\..\src\testclient\main.cpp" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="testclient.rc" />
-+ </ItemGroup>
-+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-+ <ImportGroup Label="ExtensionTargets">
-+ </ImportGroup>
-+</Project>
-\ Kein Zeilenumbruch am Dateiende.
-diff -Nur libcec-2.1.4/project/testclient/testclient.vcxproj.filters libcec-imx6/project/testclient/testclient.vcxproj.filters
---- libcec-2.1.4/project/testclient/testclient.vcxproj.filters 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/project/testclient/testclient.vcxproj.filters 2014-09-01 13:48:53.702431449 +0200
-@@ -0,0 +1,29 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-+ <ItemGroup>
-+ <Filter Include="exports">
-+ <UniqueIdentifier>{cc0a01c1-e1e7-4af8-9656-fa9463140613}</UniqueIdentifier>
-+ </Filter>
-+ <Filter Include="platform">
-+ <UniqueIdentifier>{f08c0a80-22d9-4bdd-90de-b9cf5fa88f99}</UniqueIdentifier>
-+ </Filter>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClInclude Include="..\..\include\cec.h">
-+ <Filter>exports</Filter>
-+ </ClInclude>
-+ <ClInclude Include="..\..\include\cecloader.h">
-+ <Filter>exports</Filter>
-+ </ClInclude>
-+ <ClInclude Include="resource.h" />
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ClCompile Include="..\..\src\testclient\main.cpp" />
-+ <ClCompile Include="..\..\src\lib\platform\windows\os-threads.cpp">
-+ <Filter>platform</Filter>
-+ </ClCompile>
-+ </ItemGroup>
-+ <ItemGroup>
-+ <ResourceCompile Include="testclient.rc" />
-+ </ItemGroup>
-+</Project>
-\ Kein Zeilenumbruch am Dateiende.
-diff -Nur libcec-2.1.4/src/lib/adapter/AdapterFactory.cpp libcec-imx6/src/lib/adapter/AdapterFactory.cpp
---- libcec-2.1.4/src/lib/adapter/AdapterFactory.cpp 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/src/lib/adapter/AdapterFactory.cpp 2014-09-01 13:48:54.718437326 +0200
-@@ -52,6 +52,11 @@
- #include "TDA995x/TDA995xCECAdapterCommunication.h"
- #endif
-
-+#if defined(HAVE_IMX_API)
-+#include "IMX/IMXCECAdapterDetection.h"
-+#include "IMX/IMXCECAdapterCommunication.h"
-+#endif
-+
- using namespace std;
- using namespace CEC;
-
-@@ -109,7 +114,22 @@
- }
- #endif
-
--#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API)
-+
-+#if defined(HAVE_IMX_API)
-+ if (iAdaptersFound < iBufSize && CIMXCECAdapterDetection::FindAdapter() &&
-+ (!strDevicePath || !strcmp(strDevicePath, CEC_IMX_VIRTUAL_COM)))
-+ {
-+ snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_IMX_PATH);
-+ snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_IMX_VIRTUAL_COM);
-+ deviceList[iAdaptersFound].iVendorId = IMX_ADAPTER_VID;
-+ deviceList[iAdaptersFound].iProductId = IMX_ADAPTER_PID;
-+ deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_IMX;
-+ iAdaptersFound++;
-+ }
-+#endif
-+
-+
-+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_IMX_API)
- #error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
- #endif
-
-@@ -128,11 +148,16 @@
- return new CRPiCECAdapterCommunication(m_lib->m_cec);
- #endif
-
-+#if defined(HAVE_IMX_API)
-+ if (!strcmp(strPort, CEC_IMX_VIRTUAL_COM))
-+ return new CIMXCECAdapterCommunication(m_lib->m_cec);
-+#endif
-+
- #if defined(HAVE_P8_USB)
- return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
- #endif
-
--#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API)
-+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_IMX_API)
- return NULL;
- #endif
- }
-diff -Nur libcec-2.1.4/src/lib/adapter/IMX/AdapterMessageQueue.h libcec-imx6/src/lib/adapter/IMX/AdapterMessageQueue.h
---- libcec-2.1.4/src/lib/adapter/IMX/AdapterMessageQueue.h 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/src/lib/adapter/IMX/AdapterMessageQueue.h 2014-09-01 13:48:54.718437326 +0200
-@@ -0,0 +1,134 @@
-+#pragma once
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * This program is dual-licensed; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ * Alternatively, you can license this library under a commercial license,
-+ * please contact Pulse-Eight Licensing for more information.
-+ *
-+ * For more information contact:
-+ * Pulse-Eight Licensing <license@pulse-eight.com>
-+ * http://www.pulse-eight.com/
-+ * http://www.pulse-eight.net/
-+ */
-+
-+#include "lib/platform/threads/mutex.h"
-+
-+namespace CEC
-+{
-+ using namespace PLATFORM;
-+
-+ class CAdapterMessageQueueEntry
-+ {
-+ public:
-+ CAdapterMessageQueueEntry(const cec_command &command)
-+ : m_bWaiting(true), m_retval((uint32_t)-1), m_bSucceeded(false)
-+ {
-+ m_hash = hashValue(
-+ uint32_t(command.opcode_set ? command.opcode : CEC_OPCODE_NONE),
-+ command.initiator, command.destination);
-+ }
-+
-+ virtual ~CAdapterMessageQueueEntry(void) {}
-+
-+ /*!
-+ * @brief Query result from worker thread
-+ */
-+ uint32_t Result() const
-+ {
-+ return m_retval;
-+ }
-+
-+ /*!
-+ * @brief Signal waiting threads
-+ */
-+ void Broadcast(void)
-+ {
-+ CLockObject lock(m_mutex);
-+ m_condition.Broadcast();
-+ }
-+
-+ /*!
-+ * @brief Signal waiting thread(s) when message matches this entry
-+ */
-+ bool CheckMatch(uint32_t opcode, cec_logical_address initiator,
-+ cec_logical_address destination, uint32_t response)
-+ {
-+ uint32_t hash = hashValue(opcode, initiator, destination);
-+
-+ if (hash == m_hash)
-+ {
-+ CLockObject lock(m_mutex);
-+
-+ m_retval = response;
-+ m_bSucceeded = true;
-+ m_condition.Signal();
-+ return true;
-+ }
-+
-+ return false;
-+ }
-+
-+ /*!
-+ * @brief Wait for a response to this command.
-+ * @param iTimeout The timeout to use while waiting.
-+ * @return True when a response was received before the timeout passed, false otherwise.
-+ */
-+ bool Wait(uint32_t iTimeout)
-+ {
-+ CLockObject lock(m_mutex);
-+
-+ bool bReturn = m_bSucceeded ? true : m_condition.Wait(m_mutex, m_bSucceeded, iTimeout);
-+ m_bWaiting = false;
-+ return bReturn;
-+ }
-+
-+ /*!
-+ * @return True while a thread is waiting for a signal or isn't waiting yet, false otherwise.
-+ */
-+ bool IsWaiting(void)
-+ {
-+ CLockObject lock(m_mutex);
-+ return m_bWaiting;
-+ }
-+
-+ /*!
-+ * @return Hash value for given cec_command
-+ */
-+ static uint32_t hashValue(uint32_t opcode,
-+ cec_logical_address initiator,
-+ cec_logical_address destination)
-+ {
-+ return 1 | ((uint32_t)initiator << 8) |
-+ ((uint32_t)destination << 16) | ((uint32_t)opcode << 16);
-+ }
-+
-+ private:
-+ bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */
-+ PLATFORM::CCondition<bool> m_condition; /**< the condition to wait on */
-+ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
-+ uint32_t m_hash;
-+ uint32_t m_retval;
-+ bool m_bSucceeded;
-+ };
-+
-+};
-diff -Nur libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
---- libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 2014-09-01 13:48:54.718437326 +0200
-@@ -0,0 +1,279 @@
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+#include "env.h"
-+
-+#if defined(HAVE_IMX_API)
-+#include "IMXCECAdapterCommunication.h"
-+
-+#include "lib/CECTypeUtils.h"
-+#include "lib/LibCEC.h"
-+#include "lib/platform/sockets/cdevsocket.h"
-+#include "lib/platform/util/StdString.h"
-+#include "lib/platform/util/buffer.h"
-+
-+/*
-+ * Ioctl definitions from kernel header
-+ */
-+#define HDMICEC_IOC_MAGIC 'H'
-+#define HDMICEC_IOC_SETLOGICALADDRESS _IOW(HDMICEC_IOC_MAGIC, 1, unsigned char)
-+#define HDMICEC_IOC_STARTDEVICE _IO(HDMICEC_IOC_MAGIC, 2)
-+#define HDMICEC_IOC_STOPDEVICE _IO(HDMICEC_IOC_MAGIC, 3)
-+#define HDMICEC_IOC_GETPHYADDRESS _IOR(HDMICEC_IOC_MAGIC, 4, unsigned char[4])
-+
-+#define MAX_CEC_MESSAGE_LEN 17
-+
-+#define MESSAGE_TYPE_RECEIVE_SUCCESS 1
-+#define MESSAGE_TYPE_NOACK 2
-+#define MESSAGE_TYPE_DISCONNECTED 3
-+#define MESSAGE_TYPE_CONNECTED 4
-+#define MESSAGE_TYPE_SEND_SUCCESS 5
-+
-+typedef struct hdmi_cec_event{
-+ int event_type;
-+ int msg_len;
-+ unsigned char msg[MAX_CEC_MESSAGE_LEN];
-+}hdmi_cec_event;
-+
-+
-+using namespace std;
-+using namespace CEC;
-+using namespace PLATFORM;
-+
-+#include "AdapterMessageQueue.h"
-+
-+#define LIB_CEC m_callback->GetLib()
-+
-+// these are defined in nxp private header file
-+#define CEC_MSG_SUCCESS 0x00 /*Message transmisson Succeed*/
-+#define CEC_CSP_OFF_STATE 0x80 /*CSP in Off State*/
-+#define CEC_BAD_REQ_SERVICE 0x81 /*Bad .req service*/
-+#define CEC_MSG_FAIL_UNABLE_TO_ACCESS 0x82 /*Message transmisson failed: Unable to access CEC line*/
-+#define CEC_MSG_FAIL_ARBITRATION_ERROR 0x83 /*Message transmisson failed: Arbitration error*/
-+#define CEC_MSG_FAIL_BIT_TIMMING_ERROR 0x84 /*Message transmisson failed: Bit timming error*/
-+#define CEC_MSG_FAIL_DEST_NOT_ACK 0x85 /*Message transmisson failed: Destination Address not aknowledged*/
-+#define CEC_MSG_FAIL_DATA_NOT_ACK 0x86 /*Message transmisson failed: Databyte not acknowledged*/
-+
-+
-+CIMXCECAdapterCommunication::CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
-+ IAdapterCommunication(callback)/*,
-+ m_bLogicalAddressChanged(false)*/
-+{
-+ CLockObject lock(m_mutex);
-+
-+ m_iNextMessage = 0;
-+ //m_logicalAddresses.Clear();
-+ m_logicalAddress = CECDEVICE_UNKNOWN;
-+ m_dev = new CCDevSocket(CEC_IMX_PATH);
-+}
-+
-+CIMXCECAdapterCommunication::~CIMXCECAdapterCommunication(void)
-+{
-+ Close();
-+
-+ CLockObject lock(m_mutex);
-+ delete m_dev;
-+ m_dev = 0;
-+}
-+
-+bool CIMXCECAdapterCommunication::IsOpen(void)
-+{
-+ return IsInitialised() && m_dev->IsOpen();
-+}
-+
-+bool CIMXCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChecks), bool bStartListening)
-+{
-+ if (m_dev->Open(iTimeoutMs))
-+ {
-+ if (!bStartListening || CreateThread()) {
-+ if (m_dev->Ioctl(HDMICEC_IOC_STARTDEVICE, NULL) != 0) {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to start device\n", __func__);
-+ }
-+ return true;
-+ }
-+ m_dev->Close();
-+ }
-+
-+ return false;
-+}
-+
-+
-+void CIMXCECAdapterCommunication::Close(void)
-+{
-+ StopThread(0);
-+ if (m_dev->Ioctl(HDMICEC_IOC_STOPDEVICE, NULL) != 0) {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to stop device\n", __func__);
-+ }
-+ m_dev->Close();
-+}
-+
-+
-+std::string CIMXCECAdapterCommunication::GetError(void) const
-+{
-+ std::string strError(m_strError);
-+ return strError;
-+}
-+
-+
-+cec_adapter_message_state CIMXCECAdapterCommunication::Write(
-+ const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply))
-+{
-+ //cec_frame frame;
-+ unsigned char message[MAX_CEC_MESSAGE_LEN];
-+ int msg_len = 1;
-+ cec_adapter_message_state rc = ADAPTER_MESSAGE_STATE_ERROR;
-+
-+ if ((size_t)data.parameters.size + data.opcode_set + 1 > sizeof(message))
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: data size too large !", __func__);
-+ return ADAPTER_MESSAGE_STATE_ERROR;
-+ }
-+
-+ message[0] = (data.initiator << 4) | (data.destination & 0x0f);
-+ if (data.opcode_set)
-+ {
-+ message[1] = data.opcode;
-+ msg_len++;
-+ memcpy(&message[2], data.parameters.data, data.parameters.size);
-+ msg_len+=data.parameters.size;
-+ }
-+
-+ if (m_dev->Write(message, msg_len) == msg_len)
-+ {
-+ rc = ADAPTER_MESSAGE_STATE_SENT_ACKED;
-+ }
-+ else
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: sent command error !", __func__);
-+
-+ return rc;
-+}
-+
-+
-+uint16_t CIMXCECAdapterCommunication::GetFirmwareVersion(void)
-+{
-+ /* FIXME add ioctl ? */
-+ return 0;
-+}
-+
-+
-+cec_vendor_id CIMXCECAdapterCommunication::GetVendorId(void)
-+{
-+ return CEC_VENDOR_UNKNOWN;
-+}
-+
-+
-+uint16_t CIMXCECAdapterCommunication::GetPhysicalAddress(void)
-+{
-+ uint32_t info;
-+
-+ if (m_dev->Ioctl(HDMICEC_IOC_GETPHYADDRESS, &info) != 0)
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_GETPHYADDRESS failed !", __func__);
-+ return CEC_INVALID_PHYSICAL_ADDRESS;
-+ }
-+
-+ return info;
-+}
-+
-+
-+cec_logical_addresses CIMXCECAdapterCommunication::GetLogicalAddresses(void)
-+{
-+ cec_logical_addresses addresses;
-+ addresses.Clear();
-+
-+ CLockObject lock(m_mutex);
-+ if ( m_logicalAddress != CECDEVICE_UNKNOWN)
-+ addresses.Set(m_logicalAddress);
-+
-+ return addresses;
-+}
-+
-+
-+bool CIMXCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses)
-+{
-+ int log_addr = addresses.primary;
-+
-+ CLockObject lock(m_mutex);
-+ if (m_logicalAddress == log_addr)
-+ return true;
-+
-+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)log_addr) != 0)
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
-+ return false;
-+ }
-+
-+ m_logicalAddress = (cec_logical_address)log_addr;
-+ return true;
-+}
-+
-+
-+void *CIMXCECAdapterCommunication::Process(void)
-+{
-+ bool bHandled;
-+ hdmi_cec_event event;
-+ int ret;
-+
-+ uint32_t opcode, status;
-+ cec_logical_address initiator, destination;
-+
-+ while (!IsStopped())
-+ {
-+ ret = m_dev->Read((char *)&event, sizeof(event), 5000);
-+ if (ret > 0)
-+ {
-+
-+ initiator = cec_logical_address(event.msg[0] >> 4);
-+ destination = cec_logical_address(event.msg[0] & 0x0f);
-+
-+ //LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read data : type : %d initiator %d dest %d", __func__, event.event_type, initiator, destination);
-+ if (event.event_type == MESSAGE_TYPE_RECEIVE_SUCCESS)
-+ /* Message received */
-+ {
-+ cec_command cmd;
-+
-+ cec_command::Format(
-+ cmd, initiator, destination,
-+ ( event.msg_len > 1 ) ? cec_opcode(event.msg[1]) : CEC_OPCODE_NONE);
-+
-+ for( uint8_t i = 2; i < event.msg_len; i++ )
-+ cmd.parameters.PushBack(event.msg[i]);
-+
-+ if (!IsStopped())
-+ m_callback->OnCommandReceived(cmd);
-+ }
-+ /* We are not interested in other events */
-+ } /*else {
-+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read returned %d", __func__, ret);
-+ }*/
-+
-+ }
-+
-+ return 0;
-+}
-+
-+#endif // HAVE_IMX_API
-diff -Nur libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterCommunication.h libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterCommunication.h
---- libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterCommunication.h 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterCommunication.h 2014-09-01 13:48:54.722437350 +0200
-@@ -0,0 +1,114 @@
-+#pragma once
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+#if defined(HAVE_IMX_API)
-+
-+#include "lib/platform/threads/mutex.h"
-+#include "lib/platform/threads/threads.h"
-+#include "lib/platform/sockets/socket.h"
-+#include "lib/adapter/AdapterCommunication.h"
-+#include <map>
-+
-+#define IMX_ADAPTER_VID 0x0471 /*FIXME TBD*/
-+#define IMX_ADAPTER_PID 0x1001
-+
-+
-+
-+namespace PLATFORM
-+{
-+ class CCDevSocket;
-+};
-+
-+
-+namespace CEC
-+{
-+ class CAdapterMessageQueueEntry;
-+
-+ class CIMXCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread
-+ {
-+ public:
-+ /*!
-+ * @brief Create a new USB-CEC communication handler.
-+ * @param callback The callback to use for incoming CEC commands.
-+ */
-+ CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback);
-+ virtual ~CIMXCECAdapterCommunication(void);
-+
-+ /** @name IAdapterCommunication implementation */
-+ ///{
-+ bool Open(uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT, bool bSkipChecks = false, bool bStartListening = true);
-+ void Close(void);
-+ bool IsOpen(void);
-+ std::string GetError(void) const;
-+ cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool bIsReply);
-+
-+ bool SetLineTimeout(uint8_t UNUSED(iTimeout)) { return true; }
-+ bool StartBootloader(void) { return false; }
-+ bool SetLogicalAddresses(const cec_logical_addresses &addresses);
-+ cec_logical_addresses GetLogicalAddresses(void);
-+ bool PingAdapter(void) { return IsInitialised(); }
-+ uint16_t GetFirmwareVersion(void);
-+ uint32_t GetFirmwareBuildDate(void) { return 0; }
-+ bool IsRunningLatestFirmware(void) { return true; }
-+ bool PersistConfiguration(const libcec_configuration & UNUSED(configuration)) { return false; }
-+ bool GetConfiguration(libcec_configuration & UNUSED(configuration)) { return false; }
-+ std::string GetPortName(void) { return std::string("IMX"); }
-+ uint16_t GetPhysicalAddress(void);
-+ bool SetControlledMode(bool UNUSED(controlled)) { return true; }
-+ cec_vendor_id GetVendorId(void);
-+ bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address <= CECDEVICE_BROADCAST; }
-+ cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_IMX; }
-+ uint16_t GetAdapterVendorId(void) const { return IMX_ADAPTER_VID; }
-+ uint16_t GetAdapterProductId(void) const { return IMX_ADAPTER_PID; }
-+ void SetActiveSource(bool UNUSED(bSetTo), bool UNUSED(bClientUnregistered)) {}
-+ ///}
-+
-+ /** @name PLATFORM::CThread implementation */
-+ ///{
-+ void *Process(void);
-+ ///}
-+
-+ private:
-+ bool IsInitialised(void) const { return m_dev != 0; };
-+
-+ std::string m_strError; /**< current error message */
-+
-+ //cec_logical_addresses m_logicalAddresses;
-+ cec_logical_address m_logicalAddress;
-+
-+ PLATFORM::CMutex m_mutex;
-+ PLATFORM::CCDevSocket *m_dev; /**< the device connection */
-+
-+ PLATFORM::CMutex m_messageMutex;
-+ uint32_t m_iNextMessage;
-+ std::map<uint32_t, CAdapterMessageQueueEntry *> m_messages;
-+ };
-+
-+};
-+
-+#endif
-diff -Nur libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp
---- libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp 2014-09-01 13:48:54.722437350 +0200
-@@ -0,0 +1,42 @@
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+#include "env.h"
-+#include <stdio.h>
-+
-+#if defined(HAVE_IMX_API)
-+#include "IMXCECAdapterDetection.h"
-+
-+
-+using namespace CEC;
-+
-+bool CIMXCECAdapterDetection::FindAdapter(void)
-+{
-+ return access(CEC_IMX_PATH, 0) == 0;
-+}
-+
-+#endif
-diff -Nur libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterDetection.h libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterDetection.h
---- libcec-2.1.4/src/lib/adapter/IMX/IMXCECAdapterDetection.h 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/src/lib/adapter/IMX/IMXCECAdapterDetection.h 2014-09-01 13:48:54.722437350 +0200
-@@ -0,0 +1,36 @@
-+#pragma once
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+namespace CEC
-+{
-+ class CIMXCECAdapterDetection
-+ {
-+ public:
-+ static bool FindAdapter(void);
-+ };
-+}
-diff -Nur libcec-2.1.4/src/lib/CECTypeUtils.h libcec-imx6/src/lib/CECTypeUtils.h
---- libcec-2.1.4/src/lib/CECTypeUtils.h 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/src/lib/CECTypeUtils.h 2014-09-01 13:48:54.698437211 +0200
-@@ -858,6 +858,8 @@
- return "Raspberry Pi";
- case ADAPTERTYPE_TDA995x:
- return "TDA995x";
-+ case ADAPTERTYPE_IMX:
-+ return "i.MX";
- default:
- return "unknown";
- }
-diff -Nur libcec-2.1.4/src/lib/Makefile.am libcec-imx6/src/lib/Makefile.am
---- libcec-2.1.4/src/lib/Makefile.am 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-imx6/src/lib/Makefile.am 2014-09-01 13:48:54.718437326 +0200
-@@ -59,5 +59,10 @@
- adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
- endif
-
-+## i.MX6 support
-+if USE_IMX_API
-+libcec_la_SOURCES += adapter/IMX/IMXCECAdapterDetection.cpp \
-+ adapter/IMX/IMXCECAdapterCommunication.cpp
-+endif
-
- libcec_la_LDFLAGS = @LIBS_LIBCEC@ -version-info @VERSION@
-diff -Nur libcec-2.1.4/support/create-driver-installer.cmd libcec-imx6/support/create-driver-installer.cmd
---- libcec-2.1.4/support/create-driver-installer.cmd 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/support/create-driver-installer.cmd 2014-09-01 13:48:54.758437558 +0200
-@@ -0,0 +1,58 @@
-+@echo off
-+
-+rem Check for NSIS
-+IF EXIST "%ProgramFiles%\NSIS\makensis.exe" (
-+ set NSIS="%ProgramFiles%\NSIS\makensis.exe"
-+) ELSE IF EXIST "%ProgramFiles(x86)%\NSIS\makensis.exe" (
-+ set NSIS="%ProgramFiles(x86)%\NSIS\makensis.exe"
-+) ELSE GOTO NONSIS
-+
-+rem Check for the Windows DDK
-+IF NOT EXIST "C:\WinDDK\7600.16385.1" GOTO NODDK
-+set DDK="C:\WinDDK\7600.16385.1"
-+
-+mkdir ..\build
-+
-+echo. Copying driver installer
-+copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\build\dpinst-amd64.exe
-+copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\build\dpinst-x86.exe
-+
-+:CREATECAT
-+cd ..\driver
-+IF EXIST "..\support\private\create-cat.cmd" (
-+ echo. Updating the catalogue
-+ CALL ..\support\private\create-cat.cmd p8usb-cec.cat
-+)
-+
-+:CREATEINSTALLER
-+echo. Creating the installer
-+cd ..\project
-+%NSIS% /V1 /X"SetCompressor /FINAL lzma" "p8-usbcec-driver.nsi"
-+
-+IF NOT EXIST "..\build\p8-usbcec-driver-installer.exe" GOTO :ERRORCREATINGINSTALLER
-+
-+rem Sign the installer if sign-binary.cmd exists
-+IF EXIST "..\support\private\sign-binary.cmd" (
-+ echo. Signing the installer binaries
-+ CALL ..\support\private\sign-binary.cmd ..\build\p8-usbcec-driver-installer.exe
-+)
-+
-+echo. The installer can be found here: ..\build\p8-usbcec-driver-installer.exe
-+
-+GOTO EXIT
-+
-+:NOSIS
-+echo. NSIS could not be found on your system.
-+GOTO EXIT
-+
-+:NODDK
-+echo. Windows DDK could not be found on your system
-+GOTO EXIT
-+
-+:ERRORCREATINGINSTALLER
-+echo. The installer could not be created.
-+
-+:EXIT
-+del /q /f ..\build\dpinst-amd64.exe
-+del /q /f ..\build\dpinst-x86.exe
-+cd ..\support
-\ Kein Zeilenumbruch am Dateiende.
-diff -Nur libcec-2.1.4/support/create-installer.bat libcec-imx6/support/create-installer.bat
---- libcec-2.1.4/support/create-installer.bat 1970-01-01 01:00:00.000000000 +0100
-+++ libcec-imx6/support/create-installer.bat 2014-09-01 13:48:54.758437558 +0200
-@@ -0,0 +1,140 @@
-+@echo off
-+
-+set EXITCODE=1
-+
-+rem Check for NSIS
-+IF EXIST "%ProgramFiles%\NSIS\makensis.exe" (
-+ set NSIS="%ProgramFiles%\NSIS\makensis.exe"
-+) ELSE IF EXIST "%ProgramFiles(x86)%\NSIS\makensis.exe" (
-+ set NSIS="%ProgramFiles(x86)%\NSIS\makensis.exe"
-+) ELSE GOTO NONSIS
-+
-+rem Check for VC11
-+IF "%VS110COMNTOOLS%"=="" (
-+ set COMPILER11="%ProgramFiles%\Microsoft Visual Studio 11.0\Common7\IDE\VCExpress.exe"
-+) ELSE IF EXIST "%VS110COMNTOOLS%\..\IDE\VCExpress.exe" (
-+ set COMPILER11="%VS110COMNTOOLS%\..\IDE\VCExpress.exe"
-+) ELSE IF EXIST "%VS110COMNTOOLS%\..\IDE\devenv.exe" (
-+ set COMPILER11="%VS110COMNTOOLS%\..\IDE\devenv.exe"
-+) ELSE GOTO NOSDK11
-+
-+del /s /f /q ..\build
-+mkdir ..\build
-+
-+IF EXIST "..\support\p8-usbcec-driver-installer.exe" (
-+ copy "..\support\p8-usbcec-driver-installer.exe" "..\build\."
-+) ELSE (
-+ rem Check for the Windows DDK
-+ IF NOT EXIST "C:\WinDDK\7600.16385.1" GOTO NODDK
-+ set DDK="C:\WinDDK\7600.16385.1"
-+
-+ call create-driver-installer.cmd
-+)
-+
-+mkdir ..\build\x64
-+
-+cd ..\project
-+
-+rem Skip to libCEC/x86 when we're running on win32
-+if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto libcecx86
-+
-+rem Compile libCEC and cec-client x64
-+echo. Cleaning libCEC (x64)
-+%COMPILER11% libcec.sln /clean "Release|x64"
-+echo. Compiling libCEC (x64)
-+%COMPILER11% libcec.sln /build "Release|x64"
-+
-+:libcecx86
-+rem Compile libCEC and cec-client Win32
-+echo. Cleaning libCEC (x86)
-+%COMPILER11% libcec.sln /clean "Release|x86"
-+echo. Compiling libCEC (x86)
-+%COMPILER11% libcec.sln /build "Release|x86"
-+
-+rem Clean things up before creating the installer
-+del /q /f ..\build\LibCecSharp.pdb
-+del /q /f ..\build\CecSharpTester.pdb
-+del /q /f ..\build\cec-tray.pdb
-+del /q /f ..\build\cec-tray.vshost.exe.manifest
-+del /q /f ..\build\cec-.vshost.exe
-+del /q /f ..\build\x64\LibCecSharp.pdb
-+del /q /f ..\build\x64\CecSharpTester.pdb
-+del /q /f ..\build\x64\cec-tray.pdb
-+del /q /f ..\build\x64\cec-tray.vshost.exe.manifest
-+del /q /f ..\build\x64\cec-.vshost.exe
-+
-+rem Check for sign-binary.cmd, only present on the Pulse-Eight production build system
-+rem Calls signtool.exe and signs the DLLs with Pulse-Eight's code signing key
-+IF NOT EXIST "..\support\private\sign-binary.cmd" GOTO CREATEINSTALLER
-+echo. Signing all binaries
-+CALL ..\support\private\sign-binary.cmd ..\build\cec-client.exe
-+CALL ..\support\private\sign-binary.cmd ..\build\CecSharpTester.exe
-+CALL ..\support\private\sign-binary.cmd ..\build\libcec.dll
-+CALL ..\support\private\sign-binary.cmd ..\build\LibCecSharp.dll
-+CALL ..\support\private\sign-binary.cmd ..\build\cec-tray.exe
-+CALL ..\support\private\sign-binary.cmd ..\build\x64\cec-client.exe
-+CALL ..\support\private\sign-binary.cmd ..\build\x64\CecSharpTester.exe
-+CALL ..\support\private\sign-binary.cmd ..\build\x64\libcec.dll
-+CALL ..\support\private\sign-binary.cmd ..\build\x64\LibCecSharp.dll
-+CALL ..\support\private\sign-binary.cmd ..\build\x64\cec-tray.exe
-+
-+:CREATEINSTALLER
-+echo. Creating the installer
-+cd ..\build\x64
-+copy libcec.dll libcec.x64.dll
-+copy cec-client.exe cec-client.x64.exe
-+cd ..\..\project
-+%NSIS% /V1 /X"SetCompressor /FINAL lzma" "libCEC.nsi"
-+
-+IF NOT EXIST "..\build\libCEC-installer.exe" GOTO :ERRORCREATINGINSTALLER
-+
-+rem Sign the installer if sign-binary.cmd exists
-+IF EXIST "..\support\private\sign-binary.cmd" (
-+ echo. Signing the installer binaries
-+ CALL ..\support\private\sign-binary.cmd ..\build\libCEC-installer.exe
-+)
-+
-+IF "%1%"=="" (
-+ echo. The installer can be found here: ..\build\libCEC-installer.exe
-+) ELSE (
-+ move ..\build\libCEC-installer.exe ..\build\libCEC-%1%-installer.exe
-+ echo. The installer can be found here: ..\build\libCEC-%1%-installer.exe
-+)
-+
-+set EXITCODE=0
-+GOTO EXIT
-+
-+:NOSDK11
-+echo. Visual Studio 2012 was not found on your system.
-+GOTO EXIT
-+
-+:NOSIS
-+echo. NSIS could not be found on your system.
-+GOTO EXIT
-+
-+:NODDK
-+echo. Windows DDK could not be found on your system
-+GOTO EXIT
-+
-+:ERRORCREATINGINSTALLER
-+echo. The installer could not be created. The most likely cause is that something went wrong while compiling.
-+
-+:EXIT
-+del /q /f ..\build\cec-client.exe
-+del /q /f ..\build\CecSharpTester.exe
-+del /q /f ..\build\cec-tray.exe
-+del /q /f ..\build\*.dll
-+del /q /f ..\build\*.lib
-+del /q /f ..\build\*.exp
-+del /q /f ..\build\*.xml
-+del /q /f ..\build\*.metagen
-+del /s /f /q ..\build\x64
-+rmdir ..\build\x64
-+cd ..\support
-+
-+IF "%1%"=="" (
-+ echo. exitcode = %EXITCODE%
-+) ELSE (
-+ exit %EXITCODE%
-+)
-+
-Binärdateien libcec-2.1.4/support/p8-usbcec-driver-installer.exe und libcec-imx6/support/p8-usbcec-driver-installer.exe sind verschieden.
diff --git a/package/libcec/patches/patch-src_lib_adapter_RPi_RPiCECAdapterCommunication_cpp b/package/libcec/patches/patch-src_lib_adapter_RPi_RPiCECAdapterCommunication_cpp
deleted file mode 100644
index f027f0f3a..000000000
--- a/package/libcec/patches/patch-src_lib_adapter_RPi_RPiCECAdapterCommunication_cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- libcec-2.1.4.orig/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-2.1.4/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp 2014-05-28 18:25:18.809692104 +0200
-@@ -353,7 +353,8 @@ void CRPiCECAdapterCommunication::Close(
- else
- return;
- }
-- vc_tv_unregister_callback(rpi_tv_callback);
-+ if (m_bInitialised)
-+ vc_tv_unregister_callback(rpi_tv_callback);
-
- UnregisterLogicalAddress();
-
diff --git a/package/libcec/patches/patch-src_lib_libcec_pc_in b/package/libcec/patches/patch-src_lib_libcec_pc_in
index edacd9650..5b71c1d66 100644
--- a/package/libcec/patches/patch-src_lib_libcec_pc_in
+++ b/package/libcec/patches/patch-src_lib_libcec_pc_in
@@ -1,5 +1,5 @@
---- libcec-2.1.4.orig/src/lib/libcec.pc.in 2013-12-16 10:32:51.000000000 +0100
-+++ libcec-2.1.4/src/lib/libcec.pc.in 2014-06-17 10:28:45.246000623 +0200
+--- libcec-2.2.0.orig/src/lib/libcec.pc.in 2014-11-11 13:49:38.000000000 -0600
++++ libcec-2.2.0/src/lib/libcec.pc.in 2014-11-12 13:51:02.466501999 -0600
@@ -7,6 +7,5 @@ Name: libcec
Description: Pulse-Eight CEC adapter library
URL: http://www.pulse-eight.com/
diff --git a/package/libcec/patches/patch-src_lib_platform_posix_serialport_cpp b/package/libcec/patches/patch-src_lib_platform_posix_serialport_cpp
deleted file mode 100644
index e677a0d22..000000000
--- a/package/libcec/patches/patch-src_lib_platform_posix_serialport_cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- libcec-2.1.4.orig/src/lib/platform/posix/serialport.cpp 2013-12-15 12:48:14.000000000 +0100
-+++ libcec-2.1.4/src/lib/platform/posix/serialport.cpp 2014-01-12 22:04:41.000000000 +0100
-@@ -37,7 +37,7 @@
- #include "lib/platform/util/baudrate.h"
- #include "lib/platform/posix/os-socket.h"
-
--#if defined(__APPLE__) || defined(__FreeBSD__)
-+#if defined(__APPLE__) || defined(__FreeBSD__) || !defined(__GLIBC__)
- #ifndef XCASE
- #define XCASE 0
- #endif
diff --git a/package/libpng/patches/libpng-1.6.14-apng.patch b/package/libpng/patches/libpng-1.6.14-apng.patch
new file mode 100644
index 000000000..c168b02cc
--- /dev/null
+++ b/package/libpng/patches/libpng-1.6.14-apng.patch
@@ -0,0 +1,1701 @@
+diff -Naru libpng-1.6.14.org/png.h libpng-1.6.14/png.h
+--- libpng-1.6.14.org/png.h 2014-10-23 23:57:22.656674917 +0900
++++ libpng-1.6.14/png.h 2014-10-23 23:57:22.729677456 +0900
+@@ -470,6 +470,10 @@
+ # include "pnglibconf.h"
+ #endif
+
++#define PNG_APNG_SUPPORTED
++#define PNG_READ_APNG_SUPPORTED
++#define PNG_WRITE_APNG_SUPPORTED
++
+ #ifndef PNG_VERSION_INFO_ONLY
+ /* Machine specific configuration. */
+ # include "pngconf.h"
+@@ -560,6 +564,17 @@
+ * See pngconf.h for base types that vary by machine/system
+ */
+
++#ifdef PNG_APNG_SUPPORTED
++/* dispose_op flags from inside fcTL */
++#define PNG_DISPOSE_OP_NONE 0x00
++#define PNG_DISPOSE_OP_BACKGROUND 0x01
++#define PNG_DISPOSE_OP_PREVIOUS 0x02
++
++/* blend_op flags from inside fcTL */
++#define PNG_BLEND_OP_SOURCE 0x00
++#define PNG_BLEND_OP_OVER 0x01
++#endif /* PNG_APNG_SUPPORTED */
++
+ /* This triggers a compiler error in png.c, if png.c and png.h
+ * do not agree upon the version number.
+ */
+@@ -880,6 +895,10 @@
+ #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
+ #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
+ #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */
++#ifdef PNG_APNG_SUPPORTED
++#define PNG_INFO_acTL 0x10000
++#define PNG_INFO_fcTL 0x20000
++#endif
+
+ /* This is used for the transformation routines, as some of them
+ * change these values for the row. It also should enable using
+@@ -917,6 +936,10 @@
+ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+ typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
+ typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
++#ifdef PNG_APNG_SUPPORTED
++typedef PNG_CALLBACK(void, *png_progressive_frame_ptr, (png_structp,
++ png_uint_32));
++#endif
+
+ /* The following callback receives png_uint_32 row_number, int pass for the
+ * png_bytep data of the row. When transforming an interlaced image the
+@@ -3255,6 +3278,74 @@
+ /*******************************************************************************
+ * END OF HARDWARE AND SOFTWARE OPTIONS
+ ******************************************************************************/
++#ifdef PNG_APNG_SUPPORTED
++PNG_EXPORT(245, png_uint_32, png_get_acTL, (png_structp png_ptr,
++ png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays));
++
++PNG_EXPORT(246, png_uint_32, png_set_acTL, (png_structp png_ptr,
++ png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays));
++
++PNG_EXPORT(247, png_uint_32, png_get_num_frames, (png_structp png_ptr,
++ png_infop info_ptr));
++
++PNG_EXPORT(248, png_uint_32, png_get_num_plays, (png_structp png_ptr,
++ png_infop info_ptr));
++
++PNG_EXPORT(249, png_uint_32, png_get_next_frame_fcTL,
++ (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width,
++ png_uint_32 *height, png_uint_32 *x_offset, png_uint_32 *y_offset,
++ png_uint_16 *delay_num, png_uint_16 *delay_den, png_byte *dispose_op,
++ png_byte *blend_op));
++
++PNG_EXPORT(250, png_uint_32, png_set_next_frame_fcTL,
++ (png_structp png_ptr, png_infop info_ptr, png_uint_32 width,
++ png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
++ png_byte blend_op));
++
++PNG_EXPORT(251, png_uint_32, png_get_next_frame_width,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(252, png_uint_32, png_get_next_frame_height,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(253, png_uint_32, png_get_next_frame_x_offset,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(254, png_uint_32, png_get_next_frame_y_offset,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(255, png_uint_16, png_get_next_frame_delay_num,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(256, png_uint_16, png_get_next_frame_delay_den,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(257, png_byte, png_get_next_frame_dispose_op,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(258, png_byte, png_get_next_frame_blend_op,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(259, png_byte, png_get_first_frame_is_hidden,
++ (png_structp png_ptr, png_infop info_ptr));
++PNG_EXPORT(260, png_uint_32, png_set_first_frame_is_hidden,
++ (png_structp png_ptr, png_infop info_ptr, png_byte is_hidden));
++
++#ifdef PNG_READ_APNG_SUPPORTED
++PNG_EXPORT(261, void, png_read_frame_head, (png_structp png_ptr,
++ png_infop info_ptr));
++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
++PNG_EXPORT(262, void, png_set_progressive_frame_fn, (png_structp png_ptr,
++ png_progressive_frame_ptr frame_info_fn,
++ png_progressive_frame_ptr frame_end_fn));
++#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
++#endif /* PNG_READ_APNG_SUPPORTED */
++
++#ifdef PNG_WRITE_APNG_SUPPORTED
++PNG_EXPORT(263, void, png_write_frame_head, (png_structp png_ptr,
++ png_infop info_ptr, png_bytepp row_pointers,
++ png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
++ png_byte blend_op));
++
++PNG_EXPORT(264, void, png_write_frame_tail, (png_structp png_ptr,
++ png_infop info_ptr));
++#endif /* PNG_WRITE_APNG_SUPPORTED */
++#endif /* PNG_APNG_SUPPORTED */
+
+ /* Maintainer: Put new public prototypes here ^, in libpng.3, in project
+ * defs, and in scripts/symbols.def.
+@@ -3264,7 +3355,11 @@
+ * one to use is one more than this.)
+ */
+ #ifdef PNG_EXPORT_LAST_ORDINAL
++#ifdef PNG_APNG_SUPPORTED
++ PNG_EXPORT_LAST_ORDINAL(264);
++#else
+ PNG_EXPORT_LAST_ORDINAL(244);
++#endif /* PNG_APNG_SUPPORTED */
+ #endif
+
+ #ifdef __cplusplus
+diff -Naru libpng-1.6.14.org/pngget.c libpng-1.6.14/pngget.c
+--- libpng-1.6.14.org/pngget.c 2014-10-23 23:57:22.657674952 +0900
++++ libpng-1.6.14/pngget.c 2014-10-23 23:57:22.730677491 +0900
+@@ -1195,4 +1195,166 @@
+ # endif
+ #endif
+
++#ifdef PNG_APNG_SUPPORTED
++png_uint_32 PNGAPI
++png_get_acTL(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 *num_frames, png_uint_32 *num_plays)
++{
++ png_debug1(1, "in %s retrieval function", "acTL");
++
++ if (png_ptr != NULL && info_ptr != NULL &&
++ (info_ptr->valid & PNG_INFO_acTL) &&
++ num_frames != NULL && num_plays != NULL)
++ {
++ *num_frames = info_ptr->num_frames;
++ *num_plays = info_ptr->num_plays;
++ return (1);
++ }
++
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_num_frames(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_num_frames()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->num_frames);
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_num_plays(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_num_plays()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->num_plays);
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 *width, png_uint_32 *height,
++ png_uint_32 *x_offset, png_uint_32 *y_offset,
++ png_uint_16 *delay_num, png_uint_16 *delay_den,
++ png_byte *dispose_op, png_byte *blend_op)
++{
++ png_debug1(1, "in %s retrieval function", "fcTL");
++
++ if (png_ptr != NULL && info_ptr != NULL &&
++ (info_ptr->valid & PNG_INFO_fcTL) &&
++ width != NULL && height != NULL &&
++ x_offset != NULL && y_offset != NULL &&
++ delay_num != NULL && delay_den != NULL &&
++ dispose_op != NULL && blend_op != NULL)
++ {
++ *width = info_ptr->next_frame_width;
++ *height = info_ptr->next_frame_height;
++ *x_offset = info_ptr->next_frame_x_offset;
++ *y_offset = info_ptr->next_frame_y_offset;
++ *delay_num = info_ptr->next_frame_delay_num;
++ *delay_den = info_ptr->next_frame_delay_den;
++ *dispose_op = info_ptr->next_frame_dispose_op;
++ *blend_op = info_ptr->next_frame_blend_op;
++ return (1);
++ }
++
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_next_frame_width(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_width()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_width);
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_next_frame_height(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_height()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_height);
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_next_frame_x_offset(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_x_offset()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_x_offset);
++ return (0);
++}
++
++png_uint_32 PNGAPI
++png_get_next_frame_y_offset(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_y_offset()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_y_offset);
++ return (0);
++}
++
++png_uint_16 PNGAPI
++png_get_next_frame_delay_num(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_delay_num()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_delay_num);
++ return (0);
++}
++
++png_uint_16 PNGAPI
++png_get_next_frame_delay_den(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_delay_den()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_delay_den);
++ return (0);
++}
++
++png_byte PNGAPI
++png_get_next_frame_dispose_op(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_dispose_op()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_dispose_op);
++ return (0);
++}
++
++png_byte PNGAPI
++png_get_next_frame_blend_op(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_get_next_frame_blend_op()");
++
++ if (png_ptr != NULL && info_ptr != NULL)
++ return (info_ptr->next_frame_blend_op);
++ return (0);
++}
++
++png_byte PNGAPI
++png_get_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_first_frame_is_hidden()");
++
++ if (png_ptr != NULL)
++ return (png_byte)(png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN);
++
++ PNG_UNUSED(info_ptr)
++
++ return 0;
++}
++#endif /* PNG_APNG_SUPPORTED */
+ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
+diff -Naru libpng-1.6.14.org/pnginfo.h libpng-1.6.14/pnginfo.h
+--- libpng-1.6.14.org/pnginfo.h 2014-10-23 23:57:22.657674952 +0900
++++ libpng-1.6.14/pnginfo.h 2014-10-23 23:57:22.730677491 +0900
+@@ -256,5 +256,18 @@
+ png_bytepp row_pointers; /* the image bits */
+ #endif
+
++#ifdef PNG_APNG_SUPPORTED
++ png_uint_32 num_frames; /* including default image */
++ png_uint_32 num_plays;
++ png_uint_32 next_frame_width;
++ png_uint_32 next_frame_height;
++ png_uint_32 next_frame_x_offset;
++ png_uint_32 next_frame_y_offset;
++ png_uint_16 next_frame_delay_num;
++ png_uint_16 next_frame_delay_den;
++ png_byte next_frame_dispose_op;
++ png_byte next_frame_blend_op;
++#endif
++
+ };
+ #endif /* PNGINFO_H */
+diff -Naru libpng-1.6.14.org/pngpread.c libpng-1.6.14/pngpread.c
+--- libpng-1.6.14.org/pngpread.c 2014-10-23 23:57:22.657674952 +0900
++++ libpng-1.6.14/pngpread.c 2014-10-23 23:57:22.730677491 +0900
+@@ -219,6 +219,109 @@
+
+ chunk_name = png_ptr->chunk_name;
+
++#ifdef PNG_READ_APNG_SUPPORTED
++ if (png_ptr->num_frames_read > 0 &&
++ png_ptr->num_frames_read < info_ptr->num_frames)
++ {
++ if (chunk_name == png_IDAT)
++ {
++ /* Discard trailing IDATs for the first frame */
++ if (png_ptr->mode & PNG_HAVE_fcTL || png_ptr->num_frames_read > 1)
++ png_error(png_ptr, "out of place IDAT");
++
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++
++ png_push_crc_skip(png_ptr, png_ptr->push_length);
++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
++ return;
++ }
++ else if (chunk_name == png_fdAT)
++ {
++ if (png_ptr->buffer_size < 4)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++
++ png_ensure_sequence_number(png_ptr, 4);
++
++ if (!(png_ptr->mode & PNG_HAVE_fcTL))
++ {
++ /* Discard trailing fdATs for frames other than the first */
++ if (png_ptr->num_frames_read < 2)
++ png_error(png_ptr, "out of place fdAT");
++
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++
++ png_push_crc_skip(png_ptr, png_ptr->push_length);
++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
++ return;
++ }
++
++ else
++ {
++ /* frame data follows */
++ png_ptr->idat_size = png_ptr->push_length - 4;
++ png_ptr->mode |= PNG_HAVE_IDAT;
++ png_ptr->process_mode = PNG_READ_IDAT_MODE;
++
++ return;
++ }
++ }
++
++ else if (chunk_name == png_fcTL)
++ {
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++
++ png_read_reset(png_ptr);
++ png_ptr->mode &= ~PNG_HAVE_fcTL;
++
++ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
++
++ if (!(png_ptr->mode & PNG_HAVE_fcTL))
++ png_error(png_ptr, "missing required fcTL chunk");
++
++ png_read_reinit(png_ptr, info_ptr);
++ png_progressive_read_reset(png_ptr);
++
++ if (png_ptr->frame_info_fn != NULL)
++ (*(png_ptr->frame_info_fn))(png_ptr, png_ptr->num_frames_read);
++
++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
++
++ return;
++ }
++
++ else
++ {
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++ png_warning(png_ptr, "Skipped (ignored) a chunk "
++ "between APNG chunks");
++ png_push_crc_skip(png_ptr, png_ptr->push_length);
++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
++ return;
++ }
++
++ return;
++ }
++#endif /* PNG_READ_APNG_SUPPORTED */
++
+ if (chunk_name == png_IDAT)
+ {
+ if (png_ptr->mode & PNG_AFTER_IDAT)
+@@ -283,6 +386,9 @@
+
+ else if (chunk_name == png_IDAT)
+ {
++#ifdef PNG_READ_APNG_SUPPORTED
++ png_have_info(png_ptr, info_ptr);
++#endif
+ png_ptr->idat_size = png_ptr->push_length;
+ png_ptr->process_mode = PNG_READ_IDAT_MODE;
+ png_push_have_info(png_ptr, info_ptr);
+@@ -428,6 +534,30 @@
+ png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
+ }
+ #endif
++#ifdef PNG_READ_APNG_SUPPORTED
++ else if (chunk_name == png_acTL)
++ {
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++
++ png_handle_acTL(png_ptr, info_ptr, png_ptr->push_length);
++ }
++
++ else if (chunk_name == png_fcTL)
++ {
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++
++ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
++ }
++
++#endif /* PNG_READ_APNG_SUPPORTED */
+
+ else
+ {
+@@ -621,7 +751,11 @@
+ png_byte chunk_tag[4];
+
+ /* TODO: this code can be commoned up with the same code in push_read */
++#ifdef PNG_READ_APNG_SUPPORTED
++ PNG_PUSH_SAVE_BUFFER_IF_LT(12)
++#else
+ PNG_PUSH_SAVE_BUFFER_IF_LT(8)
++#endif
+ png_push_fill_buffer(png_ptr, chunk_length, 4);
+ png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length);
+ png_reset_crc(png_ptr);
+@@ -629,17 +763,64 @@
+ png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag);
+ png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
+
++#ifdef PNG_READ_APNG_SUPPORTED
++ if (png_ptr->chunk_name != png_fdAT && png_ptr->num_frames_read > 0)
++ {
++ if (png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)
++ {
++ png_ptr->process_mode = PNG_READ_CHUNK_MODE;
++ if (png_ptr->frame_end_fn != NULL)
++ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read);
++ png_ptr->num_frames_read++;
++ return;
++ }
++ else
++ {
++ if (png_ptr->chunk_name == png_IEND)
++ png_error(png_ptr, "Not enough image data");
++ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
++ {
++ png_push_save_buffer(png_ptr);
++ return;
++ }
++ png_warning(png_ptr, "Skipping (ignoring) a chunk between "
++ "APNG chunks");
++ png_crc_finish(png_ptr, png_ptr->push_length);
++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
++ return;
++ }
++ }
++ else
++#endif
++#ifdef PNG_READ_APNG_SUPPORTED
++ if (png_ptr->chunk_name != png_IDAT && png_ptr->num_frames_read == 0)
++#else
+ if (png_ptr->chunk_name != png_IDAT)
++#endif
+ {
+ png_ptr->process_mode = PNG_READ_CHUNK_MODE;
+
+ if (!(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED))
+ png_error(png_ptr, "Not enough compressed data");
+
++#ifdef PNG_READ_APNG_SUPPORTED
++ if (png_ptr->frame_end_fn != NULL)
++ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read);
++ png_ptr->num_frames_read++;
++#endif
++
+ return;
+ }
+
+ png_ptr->idat_size = png_ptr->push_length;
++
++#ifdef PNG_READ_APNG_SUPPORTED
++ if (png_ptr->num_frames_read > 0)
++ {
++ png_ensure_sequence_number(png_ptr, 4);
++ png_ptr->idat_size -= 4;
++ }
++#endif
+ }
+
+ if (png_ptr->idat_size && png_ptr->save_buffer_size)
+@@ -712,6 +893,15 @@
+ if (!(buffer_length > 0) || buffer == NULL)
+ png_error(png_ptr, "No IDAT data (internal error)");
+
++#ifdef PNG_READ_APNG_SUPPORTED
++ /* If the app is not APNG-aware, decode only the first frame */
++ if (!(png_ptr->apng_flags & PNG_APNG_APP) && png_ptr->num_frames_read > 0)
++ {
++ png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
++ return;
++ }
++#endif
++
+ /* This routine must process all the data it has been given
+ * before returning, calling the row callback as required to
+ * handle the uncompressed results.
+@@ -1154,6 +1344,18 @@
+ png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
+ }
+
++#ifdef PNG_READ_APNG_SUPPORTED
++void PNGAPI
++png_set_progressive_frame_fn(png_structp png_ptr,
++ png_progressive_frame_ptr frame_info_fn,
++ png_progressive_frame_ptr frame_end_fn)
++{
++ png_ptr->frame_info_fn = frame_info_fn;
++ png_ptr->frame_end_fn = frame_end_fn;
++ png_ptr->apng_flags |= PNG_APNG_APP;
++}
++#endif
++
+ png_voidp PNGAPI
+ png_get_progressive_ptr(png_const_structrp png_ptr)
+ {
+diff -Naru libpng-1.6.14.org/pngpriv.h libpng-1.6.14/pngpriv.h
+--- libpng-1.6.14.org/pngpriv.h 2014-10-23 23:57:22.658674987 +0900
++++ libpng-1.6.14/pngpriv.h 2014-10-23 23:57:22.731677525 +0900
+@@ -555,6 +555,10 @@
+ #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
+ /* 0x4000 (unused) */
+ #define PNG_IS_READ_STRUCT 0x8000 /* Else is a write struct */
++#ifdef PNG_APNG_SUPPORTED
++#define PNG_HAVE_acTL 0x10000
++#define PNG_HAVE_fcTL 0x20000
++#endif
+
+ /* Flags for the transformations the PNG library does on the image data */
+ #define PNG_BGR 0x0001
+@@ -776,6 +780,16 @@
+ #define png_tRNS PNG_U32(116, 82, 78, 83)
+ #define png_zTXt PNG_U32(122, 84, 88, 116)
+
++#ifdef PNG_APNG_SUPPORTED
++#define png_acTL PNG_U32( 97, 99, 84, 76)
++#define png_fcTL PNG_U32(102, 99, 84, 76)
++#define png_fdAT PNG_U32(102, 100, 65, 84)
++
++/* For png_struct.apng_flags: */
++#define PNG_FIRST_FRAME_HIDDEN 0x0001
++#define PNG_APNG_APP 0x0002
++#endif
++
+ /* The following will work on (signed char*) strings, whereas the get_uint_32
+ * macro will fail on top-bit-set values because of the sign extension.
+ */
+@@ -1476,6 +1490,47 @@
+ */
+ #endif
+
++#ifdef PNG_APNG_SUPPORTED
++PNG_INTERNAL_FUNCTION(void,png_ensure_fcTL_is_valid,(png_structp png_ptr,
++ png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den,
++ png_byte dispose_op, png_byte blend_op), PNG_EMPTY);
++
++#ifdef PNG_READ_APNG_SUPPORTED
++PNG_INTERNAL_FUNCTION(void,png_handle_acTL,(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 length),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_handle_fcTL,(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 length),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_handle_fdAT,(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 length),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_have_info,(png_structp png_ptr, png_infop info_ptr),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_ensure_sequence_number,(png_structp png_ptr,
++ png_uint_32 length),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_read_reset,(png_structp png_ptr),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_read_reinit,(png_structp png_ptr,
++ png_infop info_ptr),PNG_EMPTY);
++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
++PNG_INTERNAL_FUNCTION(void,png_progressive_read_reset,(png_structp png_ptr),PNG_EMPTY);
++#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
++#endif /* PNG_READ_APNG_SUPPORTED */
++
++#ifdef PNG_WRITE_APNG_SUPPORTED
++PNG_INTERNAL_FUNCTION(void,png_write_acTL,(png_structp png_ptr,
++ png_uint_32 num_frames, png_uint_32 num_plays),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_write_fcTL,(png_structp png_ptr,
++ png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den,
++ png_byte dispose_op, png_byte blend_op),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_write_fdAT,(png_structp png_ptr,
++ png_const_bytep data, png_size_t length),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_write_reset,(png_structp png_ptr),PNG_EMPTY);
++PNG_INTERNAL_FUNCTION(void,png_write_reinit,(png_structp png_ptr,
++ png_infop info_ptr, png_uint_32 width, png_uint_32 height),PNG_EMPTY);
++#endif /* PNG_WRITE_APNG_SUPPORTED */
++#endif /* PNG_APNG_SUPPORTED */
++
+ /* Added at libpng version 1.4.0 */
+ #ifdef PNG_COLORSPACE_SUPPORTED
+ /* These internal functions are for maintaining the colorspace structure within
+diff -Naru libpng-1.6.14.org/pngread.c libpng-1.6.14/pngread.c
+--- libpng-1.6.14.org/pngread.c 2014-10-23 23:57:22.659675022 +0900
++++ libpng-1.6.14/pngread.c 2014-10-23 23:57:22.732677560 +0900
+@@ -158,6 +158,9 @@
+
+ else if (chunk_name == png_IDAT)
+ {
++#ifdef PNG_READ_APNG_SUPPORTED
++ png_have_info(png_ptr, info_ptr);
++#endif
+ png_ptr->idat_size = length;
+ break;
+ }
+@@ -247,6 +250,17 @@
+ png_handle_iTXt(png_ptr, info_ptr, length);
+ #endif
+
++#ifdef PNG_READ_APNG_SUPPORTED
++ else if (chunk_name == png_acTL)
++ png_handle_acTL(png_ptr, info_ptr, length);
++
++ else if (chunk_name == png_fcTL)
++ png_handle_fcTL(png_ptr, info_ptr, length);
++
++ else if (chunk_name == png_fdAT)
++ png_handle_fdAT(png_ptr, info_ptr, length);
++#endif
++
+ else
+ png_handle_unknown(png_ptr, info_ptr, length,
+ PNG_HANDLE_CHUNK_AS_DEFAULT);
+@@ -254,6 +268,72 @@
+ }
+ #endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
+
++#ifdef PNG_READ_APNG_SUPPORTED
++void PNGAPI
++png_read_frame_head(png_structp png_ptr, png_infop info_ptr)
++{
++ png_byte have_chunk_after_DAT; /* after IDAT or after fdAT */
++
++ png_debug(0, "Reading frame head");
++
++ if (!(png_ptr->mode & PNG_HAVE_acTL))
++ png_error(png_ptr, "attempt to png_read_frame_head() but "
++ "no acTL present");
++
++ /* do nothing for the main IDAT */
++ if (png_ptr->num_frames_read == 0)
++ return;
++
++ png_read_reset(png_ptr);
++ png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
++ png_ptr->mode &= ~PNG_HAVE_fcTL;
++
++ have_chunk_after_DAT = 0;
++ for (;;)
++ {
++ png_uint_32 length = png_read_chunk_header(png_ptr);
++
++ if (png_ptr->chunk_name == png_IDAT)
++ {
++ /* discard trailing IDATs for the first frame */
++ if (have_chunk_after_DAT || png_ptr->num_frames_read > 1)
++ png_error(png_ptr, "png_read_frame_head(): out of place IDAT");
++ png_crc_finish(png_ptr, length);
++ }
++
++ else if (png_ptr->chunk_name == png_fcTL)
++ {
++ png_handle_fcTL(png_ptr, info_ptr, length);
++ have_chunk_after_DAT = 1;
++ }
++
++ else if (png_ptr->chunk_name == png_fdAT)
++ {
++ png_ensure_sequence_number(png_ptr, length);
++
++ /* discard trailing fdATs for frames other than the first */
++ if (!have_chunk_after_DAT && png_ptr->num_frames_read > 1)
++ png_crc_finish(png_ptr, length - 4);
++ else if(png_ptr->mode & PNG_HAVE_fcTL)
++ {
++ png_ptr->idat_size = length - 4;
++ png_ptr->mode |= PNG_HAVE_IDAT;
++
++ break;
++ }
++ else
++ png_error(png_ptr, "png_read_frame_head(): out of place fdAT");
++ }
++ else
++ {
++ png_warning(png_ptr, "Skipped (ignored) a chunk "
++ "between APNG chunks");
++ png_crc_finish(png_ptr, length);
++ }
++ }
++}
++#endif /* PNG_READ_APNG_SUPPORTED */
++
+ /* Optional call to update the users info_ptr structure */
+ void PNGAPI
+ png_read_update_info(png_structrp png_ptr, png_inforp info_ptr)
+diff -Naru libpng-1.6.14.org/pngrutil.c libpng-1.6.14/pngrutil.c
+--- libpng-1.6.14.org/pngrutil.c 2014-10-23 23:57:22.660675057 +0900
++++ libpng-1.6.14/pngrutil.c 2014-10-23 23:57:22.735677664 +0900
+@@ -817,6 +817,11 @@
+ filter_type = buf[11];
+ interlace_type = buf[12];
+
++#ifdef PNG_READ_APNG_SUPPORTED
++ png_ptr->first_frame_width = width;
++ png_ptr->first_frame_height = height;
++#endif
++
+ /* Set internal variables */
+ png_ptr->width = width;
+ png_ptr->height = height;
+@@ -2697,6 +2702,179 @@
+ }
+ #endif
+
++#ifdef PNG_READ_APNG_SUPPORTED
++void /* PRIVATE */
++png_handle_acTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
++{
++ png_byte data[8];
++ png_uint_32 num_frames;
++ png_uint_32 num_plays;
++ png_uint_32 didSet;
++
++ png_debug(1, "in png_handle_acTL");
++
++ if (!(png_ptr->mode & PNG_HAVE_IHDR))
++ {
++ png_error(png_ptr, "Missing IHDR before acTL");
++ }
++ else if (png_ptr->mode & PNG_HAVE_IDAT)
++ {
++ png_warning(png_ptr, "Invalid acTL after IDAT skipped");
++ png_crc_finish(png_ptr, length);
++ return;
++ }
++ else if (png_ptr->mode & PNG_HAVE_acTL)
++ {
++ png_warning(png_ptr, "Duplicate acTL skipped");
++ png_crc_finish(png_ptr, length);
++ return;
++ }
++ else if (length != 8)
++ {
++ png_warning(png_ptr, "acTL with invalid length skipped");
++ png_crc_finish(png_ptr, length);
++ return;
++ }
++
++ png_crc_read(png_ptr, data, 8);
++ png_crc_finish(png_ptr, 0);
++
++ num_frames = png_get_uint_31(png_ptr, data);
++ num_plays = png_get_uint_31(png_ptr, data + 4);
++
++ /* the set function will do error checking on num_frames */
++ didSet = png_set_acTL(png_ptr, info_ptr, num_frames, num_plays);
++ if(didSet)
++ png_ptr->mode |= PNG_HAVE_acTL;
++}
++
++void /* PRIVATE */
++png_handle_fcTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
++{
++ png_byte data[22];
++ png_uint_32 width;
++ png_uint_32 height;
++ png_uint_32 x_offset;
++ png_uint_32 y_offset;
++ png_uint_16 delay_num;
++ png_uint_16 delay_den;
++ png_byte dispose_op;
++ png_byte blend_op;
++
++ png_debug(1, "in png_handle_fcTL");
++
++ png_ensure_sequence_number(png_ptr, length);
++
++ if (!(png_ptr->mode & PNG_HAVE_IHDR))
++ {
++ png_error(png_ptr, "Missing IHDR before fcTL");
++ }
++ else if (png_ptr->mode & PNG_HAVE_IDAT)
++ {
++ /* for any frames other then the first this message may be misleading,
++ * but correct. PNG_HAVE_IDAT is unset before the frame head is read
++ * i can't think of a better message */
++ png_warning(png_ptr, "Invalid fcTL after IDAT skipped");
++ png_crc_finish(png_ptr, length-4);
++ return;
++ }
++ else if (png_ptr->mode & PNG_HAVE_fcTL)
++ {
++ png_warning(png_ptr, "Duplicate fcTL within one frame skipped");
++ png_crc_finish(png_ptr, length-4);
++ return;
++ }
++ else if (length != 26)
++ {
++ png_warning(png_ptr, "fcTL with invalid length skipped");
++ png_crc_finish(png_ptr, length-4);
++ return;
++ }
++
++ png_crc_read(png_ptr, data, 22);
++ png_crc_finish(png_ptr, 0);
++
++ width = png_get_uint_31(png_ptr, data);
++ height = png_get_uint_31(png_ptr, data + 4);
++ x_offset = png_get_uint_31(png_ptr, data + 8);
++ y_offset = png_get_uint_31(png_ptr, data + 12);
++ delay_num = png_get_uint_16(data + 16);
++ delay_den = png_get_uint_16(data + 18);
++ dispose_op = data[20];
++ blend_op = data[21];
++
++ if (png_ptr->num_frames_read == 0 && (x_offset != 0 || y_offset != 0))
++ {
++ png_warning(png_ptr, "fcTL for the first frame must have zero offset");
++ return;
++ }
++
++ if (info_ptr != NULL)
++ {
++ if (png_ptr->num_frames_read == 0 &&
++ (width != info_ptr->width || height != info_ptr->height))
++ {
++ png_warning(png_ptr, "size in first frame's fcTL must match "
++ "the size in IHDR");
++ return;
++ }
++
++ /* The set function will do more error checking */
++ png_set_next_frame_fcTL(png_ptr, info_ptr, width, height,
++ x_offset, y_offset, delay_num, delay_den,
++ dispose_op, blend_op);
++
++ png_read_reinit(png_ptr, info_ptr);
++
++ png_ptr->mode |= PNG_HAVE_fcTL;
++ }
++}
++
++void /* PRIVATE */
++png_have_info(png_structp png_ptr, png_infop info_ptr)
++{
++ if((info_ptr->valid & PNG_INFO_acTL) && !(info_ptr->valid & PNG_INFO_fcTL))
++ {
++ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
++ info_ptr->num_frames++;
++ }
++}
++
++void /* PRIVATE */
++png_handle_fdAT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
++{
++ png_ensure_sequence_number(png_ptr, length);
++
++ /* This function is only called from png_read_end(), png_read_info(),
++ * and png_push_read_chunk() which means that:
++ * - the user doesn't want to read this frame
++ * - or this is an out-of-place fdAT
++ * in either case it is safe to ignore the chunk with a warning */
++ png_warning(png_ptr, "ignoring fdAT chunk");
++ png_crc_finish(png_ptr, length - 4);
++ PNG_UNUSED(info_ptr)
++}
++
++void /* PRIVATE */
++png_ensure_sequence_number(png_structp png_ptr, png_uint_32 length)
++{
++ png_byte data[4];
++ png_uint_32 sequence_number;
++
++ if (length < 4)
++ png_error(png_ptr, "invalid fcTL or fdAT chunk found");
++
++ png_crc_read(png_ptr, data, 4);
++ sequence_number = png_get_uint_31(png_ptr, data);
++
++ if (sequence_number != png_ptr->next_seq_num)
++ png_error(png_ptr, "fcTL or fdAT chunk with out-of-order sequence "
++ "number found");
++
++ png_ptr->next_seq_num++;
++}
++#endif /* PNG_READ_APNG_SUPPORTED */
++
+ #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
+ /* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */
+ static int
+@@ -3953,7 +4131,38 @@
+ {
+ uInt avail_in;
+ png_bytep buffer;
++#ifdef PNG_READ_APNG_SUPPORTED
++ png_uint_32 bytes_to_skip = 0;
++
++ while (png_ptr->idat_size == 0 || bytes_to_skip != 0)
++ {
++ png_crc_finish(png_ptr, bytes_to_skip);
++ bytes_to_skip = 0;
+
++ png_ptr->idat_size = png_read_chunk_header(png_ptr);
++ if (png_ptr->num_frames_read == 0)
++ {
++ if (png_ptr->chunk_name != png_IDAT)
++ png_error(png_ptr, "Not enough image data");
++ }
++ else
++ {
++ if (png_ptr->chunk_name == png_IEND)
++ png_error(png_ptr, "Not enough image data");
++ if (png_ptr->chunk_name != png_fdAT)
++ {
++ png_warning(png_ptr, "Skipped (ignored) a chunk "
++ "between APNG chunks");
++ bytes_to_skip = png_ptr->idat_size;
++ continue;
++ }
++
++ png_ensure_sequence_number(png_ptr, png_ptr->idat_size);
++
++ png_ptr->idat_size -= 4;
++ }
++ }
++#else
+ while (png_ptr->idat_size == 0)
+ {
+ png_crc_finish(png_ptr, 0);
+@@ -3965,7 +4174,7 @@
+ if (png_ptr->chunk_name != png_IDAT)
+ png_error(png_ptr, "Not enough image data");
+ }
+-
++#endif /* PNG_READ_APNG_SUPPORTED */
+ avail_in = png_ptr->IDAT_read_size;
+
+ if (avail_in > png_ptr->idat_size)
+@@ -4028,6 +4237,9 @@
+
+ png_ptr->mode |= PNG_AFTER_IDAT;
+ png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED;
++#ifdef PNG_READ_APNG_SUPPORTED
++ png_ptr->num_frames_read++;
++#endif
+
+ if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0)
+ png_chunk_benign_error(png_ptr, "Extra compressed data");
+@@ -4465,4 +4677,80 @@
+
+ png_ptr->flags |= PNG_FLAG_ROW_INIT;
+ }
++
++#ifdef PNG_READ_APNG_SUPPORTED
++/* This function is to be called after the main IDAT set has been read and
++ * before a new IDAT is read. It resets some parts of png_ptr
++ * to make them usable by the read functions again */
++void /* PRIVATE */
++png_read_reset(png_structp png_ptr)
++{
++ png_ptr->mode &= ~PNG_HAVE_IDAT;
++ png_ptr->mode &= ~PNG_AFTER_IDAT;
++ png_ptr->row_number = 0;
++ png_ptr->pass = 0;
++}
++
++void /* PRIVATE */
++png_read_reinit(png_structp png_ptr, png_infop info_ptr)
++{
++ png_ptr->width = info_ptr->next_frame_width;
++ png_ptr->height = info_ptr->next_frame_height;
++ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
++ png_ptr->info_rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth,
++ png_ptr->width);
++ if (png_ptr->prev_row)
++ memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
++}
++
++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
++/* same as png_read_reset() but for the progressive reader */
++void /* PRIVATE */
++png_progressive_read_reset(png_structp png_ptr)
++{
++#ifdef PNG_READ_INTERLACING_SUPPORTED
++ /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
++
++ /* Start of interlace block */
++ const int png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
++
++ /* Offset to next interlace block */
++ const int png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
++
++ /* Start of interlace block in the y direction */
++ const int png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
++
++ /* Offset to next interlace block in the y direction */
++ const int png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
++
++ if (png_ptr->interlaced)
++ {
++ if (!(png_ptr->transformations & PNG_INTERLACE))
++ png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
++ png_pass_ystart[0]) / png_pass_yinc[0];
++ else
++ png_ptr->num_rows = png_ptr->height;
++
++ png_ptr->iwidth = (png_ptr->width +
++ png_pass_inc[png_ptr->pass] - 1 -
++ png_pass_start[png_ptr->pass]) /
++ png_pass_inc[png_ptr->pass];
++ }
++ else
++#endif /* PNG_READ_INTERLACING_SUPPORTED */
++ {
++ png_ptr->num_rows = png_ptr->height;
++ png_ptr->iwidth = png_ptr->width;
++ }
++ png_ptr->flags &= ~PNG_FLAG_ZSTREAM_ENDED;
++ if (inflateReset(&(png_ptr->zstream)) != Z_OK)
++ png_error(png_ptr, "inflateReset failed");
++ png_ptr->zstream.avail_in = 0;
++ png_ptr->zstream.next_in = 0;
++ png_ptr->zstream.next_out = png_ptr->row_buf;
++ png_ptr->zstream.avail_out = (uInt)PNG_ROWBYTES(png_ptr->pixel_depth,
++ png_ptr->iwidth) + 1;
++}
++#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
++#endif /* PNG_READ_APNG_SUPPORTED */
+ #endif /* PNG_READ_SUPPORTED */
+diff -Naru libpng-1.6.14.org/pngset.c libpng-1.6.14/pngset.c
+--- libpng-1.6.14.org/pngset.c 2014-10-23 23:57:22.661675091 +0900
++++ libpng-1.6.14/pngset.c 2014-10-23 23:57:22.735677664 +0900
+@@ -239,6 +239,11 @@
+ info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
+
+ info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
++
++#ifdef PNG_APNG_SUPPORTED
++ /* for non-animated png. this may be overwritten from an acTL chunk later */
++ info_ptr->num_frames = 1;
++#endif
+ }
+
+ #ifdef PNG_oFFs_SUPPORTED
+@@ -1065,6 +1070,147 @@
+ }
+ #endif /* PNG_sPLT_SUPPORTED */
+
++#ifdef PNG_APNG_SUPPORTED
++png_uint_32 PNGAPI
++png_set_acTL(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 num_frames, png_uint_32 num_plays)
++{
++ png_debug1(1, "in %s storage function", "acTL");
++
++ if (png_ptr == NULL || info_ptr == NULL)
++ {
++ png_warning(png_ptr,
++ "Call to png_set_acTL() with NULL png_ptr "
++ "or info_ptr ignored");
++ return (0);
++ }
++ if (num_frames == 0)
++ {
++ png_warning(png_ptr,
++ "Ignoring attempt to set acTL with num_frames zero");
++ return (0);
++ }
++ if (num_frames > PNG_UINT_31_MAX)
++ {
++ png_warning(png_ptr,
++ "Ignoring attempt to set acTL with num_frames > 2^31-1");
++ return (0);
++ }
++ if (num_plays > PNG_UINT_31_MAX)
++ {
++ png_warning(png_ptr,
++ "Ignoring attempt to set acTL with num_plays "
++ "> 2^31-1");
++ return (0);
++ }
++
++ info_ptr->num_frames = num_frames;
++ info_ptr->num_plays = num_plays;
++
++ info_ptr->valid |= PNG_INFO_acTL;
++
++ return (1);
++}
++
++/* delay_num and delay_den can hold any 16-bit values including zero */
++png_uint_32 PNGAPI
++png_set_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den,
++ png_byte dispose_op, png_byte blend_op)
++{
++ png_debug1(1, "in %s storage function", "fcTL");
++
++ if (png_ptr == NULL || info_ptr == NULL)
++ {
++ png_warning(png_ptr,
++ "Call to png_set_fcTL() with NULL png_ptr or info_ptr "
++ "ignored");
++ return (0);
++ }
++
++ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset,
++ delay_num, delay_den, dispose_op, blend_op);
++
++ if (blend_op == PNG_BLEND_OP_OVER)
++ {
++ if (!(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) &&
++ !(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
++ {
++ png_warning(png_ptr, "PNG_BLEND_OP_OVER is meaningless "
++ "and wasteful for opaque images, ignored");
++ blend_op = PNG_BLEND_OP_SOURCE;
++ }
++ }
++
++ info_ptr->next_frame_width = width;
++ info_ptr->next_frame_height = height;
++ info_ptr->next_frame_x_offset = x_offset;
++ info_ptr->next_frame_y_offset = y_offset;
++ info_ptr->next_frame_delay_num = delay_num;
++ info_ptr->next_frame_delay_den = delay_den;
++ info_ptr->next_frame_dispose_op = dispose_op;
++ info_ptr->next_frame_blend_op = blend_op;
++
++ info_ptr->valid |= PNG_INFO_fcTL;
++
++ return (1);
++}
++
++void /* PRIVATE */
++png_ensure_fcTL_is_valid(png_structp png_ptr,
++ png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den,
++ png_byte dispose_op, png_byte blend_op)
++{
++ if (width > PNG_UINT_31_MAX)
++ png_error(png_ptr, "invalid width in fcTL (> 2^31-1)");
++ if (height > PNG_UINT_31_MAX)
++ png_error(png_ptr, "invalid height in fcTL (> 2^31-1)");
++ if (x_offset > PNG_UINT_31_MAX)
++ png_error(png_ptr, "invalid x_offset in fcTL (> 2^31-1)");
++ if (y_offset > PNG_UINT_31_MAX)
++ png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)");
++ if (width + x_offset > png_ptr->first_frame_width ||
++ height + y_offset > png_ptr->first_frame_height)
++ png_error(png_ptr, "dimensions of a frame are greater than"
++ "the ones in IHDR");
++
++ if (dispose_op != PNG_DISPOSE_OP_NONE &&
++ dispose_op != PNG_DISPOSE_OP_BACKGROUND &&
++ dispose_op != PNG_DISPOSE_OP_PREVIOUS)
++ png_error(png_ptr, "invalid dispose_op in fcTL");
++
++ if (blend_op != PNG_BLEND_OP_SOURCE &&
++ blend_op != PNG_BLEND_OP_OVER)
++ png_error(png_ptr, "invalid blend_op in fcTL");
++
++ PNG_UNUSED(delay_num)
++ PNG_UNUSED(delay_den)
++}
++
++png_uint_32 PNGAPI
++png_set_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr,
++ png_byte is_hidden)
++{
++ png_debug(1, "in png_first_frame_is_hidden()");
++
++ if (png_ptr == NULL)
++ return 0;
++
++ if (is_hidden)
++ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
++ else
++ png_ptr->apng_flags &= ~PNG_FIRST_FRAME_HIDDEN;
++
++ PNG_UNUSED(info_ptr)
++
++ return 1;
++}
++#endif /* PNG_APNG_SUPPORTED */
++
+ #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
+ static png_byte
+ check_location(png_const_structrp png_ptr, int location)
+diff -Naru libpng-1.6.14.org/pngstruct.h libpng-1.6.14/pngstruct.h
+--- libpng-1.6.14.org/pngstruct.h 2014-10-23 23:57:22.661675091 +0900
++++ libpng-1.6.14/pngstruct.h 2014-10-23 23:57:22.735677664 +0900
+@@ -409,6 +409,27 @@
+ png_byte filter_type;
+ #endif
+
++#ifdef PNG_APNG_SUPPORTED
++ png_uint_32 apng_flags;
++ png_uint_32 next_seq_num; /* next fcTL/fdAT chunk sequence number */
++ png_uint_32 first_frame_width;
++ png_uint_32 first_frame_height;
++
++#ifdef PNG_READ_APNG_SUPPORTED
++ png_uint_32 num_frames_read; /* incremented after all image data of */
++ /* a frame is read */
++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
++ png_progressive_frame_ptr frame_info_fn; /* frame info read callback */
++ png_progressive_frame_ptr frame_end_fn; /* frame data read callback */
++#endif
++#endif
++
++#ifdef PNG_WRITE_APNG_SUPPORTED
++ png_uint_32 num_frames_to_write;
++ png_uint_32 num_frames_written;
++#endif
++#endif /* PNG_APNG_SUPPORTED */
++
+ /* New members added in libpng-1.2.0 */
+
+ /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
+diff -Naru libpng-1.6.14.org/pngtest.c libpng-1.6.14/pngtest.c
+--- libpng-1.6.14.org/pngtest.c 2014-10-23 23:57:22.661675091 +0900
++++ libpng-1.6.14/pngtest.c 2014-10-23 23:57:22.736677699 +0900
+@@ -848,6 +848,10 @@
+ png_uint_32 width, height;
+ int num_pass = 1, pass;
+ int bit_depth, color_type;
++#ifdef PNG_APNG_SUPPORTED
++ png_uint_32 num_frames;
++ png_uint_32 num_plays;
++#endif
+
+ row_buf = NULL;
+ error_parameters.file_name = inname;
+@@ -1314,6 +1318,20 @@
+ }
+ }
+ #endif
++#ifdef PNG_APNG_SUPPORTED
++ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL))
++ {
++ if (png_get_acTL(read_ptr, read_info_ptr, &num_frames, &num_plays))
++ {
++ png_byte is_hidden;
++ pngtest_debug2("Handling acTL chunks (frames %ld, plays %ld)",
++ num_frames, num_plays);
++ png_set_acTL(write_ptr, write_info_ptr, num_frames, num_plays);
++ is_hidden = png_get_first_frame_is_hidden(read_ptr, read_info_ptr);
++ png_set_first_frame_is_hidden(write_ptr, write_info_ptr, is_hidden);
++ }
++ }
++#endif
+ #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
+ {
+ png_unknown_chunkp unknowns;
+@@ -1375,6 +1393,89 @@
+ t_misc += (t_stop - t_start);
+ t_start = t_stop;
+ #endif
++#ifdef PNG_APNG_SUPPORTED
++ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL))
++ {
++ png_uint_32 frame;
++ for (frame = 0; frame < num_frames; frame++)
++ {
++ png_uint_32 frame_width;
++ png_uint_32 frame_height;
++ png_uint_32 x_offset;
++ png_uint_32 y_offset;
++ png_uint_16 delay_num;
++ png_uint_16 delay_den;
++ png_byte dispose_op;
++ png_byte blend_op;
++ png_read_frame_head(read_ptr, read_info_ptr);
++ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_fcTL))
++ {
++ png_get_next_frame_fcTL(read_ptr, read_info_ptr,
++ &frame_width, &frame_height,
++ &x_offset, &y_offset,
++ &delay_num, &delay_den,
++ &dispose_op, &blend_op);
++ }
++ else
++ {
++ frame_width = width;
++ frame_height = height;
++ x_offset = 0;
++ y_offset = 0;
++ delay_num = 1;
++ delay_den = 1;
++ dispose_op = PNG_DISPOSE_OP_NONE;
++ blend_op = PNG_BLEND_OP_SOURCE;
++ }
++#ifdef PNG_WRITE_APNG_SUPPORTED
++ png_write_frame_head(write_ptr, write_info_ptr, (png_bytepp)&row_buf,
++ frame_width, frame_height,
++ x_offset, y_offset,
++ delay_num, delay_den,
++ dispose_op, blend_op);
++#endif
++ for (pass = 0; pass < num_pass; pass++)
++ {
++ pngtest_debug1("Writing row data for pass %d", pass);
++ for (y = 0; y < frame_height; y++)
++ {
++#ifndef SINGLE_ROWBUF_ALLOC
++ pngtest_debug2("Allocating row buffer (pass %d, y = %ld)...", pass, y);
++ row_buf = (png_bytep)png_malloc(read_ptr,
++ png_get_rowbytes(read_ptr, read_info_ptr));
++ pngtest_debug2("0x%08lx (%ld bytes)", (unsigned long)row_buf,
++ png_get_rowbytes(read_ptr, read_info_ptr));
++#endif /* !SINGLE_ROWBUF_ALLOC */
++ png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1);
++
++#ifdef PNG_WRITE_SUPPORTED
++#ifdef PNGTEST_TIMING
++ t_stop = (float)clock();
++ t_decode += (t_stop - t_start);
++ t_start = t_stop;
++#endif
++ png_write_rows(write_ptr, (png_bytepp)&row_buf, 1);
++#ifdef PNGTEST_TIMING
++ t_stop = (float)clock();
++ t_encode += (t_stop - t_start);
++ t_start = t_stop;
++#endif
++#endif /* PNG_WRITE_SUPPORTED */
++
++#ifndef SINGLE_ROWBUF_ALLOC
++ pngtest_debug2("Freeing row buffer (pass %d, y = %ld)", pass, y);
++ png_free(read_ptr, row_buf);
++ row_buf = NULL;
++#endif /* !SINGLE_ROWBUF_ALLOC */
++ }
++ }
++#ifdef PNG_WRITE_APNG_SUPPORTED
++ png_write_frame_tail(write_ptr, write_info_ptr);
++#endif
++ }
++ }
++ else
++#endif
+ for (pass = 0; pass < num_pass; pass++)
+ {
+ pngtest_debug1("Writing row data for pass %d", pass);
+diff -Naru libpng-1.6.14.org/pngwrite.c libpng-1.6.14/pngwrite.c
+--- libpng-1.6.14.org/pngwrite.c 2014-10-23 23:57:22.662675126 +0900
++++ libpng-1.6.14/pngwrite.c 2014-10-23 23:57:22.737677734 +0900
+@@ -127,6 +127,10 @@
+ * application continues writing the PNG. So check the 'invalid' flag here
+ * too.
+ */
++#ifdef PNG_WRITE_APNG_SUPPORTED
++ if (info_ptr->valid & PNG_INFO_acTL)
++ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
++#endif
+ #ifdef PNG_GAMMA_SUPPORTED
+ # ifdef PNG_WRITE_gAMA_SUPPORTED
+ if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) &&
+@@ -359,6 +363,11 @@
+ png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
+ #endif
+
++#ifdef PNG_WRITE_APNG_SUPPORTED
++ if (png_ptr->num_frames_written != png_ptr->num_frames_to_write)
++ png_error(png_ptr, "Not enough frames written");
++#endif
++
+ /* See if user wants us to write information chunks */
+ if (info_ptr != NULL)
+ {
+@@ -1665,6 +1674,43 @@
+ }
+ #endif
+
++#ifdef PNG_WRITE_APNG_SUPPORTED
++void PNGAPI
++png_write_frame_head(png_structp png_ptr, png_infop info_ptr,
++ png_bytepp row_pointers, png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
++ png_byte blend_op)
++{
++ png_debug(1, "in png_write_frame_head");
++
++ /* there is a chance this has been set after png_write_info was called,
++ * so it would be set but not written. is there a way to be sure? */
++ if (!(info_ptr->valid & PNG_INFO_acTL))
++ png_error(png_ptr, "png_write_frame_head(): acTL not set");
++
++ png_write_reset(png_ptr);
++
++ png_write_reinit(png_ptr, info_ptr, width, height);
++
++ if ( !(png_ptr->num_frames_written == 0 &&
++ (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ) )
++ png_write_fcTL(png_ptr, width, height, x_offset, y_offset,
++ delay_num, delay_den, dispose_op, blend_op);
++
++ PNG_UNUSED(row_pointers)
++}
++
++void PNGAPI
++png_write_frame_tail(png_structp png_ptr, png_infop info_ptr)
++{
++ png_debug(1, "in png_write_frame_tail");
++
++ png_ptr->num_frames_written++;
++
++ PNG_UNUSED(info_ptr)
++}
++#endif /* PNG_WRITE_APNG_SUPPORTED */
+
+ #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
+ #ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */
+diff -Naru libpng-1.6.14.org/pngwutil.c libpng-1.6.14/pngwutil.c
+--- libpng-1.6.14.org/pngwutil.c 2014-10-23 23:57:22.663675161 +0900
++++ libpng-1.6.14/pngwutil.c 2014-10-23 23:57:22.738677769 +0900
+@@ -902,6 +902,11 @@
+ /* Write the chunk */
+ png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);
+
++#ifdef PNG_WRITE_APNG_SUPPORTED
++ png_ptr->first_frame_width = width;
++ png_ptr->first_frame_height = height;
++#endif
++
+ if ((png_ptr->do_filter) == PNG_NO_FILTERS)
+ {
+ if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
+@@ -1080,7 +1085,14 @@
+ optimize_cmf(data, png_image_size(png_ptr));
+ # endif
+
++# ifdef PNG_WRITE_APNG_SUPPORTED
++ if (png_ptr->num_frames_written == 0)
++# endif
+ png_write_complete_chunk(png_ptr, png_IDAT, data, size);
++# ifdef PNG_WRITE_APNG_SUPPORTED
++ else
++ png_write_fdAT(png_ptr, data, size);
++# endif /* PNG_WRITE_APNG_SUPPORTED */
+ png_ptr->mode |= PNG_HAVE_IDAT;
+
+ png_ptr->zstream.next_out = data;
+@@ -1126,7 +1138,15 @@
+ optimize_cmf(data, png_image_size(png_ptr));
+ # endif
+
++# ifdef PNG_WRITE_APNG_SUPPORTED
++ if (png_ptr->num_frames_written == 0)
++# endif
+ png_write_complete_chunk(png_ptr, png_IDAT, data, size);
++# ifdef PNG_WRITE_APNG_SUPPORTED
++ else
++ png_write_fdAT(png_ptr, data, size);
++# endif /* PNG_WRITE_APNG_SUPPORTED */
++
+ png_ptr->zstream.avail_out = 0;
+ png_ptr->zstream.next_out = NULL;
+ png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT;
+@@ -1939,6 +1959,82 @@
+ }
+ #endif
+
++#ifdef PNG_WRITE_APNG_SUPPORTED
++void /* PRIVATE */
++png_write_acTL(png_structp png_ptr,
++ png_uint_32 num_frames, png_uint_32 num_plays)
++{
++ png_byte buf[8];
++
++ png_debug(1, "in png_write_acTL");
++
++ png_ptr->num_frames_to_write = num_frames;
++
++ if (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN)
++ num_frames--;
++
++ png_save_uint_32(buf, num_frames);
++ png_save_uint_32(buf + 4, num_plays);
++
++ png_write_complete_chunk(png_ptr, png_acTL, buf, (png_size_t)8);
++}
++
++void /* PRIVATE */
++png_write_fcTL(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
++ png_uint_32 x_offset, png_uint_32 y_offset,
++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
++ png_byte blend_op)
++{
++ png_byte buf[26];
++
++ png_debug(1, "in png_write_fcTL");
++
++ if (png_ptr->num_frames_written == 0 && (x_offset != 0 || y_offset != 0))
++ png_error(png_ptr, "x and/or y offset for the first frame aren't 0");
++ if (png_ptr->num_frames_written == 0 &&
++ (width != png_ptr->first_frame_width ||
++ height != png_ptr->first_frame_height))
++ png_error(png_ptr, "width and/or height in the first frame's fcTL "
++ "don't match the ones in IHDR");
++
++ /* more error checking */
++ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset,
++ delay_num, delay_den, dispose_op, blend_op);
++
++ png_save_uint_32(buf, png_ptr->next_seq_num);
++ png_save_uint_32(buf + 4, width);
++ png_save_uint_32(buf + 8, height);
++ png_save_uint_32(buf + 12, x_offset);
++ png_save_uint_32(buf + 16, y_offset);
++ png_save_uint_16(buf + 20, delay_num);
++ png_save_uint_16(buf + 22, delay_den);
++ buf[24] = dispose_op;
++ buf[25] = blend_op;
++
++ png_write_complete_chunk(png_ptr, png_fcTL, buf, (png_size_t)26);
++
++ png_ptr->next_seq_num++;
++}
++
++void /* PRIVATE */
++png_write_fdAT(png_structp png_ptr,
++ png_const_bytep data, png_size_t length)
++{
++ png_byte buf[4];
++
++ png_write_chunk_header(png_ptr, png_fdAT, (png_uint_32)(4 + length));
++
++ png_save_uint_32(buf, png_ptr->next_seq_num);
++ png_write_chunk_data(png_ptr, buf, 4);
++
++ png_write_chunk_data(png_ptr, data, length);
++
++ png_write_chunk_end(png_ptr);
++
++ png_ptr->next_seq_num++;
++}
++#endif /* PNG_WRITE_APNG_SUPPORTED */
++
+ /* Initializes the row writing capability of libpng */
+ void /* PRIVATE */
+ png_write_start_row(png_structrp png_ptr)
+@@ -3026,4 +3122,39 @@
+ }
+ #endif
+ }
++
++#ifdef PNG_WRITE_APNG_SUPPORTED
++void /* PRIVATE */
++png_write_reset(png_structp png_ptr)
++{
++ png_ptr->row_number = 0;
++ png_ptr->pass = 0;
++ png_ptr->mode &= ~PNG_HAVE_IDAT;
++}
++
++void /* PRIVATE */
++png_write_reinit(png_structp png_ptr, png_infop info_ptr,
++ png_uint_32 width, png_uint_32 height)
++{
++ if (png_ptr->num_frames_written == 0 &&
++ (width != png_ptr->first_frame_width ||
++ height != png_ptr->first_frame_height))
++ png_error(png_ptr, "width and/or height in the first frame's fcTL "
++ "don't match the ones in IHDR");
++ if (width > png_ptr->first_frame_width ||
++ height > png_ptr->first_frame_height)
++ png_error(png_ptr, "width and/or height for a frame greater than"
++ "the ones in IHDR");
++
++ png_set_IHDR(png_ptr, info_ptr, width, height,
++ info_ptr->bit_depth, info_ptr->color_type,
++ info_ptr->interlace_type, info_ptr->compression_type,
++ info_ptr->filter_type);
++
++ png_ptr->width = width;
++ png_ptr->height = height;
++ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
++ png_ptr->usr_width = png_ptr->width;
++}
++#endif /* PNG_WRITE_APNG_SUPPORTED */
+ #endif /* PNG_WRITE_SUPPORTED */
+diff -Naru libpng-1.6.14.org/scripts/symbols.def libpng-1.6.14/scripts/symbols.def
+--- libpng-1.6.14.org/scripts/symbols.def 2014-10-23 23:57:22.670675404 +0900
++++ libpng-1.6.14/scripts/symbols.def 2014-10-23 23:57:22.746678047 +0900
+@@ -249,3 +249,23 @@
+ png_set_check_for_invalid_index @242
+ png_get_palette_max @243
+ png_set_option @244
++ png_get_acTL @245
++ png_set_acTL @246
++ png_get_num_frames @247
++ png_get_num_plays @248
++ png_get_next_frame_fcTL @249
++ png_set_next_frame_fcTL @250
++ png_get_next_frame_width @251
++ png_get_next_frame_height @252
++ png_get_next_frame_x_offset @253
++ png_get_next_frame_y_offset @254
++ png_get_next_frame_delay_num @255
++ png_get_next_frame_delay_den @256
++ png_get_next_frame_dispose_op @257
++ png_get_next_frame_blend_op @258
++ png_get_first_frame_is_hidden @259
++ png_set_first_frame_is_hidden @260
++ png_read_frame_head @261
++ png_set_progressive_frame_fn @262
++ png_write_frame_head @263
++ png_write_frame_tail @264
diff --git a/package/mesalib/Makefile b/package/mesalib/Makefile
index f41d3805c..ef9eb2164 100644
--- a/package/mesalib/Makefile
+++ b/package/mesalib/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= mesalib
-PKG_VERSION:= 10.2.7
+PKG_VERSION:= 10.3.3
PKG_RELEASE:= 1
-PKG_MD5SUM:= 6927e1ae64818e6b692edaf06c644388
+PKG_MD5SUM:= e02efdfe0466bc75769e462841ab83f2
PKG_DESCR:= 3d graphics library
PKG_SECTION:= libs/video
PKG_DEPENDS:= libxdamage libxfixes libdrm libxxf86vm libexpat
diff --git a/package/nginx/Makefile b/package/nginx/Makefile
index 735c61985..804b6309f 100644
--- a/package/nginx/Makefile
+++ b/package/nginx/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= nginx
-PKG_VERSION:= 1.7.1
+PKG_VERSION:= 1.7.8
PKG_RELEASE:= 1
-PKG_MD5SUM:= 9659cbb26f226f6390b18ef991a79233
+PKG_MD5SUM:= fd5ab813fc1853cd8efe580ead577c3e
PKG_DESCR:= powerful http reverse proxy and webserver
PKG_SECTION:= net/http
PKG_BUILDDEP:= openssl pcre zlib
diff --git a/package/php/Makefile b/package/php/Makefile
index 4d41781b2..fe1236a50 100644
--- a/package/php/Makefile
+++ b/package/php/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= php
-PKG_VERSION:= 5.5.17
+PKG_VERSION:= 5.5.19
PKG_RELEASE:= 1
-PKG_MD5SUM:= e5f25dae73004658533ee7701a527bd0
+PKG_MD5SUM:= c63dcfd8b318d12127ba6d39ecc8a444
PKG_DESCR:= php language interpreter
PKG_SECTION:= dev/lang
PKG_DEPENDS:= libpthread librt