debian/0000755000000000000000000000000011764654572007207 5ustar debian/compat0000644000000000000000000000000211254724127010371 0ustar 7 debian/yauap.menu0000644000000000000000000000021010762575104011173 0ustar ?package(yauap): \ needs="text" \ section="Applications/Sound" \ title="Yauap - no-exit mode" \ command="yauap -noexit" debian/watch0000644000000000000000000000013610763237630010226 0ustar version=3 http://download.savannah.nongnu.org/releases/yauap/yauap-((?:[\d.]|pre|rc)+).tar.gz debian/copyright0000644000000000000000000000174311254727402011132 0ustar X-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat X-Debianized-By: Modestas Vainius X-Debianized-Date: Tue, 04 Mar 2008 14:02:05 +0200. X-Source-Downloaded-From: http://download.savannah.nongnu.org/releases/yauap/ X-Upstream-Author: Sascha Sommer X-Comment: LGPL-2+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian systems, the complete text of the GNU Lesser General Public License v2 can be found in `/usr/share/common-licenses/LGPL-2' . "GNU Library General Public License, version 2 or later" is abreviated as 'LGPL-2+' below. Files: debian/* Copyright: © 2008-2009 Modestas Vainius License: LGPL-2+ Files: * Copyright: © 2006-2009 Sascha Sommer License: LGPL-2+ debian/control0000644000000000000000000000253111764453367010612 0ustar Source: yauap Section: sound Priority: optional Maintainer: Anthony Gasperin Standards-Version: 3.9.3 Build-Depends: debhelper (>= 7.3.16), libdbus-glib-1-dev, libgstreamer-plugins-base0.10-dev Homepage: http://www.nongnu.org/yauap/ Package: yauap Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, gstreamer0.10-plugins-base, gstreamer0.10-plugins-good Recommends: gstreamer0.10-plugins-ugly Suggests: gstreamer0.10-plugins-bad, gstreamer0.10-gnomevfs Description: simple command line audio player based on GStreamer Yauap is a simple commandline audio player based on the GStreamer multimedia framework. It also exposes a DBus interface which allows other applications to use Yauap as a playback backend for audio files and streams. . You should install gstreamer0.10-plugins-ugly to get support for popular MPEG audio formats like MP3. You should install either gstreamer0.10-plugins-bad or gstreamer0.10-gnomevfs to get support for playback of network streams. Package: yauap-dbg Architecture: any Section: debug Priority: extra Depends: ${misc:Depends}, yauap (= ${binary:Version}) Description: debugging symbols for Yauap This package provides debugging symbols for binaries shipped in the 'yauap' package. You should install this package to get more useful backtrace if you are about to report a Yauap crash. debian/changelog0000644000000000000000000000500611764454513011053 0ustar yauap (0.2.4-3) unstable; urgency=low * New Maintainer ( Closes: #623866 ). * Update to 3.9.3 standard-version. -- Anthony Gasperin Fri, 08 Jun 2012 20:26:26 +0200 yauap (0.2.4-2) unstable; urgency=low * Orphan the package: set maintainer to Debian QA Group. * Switch to debian source package format 3.0 (quilt). * Bump Standards-Version to 3.9.2: no changes needed. * Remove README.source, no longer needed. * Remove DMUA field from debian/control. * Fix building with --no-add-needed (Closes: #556766). 01_shlibdeps.diff enhancement stolen from Ubuntu (thanks to Michael Bienia). * Remove article from the beginning of the description synopsis. -- Modestas Vainius Sat, 23 Apr 2011 23:08:04 +0300 yauap (0.2.4-1) unstable; urgency=low * New upstream release. * Remove obsolete VCS fields. * Switch yauap-dbg section to debug. * Add README.source. * Bump Standards-Version to 3.8.3: no changes needed. * Switch build system to dh v7: - bump debhelper compat level to 7; - bump debhelper build dependency to 7.3.16 (dh_auto_install --destdir); - build depend on quilt >= 0.46-7~ for quilt dh addon; - adjust debian/rules. * Resync patches: - 03_volume_range_0_1.diff - adapt to upstream changes; - refresh other patches. * Add ${misc:Depends}. * Update years in debian/copyright. -- Modestas Vainius Fri, 18 Sep 2009 18:18:50 +0300 yauap (0.2.2-2) unstable; urgency=low * Depend on gstreamer0.10-plugins-base. yauap does not play anything without it. -- Modestas Vainius Sat, 05 Apr 2008 21:17:38 +0300 yauap (0.2.2-1) unstable; urgency=low * Initial release. (Closes: #445366) * New patches: - 01_shlibdeps.diff - patch Makefile to get rid of useless libraries when linking. - 02_use_g_gint64_format.diff - use G_GINT64_FORMAT for sprintf()'ing gint64 typed integers. - 03_volume_range_0_1.diff - map yauap volume range to gstreamer range 0-1 instead of 0-4. Volume value higher than 1 causes distortions on my machine and probably on many others. - 04_network_friendly_timeouts.diff - use saner (7 seconds instread of 1 second) timeouts to get yauap play network streams. - 05_enable_iradio_metadata.diff - add support for metadata from shoutcast/icecast Internet radio stations. * Add debian/watch file. * Add a man page for yauap. -- Modestas Vainius Tue, 04 Mar 2008 14:17:54 +0200 debian/rules0000755000000000000000000000040511554630060010245 0ustar #!/usr/bin/make -f override_dh_auto_install: dh_auto_install --destdir="$(CURDIR)/debian/yauap" override_dh_installchangelogs: dh_installchangelogs ChangeLog %: dh --dbg-package=yauap-dbg $@ .PHONY: override_dh_auto_install override_dh_installchangelogs debian/yauap.10000644000000000000000000000262410763245473010406 0ustar .TH Yauap 1 "MARCH 2008" .SH NAME yauap \- a simple command line audio player based on the GStreamer multimedia framework. .SH SYNOPSIS \fByauap\fP [options] [URL1] [URL2] ... .SH DESCRIPTION \fBYauap\fP a simple command line audio player based on the GStreamer multimedia framework. It provides a simple command line interface to play any audio file or stream supported by GStreamer framework installed on you system. Basic functions can be controlled via key bindings (unless \fB\-slave\fP option was given), which are specified in the section \fBKey Bindings\fP below. \fBYauap\fP also supports remote control of its functions via DBus. .PP You must specify URL(s) to play unless you run \fByauap\fP with the \fB\-noexit\fP option. .SS Options .TP \fB\-h\fP Display help .TP \fB\-cdrom-device\fP device Specify the CDROM device to play audio CD. .TP \fB\-slave\fP Start in slave mode (i.e. with key bindings disabled) .TP \fB\-noexit\fP Do not exit when the play-list is finished. Useful if you intend to initiate playback of the audio file/stream via DBus interface. .SS Key Bindings .TP SPACE Pause/Resume playback .TP <- -> Seek backward/forward 10 seconds. .TP up and down Seek backward/forward 1 minute. .TP q / ESC Quit .TP / and * Decrease/increase volume. .SH AUTHORS Yauap author is Sascha Sommer . This manual page was written by Modestas Vainius for Debian distribution. debian/patches/0000755000000000000000000000000011554631751010625 5ustar debian/patches/02_use_g_gint64_format.diff0000644000000000000000000000113511254725014015616 0ustar --- a/main.c +++ b/main.c @@ -662,9 +662,9 @@ /* reload to update metadata */ gst_element_set_state(play,GST_STATE_PAUSED); gst_element_query_duration(play, &fmt, &len); - snprintf(tmp,sizeof(tmp),"%i=%lli",i,len / GST_SECOND); + snprintf(tmp,sizeof(tmp),"%i=%" G_GINT64_FORMAT,i,len / GST_SECOND); (*ret)[i-1] = strdup(tmp); - printf("Track%i len %llis\n",i,len/ GST_SECOND); + printf("Track%i len %" G_GINT64_FORMAT "s\n",i,len/ GST_SECOND); } } } debian/patches/05_enable_iradio_metadata.diff0000644000000000000000000000633111254726627016407 0ustar --- a/main.c +++ b/main.c @@ -44,6 +44,7 @@ GstElement *audio; /* audio chain (format conversion, resampling, volume, output sink) */ int num_frontends; yauap_frontend_t** frontends; + gboolean is_iradio; int use_scope; #define SAMPLE_BUFFER_SIZE (SCOPE_SIZE * 1000) @@ -273,7 +274,36 @@ GstStructure *str; GstPad *audiopad = NULL; unsigned int num_tags = 0; - char** ptr; + char** ptr; + + // If the source is internet radio, try getting station name + // and genre + if (priv->is_iradio) { + GstElement* src = gst_bin_get_by_name(GST_BIN(priv->play), "source"); + if (src) { + if (!priv->tag_list) + priv->tag_list = gst_tag_list_new(); + + // Name of the radio station (expose as album name) + if (g_object_class_find_property(G_OBJECT_GET_CLASS(src), "iradio-name")) { + gchar* tag = NULL; + g_object_get(src, "iradio-name", &tag, NULL); + if (tag && strcmp("", tag)) { + gst_tag_list_add(priv->tag_list, GST_TAG_MERGE_KEEP, GST_TAG_ALBUM, tag, NULL); + } + } + + // Genre of the radio station if available + if (g_object_class_find_property(G_OBJECT_GET_CLASS(src), "iradio-genre")) { + gchar* tag = NULL; + g_object_get(src, "iradio-genre", &tag, NULL); + if (tag && strcmp("", tag)) { + gst_tag_list_add(priv->tag_list, GST_TAG_MERGE_KEEP, GST_TAG_GENRE, tag, NULL); + } + } + } + } + gst_tag_list_foreach(priv->tag_list,taglist_count_entries,&num_tags); /* count tags */ *ret = ptr = calloc(num_tags+4,sizeof(char*)); /* allocate taglist for tags + num_channels + samplerate + length */ /* get tags from tag_list */ @@ -352,7 +382,7 @@ case GST_MESSAGE_TAG:{ GstTagList* tlist; gst_message_parse_tag(msg,&tlist); - priv->tag_list = gst_tag_list_merge(priv->tag_list,tlist,GST_TAG_MERGE_PREPEND); + priv->tag_list = gst_tag_list_merge(priv->tag_list,tlist,GST_TAG_MERGE_REPLACE); /* signal metadata change */ signal_frontend(player,SIGNAL_METADATA,"new metadata"); @@ -513,15 +543,23 @@ /* check for audio cds */ protocol = gst_uri_get_protocol(url); is_cdda = !strcmp(protocol,"cdda"); - free(protocol); /* set up gstreamer pipeline */ src = gst_element_make_from_uri(GST_URI_SRC, url,"source"); if(!src){ printf("element make from uri failed for url %s\n",url); + g_free(protocol); return 1; } + /* Enable internet radio metadata if source is a http(s) stream */ + if ((!strcmp (protocol, "http") || !strcmp(protocol, "https")) && + g_object_class_find_property (G_OBJECT_GET_CLASS(src), "iradio-mode")) { + g_object_set (src, "iradio-mode", TRUE, NULL); + priv->is_iradio = !!g_object_class_find_property(G_OBJECT_GET_CLASS (src), "iradio-name"); + } + g_free(protocol); + /* set cdrom device */ if(priv->cdrom_device && !strcmp(G_OBJECT_TYPE_NAME(src),"GstCdParanoiaSrc")) g_object_set(src, "device", priv->cdrom_device, NULL); debian/patches/03_volume_range_0_1.diff0000644000000000000000000000202311254726627015104 0ustar --- a/main.c +++ b/main.c @@ -159,28 +159,27 @@ /* get current volume */ if(priv->volume) g_object_get( G_OBJECT(priv->volume), "volume", &volume, NULL ); - return volume * 10.0; + return volume * 100.0; } /* set new volume [0-100] */ static int player_set_volume(player_t* player,float value){ yauap_priv_t* priv = player->yauap_priv; - gdouble volume = value; - - priv->cur_volume = value; + gdouble volume; if(!priv->volume) return TRUE; - /* change range from 0 - 100 to 0 - 4 */ - volume *= 0.1; - - - /* ajust values */ - if(volume < 0.0) - volume = 0.0; - else if(volume > 10.0) - volume = 10.0; + /* adjust values */ + if(value < 0.0) + value = 0.0; + else if(value > 100.0) + value = 100.0; + + priv->cur_volume = value; + + /* change range from 0 - 100 to 0 - 1 */ + volume = value * 0.01; printf("\nsetting volume %f\n",value); g_object_set(G_OBJECT(priv->volume), "volume", volume, NULL); debian/patches/01_shlibdeps.diff0000644000000000000000000000141711554631751013737 0ustar --- a/Makefile +++ b/Makefile @@ -7,13 +7,13 @@ bindir=$(DESTDIR)${PREFIX}/bin CFLAGS += -g3 -Wall #glib 2 CFLAGS += `pkg-config --cflags glib-2.0` -LDFLAGS += `pkg-config --libs glib-2.0` +LIBS += `pkg-config --libs glib-2.0` -lgobject-2.0 #gstreamer CFLAGS += `pkg-config --cflags gstreamer-0.10` -LDFLAGS += `pkg-config --libs gstreamer-0.10` -lgstpbutils-0.10 +LIBS += `pkg-config --libs gstreamer-0.10 | sed 's/^.*\(-lgstreamer[[:alnum:].-]*\)\b.*$$/\1/'` -lgstpbutils-0.10 #dbus CFLAGS += `pkg-config --cflags dbus-1` -LDFLAGS += `pkg-config --libs dbus-1` -ldbus-glib-1 +LIBS += -ldbus-glib-1 @@ -35,7 +35,7 @@ yauap-service-glue.h: yauap: yauap-service-glue.h $(OBJS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) clean: debian/patches/04_network_friendly_timeouts.diff0000644000000000000000000000202311254726627017301 0ustar --- a/main.c +++ b/main.c @@ -188,7 +188,7 @@ /* start playback */ -#define PLAY_TIMEOUT 1000 +#define PLAY_TIMEOUT 700 static int player_start(player_t* player){ yauap_priv_t* priv = player->yauap_priv; GstState state; @@ -209,7 +209,7 @@ /* wait until we are really playing back */ while(timeout > 0 && gst_element_get_state(priv->play, &state, NULL, 0) && state != GST_STATE_PLAYING){ // printf("waiting...\n"); - usleep(100); + usleep(10000); --timeout; } if(timeout <= 0){ @@ -679,7 +679,7 @@ /************************ decodeable check ***************************************/ /* how many microseconds shall we wait for the detection to succeed */ -#define DETECT_TIMEOUT 100000 +#define DETECT_TIMEOUT 700000 /* callback function that checks if a audio decoder has been added */ @@ -752,6 +752,7 @@ } /* stop playback */ + gst_element_set_state(decodebin,GST_STATE_NULL); gst_element_set_state(play,GST_STATE_NULL); } debian/patches/series0000644000000000000000000000021011157720014012021 0ustar 01_shlibdeps.diff 02_use_g_gint64_format.diff 03_volume_range_0_1.diff 04_network_friendly_timeouts.diff 05_enable_iradio_metadata.diff debian/source/0000755000000000000000000000000011554630034010467 5ustar debian/source/format0000644000000000000000000000001411554630033011674 0ustar 3.0 (quilt) debian/yauap.manpages0000644000000000000000000000001710763243706012030 0ustar debian/yauap.1