From nobody Thu Oct 31 22:15:35 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xfdbq2jt7z5cTgr; Thu, 31 Oct 2024 22:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xfdbq2Nbdz4sb6; Thu, 31 Oct 2024 22:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730412935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v35EtcuKksC2P4N0PQQi5r3/ixXC709m9pxduN0BllE=; b=UdF/4K/88cmsJrEiEUt3NnnYTCbwI5h0sev0KzJefYUBwoed1GPgioaP+kExlNfv3w/MT3 wsAmY6pwv3/BaWsyt7GYvCS5ofoJgipSHf2HzZ7WB6S4zu6fBHnsgi5KuvApwsYcjnlrA3 8O5akrGhp9sb2kn3KB9du8KyjPKZnaD+kOROEmN56tUSynrnTNJJUTeH9MgEaXCftNKoZ2 w19L0msn3c2m+yETOznoPISDms5uG8b6uoZV7z5zfxfKZKXg758T4fLlfLK57c8DJ+0jHG P7VXIP8n2DhPp+E527PBcWL821qULYh+b7sXFNQ15zA23XY7O1s5NZepIw8oCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730412935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v35EtcuKksC2P4N0PQQi5r3/ixXC709m9pxduN0BllE=; b=yscn8bSUR4Dzz33p2BEArMemodoT9/6AXngu0ng4tXr7b5CsonZ2Zu+37YqN2qfPsy9nT7 gfFqIedP8LxyFyZ+ywoCq5XQWFewodiFGwdB5GuUA1u1eGnP3ziM5hgou3NcmrLg6edYhU nCP8Hp6uLE8O8TM1CghcYTZrKL8YtaN4Q3b7w3iBBxdVVttJOZIJrMwgcRJw0tPmlMoNJz NFb29pQ6j0V3/Spq42cDx/16+MgZuyPIQtMNFZRzrnUHL/k6J9OlxiXNhmskjbe9bR4yNe s12lqJJqKqSPeU2lU/NTH75IKURRnzVI7MEmQH0728eej7bSgXI+z8gQEgqS8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730412935; a=rsa-sha256; cv=none; b=KkhMJinJvdEFCx+hg9rRjxLqunkOsEcxt+UaYdk4avj+XUnE7bT8xvYCLiuPVCsFNViHt+ 2pBscdUPbQfRKWzry0GyP6BMgRLalkmY3A0RLqlTqHj9o7dyhegLls8Y33AcZXEr3sM6Y1 KdkNdnRO4rGGTt0En1+rKGB0Gk85fWKuHe3mDubKhlRyazrj0rr4Xhk9Ac3sURJ8AqgBR8 u9qeGIALU5NuMdScHU3WgK1lFxmQN7fSQ0cb4+M9jY41CZZZFQVmL/LgLBlsXhradGZE2x ILw4adkk5pDf8AxWiC4dOC6FXCotrXZBCzF3yAHxBimLtI8iR0mPmoKSIQktnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xfdbq1rvzztvl; Thu, 31 Oct 2024 22:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VMFZ2o074584; Thu, 31 Oct 2024 22:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VMFZ1O074581; Thu, 31 Oct 2024 22:15:35 GMT (envelope-from git) Date: Thu, 31 Oct 2024 22:15:35 GMT Message-Id: <202410312215.49VMFZ1O074581@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Rene Ladan Subject: git: 63e9785151ba - main - audio/libshairport: Remove expired port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rene X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63e9785151ba1088aa94e9c618d893ed9af10068 Auto-Submitted: auto-generated The branch main has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=63e9785151ba1088aa94e9c618d893ed9af10068 commit 63e9785151ba1088aa94e9c618d893ed9af10068 Author: Rene Ladan AuthorDate: 2024-10-31 22:15:30 +0000 Commit: Rene Ladan CommitDate: 2024-10-31 22:15:30 +0000 audio/libshairport: Remove expired port 2024-10-31 audio/libshairport: Abandonware, project removed upstream and hasn't seen development since 2011 --- MOVED | 1 + audio/Makefile | 1 - audio/libshairport/Makefile | 23 - audio/libshairport/distinfo | 2 - audio/libshairport/files/patch-configure.in | 20 - audio/libshairport/files/patch-src_Makefile.am | 12 - audio/libshairport/files/patch-src_alac.c | 47 -- audio/libshairport/files/patch-src_ao.h | 161 ------ audio/libshairport/files/patch-src_hairtunes.c | 233 --------- audio/libshairport/files/patch-src_hairtunes.h | 11 - audio/libshairport/files/patch-src_shairport.c | 691 ------------------------- audio/libshairport/files/patch-src_shairport.h | 51 -- audio/libshairport/files/patch-src_socketlib.c | 58 --- audio/libshairport/pkg-descr | 15 - audio/libshairport/pkg-plist | 6 - 15 files changed, 1 insertion(+), 1331 deletions(-) diff --git a/MOVED b/MOVED index cf3923a2587f..decade661674 100644 --- a/MOVED +++ b/MOVED @@ -3564,3 +3564,4 @@ cad/tkgate||2024-10-31|Has expired: Upstream is gone www/py-gandi.cli||2024-10-31|Has expired: Upstream no longer continuing devel/libdevq||2024-10-31|Has expired: Upstream repo archived Dec 14, 2023 www/mod_cloudflare||2024-10-31|Has expired: Deprecated upstream 20 Jul 2021, upstream recommends mod_remoteip +audio/libshairport||2024-10-31|Has expired: Abandonware, project removed upstream and hasn't seen development since 2011 diff --git a/audio/Makefile b/audio/Makefile index 1a02ea1b1a35..fd6e62f929b2 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -381,7 +381,6 @@ SUBDIR += libopusenc SUBDIR += libremidi SUBDIR += libsamplerate - SUBDIR += libshairport SUBDIR += libshout SUBDIR += libsidplay SUBDIR += libsidplayfp diff --git a/audio/libshairport/Makefile b/audio/libshairport/Makefile deleted file mode 100644 index b63ed694d66d..000000000000 --- a/audio/libshairport/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -PORTNAME= libshairport -PORTVERSION= 1.2.0.20310 -PORTREVISION= 2 -CATEGORIES= audio -MASTER_SITES= http://mirrors.xbmc.org/build-deps/darwin-libs/ -DISTNAME= libshairport-${PORTVERSION}_lib - -MAINTAINER= manuel.creach@icloud.com -COMMENT= Airport Extreme Emulator -WWW= https://github.com/amejia1/libshairport - -DEPRECATED= Abandonware, project removed upstream and hasn't seen development since 2011 -EXPIRATION_DATE=2024-10-31 - -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip -USES= autoreconf gmake libtool ssl -USE_LDCONFIG= yes - -CPPFLAGS+= -isystem${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib - -.include diff --git a/audio/libshairport/distinfo b/audio/libshairport/distinfo deleted file mode 100644 index 29b87c7e93d7..000000000000 --- a/audio/libshairport/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (libshairport-1.2.0.20310_lib.tar.gz) = 61602402d846a50e8ddf82c3fb5b81984de95ed56abfe0f1e22426d1901c564f -SIZE (libshairport-1.2.0.20310_lib.tar.gz) = 32759 diff --git a/audio/libshairport/files/patch-configure.in b/audio/libshairport/files/patch-configure.in deleted file mode 100644 index 3ac6b33f836b..000000000000 --- a/audio/libshairport/files/patch-configure.in +++ /dev/null @@ -1,20 +0,0 @@ ---- configure.in.orig 2011-09-23 20:56:46 UTC -+++ configure.in -@@ -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/audio/libshairport/files/patch-src_Makefile.am b/audio/libshairport/files/patch-src_Makefile.am deleted file mode 100644 index 2273cf45b9ce..000000000000 --- a/audio/libshairport/files/patch-src_Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ ---- src/Makefile.am.orig 2011-09-23 21:14:39 UTC -+++ src/Makefile.am -@@ -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/audio/libshairport/files/patch-src_alac.c b/audio/libshairport/files/patch-src_alac.c deleted file mode 100644 index 477b6f2f3a3b..000000000000 --- a/audio/libshairport/files/patch-src_alac.c +++ /dev/null @@ -1,47 +0,0 @@ ---- src/alac.c.orig 2011-08-20 22:06:21 UTC -+++ src/alac.c -@@ -804,7 +804,7 @@ void decode_frame(alac_file *alac, - } - 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 @@ void decode_frame(alac_file *alac, - } - 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 @@ void decode_frame(alac_file *alac, - } - 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 @@ void decode_frame(alac_file *alac, - } - 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 @@ void decode_frame(alac_file *alac, - } - 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; diff --git a/audio/libshairport/files/patch-src_ao.h b/audio/libshairport/files/patch-src_ao.h deleted file mode 100644 index fdb8a165dafd..000000000000 --- a/audio/libshairport/files/patch-src_ao.h +++ /dev/null @@ -1,161 +0,0 @@ ---- src/ao.h.orig 2016-07-26 15:10:45 UTC -+++ src/ao.h -@@ -0,0 +1,158 @@ -+/* -+ * -+ * 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 -+#include -+#include -+#include -+ -+/* --- 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* ); -+ void (*ao_set_metadata)(const char *buffer, unsigned int size); -+ void (*ao_set_metadata_coverart)(const char *buffer, unsigned int size); -+ }; diff --git a/audio/libshairport/files/patch-src_hairtunes.c b/audio/libshairport/files/patch-src_hairtunes.c deleted file mode 100644 index c79446151e87..000000000000 --- a/audio/libshairport/files/patch-src_hairtunes.c +++ /dev/null @@ -1,233 +0,0 @@ ---- src/hairtunes.c.orig 2011-09-23 19:55:48 UTC -+++ src/hairtunes.c -@@ -25,7 +25,7 @@ - */ - - #define XBMC --//#defined HAS_AO -+#define HAS_AO - - #include - #include -@@ -45,7 +45,7 @@ - #include - #include - #ifdef HAS_AO --#include -+#include "ao.h" - #endif - - #ifdef FANCY_RESAMPLING -@@ -89,7 +89,6 @@ int pipe_handle = -1; - // maximal resampling shift - conservative - #define OUTFRAME_BYTES (4*(frame_size+3)) - -- - alac_file *decoder_info; - - #ifdef FANCY_RESAMPLING -@@ -122,8 +121,8 @@ pthread_mutex_t ab_mutex; - 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) { -@@ -246,13 +245,13 @@ int hairtunes_init(char *pAeskey, char * - 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 - -@@ -263,18 +262,28 @@ void hairtunes_setvolume(float f) - { - 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; - } - -+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); - ab_resync(); - pthread_mutex_unlock(&ab_mutex); - if (debug) -- fprintf(stderr, "FLUSH\n"); -+ xprintf("FLUSH\n"); - } - - #ifdef HAIRTUNES_STANDALONE -@@ -424,7 +433,7 @@ static void buffer_put_packet(seq_t seqn - } 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); -@@ -521,7 +530,7 @@ static void rtp_request_resend(seq_t fir - 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; -@@ -605,8 +614,8 @@ static int init_rtp(void) { - 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; -@@ -709,7 +718,7 @@ void bf_est_update(short fill) { - 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; -@@ -725,7 +734,7 @@ short *buffer_get_frame(void) { - 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); -@@ -737,7 +746,7 @@ short *buffer_get_frame(void) { - 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; -@@ -749,7 +758,7 @@ short *buffer_get_frame(void) { - - 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; -@@ -776,13 +785,13 @@ int stuff_buffer(double playback_rate, s - 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++; - } -@@ -849,6 +858,11 @@ void *audio_thread_func(void *arg) { - 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; -@@ -881,7 +895,7 @@ void *audio_thread_func(void *arg) { - } - #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 +920,7 @@ void init_pipe(char* pipe) { - ao_device *dev; - - void* init_ao() { -- ao_initialize(); -+ g_ao.ao_initialize(); - - int driver; - #ifndef XBMC -@@ -921,7 +935,7 @@ void* init_ao() { - #endif - { - // otherwise choose the default -- driver = ao_default_driver_id(); -+ driver = g_ao.ao_default_driver_id(); - } - - ao_sample_format fmt; -@@ -944,9 +958,9 @@ void* init_ao() { - } - #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,12 +999,13 @@ void clean_output(void) - audio_running = 0; - pthread_join(audio_thread, NULL); - #ifdef HAS_AO -- ao_close(dev); -+ g_ao.ao_close(dev); - #endif - } - - void hairtunes_cleanup(void) - { -+ pthread_cond_signal(&ab_buffer_ready); - clean_output(); - clean_rtp(); - clean_buffer(); diff --git a/audio/libshairport/files/patch-src_hairtunes.h b/audio/libshairport/files/patch-src_hairtunes.h deleted file mode 100644 index 13ccb776b5aa..000000000000 --- a/audio/libshairport/files/patch-src_hairtunes.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/hairtunes.h.orig 2011-08-20 22:06:21 UTC -+++ src/hairtunes.h -@@ -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 --git a/audio/libshairport/files/patch-src_shairport.c b/audio/libshairport/files/patch-src_shairport.c deleted file mode 100644 index b26546624481..000000000000 --- a/audio/libshairport/files/patch-src_shairport.c +++ /dev/null @@ -1,691 +0,0 @@ ---- src/shairport.c.orig 2011-08-20 23:57:56 UTC -+++ src/shairport.c -@@ -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 -@@ -92,13 +113,26 @@ static struct addrinfo *tAddrInfo; - 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; -+} -+ -+void shairport_set_printf(struct printfPtr *funcPtr) -+{ -+ g_printf = *funcPtr; -+} -+#endif -+ - #ifndef XBMC - int main(int argc, char **argv) - #else - 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]; - -@@ -177,22 +211,22 @@ int shairport_main(int argc, char **argv - } - 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); - } - -@@ -201,11 +235,11 @@ int shairport_main(int argc, char **argv - 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 - { -@@ -246,10 +280,10 @@ int shairport_main(int argc, char **argv - 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) - { -@@ -263,12 +297,12 @@ int shairport_main(int argc, char **argv - #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; - } - -@@ -295,7 +329,7 @@ int shairport_loop(void) - - int readsock; - -- slog(LOG_DEBUG_V, "Waiting for clients to connect\n"); -+ xprintf("Waiting for clients to connect\n"); - - while(m_running) - { -@@ -327,7 +361,7 @@ int shairport_loop(void) - { - freeaddrinfo(tAddrInfo); - tAddrInfo = NULL; -- slog(LOG_DEBUG, "...Accepted Client Connection..\n"); -+ xprintf("...Accepted Client Connection..\n"); - close(tServerSock); - handleClient(tClientSock, tPassword, tHWID); - //close(tClientSock); -@@ -335,11 +369,11 @@ int shairport_loop(void) - } - 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 - } -@@ -349,7 +383,7 @@ int shairport_loop(void) - } - } - -- slog(LOG_DEBUG_VV, "Finished\n"); -+ xprintf("Finished\n"); - if(tAddrInfo != NULL) - { - freeaddrinfo(tAddrInfo); -@@ -360,6 +394,7 @@ int shairport_loop(void) - void shairport_exit(void) - { - m_running = 0; -+ close(tServerSock); - } - - int shairport_is_running(void) -@@ -407,7 +442,7 @@ int findEnd(char *tReadBuf) - - 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; -@@ -426,7 +461,7 @@ void handleClient(int pSock, char *pPass - - // 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); -@@ -446,20 +481,20 @@ void handleClient(int pSock, char *pPass - 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; -@@ -478,18 +513,19 @@ void handleClient(int pSock, char *pPass - 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) - { -- 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; -@@ -498,13 +534,13 @@ void handleClient(int pSock, char *pPass - } - 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... -@@ -517,9 +553,9 @@ void handleClient(int pSock, char *pPass - - 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) -@@ -532,7 +568,7 @@ int readDataFromClient(int pSock, struct - 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? -@@ -543,40 +579,40 @@ int readDataFromClient(int pSock, struct - { - 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) -@@ -597,7 +633,7 @@ char *getFromBuffer(char *pBufferPtr, co - } - - tSize = (int) (tShortest - tFound); -- slog(LOG_DEBUG_VV, "Found %.*s length: %d\n", tSize, tFound, tSize); -+ xprintf("Found %s length: %d\n",tFound, tSize); - if(pReturnSize != NULL) - { - *pReturnSize = tSize; -@@ -605,7 +641,7 @@ char *getFromBuffer(char *pBufferPtr, co - } - else - { -- slog(LOG_DEBUG_V, "Not Found\n"); -+ xprintf("Not Found\n"); - } - return tFound; - } -@@ -639,10 +675,10 @@ int buildAppleResponse(struct connection - { - 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]; -@@ -664,7 +700,7 @@ int buildAppleResponse(struct connection - } *** 474 LINES SKIPPED ***