42 static void xmms_visualization_destroy (
xmms_object_t *
object);
44 #include "visualization/object_ipc.c"
52 for (
id = 0;
id < vis->
clientc; ++id) {
75 if (id < 0 || id >= vis->
clientc) {
88 if (id < 0 || id >= vis->
clientc) {
122 xmms_visualization_register_ipc_commands (
XMMS_OBJECT (vis));
148 g_io_channel_shutdown (vis->
socketio, FALSE, NULL);
152 xmms_visualization_unregister_ipc_commands ();
176 if (!g_strcasecmp (key,
"type")) {
177 if (!g_strcasecmp (data,
"pcm")) {
179 }
else if (!g_strcasecmp (data,
"spectrum")) {
181 }
else if (!g_strcasecmp (data,
"peak")) {
186 }
else if (!g_strcasecmp (key,
"stereo")) {
187 p->
stereo = (atoi (data) > 0);
188 }
else if (!g_strcasecmp (key,
"pcm.hardwire")) {
191 }
else if (!g_strcasecmp (key,
"timeframe")) {
209 id = create_client ();
211 xmms_error_set (err,
XMMS_ERROR_OOM,
"could not allocate dataset");
217 properties_init (&c->
prop);
231 if (!property_set (&c->
prop, key, value)) {
247 const gchar *key, *valstr;
253 xmms_error_set (err,
XMMS_ERROR_INVAL,
"properties must be sent as a dict!");
259 xmms_error_set (err,
XMMS_ERROR_INVAL,
"key-value property pair could not be read!");
261 xmms_error_set (err,
XMMS_ERROR_INVAL,
"property value could not be read!");
262 }
else if (!property_set (&c->
prop, key, valstr)) {
282 if (sscanf (shmidstr,
"%d", &shmid) != 1) {
286 return init_shm (vis,
id, shmid, err);
305 package_write (
xmms_vis_client_t *c, int32_t
id,
struct timeval *time,
int channels,
int size,
short *buf)
330 gettimeofday (&time, NULL);
331 time.tv_sec += (latency / 1000);
332 time.tv_usec += (latency % 1000) * 1000;
333 if (time.tv_usec > 1000000) {
335 time.tv_usec -= 1000000;
339 for (i = 0; i < vis->
clientc; ++i) {
341 package_write (vis->
clientv[i], i, &time, channels, size, buf);