From 961135a83d63b56055e8c2c71d16c175bdf78520 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 8 Oct 2012 22:12:58 +0200 Subject: mms: improved aborting, increased timeout length --- plugins/mms/libmms/mms.c | 10 +++++++--- plugins/mms/libmms/mms.h | 2 +- plugins/mms/libmms/mmsh.c | 3 ++- plugins/mms/libmms/mmsh.h | 2 +- plugins/mms/libmms/mmsx.c | 6 +++--- plugins/mms/mmsplug.c | 47 +++++++++++++++++++++++++++++++++++++++++------ 6 files changed, 55 insertions(+), 15 deletions(-) (limited to 'plugins') diff --git a/plugins/mms/libmms/mms.c b/plugins/mms/libmms/mms.c index ad63e6f8..e8cfae80 100644 --- a/plugins/mms/libmms/mms.c +++ b/plugins/mms/libmms/mms.c @@ -161,8 +161,9 @@ static off_t fallback_io_read(void *data, int socket, char *buf, off_t num, int off_t len = 0, ret; /* lprintf("%d\n", fallback_io_select(data, socket, MMS_IO_READ_READY, 1000)); */ errno = 0; - int nretry = 200; - while (len < num && nretry > 0) + int nretry = 600; + lprintf ("mms: fallback_io_read: need_abort ptr = %p\n", need_abort); + while (len < num && nretry > 0 && (!need_abort || !(*need_abort))) { ret = (off_t)read(socket, buf + len, num - len); if(ret == 0) @@ -499,6 +500,7 @@ static int string_utf16(iconv_t url_conv, char *dest, char *src, int dest_len) static int get_packet_header (mms_io_t *io, mms_t *this, mms_packet_header_t *header) { size_t len; int packet_type; + lprintf ("mms: get_packet_header: need_abort ptr = %p\n", this->need_abort); header->packet_len = 0; header->packet_seq = 0; @@ -576,6 +578,7 @@ static int get_answer (mms_io_t *io, mms_t *this) { int command = 0; mms_packet_header_t header; + lprintf ("mms: get_answer: need_abort ptr = %p\n", this->need_abort); switch (get_packet_header (io, this, &header)) { case MMS_PACKET_ERR: break; @@ -1039,7 +1042,7 @@ int static mms_choose_best_streams(mms_io_t *io, mms_t *this) { * network timing request */ /* FIXME: got somewhat broken during xine_stream_t->(void*) conversion */ -mms_t *mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth) { +mms_t *mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth, int *need_abort) { iconv_t url_conv = (iconv_t)-1; mms_t *this; int res; @@ -1070,6 +1073,7 @@ mms_t *mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth) { this->bandwidth = bandwidth; this->current_pos = 0; this->eos = 0; + this->need_abort = need_abort; this->guri = gnet_uri_new(this->url); if(!this->guri) { diff --git a/plugins/mms/libmms/mms.h b/plugins/mms/libmms/mms.h index be329eef..e5eb3bb8 100644 --- a/plugins/mms/libmms/mms.h +++ b/plugins/mms/libmms/mms.h @@ -37,7 +37,7 @@ extern "C" { typedef struct mms_s mms_t; -mms_t* mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth); +mms_t* mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth, int *need_abort); int mms_read (mms_io_t *io, mms_t *instance, char *data, int len, int *need_abort); int mms_request_time_seek (mms_io_t *io, mms_t *instance, double time_sec); diff --git a/plugins/mms/libmms/mmsh.c b/plugins/mms/libmms/mmsh.c index a0552f6c..fe3d12ce 100644 --- a/plugins/mms/libmms/mmsh.c +++ b/plugins/mms/libmms/mmsh.c @@ -1017,7 +1017,7 @@ fail: return 0; } -mmsh_t *mmsh_connect (mms_io_t *io, void *data, const char *url, int bandwidth) { +mmsh_t *mmsh_connect (mms_io_t *io, void *data, const char *url, int bandwidth, int *need_abort) { mmsh_t *this; GURI *uri = NULL; GURI *proxy_uri = NULL; @@ -1041,6 +1041,7 @@ mmsh_t *mmsh_connect (mms_io_t *io, void *data, const char *url, int bandwidth) this->host_user = NULL; this->host_password = NULL; this->uri = NULL; + this->need_abort = need_abort; this->url = strdup(url); if ((proxy_env = getenv("http_proxy")) != NULL) diff --git a/plugins/mms/libmms/mmsh.h b/plugins/mms/libmms/mmsh.h index 744eefc0..898894bb 100644 --- a/plugins/mms/libmms/mmsh.h +++ b/plugins/mms/libmms/mmsh.h @@ -37,7 +37,7 @@ extern "C" { typedef struct mmsh_s mmsh_t; char* mmsh_connect_common(int *s ,int *port, char *url, char **host, char **path, char **file); -mmsh_t* mmsh_connect (mms_io_t *io, void *data, const char *url_, int bandwidth); +mmsh_t* mmsh_connect (mms_io_t *io, void *data, const char *url_, int bandwidth, int *need_abort); int mmsh_read (mms_io_t *io, mmsh_t *instance, char *data, int len, int *need_abort); int mmsh_time_seek (mms_io_t *io, mmsh_t *instance, double time_sec); diff --git a/plugins/mms/libmms/mmsx.c b/plugins/mms/libmms/mmsx.c index e2c3fd9b..8d206b8f 100644 --- a/plugins/mms/libmms/mmsx.c +++ b/plugins/mms/libmms/mmsx.c @@ -53,17 +53,17 @@ mmsx_t *mmsx_connect(mms_io_t *io, void *data, const char *url, int bandwidth, i handle it. The LIBMMS_TRY_MMS_FIRST environment variable is there for testing the mms code against servers which accept both mmsh and mms. */ if (try_mms_first, 1) { - mmsx->connection = mms_connect(io, data, url, bandwidth); + mmsx->connection = mms_connect(io, data, url, bandwidth, need_abort); if (mmsx->connection) return mmsx; } - mmsx->connection_h = mmsh_connect(io, data, url, bandwidth); + mmsx->connection_h = mmsh_connect(io, data, url, bandwidth, need_abort); if (mmsx->connection_h) return mmsx; if (!try_mms_first, 0) { - mmsx->connection = mms_connect(io, data, url, bandwidth); + mmsx->connection = mms_connect(io, data, url, bandwidth, need_abort); if (mmsx->connection) return mmsx; } diff --git a/plugins/mms/mmsplug.c b/plugins/mms/mmsplug.c index 3d2e3faf..928a527d 100644 --- a/plugins/mms/mmsplug.c +++ b/plugins/mms/mmsplug.c @@ -26,6 +26,7 @@ static DB_functions_t *deadbeef; typedef struct { DB_vfs_t *vfs; + char *fname; mmsx_t *stream; const mms_io_t *io; int need_abort; @@ -49,35 +50,61 @@ const char * mms_bandwidth_strs[]={"14.4 Kbps (Modem)", "19.2 Kbps (Modem)", static DB_FILE * mms_open (const char *fname) { MMS_FILE *fp = malloc (sizeof (MMS_FILE)); + memset (fp, 0, sizeof (MMS_FILE)); fp->io = mms_get_default_io_impl(); - fp->stream = mmsx_connect ((mms_io_t *)fp->io, fp, fname, 1544000, &fp->need_abort); - if (!fp->stream) { - free (fp); - return NULL; - } + fp->fname = strdup (fname); fp->vfs = &plugin; return (DB_FILE*)fp; } static void mms_close (DB_FILE *stream) { +// fprintf (stderr, "\033[0;32mmms_close was called\033[37;0m\n"); assert (stream); - mmsx_close (((MMS_FILE *)stream)->stream); + MMS_FILE *fp = (MMS_FILE *)stream; + if (fp->stream) { + mmsx_close (fp->stream); + } + if (fp->fname) { + free (fp->fname); + } free (stream); } +static int +mms_ensure_connected (MMS_FILE *fp) { + if (!fp->stream) { + fp->stream = mmsx_connect ((mms_io_t *)fp->io, fp, fp->fname, 1544000, &fp->need_abort); + if (!fp->stream) { + return -1; + } + } + return 0; +} + static size_t mms_read (void *ptr, size_t size, size_t nmemb, DB_FILE *stream) { assert (stream); assert (ptr); + int connect_err = mms_ensure_connected ((MMS_FILE *)stream); + if (connect_err < 0) { + return connect_err; + } MMS_FILE *fp = (MMS_FILE *)stream; int res = mmsx_read ((mms_io_t *)fp->io, fp->stream, ptr, size * nmemb); + if (fp->need_abort) { + return -1; + } return res; } static int mms_seek (DB_FILE *stream, int64_t offset, int whence) { assert (stream); + int connect_err = mms_ensure_connected ((MMS_FILE *)stream); + if (connect_err < 0) { + return connect_err; + } MMS_FILE *fp = (MMS_FILE *)stream; return mmsx_seek ((mms_io_t *)fp->io, fp->stream, offset, whence); } @@ -85,6 +112,10 @@ mms_seek (DB_FILE *stream, int64_t offset, int whence) { static int64_t mms_tell (DB_FILE *stream) { assert (stream); + int connect_err = mms_ensure_connected ((MMS_FILE *)stream); + if (connect_err < 0) { + return connect_err; + } return mmsx_get_current_pos (((MMS_FILE *)stream)->stream); } @@ -98,6 +129,10 @@ mms_rewind (DB_FILE *stream) { static int64_t mms_getlength (DB_FILE *stream) { assert (stream); + int connect_err = mms_ensure_connected ((MMS_FILE *)stream); + if (connect_err < 0) { + return connect_err; + } MMS_FILE *f = (MMS_FILE *)stream; return mmsx_get_length (f->stream); } -- cgit v1.2.3 From 4224404f39f6e570790d469fb5455fd8f2784014 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 8 Oct 2012 22:22:54 +0200 Subject: mms: more abortion improvements --- plugins/mms/libmms/mms.c | 6 +++--- plugins/mms/libmms/mmsh.c | 4 ++-- plugins/mms/libmms/mmsio.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/mms/libmms/mms.c b/plugins/mms/libmms/mms.c index e8cfae80..15c9cca9 100644 --- a/plugins/mms/libmms/mms.c +++ b/plugins/mms/libmms/mms.c @@ -192,7 +192,7 @@ static off_t fallback_io_write(void *data, int socket, char *buf, off_t num) return (off_t)write(socket, buf, num); } -static int fallback_io_tcp_connect(void *data, const char *host, int port) +static int fallback_io_tcp_connect(void *data, const char *host, int port, int *need_abort) { struct hostent *h; @@ -226,7 +226,7 @@ static int fallback_io_tcp_connect(void *data, const char *host, int port) time_t t = time (NULL); int error = 0; - for (;;) { + while (!need_abort || !(*need_abort)) { int res = connect(s, (struct sockaddr *)&sin, sizeof(sin)); if (res == -1 && (errno == EINPROGRESS || errno == EALREADY)) { if (time (NULL) - t > 3) { @@ -882,7 +882,7 @@ static int mms_tcp_connect(mms_io_t *io, mms_t *this) { * try to connect */ lprintf("mms: trying to connect to %s on port %d\n", this->host, this->port); - this->s = io_connect(io, this->host, this->port); + this->s = io_connect(io, this->host, this->port, this->need_abort); if (this->s == -1) { lprintf("mms: failed to connect to %s\n", this->host); return 1; diff --git a/plugins/mms/libmms/mmsh.c b/plugins/mms/libmms/mmsh.c index fe3d12ce..0606ac53 100644 --- a/plugins/mms/libmms/mmsh.c +++ b/plugins/mms/libmms/mmsh.c @@ -248,7 +248,7 @@ static off_t fallback_io_write(void *data, int socket, char *buf, off_t num) return (off_t)write(socket, buf, num); } -static int fallback_io_tcp_connect(void *data, const char *host, int port) +static int fallback_io_tcp_connect(void *data, const char *host, int port, int *need_abort) { struct hostent *h; @@ -822,7 +822,7 @@ static int mmsh_tcp_connect(mms_io_t *io, mmsh_t *this) { */ lprintf("mmsh: try to connect to %s on port %d \n", this->connect_host, this->connect_port); - this->s = io_connect (io, this->connect_host, this->connect_port); + this->s = io_connect (io, this->connect_host, this->connect_port, this->need_abort); if (this->s == -1) { lprintf("mmsh: failed to connect '%s'\n", this->connect_host); diff --git a/plugins/mms/libmms/mmsio.h b/plugins/mms/libmms/mmsio.h index a1cb93bb..376e6736 100644 --- a/plugins/mms/libmms/mmsio.h +++ b/plugins/mms/libmms/mmsio.h @@ -66,7 +66,7 @@ typedef int (*mms_io_select_func)(void *data, int fd, int state, int timeout_mse * * returns a socket descriptor or -1 if an error occured */ -typedef int (*mms_io_tcp_connect_func)(void *data, const char *host, int port); +typedef int (*mms_io_tcp_connect_func)(void *data, const char *host, int port, int *need_abort); typedef struct { -- cgit v1.2.3 From b07ade8fa94036aeb1ffa6db4ca1ef182237ccc5 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 8 Oct 2012 22:30:50 +0200 Subject: gtkui: playlist popup menu positioning WIP --- plugins/gtkui/ddblistview.h | 3 +++ plugins/gtkui/plcommon.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/gtkui/ddblistview.h b/plugins/gtkui/ddblistview.h index 143ef28c..f2ead8ce 100644 --- a/plugins/gtkui/ddblistview.h +++ b/plugins/gtkui/ddblistview.h @@ -266,6 +266,9 @@ ddb_listview_clear_sort (DdbListview *listview); void ddb_listview_lock_columns (DdbListview *lv, gboolean lock); +int +ddb_listview_get_row_pos (DdbListview *listview, int row_idx); + G_END_DECLS #endif // __DDBLISTVIEW_H diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index c633cb60..aa1b0f8b 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -438,6 +438,38 @@ find_popup (GtkWidget *widget, return found_widget; } +#if 0 +// experimental code to position the popup at the item +static void +popup_menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { + // find 1st selected item + DdbListview *lv = user_data; + int winx, winy; + gdk_window_get_position (gtk_widget_get_window (GTK_WIDGET (lv->list)), &winx, &winy); + DdbListviewIter it = lv->binding->head (); + int idx = 0; + while (it) { + if (lv->binding->is_selected (it)) { + break; + } + DdbListviewIter next = lv->binding->next (it); + lv->binding->unref (it); + it = next; + idx++; + } + if (it) { + // get Y position + *y = ddb_listview_get_row_pos (lv, idx) + winy; + lv->binding->unref (it); + } + else { + *y = winy; // mouse_y + } + *x = winx; // mouse_x + *push_in = TRUE; +} +#endif + void list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) { clicked_idx = deadbeef->pl_get_idx_of (it); @@ -652,7 +684,7 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) { g_signal_connect ((gpointer) properties1, "activate", G_CALLBACK (main_properties_activate), NULL); - gtk_menu_popup (GTK_MENU (playlist_menu), NULL, NULL, NULL, listview, 0, gtk_get_current_event_time()); + gtk_menu_popup (GTK_MENU (playlist_menu), NULL, NULL, NULL/*popup_menu_position_func*/, listview, 0, gtk_get_current_event_time()); } void -- cgit v1.2.3 From 0b7dbebd8acf3091196a3e375b91a8e517df14f1 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 8 Oct 2012 22:31:33 +0200 Subject: mms: debug printfs --- plugins/mms/mmsplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mms/mmsplug.c b/plugins/mms/mmsplug.c index 928a527d..cb339a96 100644 --- a/plugins/mms/mmsplug.c +++ b/plugins/mms/mmsplug.c @@ -59,7 +59,7 @@ mms_open (const char *fname) { static void mms_close (DB_FILE *stream) { -// fprintf (stderr, "\033[0;32mmms_close was called\033[37;0m\n"); + //fprintf (stderr, "\033[0;32mmms_close was called\033[37;0m\n"); assert (stream); MMS_FILE *fp = (MMS_FILE *)stream; if (fp->stream) { @@ -156,6 +156,7 @@ mms_is_streaming (void) { static void mms_abort (DB_FILE *fp) { + //fprintf (stderr, "\033[0;35mabort called\033[37;0m\n"); ((MMS_FILE *)fp)->need_abort = 1; } -- cgit v1.2.3 From c55f92966ea08512570fa7e381ffecad16cc2486 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 9 Oct 2012 19:52:41 +0200 Subject: vorbis: update waveformat if changes dynamically in the stream --- plugins/vorbis/vorbis.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index a121695a..6036d215 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -316,6 +316,9 @@ cvorbis_read (DB_fileinfo_t *_info, char *bytes, int size) { ogg_info_t *info = (ogg_info_t *)_info; // trace ("cvorbis_read %d bytes\n", size); + _info->fmt.channels = info->vi->channels; + _info->fmt.samplerate = info->vi->rate; + int samplesize = _info->fmt.channels * _info->fmt.bps / 8; if (!info->info.file->vfs->is_streaming ()) { -- cgit v1.2.3 From aa6117ca31c934e443b60c5070107b15eaf358e1 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 9 Oct 2012 20:12:51 +0200 Subject: mp3: fixed trk properties samplerate --- plugins/mpgmad/mpgmad.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index 132adebc..c8a696ad 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -579,8 +579,6 @@ cmp3_scan_stream (buffer_t *buffer, int sample) { } } if (sample == 0) { - trace ("cmp3_scan_stream: trying to figure out duration from file size\n"); - buffer->samplerate = samplerate; if (buffer->file->vfs->is_streaming ()) { // only suitable for cbr files, used if streaming int sz = deadbeef->fgetlength (buffer->file); -- cgit v1.2.3 From c82ab50a979fa328b4f59fbcdace66a4a708ff46 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 9 Oct 2012 21:49:33 +0200 Subject: fixed gtk2/3 configure options -- now there's no --disable/enable-gtkui, only --disable/enable-gtk2 and -gtk3. --- configure.ac | 8 ++------ plugins/gtkui/Makefile.am | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/configure.ac b/configure.ac index 890a6a80..acefaac5 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,6 @@ AC_ARG_ENABLE(nullout, [AS_HELP_STRING([--disable-nullout ], [disable NULL outp AC_ARG_ENABLE(alsa, [AS_HELP_STRING([--disable-alsa ], [disable ALSA output plugin (default: enabled)])], [enable_alsa=$enableval], [enable_alsa=yes]) AC_ARG_ENABLE(oss, [AS_HELP_STRING([--disable-oss ], [disable Open Sound System output plugin (default: enabled)])], [enable_oss=$enableval], [enable_oss=yes]) AC_ARG_ENABLE(pulse, [AS_HELP_STRING([--disable-pulse ], [disable PulseAudio output plugin (default: enabled)])], [enable_pulse=$enableval], [enable_pulse=yes]) -AC_ARG_ENABLE(gtkui, [AS_HELP_STRING([--disable-gtkui ], [disable standard GTK+ user interface plugin (default: enabled)])], [enable_gtkui=$enableval], [enable_gtkui=yes]) AC_ARG_ENABLE(gtk3, [AS_HELP_STRING([--enable-gtk3 ], [build GTK3 version of gtkui plugin (default: enabled)])], [enable_gtk3=$enableval], [enable_gtk3=yes]) AC_ARG_ENABLE(gtk2, [AS_HELP_STRING([--disable-gtk2 ], [build GTK2 version of gtkui plugin (default: enabled)])], [enable_gtk2=$enableval], [enable_gtk2=yes]) AC_ARG_ENABLE(vfs_curl, [AS_HELP_STRING([--disable-vfs-curl], [disable HTTP streaming vfs plugin (default: enabled)])], [enable_vfs_curl=$enableval], [enable_vfs_curl=yes]) @@ -357,10 +356,8 @@ fi fi dnl gtkui plugin -if test "x$enable_gtkui" != "xno" ; then - if test "x$HAVE_GTK2" == "xyes" || test "x$HAVE_GTK3" == "xyes" ; then - HAVE_GTKUI=yes - fi +if test "x$HAVE_GTK2" == "xyes" || test "x$HAVE_GTK3" == "xyes" ; then + HAVE_GTKUI=yes fi if test "x$enable_alsa" != "xno" ; then @@ -608,7 +605,6 @@ AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLACPLUGIN" = "xyes") AM_CONDITIONAL(HAVE_WAVPACK, test "x$HAVE_WAVPACKPLUGIN" = "xyes") AM_CONDITIONAL(HAVE_SNDFILE, test "x$HAVE_SNDFILEPLUGIN" = "xyes") AM_CONDITIONAL(HAVE_CDDA, test "x$HAVE_CDDAPLUGIN" = "xyes") -AM_CONDITIONAL(HAVE_GTKUI, test "x$HAVE_GTKUI" = "xyes") AM_CONDITIONAL(HAVE_GTK2, test "x$HAVE_GTK2" = "xyes") AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes") AM_CONDITIONAL(HAVE_ALSA, test "x$HAVE_ALSAPLUGIN" = "xyes") diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index bb3bfca5..2ec703d8 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -1,4 +1,3 @@ -if HAVE_GTKUI gtkuidir = $(libdir)/$(PACKAGE) if HAVE_SM @@ -101,4 +100,3 @@ ddb_gui_GTK2_fallback_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT) endif -endif -- cgit v1.2.3 From 6931db2917c095fbeab43cc439f51a400c810dd1 Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 10 Oct 2012 22:28:39 +0200 Subject: aac: fixed makefile --- plugins/aac/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/aac/Makefile.am b/plugins/aac/Makefile.am index deab8c8f..5a532d8f 100644 --- a/plugins/aac/Makefile.am +++ b/plugins/aac/Makefile.am @@ -1,4 +1,5 @@ if HAVE_AAC +aacpath=@top_srcdir@/plugins/aac aacdir = $(libdir)/$(PACKAGE) pkglib_LTLIBRARIES = aac.la aac_la_SOURCES = aac.c aac_parser.c aac_parser.h\ @@ -15,6 +16,6 @@ aac_la_SOURCES = aac.c aac_parser.c aac_parser.h\ aac_la_LDFLAGS = -module aac_la_LIBADD = $(LDADD) $(FAAD2_LIBS) -AM_CFLAGS = $(CFLAGS) -std=c99 -DUSE_MP4FF -DUSE_TAGGING -I../libmp4ff +AM_CFLAGS = $(CFLAGS) -std=c99 -DUSE_MP4FF -DUSE_TAGGING -I$(aacpath)/../libmp4ff endif -- cgit v1.2.3 From 406a77d1bd10e09e448a2ef80b88e59669794b11 Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 10 Oct 2012 22:28:54 +0200 Subject: converter: fixed file-exists check --- plugins/converter/convgui.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/converter/convgui.c b/plugins/converter/convgui.c index e225c74d..89a341f1 100644 --- a/plugins/converter/convgui.c +++ b/plugins/converter/convgui.c @@ -181,8 +181,22 @@ converter_worker (void *ctx) { converter_plugin->get_output_path (conv->convert_items[n], conv->outfolder, conv->outfile, conv->encoder_preset, conv->preserve_folder_structure, root, conv->write_to_source_folder, outpath, sizeof (outpath)); int skip = 0; + + // need to unescape path before passing to stat + char unesc_path[2000]; + char invalid[] = "$\"`\\"; + const char *p = outpath; + char *o = unesc_path; + while (*p) { + if (*p == '\\') { + p++; + } + *o++ = *p++; + } + *o = 0; + struct stat st; - int res = stat(outpath, &st); + int res = stat(unesc_path, &st); if (res == 0) { if (conv->overwrite_action > 1 || conv->overwrite_action < 0) { conv->overwrite_action = 0; @@ -192,7 +206,7 @@ converter_worker (void *ctx) { struct overwrite_prompt_ctx ctl; ctl.mutex = deadbeef->mutex_create (); ctl.cond = deadbeef->cond_create (); - ctl.fname = outpath; + ctl.fname = unesc_path; ctl.result = 0; gdk_threads_add_idle (overwrite_prompt_cb, &ctl); deadbeef->cond_wait (ctl.cond, ctl.mutex); -- cgit v1.2.3 From 1ab32a2802e79ae39226f25fe81150fe80858757 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 11 Oct 2012 21:10:46 +0200 Subject: aac: fail adts parser if encountered many failed frames in a row --- plugins/aac/aac.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins') diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index a7abece0..156e86f8 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -142,6 +142,9 @@ parse_aac_stream(DB_FILE *fp, int *psamplerate, int *pchannels, float *pduration int frame = 0; int scanframes = 1000; + + int nfail = 0; + if (fp->vfs->is_streaming ()) { scanframes = 1; } @@ -160,6 +163,11 @@ parse_aac_stream(DB_FILE *fp, int *psamplerate, int *pchannels, float *pduration memmove (buf, buf+1, sizeof (buf)-1); bufsize--; // trace ("aac_sync fail, framepos: %d\n", framepos); + nfail++; + if (nfail > 100) { + trace ("aac: many failed sync attemps, aborted\n"); + return -1; + } if (deadbeef->ftell (fp) - initfpos > 2000) { // how many is enough to make sure? break; } @@ -168,6 +176,7 @@ parse_aac_stream(DB_FILE *fp, int *psamplerate, int *pchannels, float *pduration } else { // trace ("aac: frame #%d sync: %dch %d %d %d %d\n", frame, channels, samplerate, bitrate, samples, size); + nfail = 0; frame++; nsamples += samples; if (!stream_sr) { -- cgit v1.2.3 From eb005708fb6bb46f19ca31ca6141cb94f8bad614 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 14 Oct 2012 12:02:27 +0200 Subject: aac: don't attempt raw aac detection on mp4 files --- plugins/aac/aac.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 156e86f8..acef86d9 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -1196,6 +1196,10 @@ aac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { if (i < ntracks) { return after; } + if (ntracks > 0) { + // mp4 container found, but no valid aac tracks in it + return NULL; + } } } trace ("aac: mp4 container failed, trying raw aac\n"); -- cgit v1.2.3 From 939c053d0e57ca5f5cad5e586071650a3a683ec3 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 14 Oct 2012 20:33:23 +0200 Subject: gtk3 support in static build --- configure.ac | 9 ++------- plugins/converter/Makefile.am | 21 +++++++++++++-------- plugins/gtkui/Makefile.am | 20 ++++++++++++++++++++ plugins/shellexecui/Makefile.am | 21 +++++++++++++-------- scripts/portable_package_static.sh | 2 ++ scripts/portable_postbuild.sh | 8 +++++++- scripts/static_build.sh | 2 +- 7 files changed, 58 insertions(+), 25 deletions(-) (limited to 'plugins') diff --git a/configure.ac b/configure.ac index 424555df..dbb870a9 100644 --- a/configure.ac +++ b/configure.ac @@ -354,11 +354,6 @@ else fi fi -dnl gtkui plugin -if test "x$HAVE_GTK2" == "xyes" || test "x$HAVE_GTK3" == "xyes" ; then - HAVE_GTKUI=yes -fi - if test "x$enable_alsa" != "xno" ; then if test "x$HAVE_ALSA" = "xyes" ; then HAVE_ALSAPLUGIN=yes @@ -691,8 +686,8 @@ PRINT_PLUGIN_INFO([vtx],[vtx file player (ay8910/12 emulation)],[test "x$HAVE_VT PRINT_PLUGIN_INFO([adplug],[adplug player (OPL2/OPL3 emulation)],[test "x$HAVE_ADPLUG" = "xyes"]) PRINT_PLUGIN_INFO([vfs_curl],[http/ftp streaming support],[test "x$HAVE_VFS_CURL" = "xyes"]) PRINT_PLUGIN_INFO([cdda],[cd audio player],[test "x$HAVE_CDDAPLUGIN" = "xyes"]) -PRINT_PLUGIN_INFO([gtkui],[GTK2 user interface],[test "x$HAVE_GTK2" = "xyes" && test "x$HAVE_GTKUI" = "xyes"]) -PRINT_PLUGIN_INFO([gtkui3],[GTK3 user interface],[test "x$HAVE_GTK3" = "xyes" && test "x$HAVE_GTKUI" = "xyes"]) +PRINT_PLUGIN_INFO([gtkui],[GTK2 user interface],[test "x$HAVE_GTK2" = "xyes"]) +PRINT_PLUGIN_INFO([gtkui3],[GTK3 user interface],[test "x$HAVE_GTK3" = "xyes"]) PRINT_PLUGIN_INFO([hotkeys],[Global hotkeys support],[test "x$HAVE_HOTKEYS" = "xyes"]) PRINT_PLUGIN_INFO([ffmpeg],[ffmpeg codecs],[test "x$HAVE_FFMPEGPLUGIN" = "xyes"]) PRINT_PLUGIN_INFO([oss],[oss output plugin],[test "x$HAVE_OSS" = "xyes"]) diff --git a/plugins/converter/Makefile.am b/plugins/converter/Makefile.am index e9b5b964..d14d3f40 100644 --- a/plugins/converter/Makefile.am +++ b/plugins/converter/Makefile.am @@ -30,15 +30,10 @@ AM_CFLAGS = $(CFLAGS) -std=c99 -fPIC converter_la_SOURCES = converter.c converter.h converter_la_LDFLAGS = -module + if HAVE_GTK2 converter_gtk2_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h converter_gtk2_la_LDFLAGS = -module -endif -if HAVE_GTK3 -converter_gtk3_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h -converter_gtk3_la_LDFLAGS = -module -endif - if STATICLINK GTK_ROOT=@top_srcdir@/$(LIB)/gtk-2.12.12/usr @@ -46,15 +41,25 @@ converter_gtk2_la_LIBADD = $(LDADD) -L$(GTK_ROOT)/lib $(GTK_ROOT)/lib/libgtk-x11 converter_gtk2_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT)/lib/gtk-2.0/include -I $(GTK_ROOT)/include/glib-2.0 -I $(GTK_ROOT)/include/gtk-2.0 -I $(GTK_ROOT)/include/cairo -I $(GTK_ROOT)/lib/glib-2.0/include/ -I $(GTK_ROOT)/include/pango-1.0 -I $(GTK_ROOT)/include/atk-1.0 -DULTRA_COMPATIBLE=1 else -if HAVE_GTK2 converter_gtk2_la_LIBADD = $(LDADD) $(GTK2_DEPS_LIBS) converter_gtk2_la_CFLAGS = -std=c99 $(GTK2_DEPS_CFLAGS) endif +endif + if HAVE_GTK3 +converter_gtk3_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h +converter_gtk3_la_LDFLAGS = -module +if STATICLINK +GTK_ROOT_300=@top_srcdir@/$(LIB)/gtk-3.0.0 + +converter_gtk3_la_LIBADD = $(LDADD) -L$(GTK_ROOT_300)/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig $(SM_LIBADD) + +converter_gtk3_la_CFLAGS = -std=c99 -I$(GTK_ROOT_300)/include/gtk-3.0 -I$(GTK_ROOT_300)/include/pango-1.0 -I$(GTK_ROOT_300)/include/gio-unix-2.0/ -I$(GTK_ROOT_300)/include/atk-1.0 -I$(GTK_ROOT_300)/include/cairo -I$(GTK_ROOT_300)/include/gdk-pixbuf-2.0 -I$(GTK_ROOT_300)/include/freetype2 -I$(GTK_ROOT_300)/include/glib-2.0 -I$(GTK_ROOT_300)/lib/glib-2.0/include $(SM_CFLAGS) + +else converter_gtk3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS) converter_gtk3_la_CFLAGS = -std=c99 $(GTK3_DEPS_CFLAGS) endif - endif endif diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index 2ec703d8..2aebf0f5 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -47,7 +47,17 @@ sdk_HEADERS = gtkui_api.h EXTRA_DIST = deadbeef.glade if STATICLINK +if HAVE_GTK2 +if HAVE_GTK3 +pkglib_LTLIBRARIES = ddb_gui_GTK2.la ddb_gui_GTK2.fallback.la ddb_gui_GTK3.la +else pkglib_LTLIBRARIES = ddb_gui_GTK2.la ddb_gui_GTK2.fallback.la +endif +else +if HAVE_GTK3 +pkglib_LTLIBRARIES = ddb_gui_GTK3.la +endif +endif else if HAVE_GTK2 if HAVE_GTK3 @@ -80,12 +90,22 @@ ddb_gui_GTK2_la_CFLAGS = -std=c99 $(GTK2_DEPS_CFLAGS) $(SM_CFLAGS) endif endif + if HAVE_GTK3 ddb_gui_GTK3_la_SOURCES = $(GTKUI_SOURCES) ddb_gui_GTK3_la_LDFLAGS = -module +if STATICLINK +GTK_ROOT_300=@top_srcdir@/$(LIB)/gtk-3.0.0 + +ddb_gui_GTK3_la_LIBADD = $(LDADD) -L$(GTK_ROOT_300)/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig $(SM_LIBADD) + +ddb_gui_GTK3_la_CFLAGS = -std=c99 -I$(GTK_ROOT_300)/include/gtk-3.0 -I$(GTK_ROOT_300)/include/pango-1.0 -I$(GTK_ROOT_300)/include/gio-unix-2.0/ -I$(GTK_ROOT_300)/include/atk-1.0 -I$(GTK_ROOT_300)/include/cairo -I$(GTK_ROOT_300)/include/gdk-pixbuf-2.0 -I$(GTK_ROOT_300)/include/freetype2 -I$(GTK_ROOT_300)/include/glib-2.0 -I$(GTK_ROOT_300)/lib/glib-2.0/include $(SM_CFLAGS) + +else ddb_gui_GTK3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS) $(SM_LIBADD) ddb_gui_GTK3_la_CFLAGS = -std=c99 $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) endif +endif # fallback lib if STATICLINK diff --git a/plugins/shellexecui/Makefile.am b/plugins/shellexecui/Makefile.am index 688d271f..e8945130 100644 --- a/plugins/shellexecui/Makefile.am +++ b/plugins/shellexecui/Makefile.am @@ -19,12 +19,6 @@ AM_CFLAGS = $(CFLAGS) -std=c99 -fPIC if HAVE_GTK2 shellexecui_gtk2_la_SOURCES = shellexecui.c interface.c support.c callbacks.c interface.h support.h callbacks.h shellexecui_gtk2_la_LDFLAGS = -module -endif -if HAVE_GTK3 -shellexecui_gtk3_la_SOURCES = shellexecui.c interface.c support.c callbacks.c interface.h support.h callbacks.h -shellexecui_gtk3_la_LDFLAGS = -module -endif - if STATICLINK GTK_ROOT=@top_srcdir@/$(LIB)/gtk-2.12.12/usr @@ -32,15 +26,26 @@ shellexecui_gtk2_la_LIBADD = $(LDADD) -L$(GTK_ROOT)/lib $(GTK_ROOT)/lib/libgtk-x shellexecui_gtk2_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT)/lib/gtk-2.0/include -I $(GTK_ROOT)/include/glib-2.0 -I $(GTK_ROOT)/include/gtk-2.0 -I $(GTK_ROOT)/include/cairo -I $(GTK_ROOT)/lib/glib-2.0/include/ -I $(GTK_ROOT)/include/pango-1.0 -I $(GTK_ROOT)/include/atk-1.0 -DULTRA_COMPATIBLE=1 else -if HAVE_GTK2 shellexecui_gtk2_la_LIBADD = $(LDADD) $(GTK2_DEPS_LIBS) shellexecui_gtk2_la_CFLAGS = -std=c99 $(GTK2_DEPS_CFLAGS) endif +endif + if HAVE_GTK3 +shellexecui_gtk3_la_SOURCES = shellexecui.c interface.c support.c callbacks.c interface.h support.h callbacks.h +shellexecui_gtk3_la_LDFLAGS = -module +if STATICLINK +GTK_ROOT_300=@top_srcdir@/$(LIB)/gtk-3.0.0 + +shellexecui_gtk3_la_LIBADD = $(LDADD) -L$(GTK_ROOT_300)/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig $(SM_LIBADD) + +shellexecui_gtk3_la_CFLAGS = -std=c99 -I$(GTK_ROOT_300)/include/gtk-3.0 -I$(GTK_ROOT_300)/include/pango-1.0 -I$(GTK_ROOT_300)/include/gio-unix-2.0/ -I$(GTK_ROOT_300)/include/atk-1.0 -I$(GTK_ROOT_300)/include/cairo -I$(GTK_ROOT_300)/include/gdk-pixbuf-2.0 -I$(GTK_ROOT_300)/include/freetype2 -I$(GTK_ROOT_300)/include/glib-2.0 -I$(GTK_ROOT_300)/lib/glib-2.0/include $(SM_CFLAGS) + +else shellexecui_gtk3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS) shellexecui_gtk3_la_CFLAGS = -std=c99 $(GTK3_DEPS_CFLAGS) endif - endif + endif diff --git a/scripts/portable_package_static.sh b/scripts/portable_package_static.sh index 1ad0c076..6db7cc3c 100755 --- a/scripts/portable_package_static.sh +++ b/scripts/portable_package_static.sh @@ -32,6 +32,7 @@ tar jcvf ../../portable_out/build/$OUTNAME\ $PLUGDIR/dca.so\ $PLUGDIR/ddb_gui_GTK2.fallback.so\ $PLUGDIR/ddb_gui_GTK2.so\ + $PLUGDIR/ddb_gui_GTK3.so\ $PLUGDIR/ffap.so\ $PLUGDIR/ffmpeg.so\ $PLUGDIR/flac.so\ @@ -66,6 +67,7 @@ tar jcvf ../../portable_out/build/$OUTNAME\ $PLUGDIR/pulse.so\ $PLUGDIR/dsp_libsrc.so\ $PLUGDIR/ddb_mono2stereo.so\ + $PLUGDIR/alac.so\ $PIXMAPDIR\ $SRCDIR/locale cd ../.. diff --git a/scripts/portable_postbuild.sh b/scripts/portable_postbuild.sh index 45db6740..c1de99c7 100755 --- a/scripts/portable_postbuild.sh +++ b/scripts/portable_postbuild.sh @@ -18,7 +18,7 @@ cp ./deadbeef $OUTDIR for i in nullout cdda flac alsa mpgmad hotkeys vtx \ ffap ffmpeg wavpack vorbis oss vfs_curl \ - lastfm sid adplug sndfile artwork \ + lastfm sid adplug sndfile artwork alac \ supereq gme dumb notify musepack wildmidi \ tta dca aac mms shn ao shellexec shellexecui vfs_zip \ m3u converter pulse dsp_libsrc mono2stereo ; do @@ -53,6 +53,12 @@ if [ -f ./plugins/gtkui/.libs/ddb_gui_GTK2.fallback.so ]; then cp ./plugins/gtkui/.libs/ddb_gui_GTK2.fallback.so $PLUGDIR/ fi +if [ -f ./plugins/gtkui/.libs/ddb_gui_GTK3.so ]; then + cp ./plugins/gtkui/.libs/ddb_gui_GTK3.so $PLUGDIR/ +else + echo ./plugins/gtkui/.libs/ddb_gui_GTK3.so not found +fi + #pixmaps for i in pause_16.png play_16.png noartwork.png buffering_16.png; do diff --git a/scripts/static_build.sh b/scripts/static_build.sh index 250b29e8..46e82e9a 100755 --- a/scripts/static_build.sh +++ b/scripts/static_build.sh @@ -11,7 +11,7 @@ cd ../../ ./autogen.sh export APBUILD_STATIC_LIBGCC=1 -CC=$AP/apgcc CXX=$AP/apgcc ./configure --enable-staticlink --disable-artwork-imlib2 --prefix=/opt/deadbeef +CC=$AP/apgcc CXX=$AP/apgcc ./configure --enable-staticlink --disable-artwork-imlib2 --enable-ffmpeg --prefix=/opt/deadbeef sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool make clean make DESTDIR=`pwd`/static/$ARCH/deadbeef-$VERSION -j8 install -- cgit v1.2.3 From 2484c1e2bd0fd602c66955db9e1fca2c76d3be35 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 15 Oct 2012 21:19:50 +0200 Subject: gtkui: fixed gtk2 plugin static linking --- plugins/gtkui/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index 2aebf0f5..f7844820 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -81,7 +81,7 @@ ddb_gui_GTK2_la_LDFLAGS = -module if STATICLINK GTK_ROOT_216=@top_srcdir@/$(LIB)/gtk-2.16.0 -ddb_gui_GTK2_la_LIBADD = $(LDADD) -L$(GTK_ROOT_216)/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 $(SM_LIBADD) +ddb_gui_GTK2_la_LIBADD = $(LDADD) -L$(GTK_ROOT_216)/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 $(SM_LIBADD) ddb_gui_GTK2_la_CFLAGS = -std=c99 -I$(GTK_ROOT_216)/include/gtk-2.0 -I$(GTK_ROOT_216)/lib/gtk-2.0/include -I$(GTK_ROOT_216)/include/atk-1.0 -I$(GTK_ROOT_216)/include/cairo -I$(GTK_ROOT_216)/include/pango-1.0 -I$(GTK_ROOT_216)/include -I$(GTK_ROOT_216)/include/glib-2.0 -I$(GTK_ROOT_216)/lib/glib-2.0/include $(SM_CFLAGS) else -- cgit v1.2.3 From 1c03f44725ad06f12829ea142001bd47a30fc717 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 16 Oct 2012 20:29:01 +0200 Subject: aac: fixed filehandle leak --- plugins/aac/aac.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index acef86d9..1083f94f 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -1194,10 +1194,12 @@ aac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { } mp4ff_close (mp4); if (i < ntracks) { + deadbeef->fclose (fp); return after; } if (ntracks > 0) { // mp4 container found, but no valid aac tracks in it + deadbeef->fclose (fp); return NULL; } } -- cgit v1.2.3 From a465ab861a2df522d55698a894f20ab6c7b144bd Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 17 Oct 2012 17:48:37 +0200 Subject: gtk3 static-build fix --- configure.ac | 2 +- plugins/gtkui/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/configure.ac b/configure.ac index d0bd12e2..884b0171 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([deadbeef], [0.5.6-rc2]) +AC_INIT([deadbeef], [devel]) AC_CONFIG_HEADER(config.h) diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index f7844820..279b555b 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -97,7 +97,7 @@ ddb_gui_GTK3_la_LDFLAGS = -module if STATICLINK GTK_ROOT_300=@top_srcdir@/$(LIB)/gtk-3.0.0 -ddb_gui_GTK3_la_LIBADD = $(LDADD) -L$(GTK_ROOT_300)/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig $(SM_LIBADD) +ddb_gui_GTK3_la_LIBADD = $(LDADD) -L$(GTK_ROOT_300)/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lfreetype -lfontconfig $(SM_LIBADD) ddb_gui_GTK3_la_CFLAGS = -std=c99 -I$(GTK_ROOT_300)/include/gtk-3.0 -I$(GTK_ROOT_300)/include/pango-1.0 -I$(GTK_ROOT_300)/include/gio-unix-2.0/ -I$(GTK_ROOT_300)/include/atk-1.0 -I$(GTK_ROOT_300)/include/cairo -I$(GTK_ROOT_300)/include/gdk-pixbuf-2.0 -I$(GTK_ROOT_300)/include/freetype2 -I$(GTK_ROOT_300)/include/glib-2.0 -I$(GTK_ROOT_300)/lib/glib-2.0/include $(SM_CFLAGS) -- cgit v1.2.3 From 18855db9d72965996f5bb5479012f854d2b30692 Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 17 Oct 2012 20:00:52 +0200 Subject: Revert "aac: fail adts parser if encountered many failed frames in a row" This reverts commit 1ab32a2802e79ae39226f25fe81150fe80858757. --- plugins/aac/aac.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'plugins') diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 1083f94f..ca0f391e 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -142,9 +142,6 @@ parse_aac_stream(DB_FILE *fp, int *psamplerate, int *pchannels, float *pduration int frame = 0; int scanframes = 1000; - - int nfail = 0; - if (fp->vfs->is_streaming ()) { scanframes = 1; } @@ -163,11 +160,6 @@ parse_aac_stream(DB_FILE *fp, int *psamplerate, int *pchannels, float *pduration memmove (buf, buf+1, sizeof (buf)-1); bufsize--; // trace ("aac_sync fail, framepos: %d\n", framepos); - nfail++; - if (nfail > 100) { - trace ("aac: many failed sync attemps, aborted\n"); - return -1; - } if (deadbeef->ftell (fp) - initfpos > 2000) { // how many is enough to make sure? break; } @@ -176,7 +168,6 @@ parse_aac_stream(DB_FILE *fp, int *psamplerate, int *pchannels, float *pduration } else { // trace ("aac: frame #%d sync: %dch %d %d %d %d\n", frame, channels, samplerate, bitrate, samples, size); - nfail = 0; frame++; nsamples += samples; if (!stream_sr) { -- cgit v1.2.3 From 650d0407cdf1b4a93ac1521c38ec6e035878b268 Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 17 Oct 2012 20:06:40 +0200 Subject: 0.5.6-rc3: fixed artwork libpng and libjpeg static linkage --- PORTABLE_VERSION | 2 +- configure.ac | 6 +++++- plugins/artwork/Makefile.am | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/PORTABLE_VERSION b/PORTABLE_VERSION index 8b80fc2e..1ccaca80 100644 --- a/PORTABLE_VERSION +++ b/PORTABLE_VERSION @@ -1 +1 @@ -0.5.6-rc2 +0.5.6-rc3 diff --git a/configure.ac b/configure.ac index 884b0171..30c811c7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([deadbeef], [devel]) +AC_INIT([deadbeef], [0.5.6-rc3]) AC_CONFIG_HEADER(config.h) @@ -450,9 +450,13 @@ if test "x$enable_artwork" != "xno" ; then if test "x$enable_staticlink" != "xno" ; then HAVE_JPEG=yes JPEG_DEPS_LIBS="../../$LIB/lib/libjpeg.a" + JPEG_DEPS_CFLAGS="-I../../$LIB/include" + AC_SUBST(JPEG_DEPS_CFLAGS) AC_SUBST(JPEG_DEPS_LIBS) HAVE_PNG=yes + PNG_DEPS_CFLAGS="-I../../$LIB/include/libpng15" PNG_DEPS_LIBS="../../$LIB/lib/libpng.a ../../$LIB/lib/libz.a" + AC_SUBST(PNG_DEPS_CFLAGS) AC_SUBST(PNG_DEPS_LIBS) HAVE_IMLIB2=no else diff --git a/plugins/artwork/Makefile.am b/plugins/artwork/Makefile.am index 74155a1c..dc46f7d9 100644 --- a/plugins/artwork/Makefile.am +++ b/plugins/artwork/Makefile.am @@ -10,6 +10,7 @@ ARTWORK_DEPS=$(IMLIB2_DEPS_LIBS) ARTWORK_CFLAGS=-DUSE_IMLIB2 else ARTWORK_DEPS=$(JPEG_DEPS_LIBS) $(PNG_DEPS_LIBS) +ARTWORK_CFLAGS=$(JPEG_DEPS_CFLAGS) $(PNG_DEPS_CFLAGS) endif if HAVE_FLAC -- cgit v1.2.3 From cf99fd6ea3cd728fa643e7d34e6edbf026f0feb5 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 18 Oct 2012 22:27:37 +0200 Subject: wavpack: don't use channelmask from file, because of broken pcm format conversion --- plugins/wavpack/wavpack.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/wavpack/wavpack.c b/plugins/wavpack/wavpack.c index 7e81f5e9..c28478c9 100644 --- a/plugins/wavpack/wavpack.c +++ b/plugins/wavpack/wavpack.c @@ -162,7 +162,15 @@ wv_init (DB_fileinfo_t *_info, DB_playItem_t *it) { _info->fmt.channels = WavpackGetNumChannels (info->ctx); _info->fmt.samplerate = WavpackGetSampleRate (info->ctx); _info->fmt.is_float = (WavpackGetMode (info->ctx) & MODE_FLOAT) ? 1 : 0; - _info->fmt.channelmask = WavpackGetChannelMask (info->ctx); + + // FIXME: streamer and maybe output plugins need to be fixed to support + // arbitrary channelmask + + // _info->fmt.channelmask = WavpackGetChannelMask (info->ctx); + + for (int i = 0; i < _info->fmt.channels; i++) { + _info->fmt.channelmask |= 1 << i; + } _info->readpos = 0; if (it->endsample > 0) { info->startsample = it->startsample; -- cgit v1.2.3