From fe78eb6e6171c45cd3500bfd8cd35ded4f548c1d Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sun, 31 Jan 2010 22:30:29 +0100 Subject: 0.3.3-rc1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 66a45301..e3d1eafa 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_INIT AC_CONFIG_HEADER(config.h) PACKAGE="deadbeef" -VERSION="0.3.2" +VERSION="0.3.3-rc1" AM_INIT_AUTOMAKE($PACKAGE,$VERSION) -- cgit v1.2.3 From 1cc65f741a53ad608a9a150d4076a883002f0738 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 1 Feb 2010 20:39:54 +0100 Subject: moved libnotify support into gtkui using --enable-libnotify --- Makefile.am | 2 +- configure.ac | 18 ++++++++++- plugins/gtkui/Makefile.am | 4 +-- plugins/gtkui/gtkui.c | 51 +++++++++++++++++++++++++++++- plugins/notification/Makefile.am | 5 --- plugins/notification/notification.c | 63 ------------------------------------- 6 files changed, 70 insertions(+), 73 deletions(-) delete mode 100644 plugins/notification/Makefile.am delete mode 100644 plugins/notification/notification.c (limited to 'configure.ac') diff --git a/Makefile.am b/Makefile.am index 1276047a..26e75e20 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,6 @@ SUBDIRS = gme/Game_Music_Emu-0.5.2\ plugins/nullout\ plugins/vtx\ plugins/adplug\ - plugins/notification\ ${ALSA_DIR}\ ${LFM_DIR}\ ${MPGMAD_DIR}\ @@ -22,6 +21,7 @@ SUBDIRS = gme/Game_Music_Emu-0.5.2\ ${GTKUI_DIR}\ ${FFMPEG_DIR}\ ${OSS_DIR} +# ${NOTIFY_DIR} dumbpath=@top_srcdir@/dumb sidpath=@top_srcdir@/sid/sidplay-libs-2.1.0 diff --git a/configure.ac b/configure.ac index e3d1eafa..8dac0985 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,13 @@ PKG_CHECK_MODULES(DEPS, samplerate) PKG_CHECK_MODULES(GTKUI_DEPS, gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0, HAVE_GTK=1, NO_GTK=1) PKG_CHECK_MODULES(ALSA_DEPS, alsa, HAVE_ALSA=1, NO_ALSA=1) PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec >= 51.0.0 libavutil libavformat >= 52.0.0, HAVE_FFMPEG=1, NO_FFMPEG=1) + +AC_ARG_ENABLE(libnotify, [ --enable-libnotify Enable support for OSD notifications], [libnotify=yes]) + +if test "x${libnotify}" = "xyes" ; then +PKG_CHECK_MODULES(NOTIFY_DEPS, libnotify >= 0.4.4, HAVE_NOTIFY=1, NO_NOTIFY=1) +fi + AC_CHECK_LIB([pthread], [main]) AC_CHECK_LIB([dl], [main]) AC_CHECK_LIB([iconv], [main], [have_iconv=yes], [have_iconv=no]) @@ -182,6 +189,15 @@ if test ${HAVE_FFMPEG}; then AC_SUBST(FFMPEG_DIR) fi +AM_CONDITIONAL(HAVE_NOTIFY, test $HAVE_NOTIFY) +if test ${HAVE_NOTIFY}; then + AC_DEFINE(HAVE_NOTIFY,1,[Use libnotify]) + NOTIFY_DIR="plugins/notification" + AC_SUBST(NOTIFY_DEPS_CFLAGS) + AC_SUBST(NOTIFY_DEPS_LIBS) + AC_SUBST(NOTIFY_DIR) +fi + dnl *** OSS output (partly stolen from audacious) have_oss=no @@ -262,8 +278,8 @@ PRINT_PLUGIN_INFO([vfs_curl],[http/ftp streaming support],[test $HAVE_CURL]) dnl PRINT_PLUGIN_INFO([faad2],[aac/mp4 player],[test $HAVE_FAAD && test $HAVE_MP4FF]) PRINT_PLUGIN_INFO([cdda],[cd audio player],[test $HAVE_CDIO && test $HAVE_CDDB]) PRINT_PLUGIN_INFO([gtkui],[GTK user interface],[test $HAVE_GTK]) +PRINT_PLUGIN_INFO([libnotify],[Current track notification],[test $HAVE_NOTIFY]) PRINT_PLUGIN_INFO([ffmpeg],[ffmpeg codecs],[test $HAVE_FFMPEG]) -PRINT_PLUGIN_INFO([notification],[Current track notification],[true]) PRINT_PLUGIN_INFO([oss],[oss output plugin],[test "x$have_oss" = "xyes"]) echo diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index aaf9c56a..146e76db 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -13,6 +13,6 @@ gtkui_la_SOURCES = gtkui.c gtkui.h\ gtkui_la_LDFLAGS = -module -gtkui_la_LIBADD = $(LDADD) $(GTKUI_DEPS_LIBS) -AM_CFLAGS = -std=c99 $(GTKUI_DEPS_CFLAGS) +gtkui_la_LIBADD = $(LDADD) $(GTKUI_DEPS_LIBS) $(NOTIFY_DEPS_LIBS) +AM_CFLAGS = -std=c99 $(GTKUI_DEPS_CFLAGS) $(NOTIFY_DEPS_CFLAGS) endif diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index c4aacb95..279d281f 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -18,6 +18,12 @@ */ #include "../../deadbeef.h" #include +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif +#if HAVE_NOTIFY +#include +#endif #include #include #include @@ -52,6 +58,11 @@ static int sb_context_id = -1; static char sb_text[512]; static float last_songpos = -1; +#if HAVE_NOTIFY +#define NOTIFY_DEFAULT_FORMAT "%a - %t" +static NotifyNotification* notification; +#endif + static gboolean update_songinfo (gpointer ctx) { char sbtext_new[512] = "-"; @@ -250,6 +261,27 @@ gtkui_on_activate (DB_event_t *ev, uintptr_t data) { static int gtkui_on_songchanged (DB_event_trackchange_t *ev, uintptr_t data) { gtkpl_songchanged_wrapper (ev->from, ev->to); +#if HAVE_NOTIFY + if (deadbeef->conf_get_int ("libnotify.enable", 0)) { + DB_playItem_t *track = deadbeef->pl_get_for_idx (ev->to); + if (track) { + char cmd [1024]; + deadbeef->pl_format_title (track, -1, cmd, sizeof (cmd), -1, deadbeef->conf_get_str ("libnotify.format", NOTIFY_DEFAULT_FORMAT)); + if (notify_is_initted ()) { + if (notification) { + notify_notification_close (notification, NULL); + } + else { + notification = notify_notification_new ("DeaDBeeF", cmd, NULL, NULL); + } + if (notification) { + notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT); + notify_notification_show (notification, NULL); + } + } + } + } +#endif return 0; } @@ -365,6 +397,10 @@ gtkui_thread (void *ctx) { gdk_threads_init (); gdk_threads_enter (); gtk_set_locale (); +#if HAVE_NOTIFY + notify_init ("DeaDBeeF"); +#endif + int argc = 1; const char **argv = alloca (sizeof (char *)); argv[0] = "deadbeef"; @@ -439,6 +475,9 @@ gtkui_thread (void *ctx) { gtk_widget_show (mainwin); gtk_main (); +#if HAVE_NOTIFY + notify_uninit (); +#endif gdk_threads_leave (); } @@ -495,6 +534,13 @@ gtkui_load (DB_functions_t *api) { return DB_PLUGIN (&plugin); } +#if HAVE_NOTIFY +static const char settings_dlg[] = + "property \"Enable OSD notifications\" checkbox libnotify.enable 0;\n" + "property \"Notification format\" entry libnotify.format \"" NOTIFY_DEFAULT_FORMAT "\";\n" +; +#endif + // define plugin interface static DB_gui_t plugin = { DB_PLUGIN_SET_API_VERSION @@ -508,5 +554,8 @@ static DB_gui_t plugin = { .plugin.email = "waker@users.sourceforge.net", .plugin.website = "http://deadbeef.sf.net", .plugin.start = gtkui_start, - .plugin.stop = gtkui_stop + .plugin.stop = gtkui_stop, +#if HAVE_NOTIFY + .plugin.configdialog = settings_dlg, +#endif }; diff --git a/plugins/notification/Makefile.am b/plugins/notification/Makefile.am deleted file mode 100644 index 5a9f7f65..00000000 --- a/plugins/notification/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -notificationdir = $(libdir)/$(PACKAGE) -pkglib_LTLIBRARIES = notification.la -notification_la_SOURCES = notification.c -notification_la_LDFLAGS = -module -AM_CFLAGS = -std=c99 diff --git a/plugins/notification/notification.c b/plugins/notification/notification.c deleted file mode 100644 index dc5b669f..00000000 --- a/plugins/notification/notification.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "../../deadbeef.h" - -#include -#include - -static DB_misc_t plugin; -static DB_functions_t *deadbeef; - -#define DEFAULT_COMMAND "notify-send '%t' '%a - %b'" - -static const char settings_dlg[] = - "property Command entry notification.command \"" DEFAULT_COMMAND "\";\n" -; - -static void -show_notification (DB_playItem_t *track) -{ - char cmd [1024]; - deadbeef->pl_format_title (track, -1, cmd, sizeof (cmd), -1, deadbeef->conf_get_str ("notification.command", DEFAULT_COMMAND)); - //system (cmd); -} - -static int -songchanged (DB_event_trackchange_t *ev, uintptr_t data) { - DB_playItem_t *track = deadbeef->pl_get_for_idx (ev->to); - if (track) { - show_notification (track); - } - return 0; -} - -static int -notification_stop (void) { - deadbeef->ev_unsubscribe (DB_PLUGIN (&plugin), DB_EV_SONGCHANGED, DB_CALLBACK (songchanged), 0); - return 0; -} - -static int -notification_start (void) { - deadbeef->ev_subscribe (DB_PLUGIN (&plugin), DB_EV_SONGCHANGED, DB_CALLBACK (songchanged), 0); - return 0; -} - -DB_plugin_t * -notification_load (DB_functions_t *api) { - deadbeef = api; - return DB_PLUGIN (&plugin); -} - -// define plugin interface -static DB_misc_t plugin = { - DB_PLUGIN_SET_API_VERSION - .plugin.type = DB_PLUGIN_MISC, - .plugin.name = "Current track notification", - .plugin.descr = "Displays notification when current track is changed", - .plugin.author = "Viktor Semykin", - .plugin.email = "thesame.ml@gmail.com", - .plugin.website = "http://deadbeef.sf.net", - .plugin.start = notification_start, - .plugin.stop = notification_stop, - .plugin.configdialog = settings_dlg -}; - -- cgit v1.2.3 From 98661e886b4ae01cba0ae7a0c4a842682404c12b Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 1 Feb 2010 21:04:28 +0100 Subject: version=0.3.3-pre --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8dac0985..d9337fbb 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_INIT AC_CONFIG_HEADER(config.h) PACKAGE="deadbeef" -VERSION="0.3.3-rc1" +VERSION="0.3.3-pre" AM_INIT_AUTOMAKE($PACKAGE,$VERSION) -- cgit v1.2.3 From 674f33345ca886546cb0a57ed338eb13cb2c82b0 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 2 Feb 2010 20:07:24 +0100 Subject: fixed libnotify support --- configure.ac | 3 --- plugins/gtkui/gtkplaylist.c | 32 +++++++++++++++++++++++++++++++- plugins/gtkui/gtkui.c | 26 -------------------------- plugins/gtkui/gtkui.h | 4 ++++ 4 files changed, 35 insertions(+), 30 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d9337fbb..4e2bd679 100644 --- a/configure.ac +++ b/configure.ac @@ -192,10 +192,8 @@ fi AM_CONDITIONAL(HAVE_NOTIFY, test $HAVE_NOTIFY) if test ${HAVE_NOTIFY}; then AC_DEFINE(HAVE_NOTIFY,1,[Use libnotify]) - NOTIFY_DIR="plugins/notification" AC_SUBST(NOTIFY_DEPS_CFLAGS) AC_SUBST(NOTIFY_DEPS_LIBS) - AC_SUBST(NOTIFY_DIR) fi dnl *** OSS output (partly stolen from audacious) @@ -307,7 +305,6 @@ plugins/nullout/Makefile plugins/vtx/Makefile plugins/adplug/Makefile plugins/ffmpeg/Makefile -plugins/notification/Makefile plugins/oss/Makefile deadbeef.desktop ]) diff --git a/plugins/gtkui/gtkplaylist.c b/plugins/gtkui/gtkplaylist.c index 7b0912b9..0a160b97 100644 --- a/plugins/gtkui/gtkplaylist.c +++ b/plugins/gtkui/gtkplaylist.c @@ -16,7 +16,10 @@ along with this program. If not, see . */ #ifdef HAVE_CONFIG_H -# include +# include "../../config.h" +#endif +#if HAVE_NOTIFY +#include #endif #include @@ -40,6 +43,7 @@ #include "../../session.h" #include "../../deadbeef.h" #include "parser.h" +#include "gtkui.h" #define min(x,y) ((x)<(y)?(x):(y)) #define max(x,y) ((x)>(y)?(x):(y)) @@ -1832,12 +1836,38 @@ struct fromto_t { int to; }; +#if HAVE_NOTIFY +static NotifyNotification* notification; +#endif + static gboolean update_win_title_idle (gpointer data) { struct fromto_t *ft = (struct fromto_t *)data; int from = ft->from; int to = ft->to; free (ft); + + // show notification +#if HAVE_NOTIFY + if (to != -1 && deadbeef->conf_get_int ("libnotify.enable", 0)) { + DB_playItem_t *track = deadbeef->pl_get_for_idx (to); + if (track) { + char cmd [1024]; + deadbeef->pl_format_title (track, -1, cmd, sizeof (cmd), -1, deadbeef->conf_get_str ("libnotify.format", NOTIFY_DEFAULT_FORMAT)); + if (notify_is_initted ()) { + if (notification) { + notify_notification_close (notification, NULL); + } + notification = notify_notification_new ("DeaDBeeF", cmd, NULL, NULL); + if (notification) { + notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT); + notify_notification_show (notification, NULL); + } + } + } + } +#endif + // update window title if (from >= 0 || to >= 0) { if (to >= 0) { diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 279d281f..6b810541 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -58,11 +58,6 @@ static int sb_context_id = -1; static char sb_text[512]; static float last_songpos = -1; -#if HAVE_NOTIFY -#define NOTIFY_DEFAULT_FORMAT "%a - %t" -static NotifyNotification* notification; -#endif - static gboolean update_songinfo (gpointer ctx) { char sbtext_new[512] = "-"; @@ -261,27 +256,6 @@ gtkui_on_activate (DB_event_t *ev, uintptr_t data) { static int gtkui_on_songchanged (DB_event_trackchange_t *ev, uintptr_t data) { gtkpl_songchanged_wrapper (ev->from, ev->to); -#if HAVE_NOTIFY - if (deadbeef->conf_get_int ("libnotify.enable", 0)) { - DB_playItem_t *track = deadbeef->pl_get_for_idx (ev->to); - if (track) { - char cmd [1024]; - deadbeef->pl_format_title (track, -1, cmd, sizeof (cmd), -1, deadbeef->conf_get_str ("libnotify.format", NOTIFY_DEFAULT_FORMAT)); - if (notify_is_initted ()) { - if (notification) { - notify_notification_close (notification, NULL); - } - else { - notification = notify_notification_new ("DeaDBeeF", cmd, NULL, NULL); - } - if (notification) { - notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT); - notify_notification_show (notification, NULL); - } - } - } - } -#endif return 0; } diff --git a/plugins/gtkui/gtkui.h b/plugins/gtkui/gtkui.h index fd8e1166..2031b502 100644 --- a/plugins/gtkui/gtkui.h +++ b/plugins/gtkui/gtkui.h @@ -19,6 +19,10 @@ #ifndef __GTKUI_H #define __GTKUI_H +#if HAVE_NOTIFY +#define NOTIFY_DEFAULT_FORMAT "%a - %t" +#endif + extern DB_functions_t *deadbeef; struct _GSList; -- cgit v1.2.3 From f5399c2357d65fab38e42a526f9f49af4d326dea Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 4 Feb 2010 20:51:32 +0100 Subject: added X11/Xlib check for global hotkeys plugin --- Makefile.am | 2 +- README | 1 + configure.ac | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/Makefile.am b/Makefile.am index 26e75e20..ff3363b0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,11 +4,11 @@ SUBDIRS = gme/Game_Music_Emu-0.5.2\ dumb\ pixmaps\ icons\ - plugins/hotkeys\ plugins/ffap\ plugins/nullout\ plugins/vtx\ plugins/adplug\ + ${HOTKEYS_DIR}\ ${ALSA_DIR}\ ${LFM_DIR}\ ${MPGMAD_DIR}\ diff --git a/README b/README index ad212de1..b76dd10d 100644 --- a/README +++ b/README @@ -12,6 +12,7 @@ optional/build dependencies libsndfile: for sndfile plugin libcdio + libcddb: for cd audio plugin ffmpeg: for ffmpeg plugin + xlib: for global hotkeys if you want to build from git - install autotools, and run autoreconf diff --git a/configure.ac b/configure.ac index 4e2bd679..874fb020 100644 --- a/configure.ac +++ b/configure.ac @@ -196,6 +196,12 @@ if test ${HAVE_NOTIFY}; then AC_SUBST(NOTIFY_DEPS_LIBS) fi +AC_CHECK_HEADER([X11/Xlib.h], HAVE_XLIB_H=yes) +if test "x$HAVE_XLIB_H" = "xyes"; then + HOTKEYS_DIR="plugins/hotkeys" + AC_SUBST(HOTKEYS_DIR) +fi + dnl *** OSS output (partly stolen from audacious) have_oss=no @@ -276,6 +282,7 @@ PRINT_PLUGIN_INFO([vfs_curl],[http/ftp streaming support],[test $HAVE_CURL]) dnl PRINT_PLUGIN_INFO([faad2],[aac/mp4 player],[test $HAVE_FAAD && test $HAVE_MP4FF]) PRINT_PLUGIN_INFO([cdda],[cd audio player],[test $HAVE_CDIO && test $HAVE_CDDB]) PRINT_PLUGIN_INFO([gtkui],[GTK user interface],[test $HAVE_GTK]) +PRINT_PLUGIN_INFO([hotkeys],[Global hotkeys support],[test "x$HAVE_XLIB_H" = "xyes"]) PRINT_PLUGIN_INFO([libnotify],[Current track notification],[test $HAVE_NOTIFY]) PRINT_PLUGIN_INFO([ffmpeg],[ffmpeg codecs],[test $HAVE_FFMPEG]) PRINT_PLUGIN_INFO([oss],[oss output plugin],[test "x$have_oss" = "xyes"]) -- cgit v1.2.3 From 3e3ffecf639d9df61c164cba4ca499f0c9bb49c6 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 4 Feb 2010 21:30:53 +0100 Subject: added check for iconv.h --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 874fb020..c554aa5c 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,9 @@ fi AC_CHECK_LIB([pthread], [main]) AC_CHECK_LIB([dl], [main]) + +AC_CHECK_HEADER([iconv.h],[],[iconv.h not found.]) + AC_CHECK_LIB([iconv], [main], [have_iconv=yes], [have_iconv=no]) if test "x${have_iconv}" = "xyes" ; then ICONV_LIB="-liconv" -- cgit v1.2.3 From 8017942e7b136b688b50291bf3ac134e07c3f67e Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sun, 7 Feb 2010 10:49:59 +0100 Subject: 0.3.3 --- ChangeLog | 20 ++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/ChangeLog b/ChangeLog index 95207794..fdd41ad5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +version 0.3.3 + fixed "unknown response" in command line + fixed winkey in global hotkeys plugin + fixed crash in id3v1 parser + fixed crash in mp3 plugin + fixed few bugs/problems in ALSA plugin (now works on wider range of soundcards) + fixed playback of multichannel FLAC files + fixed 24 bit wavpack playback + fixed duration calculation and seeking bugs in mp3 plugin + added support for older versions of ffmpeg + added OSS(3,4) support + experimental FreeBSD support + experimental OpenSolaris support + improved GUI dialogs + added new "File Number" column type + added new "File Name" custom column conversion + added option to disable nowplaying notifications in lastfm plugin + added support for icy metadata (title in shoutcast streams) + added experimental (optional) support for notifications using libnotify + version 0.3.2 all GTK+ UI code is now in plugin improved main menu layout in GTK UI diff --git a/configure.ac b/configure.ac index c554aa5c..9de8cf6b 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_INIT AC_CONFIG_HEADER(config.h) PACKAGE="deadbeef" -VERSION="0.3.3-pre" +VERSION="0.3.3" AM_INIT_AUTOMAKE($PACKAGE,$VERSION) -- cgit v1.2.3