#include <gconf/gconf-client.h>
#include <libosso.h>
#include <dbus/dbus.h>
+#include <fcntl.h>
#define STATE_FILE "/sys/devices/platform/gpio-switch/headphone/state"
#define STATE_CONNECTED_STR "connected"
#define PANUCCI_PATH "/panucciInterface"
#define PANUCCI_INTF "org.panucci.panucciInterface"
+#define MPLAYER_FIFO "/etc/headphoned/mplayer-input"
+
// Volume control is currently broken, as something is messing
// with the controls from outside this process in GConf..
//#define ENABLE_VOLUME_CONTROL
gint volume = headphoned->volume[headphoned->state];
#endif
gchar* result;
+ int mplayer_fifo;
g_io_channel_seek_position(source, 0, G_SEEK_SET, NULL);
g_io_channel_read_line(source, &result, NULL, NULL, NULL);
NULL,
DBUS_TYPE_INVALID);
}
+
+ /* MPlayer */
+ if ((mplayer_fifo = open(MPLAYER_FIFO,
+ O_WRONLY | O_NONBLOCK)) != -1) {
+ write(mplayer_fifo, "pause\n", 6);
+ close(mplayer_fifo);
+ }
}
#endif
}