summaryrefslogtreecommitdiff
path: root/meta-openvuplus/recipes-support
diff options
context:
space:
mode:
authorhschang <chang@dev3>2015-02-05 02:42:36 (GMT)
committerhschang <chang@dev3>2015-02-06 01:12:20 (GMT)
commitd46ebdf3dab36adda4e1cec09897eaa5ad1f4a6e (patch)
treebc2973ed90ecd3de133c260ae8d2ec49324fbbce /meta-openvuplus/recipes-support
parentb4e3195ecc36ab3d2dfce78d8fce6685ba52e7ec (diff)
Support gles animation.
Diffstat (limited to 'meta-openvuplus/recipes-support')
-rw-r--r--meta-openvuplus/recipes-support/libbluray/libaacs_git.bb13
-rw-r--r--meta-openvuplus/recipes-support/libbluray/libbluray.inc16
-rw-r--r--meta-openvuplus/recipes-support/libbluray/libbluray_1.0.0.bb15
-rw-r--r--meta-openvuplus/recipes-support/libbluray/libdca_0.0.5-5.bb19
-rw-r--r--meta-openvuplus/recipes-support/libbluray/libdvdcss-1.2.10/use-cached-reads.patch243
-rw-r--r--meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bbappend3
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport.inc43
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/0001-xbmc-patch-for-xbmc.patch195
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/001_add_ao.patch270
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/002_fix_install_header.patch12
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/003_fix_deadlock.patch10
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/004_fix_bad_access.patch22
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/005_fix_shutdown.patch10
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/006_no_printf.patch843
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/007_fix_syslog_defines.patch24
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/008-add-missing-libs.patch21
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/009_fix_ipv6.patch22
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/010_handle_metadata.patch154
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/011_fix_ipv4_fallback.patch10
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/config8
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport/init49
-rw-r--r--meta-openvuplus/recipes-support/libshairport/libshairport_1.2.0.20310.bb8
-rw-r--r--meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch20
-rw-r--r--meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch62
-rw-r--r--meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb43
-rw-r--r--meta-openvuplus/recipes-support/taglib/taglib_1.8.bb28
26 files changed, 2163 insertions, 0 deletions
diff --git a/meta-openvuplus/recipes-support/libbluray/libaacs_git.bb b/meta-openvuplus/recipes-support/libbluray/libaacs_git.bb
new file mode 100644
index 0000000..720e93b
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libbluray/libaacs_git.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Open implementation of the AACS specification"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4b54a1fd55a448865a0b32d41598759d"
+DEPENDS = "libgcrypt"
+SRCREV = "668bd765cd3bdaf8216ad0fa26e01286029c0499"
+PV = "0.4.0"
+
+SRC_URI = "git://git.videolan.org/${PN}.git;protocol=git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools lib_package pkgconfig
diff --git a/meta-openvuplus/recipes-support/libbluray/libbluray.inc b/meta-openvuplus/recipes-support/libbluray/libbluray.inc
new file mode 100644
index 0000000..ff83a53
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libbluray/libbluray.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "libbluray for oe."
+SECTION = "misc"
+HOMEPAGE = "http://videolan.org"
+DEPENDS = ""
+LICENSE = "GPLv2"
+INC_PR = "r4"
+S="${WORKDIR}/git"
+SRC_URI = "git://git.videolan.org/libbluray.git;branch=master;protocol=git \
+ "
+
+inherit autotools
+
+
+PACKAGES += "${PN}"
+
+FILES_${PN} = "/"
diff --git a/meta-openvuplus/recipes-support/libbluray/libbluray_1.0.0.bb b/meta-openvuplus/recipes-support/libbluray/libbluray_1.0.0.bb
new file mode 100644
index 0000000..656a2bb
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libbluray/libbluray_1.0.0.bb
@@ -0,0 +1,15 @@
+require libbluray.inc
+
+DEPENDS += "libaacs libdca libdvdcss"
+RDEPENDS += "libaacs libdca libdvdcss"
+
+SRCREV="491c7e8501d7e7ea853700a2f35a18f11ad40a5b"
+LIC_FILES_CHKSUM="file://COPYING;md5=435ed639f84d4585d93824e7da3d85da"
+PR = "r2"
+
+#SRC_URI[archive.md5sum] = "b009e0550c3cf54d740e92a5f47821e1"
+#SRC_URI[archive.sha256sum] = "61602402d846a50e8ddf82c3fb5b81984de95ed56abfe0f1e22426d1901c564f"
+
+do_package_qa() {
+}
+
diff --git a/meta-openvuplus/recipes-support/libbluray/libdca_0.0.5-5.bb b/meta-openvuplus/recipes-support/libbluray/libdca_0.0.5-5.bb
new file mode 100644
index 0000000..8dd898f
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libbluray/libdca_0.0.5-5.bb
@@ -0,0 +1,19 @@
+SUMMARY = "decoding library for DTS Coherent Acoustics streams"
+SECTION = "libs/multimedia"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+SRCREV = "4f6b5d6e6fb35994c342de95bf05e20117da549b"
+
+SRC_URI = "git://anonscm.debian.org/collab-maint/${PN}.git;protocol=git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools lib_package pkgconfig
+
+do_unpackpost() {
+ QUILT_PATCHES=debian/patches quilt push -a
+ # single precision is enough and speeds up libdca by about 10-15%
+ sed -i -e 's/double/sample_t/g' ${S}/libdca/*.c ${S}/libdca/*.h
+}
+
+addtask unpackpost after do_unpack before do_patch
diff --git a/meta-openvuplus/recipes-support/libbluray/libdvdcss-1.2.10/use-cached-reads.patch b/meta-openvuplus/recipes-support/libbluray/libdvdcss-1.2.10/use-cached-reads.patch
new file mode 100644
index 0000000..ae583fa
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libbluray/libdvdcss-1.2.10/use-cached-reads.patch
@@ -0,0 +1,243 @@
+--- libdvdcss-1.2.10.org/src/device.c 2008-07-13 14:25:49.000000000 +0200
++++ libdvdcss-1.2.10/src/device.c 2013-11-18 22:39:50.000000000 +0100
+@@ -383,7 +383,12 @@
+
+ return 0;
+ #else
+- close( dvdcss->i_fd );
++ if ( dvdcss->p_read_file )
++ {
++ fclose( dvdcss->p_read_file );
++ free ( dvdcss->p_read_buf );
++ dvdcss->p_read_file = NULL;
++ }
+
+ if( dvdcss->i_raw_fd >= 0 )
+ {
+@@ -403,7 +408,28 @@
+ static int libc_open ( dvdcss_t dvdcss, char const *psz_device )
+ {
+ #if !defined( WIN32 )
+- dvdcss->i_fd = dvdcss->i_read_fd = open( psz_device, 0 );
++ dvdcss->p_read_file = fopen( psz_device, "r" );
++ if ( dvdcss->p_read_file )
++ {
++ dvdcss->p_read_buf = malloc( 128*1024 );
++ if ( !dvdcss->p_read_buf )
++ {
++ print_debug( dvdcss, "allocate buffer failed!" );
++ fclose( dvdcss->p_read_file );
++ dvdcss->p_read_file = NULL;
++ }
++ else if ( setvbuf( dvdcss->p_read_file, dvdcss->p_read_buf, _IOFBF, 128*1024 ) )
++ {
++ print_debug( dvdcss, "setvbuf failed (%s)", strerror(errno) );
++ free( dvdcss->p_read_buf );
++ fclose( dvdcss->p_read_file );
++ dvdcss->p_read_file = NULL;
++ }
++ }
++ if (dvdcss->p_read_file)
++ dvdcss->i_fd = dvdcss->i_read_fd = fileno( dvdcss->p_read_file );
++ else
++ dvdcss->i_fd = dvdcss->i_read_fd = -1;
+ #else
+ dvdcss->i_fd = dvdcss->i_read_fd = open( psz_device, O_BINARY );
+ #endif
+@@ -592,7 +618,18 @@
+ }
+
+ i_seek = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
+- i_seek = lseek( dvdcss->i_read_fd, i_seek, SEEK_SET );
++
++ if ( dvdcss->i_raw_fd >= 0 )
++ i_seek = lseek( dvdcss->i_read_fd, i_seek, SEEK_SET );
++ else
++ {
++ i_seek = fseeko( dvdcss->p_read_file, i_seek, SEEK_SET );
++ if ( !i_seek )
++ {
++ dvdcss->i_pos = i_blocks;
++ return i_blocks;
++ }
++ }
+
+ if( i_seek < 0 )
+ {
+@@ -673,36 +710,53 @@
+ *****************************************************************************/
+ static int libc_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
+ {
+- off_t i_size, i_ret;
+-
+- i_size = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
+- i_ret = read( dvdcss->i_read_fd, p_buffer, i_size );
+-
+- if( i_ret < 0 )
++ if ( dvdcss->i_raw_fd >= 0 )
+ {
+- print_error( dvdcss, "read error" );
+- dvdcss->i_pos = -1;
+- return i_ret;
+- }
++ off_t i_size, i_ret;
+
+- /* Handle partial reads */
+- if( i_ret != i_size )
+- {
+- int i_seek;
++ i_size = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
++ i_ret = read( dvdcss->i_read_fd, p_buffer, i_size );
+
+- dvdcss->i_pos = -1;
+- i_seek = libc_seek( dvdcss, i_ret / DVDCSS_BLOCK_SIZE );
+- if( i_seek < 0 )
++ if( i_ret < 0 )
+ {
+- return i_seek;
++ print_error( dvdcss, "read error" );
++ dvdcss->i_pos = -1;
++ return i_ret;
+ }
+
+- /* We have to return now so that i_pos isn't clobbered */
++ /* Handle partial reads */
++ if( i_ret != i_size )
++ {
++ int i_seek;
++
++ dvdcss->i_pos = -1;
++ i_seek = libc_seek( dvdcss, i_ret / DVDCSS_BLOCK_SIZE );
++ if( i_seek < 0 )
++ {
++ return i_seek;
++ }
++
++ /* We have to return now so that i_pos isn't clobbered */
++ return i_ret / DVDCSS_BLOCK_SIZE;
++ }
++
++ dvdcss->i_pos += i_ret / DVDCSS_BLOCK_SIZE;
+ return i_ret / DVDCSS_BLOCK_SIZE;
+ }
++ else
++ {
++ size_t i_ret = fread( p_buffer, DVDCSS_BLOCK_SIZE, i_blocks, dvdcss->p_read_file );
++
++ if ( i_ret < 0 )
++ {
++ print_error( dvdcss, "read error" );
++ dvdcss->i_pos = -1;
++ return i_ret;
++ }
+
+- dvdcss->i_pos += i_ret / DVDCSS_BLOCK_SIZE;
+- return i_ret / DVDCSS_BLOCK_SIZE;
++ dvdcss->i_pos += i_ret;
++ return i_ret;
++ }
+ }
+
+ #if defined( WIN32 )
+@@ -794,16 +848,72 @@
+ dvdcss->i_pos += i_total / DVDCSS_BLOCK_SIZE;
+ return i_total / DVDCSS_BLOCK_SIZE;
+ #else
+- int i_read = readv( dvdcss->i_read_fd, p_iovec, i_blocks );
+-
+- if( i_read < 0 )
++ if ( dvdcss->i_raw_fd >= 0 )
+ {
+- dvdcss->i_pos = -1;
+- return i_read;
++ int i_read = readv( dvdcss->i_read_fd, p_iovec, i_blocks );
++
++ if( i_read < 0 )
++ {
++ dvdcss->i_pos = -1;
++ return i_read;
++ }
++
++ dvdcss->i_pos += i_read / DVDCSS_BLOCK_SIZE;
++ return i_read / DVDCSS_BLOCK_SIZE;
+ }
++ else
++ {
++ int i_index, i_len, i_total = 0;
++ unsigned char *p_base;
++
++ for( i_index = i_blocks;
++ i_index;
++ i_index--, p_iovec++ )
++ {
++ int i_num_read;
++ i_len = p_iovec->iov_len;
++ p_base = p_iovec->iov_base;
+
+- dvdcss->i_pos += i_read / DVDCSS_BLOCK_SIZE;
+- return i_read / DVDCSS_BLOCK_SIZE;
++ if( i_len <= 0 )
++ {
++ continue;
++ }
++
++ i_num_read = fread( p_base, i_len, 1, dvdcss->p_read_file );
++
++ if( i_num_read != 1 )
++ {
++ /* We reached the end of the file or a signal interrupted
++ * the read. Return a partial read. */
++ int i_seek;
++
++ if (!i_total)
++ {
++ /* One of the reads failed, too bad.
++ * We won't even bother returning the reads that went ok,
++ * and as in the posix spec the file postition is left
++ * unspecified after a failure */
++ dvdcss->i_pos = -1;
++ return -1;
++ }
++
++ dvdcss->i_pos = -1;
++ i_seek = libc_seek( dvdcss, i_total / DVDCSS_BLOCK_SIZE );
++ if( i_seek < 0 )
++ {
++ return i_seek;
++ }
++
++ /* We have to return now so that i_pos isn't clobbered */
++ return i_total / DVDCSS_BLOCK_SIZE;
++ }
++
++ i_total += i_len;
++ }
++
++ dvdcss->i_pos += i_total / DVDCSS_BLOCK_SIZE;
++ return i_total / DVDCSS_BLOCK_SIZE;
++ }
+ #endif
+ }
+
+--- libdvdcss-1.2.10.org/src/libdvdcss.c 2008-08-29 20:41:51.000000000 +0200
++++ libdvdcss-1.2.10/src/libdvdcss.c 2013-11-17 13:15:03.000000000 +0100
+@@ -184,6 +184,7 @@
+ /*
+ * Initialize structure with default values
+ */
++ dvdcss->p_read_file = NULL;
+ #ifndef WIN32
+ dvdcss->i_raw_fd = -1;
+ #endif
+--- libdvdcss-1.2.10.org/src/libdvdcss.h 2008-08-29 20:39:56.000000000 +0200
++++ libdvdcss-1.2.10/src/libdvdcss.h 2013-11-17 13:15:03.000000000 +0100
+@@ -35,6 +35,9 @@
+ int i_read_fd;
+ int i_pos;
+
++ FILE * p_read_file;
++ void * p_read_buf;
++
+ /* File handling */
+ int ( * pf_seek ) ( dvdcss_t, int );
+ int ( * pf_read ) ( dvdcss_t, void *, int );
diff --git a/meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bbappend b/meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bbappend
new file mode 100644
index 0000000..e35f04a
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libbluray/libdvdcss_1.2.10.bbappend
@@ -0,0 +1,3 @@
+SRC_URI += "file://use-cached-reads.patch"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:"
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport.inc b/meta-openvuplus/recipes-support/libshairport/libshairport.inc
new file mode 100644
index 0000000..70fff54
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport.inc
@@ -0,0 +1,43 @@
+DESCRIPTION = "libshairport for oe."
+SECTION = "misc"
+HOMEPAGE = "http://xbmc.org/"
+DEPENDS = "openssl"
+LICENSE = "GPLv2"
+INC_PR = "r4"
+S="${WORKDIR}/${PN}-${PV}_lib"
+SRC_URI = "http://mirrors.xbmc.org/build-deps/darwin-libs/${PN}-${PV}_lib.tar.gz;name=archive \
+ file://001_add_ao.patch;apply=yes;striplevel=0 \
+ file://002_fix_install_header.patch;apply=yes;striplevel=0 \
+ file://003_fix_deadlock.patch;apply=yes;striplevel=0 \
+ file://004_fix_bad_access.patch;apply=yes;striplevel=0 \
+ file://005_fix_shutdown.patch;apply=yes;striplevel=0 \
+ file://006_no_printf.patch;apply=yes;striplevel=0 \
+ file://007_fix_syslog_defines.patch;apply=yes;striplevel=0 \
+ file://008-add-missing-libs.patch;apply=yes;striplevel=0 \
+ file://009_fix_ipv6.patch;apply=yes;striplevel=0 \
+ file://010_handle_metadata.patch;apply=yes;striplevel=0 \
+ file://011_fix_ipv4_fallback.patch;apply=yes;striplevel=0 \
+ file://0001-xbmc-patch-for-xbmc.patch;apply=yes;striplevel=1 \
+ "
+
+#do_patch(){
+# cd ${S}; patch -p0 < ../001_add_ao.patch
+# cd ${S}; patch -p0 < ../002_fix_install_header.patch
+# cd ${S}; patch -p0 < ../003_fix_deadlock.patch
+# cd ${S}; patch -p0 < ../004_fix_bad_access.patch
+# cd ${S}; patch -p0 < ../005_fix_shutdown.patch
+# cd ${S}; patch -p0 < ../006_no_printf.patch
+# cd ${S}; patch -p0 < ../007_fix_syslog_defines.patch
+# cd ${S}; patch -p0 < ../008-add-missing-libs.patch
+# cd ${S}; patch -p0 < ../009_fix_ipv6.patch
+# cd ${S}; patch -p0 < ../010_handle_metadata.patch
+# cd ${S}; patch -p0 < ../011_fix_ipv4_fallback.patch
+#}
+inherit autotools package
+
+do_package_qa() {
+}
+
+PACKAGES += "${PN}"
+
+FILES_${PN} = "/"
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/0001-xbmc-patch-for-xbmc.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/0001-xbmc-patch-for-xbmc.patch
new file mode 100644
index 0000000..b6b780e
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/0001-xbmc-patch-for-xbmc.patch
@@ -0,0 +1,195 @@
+From c9807cd8c7acd23aaef76749888b39f6f0742ce0 Mon Sep 17 00:00:00 2001
+From: Sangdol Kim <doliyu@marusys.com>
+Date: Thu, 7 Mar 2013 17:08:41 +0900
+Subject: [PATCH] [xbmc]patch for xbmc
+
+---
+ src/hairtunes.c | 17 +++++++++++++
+ src/shairport.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 83 insertions(+), 3 deletions(-)
+
+diff --git a/src/hairtunes.c b/src/hairtunes.c
+index 6957da9..2f71429 100644
+--- a/src/hairtunes.c
++++ b/src/hairtunes.c
+@@ -120,6 +120,10 @@ int ab_buffering = 1, ab_synced = 0;
+ pthread_mutex_t ab_mutex;
+ pthread_cond_t ab_buffer_ready;
+
++#ifdef XBMC
++static int g_initialized = 0;
++#endif
++
+ static void die(char *why) {
+ xprintf("FATAL: %s\n", why);
+ //exit(1);
+@@ -192,6 +196,7 @@ int hairtunes_init(char *pAeskey, char *pAesiv, char *fmtpstr, int pCtrlPort, in
+ ab_buffering = 1;
+ ab_synced = 0;
+ pthread_mutex_init(&ab_mutex, NULL);
++ printf("init hairtune_init\n");
+ pthread_cond_init(&ab_buffer_ready, NULL);
+
+ if(pAeskey != NULL)
+@@ -253,6 +258,8 @@ int hairtunes_init(char *pAeskey, char *pAesiv, char *fmtpstr, int pCtrlPort, in
+ }
+ xprintf("bye!\n");
+ fflush(stderr);
++#else
++ g_initialized = 1;
+ #endif
+
+ return EXIT_SUCCESS;
+@@ -1005,6 +1012,13 @@ void clean_output(void)
+
+ void hairtunes_cleanup(void)
+ {
++#ifdef XBMC
++ if( g_initialized == 0 )
++ {
++ printf("hairtunes_cleanup : already initialized\n");
++ return;
++ }
++#endif
+ pthread_cond_signal(&ab_buffer_ready);
+ clean_output();
+ clean_rtp();
+@@ -1013,4 +1027,7 @@ void hairtunes_cleanup(void)
+
+ pthread_mutex_destroy(&ab_mutex);
+ pthread_cond_destroy(&ab_buffer_ready);
++#ifdef XBMC
++ g_initialized = 0;
++#endif
+ }
+diff --git a/src/shairport.c b/src/shairport.c
+index f520990..8edf69f 100644
+--- a/src/shairport.c
++++ b/src/shairport.c
+@@ -311,13 +311,16 @@ int shairport_main(int argc, char **argv)
+ return 1;
+ }
+ }
+-
++#ifdef XBMC
++static int tClientSock = 0;
++#endif
+ int shairport_loop(void)
+ {
+ if (!m_running || tServerSock <= 0)
+ return 0;
+-
+- int tClientSock = 0;
++#ifndef XBMC
++ static int tClientSock = 0;
++#endif
+
+ fd_set fds;
+ FD_ZERO(&fds);
+@@ -395,6 +398,8 @@ void shairport_exit(void)
+ {
+ m_running = 0;
+ close(tServerSock);
++ printf("exit airport\n");
++
+ }
+
+ int shairport_is_running(void)
+@@ -502,7 +507,11 @@ void handleClient(int pSock, char *pPassword, char *pHWADDR)
+ struct connection tConn;
+ initConnection(&tConn, &tKeys, &tComms, pSock, pPassword);
+
++#ifdef XBMC
++ while( m_running )
++#else
+ while(1)
++#endif
+ {
+ tMoreDataNeeded = 1;
+
+@@ -510,7 +519,11 @@ void handleClient(int pSock, char *pPassword, char *pHWADDR)
+ initBuffer(&tConn.resp, 80);
+
+ int tError = FALSE;
++#ifdef XBMC
++ while(1 == tMoreDataNeeded && m_running )
++#else
+ while(1 == tMoreDataNeeded)
++#endif
+ {
+ tError = readDataFromClient(pSock, &(tConn.recv));
+ //if(!tError && strlen(tConn.recv.data) > 0)
+@@ -565,12 +578,59 @@ int readDataFromClient(int pSock, struct shairbuffer *pClientBuffer)
+
+ int tRetval = 1;
+ int tEnd = -1;
++#ifdef XBMC
++ while(tRetval > 0 && tEnd < 0 && m_running )
++#else
+ while(tRetval > 0 && tEnd < 0)
++#endif
+ {
++#ifdef XBMC
++ struct timeval tv;
++ fd_set set;
++ int result;
++#endif
+ // Read from socket until \n\n, \r\n\r\n, or \r\r is found
+ xprintf("Waiting To Read...\n");
+ fflush(stdout);
++
++#ifdef XBMC
++ FD_ZERO( &set );
++ FD_SET( (int)pSock, &set );
++
++ tv.tv_sec=0;
++ tv.tv_usec = 200000;
++ //printf("select\n");
++ result = select ( (int)pSock + 1, &set, NULL, NULL, &tv );
++
++ //printf("select 2\n");
++ if( result < 0 )
++ {
++ printf("timed out\n");
++ continue;
++ }
++
++ if( (int)pSock < 0 )
++ continue;
++ if( FD_ISSET( (int)pSock, &set ) )
++ {
++ //printf("Read Data \n");
++ tRetval = read(pSock, tReadBuf, MAX_SIZE);
++ //printf("Read Data2 \n");
++ }
++ else if( result == 0 )
++ {
++ xprintf("ReadTimeout\n");
++ continue;
++ }
++ else
++ {
++ //printf("other fd\n");
++ continue;
++ }
++
++#else
+ tRetval = read(pSock, tReadBuf, MAX_SIZE);
++#endif
+ // if new buffer contains the end of request string, only copy partial buffer?
+ tEnd = findEnd(tReadBuf);
+ if(tEnd >= 0)
+@@ -1101,7 +1161,10 @@ void cleanup(struct connection *pConn)
+ closePipe(&(pConn->hairtunes->out[0]));
+ closePipe(&(pConn->hairtunes->out[1]));
+ }
++#else
++ hairtunes_cleanup();
+ #endif
++
+ if(pConn->keys != NULL)
+ {
+ if(pConn->keys->aesiv != NULL)
+--
+1.7.2.3
+
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/001_add_ao.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/001_add_ao.patch
new file mode 100644
index 0000000..995f7b7
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/001_add_ao.patch
@@ -0,0 +1,270 @@
+diff -uP libshairport-1.2.0.20310_lib/src/ao.h ../../../../../libshairport-1.2.0.20310_lib/src/ao.h
+--- src/ao.h 1970-01-01 01:00:00.000000000 +0100
++++ src/ao.h 2011-09-25 20:36:36.000000000 +0200
+@@ -0,0 +1,156 @@
++/*
++ *
++ * ao.h
++ *
++ * Original Copyright (C) Aaron Holtzman - May 1999
++ * Modifications Copyright (C) Stan Seibert - July 2000, July 2001
++ * More Modifications Copyright (C) Jack Moffitt - October 2000
++ *
++ * This file is part of libao, a cross-platform audio outputlibrary. See
++ * README for a history of this source code.
++ *
++ * libao is free software; 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, or (at your option)
++ * any later version.
++ *
++ * libao 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 GNU Make; see the file COPYING. If not, write to
++ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++#ifndef __AO_H__
++#define __AO_H__
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif /* __cplusplus */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <stdint.h>
++#include <errno.h>
++
++/* --- Constants ---*/
++
++#define AO_TYPE_LIVE 1
++#define AO_TYPE_FILE 2
++
++
++#define AO_ENODRIVER 1
++#define AO_ENOTFILE 2
++#define AO_ENOTLIVE 3
++#define AO_EBADOPTION 4
++#define AO_EOPENDEVICE 5
++#define AO_EOPENFILE 6
++#define AO_EFILEEXISTS 7
++#define AO_EBADFORMAT 8
++
++#define AO_EFAIL 100
++
++
++#define AO_FMT_LITTLE 1
++#define AO_FMT_BIG 2
++#define AO_FMT_NATIVE 4
++
++/* --- Structures --- */
++
++typedef struct ao_info {
++ int type; /* live output or file output? */
++ char *name; /* full name of driver */
++ char *short_name; /* short name of driver */
++ char *author; /* driver author */
++ char *comment; /* driver comment */
++ int preferred_byte_format;
++ int priority;
++ char **options;
++ int option_count;
++} ao_info;
++
++typedef struct ao_functions ao_functions;
++typedef struct ao_device ao_device;
++
++typedef struct ao_sample_format {
++ int bits; /* bits per sample */
++ int rate; /* samples per second (in a single channel) */
++ int channels; /* number of audio channels */
++ int byte_format; /* Byte ordering in sample, see constants below */
++ char *matrix; /* input channel location/ordering */
++} ao_sample_format;
++
++typedef struct ao_option {
++ char *key;
++ char *value;
++ struct ao_option *next;
++} ao_option;
++
++#if defined(AO_BUILDING_LIBAO)
++#include "ao_private.h"
++#endif
++
++/* --- Functions --- */
++
++/* library setup/teardown */
++void ao_initialize(void);
++void ao_shutdown(void);
++
++/* device setup/playback/teardown */
++int ao_append_global_option(const char *key,
++ const char *value);
++int ao_append_option(ao_option **options,
++ const char *key,
++ const char *value);
++void ao_free_options(ao_option *options);
++
++char* ao_get_option(ao_option *options, const char* key);
++
++ao_device* ao_open_live(int driver_id,
++ ao_sample_format *format,
++ ao_option *option);
++ao_device* ao_open_file(int driver_id,
++ const char *filename,
++ int overwrite,
++ ao_sample_format *format,
++ ao_option *option);
++
++int ao_play(ao_device *device,
++ char *output_samples,
++ uint32_t num_bytes);
++int ao_close(ao_device *device);
++
++/* driver information */
++int ao_driver_id(const char *short_name);
++int ao_default_driver_id(void);
++ao_info *ao_driver_info(int driver_id);
++ao_info **ao_driver_info_list(int *driver_count);
++char *ao_file_extension(int driver_id);
++
++/* miscellaneous */
++int ao_is_big_endian(void);
++
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* __AO_H__ */
++
++extern struct AudioOutput g_ao;
++struct AudioOutput
++ {
++ void (*ao_initialize)(void);
++ int (*ao_play)(ao_device *, char *, uint32_t);
++ int (*ao_default_driver_id)(void);
++ ao_device* (*ao_open_live)( int, ao_sample_format *, ao_option *);
++ int (*ao_close)(ao_device *);
++ /* -- Device Setup/Playback/Teardown -- */
++ int (*ao_append_option)(ao_option **, const char *, const char *);
++ void (*ao_free_options)(ao_option *);
++ char* (*ao_get_option)(ao_option *, const char* );
++ };
+diff -uP libshairport-1.2.0.20310_lib/src/hairtunes.c ../../../../../libshairport-1.2.0.20310_lib/src/hairtunes.c
+--- src/hairtunes.c 2011-09-23 21:55:48.000000000 +0200
++++ src/hairtunes.c 2011-09-25 20:37:49.000000000 +0200
+@@ -25,7 +25,7 @@
+ */
+
+ #define XBMC
+-//#defined HAS_AO
++#define HAS_AO
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -45,7 +45,7 @@
+ #include <sys/signal.h>
+ #include <fcntl.h>
+ #ifdef HAS_AO
+-#include <ao/ao.h>
++#include "ao.h"
+ #endif
+
+ #ifdef FANCY_RESAMPLING
+@@ -881,7 +881,7 @@
+ }
+ #ifdef HAS_AO
+ } else {
+- ao_play(dev, (char *)outbuf, play_samples*4);
++ g_ao.ao_play(dev, (char *)outbuf, play_samples*4);
+ #endif
+ }
+ }
+@@ -906,7 +906,7 @@
+ ao_device *dev;
+
+ void* init_ao() {
+- ao_initialize();
++ g_ao.ao_initialize();
+
+ int driver;
+ #ifndef XBMC
+@@ -921,7 +921,7 @@
+ #endif
+ {
+ // otherwise choose the default
+- driver = ao_default_driver_id();
++ driver = g_ao.ao_default_driver_id();
+ }
+
+ ao_sample_format fmt;
+@@ -944,9 +944,9 @@
+ }
+ #endif
+
+- ao_append_option(&ao_opts, "name", "Streaming...");
++ g_ao.ao_append_option(&ao_opts, "name", "Streaming...");
+
+- dev = ao_open_live(driver, &fmt, ao_opts);
++ dev = g_ao.ao_open_live(driver, &fmt, ao_opts);
+ if (dev == NULL) {
+ die("Could not open ao device");
+ }
+@@ -985,7 +985,7 @@
+ audio_running = 0;
+ pthread_join(audio_thread, NULL);
+ #ifdef HAS_AO
+- ao_close(dev);
++ g_ao.ao_close(dev);
+ #endif
+ }
+
+diff -uP libshairport-1.2.0.20310_lib/src/shairport.c ../../../../../libshairport-1.2.0.20310_lib/src/shairport.c
+--- src/shairport.c 2011-08-21 01:57:56.000000000 +0200
++++ src/shairport.c 2011-09-25 20:44:40.000000000 +0200
+@@ -92,6 +92,14 @@
+ static char tPassword[56] = "";
+ static char tHWID[HWID_SIZE] = {0,51,52,53,54,55};
+
++#ifdef XBMC
++struct AudioOutput g_ao;
++void shairport_set_ao(struct AudioOutput *ao)
++{
++ g_ao=*ao;
++}
++#endif
++
+ #ifndef XBMC
+ int main(int argc, char **argv)
+ #else
+diff -uP libshairport-1.2.0.20310_lib/src/shairport.h ../../../../../libshairport-1.2.0.20310_lib/src/shairport.h
+--- src/shairport.h 2011-08-21 01:58:11.000000000 +0200
++++ src/shairport.h 2011-09-25 20:36:43.000000000 +0200
+@@ -11,6 +11,7 @@
+ #include <regex.h>
+ #include <sys/types.h>
+ #include <regex.h>
++#include "ao.h"
+
+
+ #define HWID_SIZE 6
+@@ -62,9 +63,11 @@
+ void shairport_exit(void);
+ int shairport_loop(void);
+ int shairport_is_running(void);
++void shairport_set_ao(struct AudioOutput *ao);
+
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+
+ #endif
++
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/002_fix_install_header.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/002_fix_install_header.patch
new file mode 100644
index 0000000..495b973
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/002_fix_install_header.patch
@@ -0,0 +1,12 @@
+--- src/Makefile.am.old 2011-09-23 23:14:39.000000000 +0200
++++ src/Makefile.am 2011-09-25 21:38:08.000000000 +0200
+@@ -1,7 +1,7 @@
+ lib_LTLIBRARIES=libshairport.la
+
+-library_includedir=$(includedir)
+-library_include_HEADERS = shairport.h
++library_includedir=$(includedir)/shairport
++library_include_HEADERS = shairport.h ao.h socketlib.h
+
+ libshairport_la_SOURCES=shairport.c hairtunes.c socketlib.c alac.c
+ libshairport_la_LDFLAGS=-dynamiclib
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/003_fix_deadlock.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/003_fix_deadlock.patch
new file mode 100644
index 0000000..c05970e
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/003_fix_deadlock.patch
@@ -0,0 +1,10 @@
+--- src/hairtunes.c.orig 2011-09-25 21:58:08.000000000 +0200
++++ src/hairtunes.c 2011-09-25 21:58:12.000000000 +0200
+@@ -991,6 +991,7 @@
+
+ void hairtunes_cleanup(void)
+ {
++ pthread_cond_signal(&ab_buffer_ready);
+ clean_output();
+ clean_rtp();
+ clean_buffer();
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/004_fix_bad_access.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/004_fix_bad_access.patch
new file mode 100644
index 0000000..1976904
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/004_fix_bad_access.patch
@@ -0,0 +1,22 @@
+--- src/hairtunes.c.orig 2011-09-25 23:26:56.000000000 +0200
++++ src/hairtunes.c 2011-09-25 23:29:27.000000000 +0200
+@@ -89,7 +89,6 @@
+ // maximal resampling shift - conservative
+ #define OUTFRAME_BYTES (4*(frame_size+3))
+
+-
+ alac_file *decoder_info;
+
+ #ifdef FANCY_RESAMPLING
+@@ -849,6 +848,11 @@
+ inbuf = buffer_get_frame();
+ } while (!inbuf && audio_running);
+
++ if(!audio_running)
++ {
++ return 0; //don't access inbuf if audio stopped
++ }
++
+ #ifdef FANCY_RESAMPLING
+ if (fancy_resampling) {
+ int i;
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/005_fix_shutdown.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/005_fix_shutdown.patch
new file mode 100644
index 0000000..32bd282
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/005_fix_shutdown.patch
@@ -0,0 +1,10 @@
+--- src/shairport.c 2011-09-25 23:58:06.000000000 +0200
++++ src/shairport.c.new 2011-09-25 23:57:54.000000000 +0200
+@@ -368,6 +368,7 @@
+ void shairport_exit(void)
+ {
+ m_running = 0;
++ close(tServerSock);
+ }
+
+ int shairport_is_running(void)
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/006_no_printf.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/006_no_printf.patch
new file mode 100644
index 0000000..eb69d42
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/006_no_printf.patch
@@ -0,0 +1,843 @@
+--- src/alac.c 2011-08-21 00:06:21.000000000 +0200
++++ src/alac.c 2011-10-01 04:12:09.000000000 +0200
+@@ -804,7 +804,7 @@
+ }
+ else
+ {
+- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type);
++ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type);
+ /* i think the only other prediction type (or perhaps this is just a
+ * boolean?) runs adaptive fir twice.. like:
+ * predictor_decompress_fir_adapt(predictor_error, tempout, ...)
+@@ -885,7 +885,7 @@
+ }
+ case 20:
+ case 32:
+- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
++ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
+ break;
+ default:
+ break;
+@@ -1004,7 +1004,7 @@
+ }
+ else
+ { /* see mono case */
+- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_a);
++ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_a);
+ }
+
+ /* channel 2 */
+@@ -1029,7 +1029,7 @@
+ }
+ else
+ {
+- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_b);
++ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_b);
+ }
+ }
+ else
+@@ -1106,7 +1106,7 @@
+ }
+ case 20:
+ case 32:
+- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
++ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
+ break;
+ default:
+ break;
+--- src/hairtunes.c 2011-10-01 17:45:08.000000000 +0200
++++ src/hairtunes.c 2011-10-01 17:42:07.000000000 +0200
+@@ -121,8 +121,8 @@
+ pthread_cond_t ab_buffer_ready;
+
+ static void die(char *why) {
+- fprintf(stderr, "FATAL: %s\n", why);
+- exit(1);
++ xprintf("FATAL: %s\n", why);
++ //exit(1);
+ }
+
+ static int hex2bin(unsigned char *buf, char *hex) {
+@@ -245,13 +245,13 @@
+ continue;
+ }
+ if (!strcmp(line, "exit\n")) {
+- exit(0);
++ ;//exit(0);
+ }
+ if (!strcmp(line, "flush\n")) {
+ hairtunes_flush();
+ }
+ }
+- fprintf(stderr, "bye!\n");
++ xprintf("bye!\n");
+ fflush(stderr);
+ #endif
+
+@@ -262,7 +262,7 @@
+ {
+ assert(f<=0);
+ if (debug)
+- fprintf(stderr, "VOL: %lf\n", f);
++ xprintf("VOL: %lf\n", f);
+ volume = pow(10.0,0.05*f);
+ fix_volume = 65536.0 * volume;
+ }
+@@ -273,7 +273,7 @@
+ ab_resync();
+ pthread_mutex_unlock(&ab_mutex);
+ if (debug)
+- fprintf(stderr, "FLUSH\n");
++ xprintf("FLUSH\n");
+ }
+
+ #ifdef HAIRTUNES_STANDALONE
+@@ -423,7 +423,7 @@
+ } else if (seq_order(ab_read, seqno)) { // late but not yet played
+ abuf = audio_buffer + BUFIDX(seqno);
+ } else { // too late.
+- fprintf(stderr, "\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write);
++ xprintf("\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write);
+ }
+ buf_fill = ab_write - ab_read;
+ pthread_mutex_unlock(&ab_mutex);
+@@ -520,7 +520,7 @@
+ if (seq_order(last, first))
+ return;
+
+- fprintf(stderr, "requesting resend on %d packets (port %d)\n", last-first+1, controlport);
++ xprintf("requesting resend on %d packets (port %d)\n", last-first+1, controlport);
+
+ char req[8]; // *not* a standard RTCP NACK
+ req[0] = 0x80;
+@@ -604,8 +604,8 @@
+ port += 3;
+ }
+
+- printf("port: %d\n", port); // let our handler know where we end up listening
+- printf("cport: %d\n", port+1);
++ xprintf("port: %d\n", port); // let our handler know where we end up listening
++ xprintf("cport: %d\n", port+1);
+
+ rtp_sockets[0] = sock;
+ rtp_sockets[1] = csock;
+@@ -708,7 +708,7 @@
+ bf_est_drift = biquad_filt(&bf_drift_lpf, CONTROL_B*(bf_est_err*CONTROL_A + err_deriv) + bf_est_drift);
+
+ if (debug)
+- fprintf(stderr, "bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err);
++ xprintf("bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err);
+ bf_playback_rate = 1.0 + CONTROL_A*bf_est_err + bf_est_drift;
+
+ bf_last_err = bf_est_err;
+@@ -724,7 +724,7 @@
+ buf_fill = ab_write - ab_read;
+ if (buf_fill < 1 || !ab_synced || ab_buffering) { // init or underrun. stop and wait
+ if (ab_synced)
+- fprintf(stderr, "\nunderrun\n");
++ xprintf("\nunderrun\n");
+
+ ab_buffering = 1;
+ pthread_cond_wait(&ab_buffer_ready, &ab_mutex);
+@@ -736,7 +736,7 @@
+ return 0;
+ }
+ if (buf_fill >= BUFFER_FRAMES) { // overrunning! uh-oh. restart at a sane distance
+- fprintf(stderr, "\noverrun.\n");
++ xprintf("\noverrun.\n");
+ ab_read = ab_write - START_FILL;
+ }
+ read = ab_read;
+@@ -748,7 +748,7 @@
+
+ volatile abuf_t *curframe = audio_buffer + BUFIDX(read);
+ if (!curframe->ready) {
+- fprintf(stderr, "\nmissing frame.\n");
++ xprintf("\nmissing frame.\n");
+ memset(curframe->data, 0, FRAME_BYTES);
+ }
+ curframe->ready = 0;
+@@ -775,13 +775,13 @@
+ if (stuff) {
+ if (stuff==1) {
+ if (debug)
+- fprintf(stderr, "+++++++++\n");
++ xprintf("+++++++++\n");
+ // interpolate one sample
+ *outptr++ = dithered_vol(((long)inptr[-2] + (long)inptr[0]) >> 1);
+ *outptr++ = dithered_vol(((long)inptr[-1] + (long)inptr[1]) >> 1);
+ } else if (stuff==-1) {
+ if (debug)
+- fprintf(stderr, "---------\n");
++ xprintf("---------\n");
+ inptr++;
+ inptr++;
+ }
+--- src/shairport.c 2011-10-01 17:45:08.000000000 +0200
++++ src/shairport.c 2011-10-01 17:41:04.000000000 +0200
+@@ -31,6 +31,27 @@
+ #include "shairport.h"
+ #include "hairtunes.h"
+
++static struct printfPtr g_printf={NULL};
++
++int xprintf(const char *format, ...)
++{
++ char dbg[2048];
++ va_list args;
++ va_start(args, format);
++ vsnprintf(dbg, sizeof(dbg), format, args);
++ va_end(args);
++ if(g_printf.extprintf)
++ {
++ g_printf.extprintf(dbg, sizeof(dbg));
++ }
++ else
++ {
++ printf(dbg);
++ }
++
++ return 1;
++}
++
+ #ifndef TRUE
+ #define TRUE (-1)
+ #endif
+@@ -98,6 +119,11 @@
+ {
+ g_ao=*ao;
+ }
++
++void shairport_set_printf(struct printfPtr *funcPtr)
++{
++ g_printf = *funcPtr;
++}
+ #endif
+
+ #ifndef XBMC
+@@ -106,7 +132,7 @@
+ int shairport_main(int argc, char **argv)
+ #endif
+ {
+- printf("initializing shairport\n");
++ xprintf("initializing shairport\n",NULL);
+ char tHWID_Hex[HWID_SIZE * 2 + 1];
+ char tKnownHwid[32];
+
+@@ -185,22 +211,22 @@
+ }
+ else if(!strcmp(arg, "-h") || !strcmp(arg, "--help"))
+ {
+- slog(LOG_INFO, "ShairPort version 0.05 C port - Airport Express emulator\n");
+- slog(LOG_INFO, "Usage:\nshairport [OPTION...]\n\nOptions:\n");
+- slog(LOG_INFO, " -a, --apname=AirPort Sets Airport name\n");
+- slog(LOG_INFO, " -p, --password=secret Sets Password (not working)\n");
+- slog(LOG_INFO, " -o, --server_port=5000 Sets Port for Avahi/dns-sd\n");
+- slog(LOG_INFO, " -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n");
+- slog(LOG_INFO, " -d Daemon mode\n");
+- slog(LOG_INFO, " -q, --quiet Supresses all output.\n");
+- slog(LOG_INFO, " -v,-v2,-v3,-vv Various debugging levels\n");
+- slog(LOG_INFO, "\n");
++ xprintf("ShairPort version 0.05 C port - Airport Express emulator\n");
++ xprintf("Usage:\nshairport [OPTION...]\n\nOptions:\n");
++ xprintf(" -a, --apname=AirPort Sets Airport name\n");
++ xprintf(" -p, --password=secret Sets Password (not working)\n");
++ xprintf(" -o, --server_port=5000 Sets Port for Avahi/dns-sd\n");
++ xprintf(" -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n");
++ xprintf(" -d Daemon mode\n");
++ xprintf(" -q, --quiet Supresses all output.\n");
++ xprintf(" -v,-v2,-v3,-vv Various debugging levels\n");
++ xprintf("\n");
+ return 0;
+ }
+ }
+
+ if ( buffer_start_fill < 30 || buffer_start_fill > BUFFER_FRAMES ) {
+- fprintf(stderr, "buffer value must be > 30 and < %d\n", BUFFER_FRAMES);
++ xprintf("buffer value must be > 30 and < %d\n", BUFFER_FRAMES);
+ return(0);
+ }
+
+@@ -209,11 +235,11 @@
+ int tPid = fork();
+ if(tPid < 0)
+ {
+- exit(1); // Error on fork
++ //exit(1); // Error on fork
+ }
+ else if(tPid > 0)
+ {
+- exit(0);
++ //exit(0);
+ }
+ else
+ {
+@@ -254,10 +280,10 @@
+ sscanf(tHWID_Hex, "%02X%02X%02X%02X%02X%02X", &tHWID[0], &tHWID[1], &tHWID[2], &tHWID[3], &tHWID[4], &tHWID[5]);
+ }
+
+- slog(LOG_INFO, "LogLevel: %d\n", kCurrentLogLevel);
+- slog(LOG_INFO, "AirName: %s\n", tServerName);
+- slog(LOG_INFO, "HWID: %.*s\n", HWID_SIZE, tHWID+1);
+- slog(LOG_INFO, "HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex);
++ xprintf("LogLevel: %d\n", kCurrentLogLevel);
++ xprintf("AirName: %s\n", tServerName);
++ xprintf("HWID: %.*s\n", HWID_SIZE, tHWID+1);
++ xprintf("HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex);
+
+ if(tSimLevel >= 1)
+ {
+@@ -271,12 +297,12 @@
+ #ifndef XBMC
+ startAvahi(tHWID_Hex, tServerName, tPort);
+ #endif
+- slog(LOG_DEBUG_V, "Starting connection server: specified server port: %d\n", tPort);
++ xprintf("Starting connection server: specified server port: %d\n", tPort);
+ tServerSock = setupListenServer(&tAddrInfo, tPort);
+ if(tServerSock < 0)
+ {
+ freeaddrinfo(tAddrInfo);
+- slog(LOG_INFO, "Error setting up server socket on port %d, try specifying a different port\n", tPort);
++ xprintf("Error setting up server socket on port %d, try specifying a different port\n", tPort);
+ return 0;
+ }
+
+@@ -303,7 +329,7 @@
+
+ int readsock;
+
+- slog(LOG_DEBUG_V, "Waiting for clients to connect\n");
++ xprintf("Waiting for clients to connect\n");
+
+ while(m_running)
+ {
+@@ -335,7 +361,7 @@
+ {
+ freeaddrinfo(tAddrInfo);
+ tAddrInfo = NULL;
+- slog(LOG_DEBUG, "...Accepted Client Connection..\n");
++ xprintf("...Accepted Client Connection..\n");
+ close(tServerSock);
+ handleClient(tClientSock, tPassword, tHWID);
+ //close(tClientSock);
+@@ -343,11 +369,11 @@
+ }
+ else
+ {
+- slog(LOG_DEBUG_VV, "Child now busy handling new client\n");
++ xprintf("Child now busy handling new client\n");
+ close(tClientSock);
+ }
+ #else
+- slog(LOG_DEBUG, "...Accepted Client Connection..\n");
++ xprintf("...Accepted Client Connection..\n");
+ handleClient(tClientSock, tPassword, tHWID);
+ #endif
+ }
+@@ -357,7 +383,7 @@
+ }
+ }
+
+- slog(LOG_DEBUG_VV, "Finished\n");
++ xprintf("Finished\n");
+ if(tAddrInfo != NULL)
+ {
+ freeaddrinfo(tAddrInfo);
+@@ -416,7 +442,7 @@
+
+ void handleClient(int pSock, char *pPassword, char *pHWADDR)
+ {
+- slog(LOG_DEBUG_VV, "In Handle Client\n");
++ xprintf("In Handle Client\n");
+ fflush(stdout);
+
+ socklen_t len;
+@@ -435,7 +461,7 @@
+
+ // deal with both IPv4 and IPv6:
+ if (addr.ss_family == AF_INET) {
+- slog(LOG_DEBUG_V, "Constructing ipv4 address\n");
++ xprintf("Constructing ipv4 address\n");
+ struct sockaddr_in *s = (struct sockaddr_in *)&addr;
+ port = ntohs(s->sin_port);
+ inet_ntop(AF_INET, &s->sin_addr, ipstr, sizeof ipstr);
+@@ -455,20 +481,20 @@
+ if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0)
+ {
+ // its ipv4...
+- slog(LOG_DEBUG_V, "Constructing ipv4 from ipv6 address\n");
++ xprintf("Constructing ipv4 from ipv6 address\n");
+ memcpy(ipbin, &addr.bin[12], 4);
+ ipbinlen = 4;
+ }
+ else
+ {
+- slog(LOG_DEBUG_V, "Constructing ipv6 address\n");
++ xprintf("Constructing ipv6 address\n");
+ memcpy(ipbin, &s->sin6_addr, 16);
+ ipbinlen = 16;
+ }
+ }
+
+- slog(LOG_DEBUG_V, "Peer IP address: %s\n", ipstr);
+- slog(LOG_DEBUG_V, "Peer port : %d\n", port);
++ xprintf("Peer IP address: %s\n", ipstr);
++ xprintf("Peer port : %d\n", port);
+
+ int tMoreDataNeeded = 1;
+ struct keyring tKeys;
+@@ -489,16 +515,16 @@
+ tError = readDataFromClient(pSock, &(tConn.recv));
+ if(!tError && strlen(tConn.recv.data) > 0)
+ {
+- slog(LOG_DEBUG_VV, "Finished Reading some data from client\n");
++ xprintf("Finished Reading some data from client\n");
+ // parse client request
+ tMoreDataNeeded = parseMessage(&tConn, ipbin, ipbinlen, pHWADDR);
+ if(1 == tMoreDataNeeded)
+ {
+- slog(LOG_DEBUG_VV, "\n\nNeed to read more data\n");
++ xprintf("\n\nNeed to read more data\n");
+ }
+ else if(-1 == tMoreDataNeeded) // Forked process down below ended.
+ {
+- slog(LOG_DEBUG_V, "Forked Process ended...cleaning up\n");
++ xprintf("Forked Process ended...cleaning up\n");
+ cleanup(&tConn);
+ // pSock was already closed
+ return;
+@@ -507,13 +533,13 @@
+ }
+ else
+ {
+- slog(LOG_DEBUG, "Error reading from socket, closing client\n");
++ xprintf("Error reading from socket, closing client\n");
+ // Error reading data....quit.
+ cleanup(&tConn);
+ return;
+ }
+ }
+- slog(LOG_DEBUG_VV, "Writing: %d chars to socket\n", tConn.resp.current);
++ xprintf("Writing: %d chars to socket\n", tConn.resp.current);
+ //tConn->resp.data[tConn->resp.current-1] = '\0';
+ writeDataToClient(pSock, &(tConn.resp));
+ // Finished reading one message...
+@@ -526,9 +552,9 @@
+
+ void writeDataToClient(int pSock, struct shairbuffer *pResponse)
+ {
+- slog(LOG_DEBUG_VV, "\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data);
++ xprintf("\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data);
+ send(pSock, pResponse->data, pResponse->current,0);
+- slog(LOG_DEBUG_VV, "----Send Response Header----\n");
++ xprintf("----Send Response Header----\n");
+ }
+
+ int readDataFromClient(int pSock, struct shairbuffer *pClientBuffer)
+@@ -541,7 +567,7 @@
+ while(tRetval > 0 && tEnd < 0)
+ {
+ // Read from socket until \n\n, \r\n\r\n, or \r\r is found
+- slog(LOG_DEBUG_V, "Waiting To Read...\n");
++ xprintf("Waiting To Read...\n");
+ fflush(stdout);
+ tRetval = read(pSock, tReadBuf, MAX_SIZE);
+ // if new buffer contains the end of request string, only copy partial buffer?
+@@ -552,40 +578,40 @@
+ {
+ pClientBuffer->marker = tEnd+1; // Marks start of content
+ }
+- slog(SOCKET_LOG_LEVEL, "Found end of http request at: %d\n", tEnd);
++ xprintf("Found end of http request at: %d\n", tEnd);
+ fflush(stdout);
+ }
+ else
+ {
+ tEnd = MAX_SIZE;
+- slog(SOCKET_LOG_LEVEL, "Read %d of data so far\n%s\n", tRetval, tReadBuf);
++ xprintf("Read %d of data so far\n%s\n", tRetval, tReadBuf);
+ fflush(stdout);
+ }
+ if(tRetval > 0)
+ {
+ // Copy read data into tReceive;
+- slog(SOCKET_LOG_LEVEL, "Read %d data, using %d of it\n", tRetval, tEnd);
++ xprintf("Read %d data, using %d of it\n", tRetval, tEnd);
+ addNToShairBuffer(pClientBuffer, tReadBuf, tRetval);
+- slog(LOG_DEBUG_VV, "Finished copying data\n");
++ xprintf("Finished copying data\n");
+ }
+ else
+ {
+- slog(LOG_DEBUG, "Error reading data from socket, got: %d bytes", tRetval);
++ xprintf("Error reading data from socket, got: %d bytes", tRetval);
+ return tRetval;
+ }
+ }
+ if(tEnd + 1 != tRetval)
+ {
+- slog(SOCKET_LOG_LEVEL, "Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1);
++ xprintf("Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1);
+ }
+- slog(SOCKET_LOG_LEVEL, "Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data);
++ xprintf("Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data);
+ fflush(stdout);
+ return 0;
+ }
+
+ char *getFromBuffer(char *pBufferPtr, const char *pField, int pLenAfterField, int *pReturnSize, char *pDelims)
+ {
+- slog(LOG_DEBUG_V, "GettingFromBuffer: %s\n", pField);
++ xprintf("GettingFromBuffer: %s\n", pField);
+ char* tFound = strstr(pBufferPtr, pField);
+ int tSize = 0;
+ if(tFound != NULL)
+@@ -606,7 +632,7 @@
+ }
+
+ tSize = (int) (tShortest - tFound);
+- slog(LOG_DEBUG_VV, "Found %.*s length: %d\n", tSize, tFound, tSize);
++ xprintf("Found %.*s length: %d\n", tSize, tFound, tSize);
+ if(pReturnSize != NULL)
+ {
+ *pReturnSize = tSize;
+@@ -614,7 +640,7 @@
+ }
+ else
+ {
+- slog(LOG_DEBUG_V, "Not Found\n");
++ xprintf("Not Found\n");
+ }
+ return tFound;
+ }
+@@ -648,10 +674,10 @@
+ {
+ char tTrim[tFoundSize + 2];
+ getTrimmed(tFound, tFoundSize, TRUE, TRUE, tTrim);
+- slog(LOG_DEBUG_VV, "HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize);
++ xprintf("HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize);
+ int tChallengeDecodeSize = 16;
+ char *tChallenge = decode_base64((unsigned char *)tTrim, tFoundSize, &tChallengeDecodeSize);
+- slog(LOG_DEBUG_VV, "Challenge Decode size: %d expected 16\n", tChallengeDecodeSize);
++ xprintf("Challenge Decode size: %d expected 16\n", tChallengeDecodeSize);
+
+ int tCurSize = 0;
+ unsigned char tChalResp[38];
+@@ -673,7 +699,7 @@
+ }
+
+ char *tTmp = encode_base64((unsigned char *)tChalResp, tCurSize);
+- slog(LOG_DEBUG_VV, "Full sig: %s\n", tTmp);
++ xprintf("Full sig: %s\n", tTmp);
+ free(tTmp);
+
+ // RSA Encrypt
+@@ -722,10 +748,10 @@
+ {
+ if(isLogEnabledFor(HEADER_LOG_LEVEL))
+ {
+- slog(HEADER_LOG_LEVEL, "Content-Length: %s value -> %d\n", tContent, tContentSize);
++ xprintf("Content-Length: %s value -> %d\n", tContent, tContentSize);
+ if(pConn->recv.marker != 0)
+ {
+- slog(HEADER_LOG_LEVEL, "ContentPtr has %d, but needs %d\n",
++ xprintf("ContentPtr has %d, but needs %d\n",
+ strlen(pConn->recv.data+pConn->recv.marker), tContentSize);
+ }
+ }
+@@ -735,7 +761,7 @@
+ }
+ else
+ {
+- slog(LOG_DEBUG_VV, "No content, header only\n");
++ xprintf("No content, header only\n");
+ }
+
+ // "Creates" a new Response Header for our response message
+@@ -748,7 +774,7 @@
+ {
+ tLen = 20;
+ }
+- slog(LOG_INFO, "********** RECV %.*s **********\n", tLen, pConn->recv.data);
++ xprintf("********** RECV %.*s **********\n", tLen, pConn->recv.data);
+ }
+
+ if(pConn->password != NULL)
+@@ -758,7 +784,7 @@
+
+ if(buildAppleResponse(pConn, pIpBin, pIpBinLen, pHWID)) // need to free sig
+ {
+- slog(LOG_DEBUG_V, "Added AppleResponse to Apple-Challenge request\n");
++ xprintf("Added AppleResponse to Apple-Challenge request\n");
+ }
+
+ // Find option, then based on option, do different actions.
+@@ -778,14 +804,14 @@
+ int tKeySize = 0;
+ char tEncodedAesIV[tSize + 2];
+ getTrimmed(tHeaderVal, tSize, TRUE, TRUE, tEncodedAesIV);
+- slog(LOG_DEBUG_VV, "AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV));
++ xprintf("AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV));
+ char *tDecodedIV = decode_base64((unsigned char*) tEncodedAesIV, tSize, &tSize);
+
+ // grab the key, copy it out of the receive buffer
+ tHeaderVal = getFromContent(tContent, "a=rsaaeskey", &tKeySize);
+ char tEncodedAesKey[tKeySize + 2]; // +1 for nl, +1 for \0
+ getTrimmed(tHeaderVal, tKeySize, TRUE, TRUE, tEncodedAesKey);
+- slog(LOG_DEBUG_VV, "AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey));
++ xprintf("AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey));
+ // remove base64 coding from key
+ char *tDecodedAesKey = decode_base64((unsigned char*) tEncodedAesKey,
+ tKeySize, &tKeySize); // Need to free DecodedAesKey
+@@ -794,7 +820,7 @@
+ int tFmtpSize = 0;
+ char *tFmtp = getFromContent(tContent, "a=fmtp", &tFmtpSize); // Don't need to free
+ tFmtp = getTrimmedMalloc(tFmtp, tFmtpSize, TRUE, FALSE); // will need to free
+- slog(LOG_DEBUG_VV, "Format: %s\n", tFmtp);
++ xprintf("Format: %s\n", tFmtp);
+
+ RSA *rsa = loadKey();
+ // Decrypt the binary aes key
+@@ -803,11 +829,11 @@
+ if(RSA_private_decrypt(tKeySize, (unsigned char *)tDecodedAesKey,
+ (unsigned char*) tDecryptedKey, rsa, RSA_PKCS1_OAEP_PADDING) >= 0)
+ {
+- slog(LOG_DEBUG, "Decrypted AES key from RSA Successfully\n");
++ xprintf("Decrypted AES key from RSA Successfully\n");
+ }
+ else
+ {
+- slog(LOG_INFO, "Error Decrypting AES key from RSA\n");
++ xprintf("Error Decrypting AES key from RSA\n");
+ }
+ free(tDecodedAesKey);
+ RSA_free(rsa);
+@@ -823,13 +849,13 @@
+ // struct comms *tComms = pConn->hairtunes;
+ // if (! (pipe(tComms->in) == 0 && pipe(tComms->out) == 0))
+ // {
+-// slog(LOG_INFO, "Error setting up hairtunes communications...some things probably wont work very well.\n");
++// xprintf("Error setting up hairtunes communications...some things probably wont work very well.\n");
+ // }
+
+ // Setup fork
+ char tPort[8] = "6000"; // get this from dup()'d stdout of child pid
+
+- printf("******** SETUP!!!!!\n");
++ xprintf("******** SETUP!!!!!\n",NULL);
+ #ifndef XBMC
+ int tPid = fork();
+ if(tPid == 0)
+@@ -845,11 +871,11 @@
+ tFound = getFromSetup(pConn->recv.data, "timing_port", &tSize);
+ getTrimmed(tFound, tSize, 1, 0, tTPortStr);
+
+- slog(LOG_DEBUG_VV, "converting %s and %s from str->int\n", tCPortStr, tTPortStr);
++ xprintf("converting %s and %s from str->int\n", tCPortStr, tTPortStr);
+ int tControlport = atoi(tCPortStr);
+ int tTimingport = atoi(tTPortStr);
+
+- slog(LOG_DEBUG_V, "Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
++ xprintf("Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
+ char *tRtp = NULL;
+ char *tPipe = NULL;
+ char *tAoDriver = NULL;
+@@ -884,7 +910,7 @@
+ tDataport, tRtp, tPipe, tAoDriver, tAoDeviceName, tAoDeviceId);
+ #ifndef XBMC
+ // Quit when finished.
+- slog(LOG_DEBUG, "Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");
++ xprintf("Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");
+ return -1;
+ }
+ else if(tPid >0)
+@@ -897,7 +923,7 @@
+ int tRead = read(tComms->out[0], tFromHairtunes, 80);
+ if(tRead <= 0)
+ {
+- slog(LOG_INFO, "Error reading port from hairtunes function, assuming default port: %d\n", tPort);
++ xprintf("Error reading port from hairtunes function, assuming default port: %d\n", tPort);
+ }
+ else
+ {
+@@ -909,7 +935,7 @@
+ }
+ else
+ {
+- slog(LOG_INFO, "Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes);
++ xprintf("Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes);
+ }
+ }
+
+@@ -930,7 +956,7 @@
+ }
+ else
+ {
+- slog(LOG_INFO, "Error forking process....dere' be errors round here.\n");
++ xprintf("Error forking process....dere' be errors round here.\n");
+ return -1;
+ }
+ #endif
+@@ -942,7 +968,7 @@
+ propogateCSeq(pConn);
+ #ifndef XBMC
+ close(pConn->hairtunes->in[1]);
+- slog(LOG_DEBUG, "Tearing down connection, closing pipes\n");
++ xprintf("Tearing down connection, closing pipes\n");
+ #else
+ hairtunes_cleanup();
+ #endif
+@@ -964,7 +990,7 @@
+ propogateCSeq(pConn);
+ int tSize = 0;
+ char *tVol = getFromHeader(pConn->recv.data, "volume", &tSize);
+- slog(LOG_DEBUG_VV, "About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
++ xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
+ // TBD VOLUME
+ #ifndef XBMC
+ write(pConn->hairtunes->in[1], "vol: ", 5);
+@@ -973,11 +999,11 @@
+ #else
+ hairtunes_setvolume(atof(tVol));
+ #endif
+- slog(LOG_DEBUG_VV, "Finished writing data write data to hairtunes\n");
++ xprintf("Finished writing data write data to hairtunes\n");
+ }
+ else
+ {
+- slog(LOG_DEBUG, "\n\nUn-Handled recv: %s\n", pConn->recv.data);
++ xprintf("\n\nUn-Handled recv: %s\n", pConn->recv.data);
+ propogateCSeq(pConn);
+ }
+ addToShairBuffer(&(pConn->resp), "\r\n");
+@@ -1056,7 +1082,7 @@
+ char tName[100 + HWID_SIZE + 3];
+ if(strlen(pServerName) > tMaxServerName)
+ {
+- slog(LOG_INFO,"Hey dog, we see you like long server names, "
++ xprintf("Hey dog, we see you like long server names, "
+ "so we put a strncat in our command so we don't buffer overflow, while you listen to your flow.\n"
+ "We just used the first %d characters. Pick something shorter if you want\n", tMaxServerName);
+ }
+@@ -1067,7 +1093,7 @@
+ strcat(tName, pHWStr);
+ strcat(tName, "@");
+ strncat(tName, pServerName, tMaxServerName);
+- slog(AVAHI_LOG_LEVEL, "Avahi/DNS-SD Name: %s\n", tName);
++ xprintf("Avahi/DNS-SD Name: %s\n", tName);
+
+ execlp("avahi-publish-service", "avahi-publish-service", tName,
+ "_raop._tcp", tPort, "tp=UDP","sm=false","sv=false","ek=1","et=0,1",
+@@ -1079,12 +1105,12 @@
+ perror("error");
+ }
+
+- slog(LOG_INFO, "Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n");
+- exit(1);
++ xprintf("Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n");
++ //exit(1);
+ }
+ else
+ {
+- slog(LOG_DEBUG_VV, "Avahi/DNS-SD started on PID: %d\n", tPid);
++ xprintf("Avahi/DNS-SD started on PID: %d\n", tPid);
+ }
+ return tPid;
+ }
+@@ -1092,7 +1118,7 @@
+
+ void printBufferInfo(struct shairbuffer *pBuf, int pLevel)
+ {
+- slog(pLevel, "Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char));
++ xprintf("Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char));
+ }
+
+ int getAvailChars(struct shairbuffer *pBuf)
+@@ -1173,7 +1199,8 @@
+ {
+ va_list argp;
+ va_start(argp, pFormat);
+- vprintf(pFormat, argp);
++ xprintf(pFormat, argp);
++ //vprintf(pFormat, argp);
+ va_end(argp);
+ }
+ //#endif
+@@ -1227,9 +1254,9 @@
+ {
+ if(pBuf->data != NULL)
+ {
+- slog(LOG_DEBUG_VV, "Hrm, buffer wasn't cleaned up....trying to free\n");
++ xprintf("Hrm, buffer wasn't cleaned up....trying to free\n");
+ free(pBuf->data);
+- slog(LOG_DEBUG_VV, "Free didn't seem to seg fault....huzzah\n");
++ xprintf("Free didn't seem to seg fault....huzzah\n");
+ }
+ pBuf->current = 0;
+ pBuf->marker = 0;
+@@ -1287,6 +1314,6 @@
+ BIO *tBio = BIO_new_mem_buf(AIRPORT_PRIVATE_KEY, -1);
+ RSA *rsa = PEM_read_bio_RSAPrivateKey(tBio, NULL, NULL, NULL); //NULL, NULL, NULL);
+ BIO_free(tBio);
+- slog(RSA_LOG_LEVEL, "RSA Key: %d\n", RSA_check_key(rsa));
++ xprintf("RSA Key: %d\n", RSA_check_key(rsa));
+ return rsa;
+ }
+--- src/shairport.h 2011-10-01 17:45:08.000000000 +0200
++++ src/shairport.h 2011-10-01 17:19:43.000000000 +0200
+@@ -59,11 +59,17 @@
+ {
+ #endif /* __cplusplus */
+
++struct printfPtr
++{
++ int (*extprintf)(const char* msg, size_t msgSize);
++};
++
+ int shairport_main(int argc, char **argv);
+ void shairport_exit(void);
+ int shairport_loop(void);
+ int shairport_is_running(void);
+ void shairport_set_ao(struct AudioOutput *ao);
++void shairport_set_printf(struct printfPtr *funcPtr);
+
+ #ifdef __cplusplus
+ }
+--- src/socketlib.c 2011-09-23 22:00:48.000000000 +0200
++++ src/socketlib.c 2011-10-01 17:42:39.000000000 +0200
+@@ -82,7 +82,7 @@
+ delay(RETRY_DELAY, &tRes);
+ }
+ }
+- printf("%d Retry attempts exceeded\n", RETRY_COUNT);
++ xprintf("%d Retry attempts exceeded\n", RETRY_COUNT);
+ return ERROR;
+ }
+
+@@ -102,7 +102,7 @@
+ tError = getaddrinfo(pHostname, pService, &hints, pAddrInfo);
+ if(tError != 0)
+ {
+- printf("Error getting address info\n");
++ xprintf("Error getting address info\n");
+ }
+ return tError;
+ }
+@@ -200,7 +200,7 @@
+ else
+ {
+ // Invalid encoded data, no other cases are possible.
+- printf("Unrecoverable error....base64 values are incorrectly encoded\n");
++ xprintf("Unrecoverable error....base64 values are incorrectly encoded\n");
+ return pSize;
+ }
+ }
+@@ -226,7 +226,7 @@
+ memset(input, 0, length);
+ memcpy(input, pInput, pLength);
+ memset(input+pLength, '=', length-pLength);
+- printf("Fixed value: [%.*s]\n", length, input);
++ xprintf("Fixed value: [%.*s]\n", length, input);
+ }
+ char *buffer = (char *)malloc(length);
+ memset(buffer, 0, length);
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/007_fix_syslog_defines.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/007_fix_syslog_defines.patch
new file mode 100644
index 0000000..4d9b834
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/007_fix_syslog_defines.patch
@@ -0,0 +1,24 @@
+--- src/shairport.h 2011-10-01 04:09:16.000000000 +0200
++++ src/shairport.h 2011-11-07 18:05:05.000000000 +0100
+@@ -16,10 +16,17 @@
+
+ #define HWID_SIZE 6
+ #define SHAIRPORT_LOG 1
+-#define LOG_INFO 1
+-#define LOG_DEBUG 5
+-#define LOG_DEBUG_V 6
+-#define LOG_DEBUG_VV 7
++
++#ifndef LOG_INFO
++#define LOG_INFO 5
++#endif
++
++#ifndef LOG_DEBUG
++#define LOG_DEBUG 6
++#endif
++
++#define LOG_DEBUG_V 7
++#define LOG_DEBUG_VV 8
+
+ struct shairbuffer
+ {
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/008-add-missing-libs.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/008-add-missing-libs.patch
new file mode 100644
index 0000000..6efd302
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/008-add-missing-libs.patch
@@ -0,0 +1,21 @@
+--- configure.in-org 2011-11-08 11:53:42.802419355 -0500
++++ configure.in 2011-11-08 11:55:38.082419413 -0500
+@@ -11,8 +11,9 @@ AC_PROG_LIBTOOL
+
+ # Checks for libraries.
+ #AC_CHECK_LIB([c], [main])
+-#AC_CHECK_LIB([m], [main])
++AC_CHECK_LIB([m], [main])
+ AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
++AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
+
+ OUTPUT_FILES="Makefile"
+@@ -21,4 +22,4 @@ LIBDIR=$PREFIX
+
+ AC_CONFIG_FILES([${OUTPUT_FILES}])
+ AC_OUTPUT(Makefile src/Makefile)
+-AC_OUTPUT
+\ No newline at end of file
++AC_OUTPUT
+
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/009_fix_ipv6.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/009_fix_ipv6.patch
new file mode 100644
index 0000000..01ff026
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/009_fix_ipv6.patch
@@ -0,0 +1,22 @@
+--- src/socketlib.c 2012-01-04 20:41:05.000000000 +0100
++++ src/socketlib.c 2012-01-04 20:35:53.000000000 +0100
+@@ -48,7 +48,7 @@
+ if((tSock==-1) && (pAddrInfo->ai_family == AF_INET6) && (errno == EAFNOSUPPORT))
+ {
+ //Fallback to ipv4
+- perror("Failed to create ipv6 socket. Trying ipv4");
++ xprintf("Failed to create ipv6 socket. Trying ipv4");
+ pAddrInfo->ai_family = AF_INET;
+ tSock = socket(pAddrInfo->ai_family, pAddrInfo->ai_socktype, 0);
+ }
+@@ -158,8 +158,8 @@
+ sprintf(tService, "%d", pPort); // copies port to string
+ int tFamily = AF_INET;
+ #ifdef AF_INET6
+- //printf("Listening on IPv6 Socket\n");
+- //tFamily = AF_INET6;
++ xprintf("Listening on IPv6 Socket\n");
++ tFamily = AF_INET6;
+ #else
+ //printf("Listening on IPv4 Socket");
+ #endif
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/010_handle_metadata.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/010_handle_metadata.patch
new file mode 100644
index 0000000..a48782e
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/010_handle_metadata.patch
@@ -0,0 +1,154 @@
+diff -ruP src/ao.h libshairport.new/src/ao.h
+--- src/ao.h 2012-05-07 22:26:53.000000000 +0200
++++ src/ao.h 2012-05-08 18:46:42.000000000 +0200
+@@ -152,5 +152,7 @@
+ /* -- Device Setup/Playback/Teardown -- */
+ int (*ao_append_option)(ao_option **, const char *, const char *);
+ void (*ao_free_options)(ao_option *);
+- char* (*ao_get_option)(ao_option *, const char* );
++ char* (*ao_get_option)(ao_option *, const char* );
++ void (*ao_set_metadata)(const char *buffer, unsigned int size);
++ void (*ao_set_metadata_coverart)(const char *buffer, unsigned int size);
+ };
+diff -ruP src/hairtunes.c src/hairtunes.c
+--- src/hairtunes.c 2012-05-07 22:26:53.000000000 +0200
++++ src/hairtunes.c 2012-05-08 18:45:51.000000000 +0200
+@@ -267,6 +267,16 @@
+ fix_volume = 65536.0 * volume;
+ }
+
++void hairtunes_set_metadata(const char *buffer, unsigned int size)
++{
++ g_ao.ao_set_metadata(buffer, size);
++}
++
++void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size)
++{
++ g_ao.ao_set_metadata_coverart(buffer, size);
++}
++
+ void hairtunes_flush(void)
+ {
+ pthread_mutex_lock(&ab_mutex);
+diff -ruP src/hairtunes.h src/hairtunes.h
+--- src/hairtunes.h 2011-08-21 00:06:21.000000000 +0200
++++ src/hairtunes.h 2012-05-08 18:46:00.000000000 +0200
+@@ -4,6 +4,8 @@
+ int hairtunes_init(char *pAeskey, char *pAesiv, char *pFmtpstr, int pCtrlPort, int pTimingPort,
+ int pDataPort, char *pRtpHost, char*pPipeName, char *pLibaoDriver, char *pLibaoDeviceName, char *pLibaoDeviceId);
+ void hairtunes_setvolume(float vol);
++void hairtunes_set_metadata(const char *buffer, unsigned int size);
++void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size);
+ void hairtunes_flush(void);
+ void hairtunes_cleanup(void);
+
+diff -ruP src/shairport.c src/shairport.c
+--- src/shairport.c 2012-05-07 22:26:53.000000000 +0200
++++ src/shairport.c 2012-05-08 18:45:30.000000000 +0200
+@@ -513,7 +513,8 @@
+ while(1 == tMoreDataNeeded)
+ {
+ tError = readDataFromClient(pSock, &(tConn.recv));
+- if(!tError && strlen(tConn.recv.data) > 0)
++ //if(!tError && strlen(tConn.recv.data) > 0)
++ if(!tError && tConn.recv.current > 0)
+ {
+ xprintf("Finished Reading some data from client\n");
+ // parse client request
+@@ -632,7 +633,7 @@
+ }
+
+ tSize = (int) (tShortest - tFound);
+- xprintf("Found %.*s length: %d\n", tSize, tFound, tSize);
++ xprintf("Found %s length: %d\n",tFound, tSize);
+ if(pReturnSize != NULL)
+ {
+ *pReturnSize = tSize;
+@@ -744,7 +745,7 @@
+ if(tContent != NULL)
+ {
+ int tContentSize = atoi(tContent);
+- if(pConn->recv.marker == 0 || strlen(pConn->recv.data+pConn->recv.marker) != tContentSize)
++ if(pConn->recv.marker == 0 || pConn->recv.current-pConn->recv.marker != tContentSize)
+ {
+ if(isLogEnabledFor(HEADER_LOG_LEVEL))
+ {
+@@ -752,7 +753,7 @@
+ if(pConn->recv.marker != 0)
+ {
+ xprintf("ContentPtr has %d, but needs %d\n",
+- strlen(pConn->recv.data+pConn->recv.marker), tContentSize);
++ (pConn->recv.current-pConn->recv.marker), tContentSize);
+ }
+ }
+ // check if value in tContent > 2nd read from client.
+@@ -989,15 +990,67 @@
+ {
+ propogateCSeq(pConn);
+ int tSize = 0;
++ char *buffer = NULL;
++ char *contentType = getFromHeader(pConn->recv.data, "Content-Type", &tSize);
++ char *tContent = getFromHeader(pConn->recv.data, "Content-Length", NULL);
++ int iContentSize = 0;
++ int isJpg = 0;
++
++ if(tContent != NULL)
++ {
++ iContentSize = atoi(tContent);
++ }
++
++ if( tSize > 1 &&
++ (strncmp(contentType, "application/x-dmap-tagged", tSize) == 0) ||
++ (strncmp(contentType, "image/jpeg", tSize) == 0) )
++ {
++ if( (pConn->recv.current - pConn->recv.marker) == iContentSize && pConn->recv.marker != 0)
++ {
++ if(strncmp(contentType, "image/jpeg", tSize) == 0)
++ {
++ isJpg = 1;
++ }
++ buffer = (char *)malloc(iContentSize * sizeof(char));
++ memcpy(buffer, pConn->recv.data + pConn->recv.marker, iContentSize);
++ }
++ else
++ {
++ iContentSize = 0;
++ }
++ }
++ else
++ {
++ iContentSize = 0;
++ }
+ char *tVol = getFromHeader(pConn->recv.data, "volume", &tSize);
+- xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
++ if( tVol)
++ {
++ xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
++ }
+ // TBD VOLUME
+ #ifndef XBMC
+ write(pConn->hairtunes->in[1], "vol: ", 5);
+ write(pConn->hairtunes->in[1], tVol, tSize);
+ write(pConn->hairtunes->in[1], "\n", 1);
+ #else
+- hairtunes_setvolume(atof(tVol));
++ if(tVol)
++ {
++ hairtunes_setvolume(atof(tVol));
++ }
++
++ if(iContentSize)
++ {
++ if(isJpg)
++ {
++ hairtunes_set_metadata_coverart(buffer, iContentSize);
++ }
++ else
++ {
++ hairtunes_set_metadata(buffer, iContentSize);
++ }
++ free(buffer);
++ }
+ #endif
+ xprintf("Finished writing data write data to hairtunes\n");
+ }
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/011_fix_ipv4_fallback.patch b/meta-openvuplus/recipes-support/libshairport/libshairport/011_fix_ipv4_fallback.patch
new file mode 100644
index 0000000..2c813f2
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/011_fix_ipv4_fallback.patch
@@ -0,0 +1,10 @@
+--- src/socketlib.c 2012-07-14 22:49:30.000000000 +0200
++++ src/socketlib.c 2012-10-08 21:55:51.000000000 +0200
+@@ -118,6 +118,7 @@
+
+ int tEnable = 1;
+ setsockopt(tSock, SOL_SOCKET, SO_REUSEADDR, &tEnable, sizeof (tEnable));
++ server_addr->ai_addr->sa_family = server_addr->ai_family; // ensure that server_addr has same famliy than the socket
+ if (bind(tSock, server_addr->ai_addr, server_addr->ai_addrlen) < 0)
+ {
+ close(tSock);
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/config b/meta-openvuplus/recipes-support/libshairport/libshairport/config
new file mode 100644
index 0000000..d1ea541
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/config
@@ -0,0 +1,8 @@
+# Default values for transmission daemon
+# please fill in and enable service.
+DAEMON_ENABLED="NO"
+DAEMON_USER="transmission"
+DAEMON_GROUP="transmission"
+DOWNLOAD_DIR="/media/sda1/torrents/"
+CONFIG_DIR="/var/lib/transmission-daemon"
+
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport/init b/meta-openvuplus/recipes-support/libshairport/libshairport/init
new file mode 100644
index 0000000..cfe3750
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport/init
@@ -0,0 +1,49 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/transmission and type
+# > update-rc.d transmission defaults 60
+#
+#
+
+# load default values
+[ -f /etc/default/transmission-daemon ] && . /etc/default/transmission-daemon
+
+if [ "$DAEMON_ENABLED" != "YES" ] ; then
+ echo "Transmission Deamon Not Enabled"
+ echo "edit /etc/default/transmission to enable"
+ exit
+fi
+
+# Exit if the package is not installed
+test -f /usr/bin/transmission-daemon || exit 0
+
+SSDOPTIONS="--chuid $DAEMON_USER:$DAEMON_GROUP"
+TRANSOPTIONS="-g $CONFIG_DIR -w $DOWNLOAD_DIR"
+
+case "$1" in
+ start)
+ echo "Starting transmission-daemon"
+ /sbin/start-stop-daemon $SSDOPTIONS --start --quiet --exec /usr/bin/transmission-daemon -- $TRANSOPTIONS
+ ;;
+ stop)
+ echo "Stopping transmission-daemon"
+ /sbin/start-stop-daemon --stop --quiet --exec /usr/bin/transmission-daemon
+ ;;
+ restart)
+ echo -n "Stopping transmission-daemon"
+ /sbin/start-stop-daemon --stop --quiet --exec /usr/bin/transmission-daemon
+ for i in 1 2 3 ;
+ do
+ sleep 1
+ echo -n "."
+ done
+ echo "Restarting transmission-daemon"
+ /sbin/start-stop-daemon $SSDOPTIONS --start --quiet --exec /usr/bin/transmission-daemon -- $TRANSOPTIONS
+ ;;
+ *)
+ echo "Usage: /etc/init.d/tranmission {start|stop|restart}"
+ exit 1
+esac
+
+exit 0
diff --git a/meta-openvuplus/recipes-support/libshairport/libshairport_1.2.0.20310.bb b/meta-openvuplus/recipes-support/libshairport/libshairport_1.2.0.20310.bb
new file mode 100644
index 0000000..0d046c4
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libshairport/libshairport_1.2.0.20310.bb
@@ -0,0 +1,8 @@
+require libshairport.inc
+
+DEPENDS += ""
+LIC_FILES_CHKSUM="file://COPYING;md5=d41d8cd98f00b204e9800998ecf8427e"
+PR = "r1"
+
+SRC_URI[archive.md5sum] = "b009e0550c3cf54d740e92a5f47821e1"
+SRC_URI[archive.sha256sum] = "61602402d846a50e8ddf82c3fb5b81984de95ed56abfe0f1e22426d1901c564f"
diff --git a/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch
new file mode 100644
index 0000000..88c962b
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch
@@ -0,0 +1,20 @@
+Description: TinyXml is built with TIXML_USE_STL, so we have to
+ enforce it when the library is used.
+Author: Felix Geyer <debfx-pkg@fobos.de>
+
+Upstream-Status: Pending
+
+diff -Nur tinyxml-2.5.3/tinyxml.h tinyxml-2.5.3.patch/tinyxml.h
+--- tinyxml-2.5.3/tinyxml.h 2007-05-07 00:41:23.000000000 +0200
++++ tinyxml-2.5.3.patch/tinyxml.h 2009-07-08 22:32:03.000000000 +0200
+@@ -26,6 +26,10 @@
+ #ifndef TINYXML_INCLUDED
+ #define TINYXML_INCLUDED
+
++#ifndef TIXML_USE_STL
++ #define TIXML_USE_STL
++#endif
++
+ #ifdef _MSC_VER
+ #pragma warning( push )
+ #pragma warning( disable : 4530 )
diff --git a/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch
new file mode 100644
index 0000000..b801506
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch
@@ -0,0 +1,62 @@
+Description: TinyXML incorrectly encodes text element containing
+ an ampersand followed by either x or #.
+
+Origin: http://sourceforge.net/tracker/index.php?func=detail&aid=3031828&group_id=13559&atid=313559
+
+Upstream-Status: Pending
+
+diff -u -r1.105 tinyxml.cpp
+--- a/tinyxml.cpp
++++ b/tinyxml.cpp
+@@ -57,30 +57,7 @@
+ {
+ unsigned char c = (unsigned char) str[i];
+
+- if ( c == '&'
+- && i < ( (int)str.length() - 2 )
+- && str[i+1] == '#'
+- && str[i+2] == 'x' )
+- {
+- // Hexadecimal character reference.
+- // Pass through unchanged.
+- // &#xA9; -- copyright symbol, for example.
+- //
+- // The -1 is a bug fix from Rob Laveaux. It keeps
+- // an overflow from happening if there is no ';'.
+- // There are actually 2 ways to exit this loop -
+- // while fails (error case) and break (semicolon found).
+- // However, there is no mechanism (currently) for
+- // this function to return an error.
+- while ( i<(int)str.length()-1 )
+- {
+- outString->append( str.c_str() + i, 1 );
+- ++i;
+- if ( str[i] == ';' )
+- break;
+- }
+- }
+- else if ( c == '&' )
++ if ( c == '&' )
+ {
+ outString->append( entity[0].str, entity[0].strLength );
+ ++i;
+diff -u -r1.89 xmltest.cpp
+--- a/xmltest.cpp
++++ b/xmltest.cpp
+@@ -1340,6 +1340,16 @@
+ }*/
+ }
+
++ #ifdef TIXML_USE_STL
++ {
++ TiXmlDocument xml;
++ xml.Parse("<foo>foo&amp;#xa+bar</foo>");
++ std::string str;
++ str << xml;
++ XmlTest( "Entity escaping", "<foo>foo&amp;#xa+bar</foo>", str.c_str() );
++ }
++ #endif
++
+ /* 1417717 experiment
+ {
+ TiXmlDocument xml;
diff --git a/meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
new file mode 100644
index 0000000..fdadebd
--- /dev/null
+++ b/meta-openvuplus/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
@@ -0,0 +1,43 @@
+# (c) Copyright 2012 Hewlett-Packard Development Company, L.P.
+
+DESCRIPTION = "a simple, small, minimal, C++ XML parser"
+HOMEPAGE = "http://www.sourceforge.net/projects/tinyxml"
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://readme.txt;md5=f8f366f3370dda889f60faa7db162cf4"
+SECTION = "libs"
+
+PR = "r5"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.tar.gz \
+ file://enforce-use-stl.patch \
+ file://entity-encoding.patch"
+SRC_URI[md5sum] = "c1b864c96804a10526540c664ade67f0"
+SRC_URI[sha256sum] = "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593"
+
+S = "${WORKDIR}/tinyxml"
+
+CXXFLAGS += "-fPIC"
+
+do_compile() {
+ ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxml.o ${S}/tinyxml.cpp
+ ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlerror.o ${S}/tinyxmlerror.cpp
+ ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlparser.o ${S}/tinyxmlparser.cpp
+ ${CXX} ${CXXFLAGS} \
+ -shared \
+ -Wl,-soname,libtinyxml.so.${PV} \
+ -o ${S}/libtinyxml.so.${PV} \
+ ${LDFLAGS} \
+ ${S}/tinyxml.o \
+ ${S}/tinyxmlparser.o \
+ ${S}/tinyxmlerror.o
+}
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 ${S}/libtinyxml.so.${PV} ${D}${libdir}
+ ln -sf libtinyxml.so.${PV} ${D}${libdir}/libtinyxml.so
+
+ install -d ${D}${includedir}
+ install -m 0644 ${S}/tinyxml.h ${D}${includedir}
+}
+
diff --git a/meta-openvuplus/recipes-support/taglib/taglib_1.8.bb b/meta-openvuplus/recipes-support/taglib/taglib_1.8.bb
new file mode 100644
index 0000000..c713e43
--- /dev/null
+++ b/meta-openvuplus/recipes-support/taglib/taglib_1.8.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "TagLib is a library for reading and editing the meta-data of several popular audio formats"
+SECTION = "libs/multimedia"
+HOMEPAGE = "http://developer.kde.org/~wheeler/taglib.html"
+LICENSE = "LGPLv2.1 | MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.MPL;md5=bfe1f75d606912a4111c90743d6c7325 \
+ file://taglib/audioproperties.h;beginline=1;endline=24;md5=9df2c7399519b7310568a7c55042ecee"
+
+PR = "r0"
+# http://developer.kde.org/~wheeler/files/src/taglib-${PV}.tar.gz
+SRC_URI = "https://github.com/downloads/taglib/taglib/taglib-1.8.tar.gz \
+ "
+
+SRC_URI[md5sum] = "dcb8bd1b756f2843e18b1fdf3aaeee15"
+SRC_URI[sha256sum] = "66d33481703c90236a0a9d1c38fd81b584ca7109ded049225f5463dcaffc209a"
+
+S = "${WORKDIR}/taglib-${PV}"
+
+inherit cmake pkgconfig binconfig
+
+PACKAGES =+ "${PN}-c"
+FILES_${PN}-c = "${libdir}/libtag_c.so.*"
+
+do_configure_prepend () {
+ rm -f ${S}/admin/ltmain.sh
+ rm -f ${S}/admin/libtool.m4.in
+}
+