rev 9522 - in people/modax/yauap/trunk/debian: . patches
Modestas Vainius
modax-guest at alioth.debian.org
Sun Mar 2 17:01:09 UTC 2008
Author: modax-guest
Date: 2008-03-02 17:01:04 +0000 (Sun, 02 Mar 2008)
New Revision: 9522
Added:
people/modax/yauap/trunk/debian/patches/02_use_g_gint64_format.diff
people/modax/yauap/trunk/debian/patches/03_volume_range_0_1.diff
people/modax/yauap/trunk/debian/patches/04_network_friendly_timeouts.diff
people/modax/yauap/trunk/debian/patches/05_enable_iradio_metadata.diff
Removed:
people/modax/yauap/trunk/debian/patches/02_volume_range_0_1.diff
Modified:
people/modax/yauap/trunk/debian/changelog
people/modax/yauap/trunk/debian/control
people/modax/yauap/trunk/debian/patches/series
people/modax/yauap/trunk/debian/rules
Log:
"Hmm, why do I always end up patching upstream source?" commit. Fixed:
* Network streaming support was very unreliable.
* Shoutcast metadata support was non-existent.
There are still a few small issues on the amarok-engine-yauap side with volume and lastfm streams,
but yauap seems to be a very competitive alternative to the xine engine. One of its main advantages is that
it apparently uses less CPU.
Modified: people/modax/yauap/trunk/debian/changelog
===================================================================
--- people/modax/yauap/trunk/debian/changelog 2008-03-02 16:45:56 UTC (rev 9521)
+++ people/modax/yauap/trunk/debian/changelog 2008-03-02 17:01:04 UTC (rev 9522)
@@ -1,11 +1,17 @@
-yauap (0.2.2-1~pre4) unstable; urgency=low
+yauap (0.2.2-1~pre9) unstable; urgency=low
* Initial release. (Closes: #445366)
* New patches:
- 01_shlibdeps.diff - patch Makefile to get rid of useless libraries when
linking.
- - 02_volume_range_0_1.diff - map yauap volume range to gstreamer range 0-1
+ - 02_use_g_gint64_format.diff - use G_GINT64_FORMAT to sprintf() gint64
+ formatted 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.
+ machine and probably on more others.
+ - 04_network_friendly_timeouts.diff - use more sane (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.
- -- Modestas Vainius <modestas at vainius.eu> Sat, 01 Mar 2008 14:54:36 +0200
+ -- Modestas Vainius <modestas at vainius.eu> Sun, 02 Mar 2008 18:41:15 +0200
Modified: people/modax/yauap/trunk/debian/control
===================================================================
--- people/modax/yauap/trunk/debian/control 2008-03-02 16:45:56 UTC (rev 9521)
+++ people/modax/yauap/trunk/debian/control 2008-03-02 17:01:04 UTC (rev 9522)
@@ -16,8 +16,8 @@
Suggests: gstreamer0.10-plugins-bad, gstreamer0.10-gnomevfs
Description: a simple command line audio player based on GStreamer
Yauap is a simple commandline audio player based on the GStreamer multimedia
- framework. It also provides a DBus interface which allows other applications
- to use Yauap as a backend for playing audio files and streams.
+ 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
Added: people/modax/yauap/trunk/debian/patches/02_use_g_gint64_format.diff
===================================================================
--- people/modax/yauap/trunk/debian/patches/02_use_g_gint64_format.diff (rev 0)
+++ people/modax/yauap/trunk/debian/patches/02_use_g_gint64_format.diff 2008-03-02 17:01:04 UTC (rev 9522)
@@ -0,0 +1,14 @@
+--- yauap-0.2.2/main.c 2008-03-02 18:08:42.000000000 +0200
++++ yauap-0.2.2/main.c 2008-03-02 18:23:39.000000000 +0200
+@@ -660,9 +660,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);
+ }
+ }
+ }
Deleted: people/modax/yauap/trunk/debian/patches/02_volume_range_0_1.diff
Added: people/modax/yauap/trunk/debian/patches/03_volume_range_0_1.diff
===================================================================
--- people/modax/yauap/trunk/debian/patches/03_volume_range_0_1.diff (rev 0)
+++ people/modax/yauap/trunk/debian/patches/03_volume_range_0_1.diff 2008-03-02 17:01:04 UTC (rev 9522)
@@ -0,0 +1,43 @@
+--- yauap-0.2.2/main.c 2008-03-02 16:27:31.000000000 +0200
++++ yauap-0.2.2/main.c 2008-03-02 16:44:11.000000000 +0200
+@@ -159,28 +159,27 @@
+ /* get current volume */
+ if(priv->volume)
+ g_object_get( G_OBJECT(priv->volume), "volume", &volume, NULL );
+- return volume * 25.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.04;
+-
+-
+- /* ajust values */
+- if(volume < 0.0)
+- volume = 0.0;
+- else if(volume > 4.0)
+- volume = 4.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);
Added: people/modax/yauap/trunk/debian/patches/04_network_friendly_timeouts.diff
===================================================================
--- people/modax/yauap/trunk/debian/patches/04_network_friendly_timeouts.diff (rev 0)
+++ people/modax/yauap/trunk/debian/patches/04_network_friendly_timeouts.diff 2008-03-02 17:01:04 UTC (rev 9522)
@@ -0,0 +1,37 @@
+--- yauap-0.2.2/main.c 2008-01-14 12:24:16.000000000 +0200
++++ yauap-0.2.2/main.c 2008-03-02 00:40:13.000000000 +0200
+@@ -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){
+@@ -677,7 +677,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 */
+@@ -750,6 +750,7 @@
+ }
+
+ /* stop playback */
++ gst_element_set_state(decodebin,GST_STATE_NULL);
+ gst_element_set_state(play,GST_STATE_NULL);
+
+ }
Added: people/modax/yauap/trunk/debian/patches/05_enable_iradio_metadata.diff
===================================================================
--- people/modax/yauap/trunk/debian/patches/05_enable_iradio_metadata.diff (rev 0)
+++ people/modax/yauap/trunk/debian/patches/05_enable_iradio_metadata.diff 2008-03-02 17:01:04 UTC (rev 9522)
@@ -0,0 +1,82 @@
+--- yauap-0.2.2/main.c 2008-03-02 16:03:06.000000000 +0200
++++ yauap-0.2.2/main.c 2008-03-02 17:51:08.000000000 +0200
+@@ -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 its 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 for compatibility)
++ 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);
Modified: people/modax/yauap/trunk/debian/patches/series
===================================================================
--- people/modax/yauap/trunk/debian/patches/series 2008-03-02 16:45:56 UTC (rev 9521)
+++ people/modax/yauap/trunk/debian/patches/series 2008-03-02 17:01:04 UTC (rev 9522)
@@ -1,2 +1,5 @@
01_shlibdeps.diff
-02_volume_range_0_1.diff
+02_use_g_gint64_format.diff
+03_volume_range_0_1.diff
+04_network_friendly_timeouts.diff
+05_enable_iradio_metadata.diff
Modified: people/modax/yauap/trunk/debian/rules
===================================================================
--- people/modax/yauap/trunk/debian/rules 2008-03-02 16:45:56 UTC (rev 9521)
+++ people/modax/yauap/trunk/debian/rules 2008-03-02 17:01:04 UTC (rev 9522)
@@ -27,7 +27,7 @@
binary-arch: build install
dh_testdir
dh_testroot
- dh_installchangelogs -a
+ dh_installchangelogs -a ChangeLog
dh_installdocs -a
dh_installmenu -a
dh_strip --dbg-package=yauap-dbg
More information about the pkg-kde-commits
mailing list