Visualization
[XMMSClient]

This manages the visualization transfer. More...

Data Structures

struct  xmmsc_vischunk_t
 Package format for vis data, encapsulated by unixshm or udp transport. More...
struct  xmmsc_vis_udp_data_t
 UDP package _descriptor_ to deliver a vis chunk. More...
struct  xmmsc_vis_udp_timing_t
 UDP package _descriptor_ to synchronize time. More...
struct  xmmsc_vis_properties_t
 Properties of the delivered vis data. More...
struct  xmmsc_vis_unixshm_t
 data describing a unixshm transport More...
struct  xmmsc_vis_udp_t
 data describing a udp transport More...

Defines

#define XMMSC_VISUALIZATION_WINDOW_SIZE   512
#define XMMS_VISPACKET_VERSION   1
#define XMMS_VISPACKET_SHMCOUNT   500
#define XMMSC_VIS_UNALIGNED_WRITE(dst, src, typ)
#define XMMSC_VIS_UNALIGNED_READ(dst, src, typ)
#define XMMS_VISPACKET_UDP_OFFSET   (1 + sizeof (uint16_t))

Enumerations

enum  xmmsc_vis_data_t { VIS_PCM, VIS_SPECTRUM, VIS_PEAK }
 

Possible data modes.

More...
enum  xmmsc_vis_transport_t { VIS_UNIXSHM, VIS_UDP, VIS_NONE }
 

Possible vis transports.

More...
enum  xmmsc_vis_state_t {
  VIS_NEW, VIS_TRYING_UNIXSHM, VIS_TO_TRY_UDP, VIS_TRYING_UDP,
  VIS_ERRORED, VIS_WORKING
}

Functions

xmmsc_visualization_t * get_dataset (xmmsc_connection_t *c, int vv)
xmmsc_result_txmmsc_visualization_version (xmmsc_connection_t *c)
 Querys the visualization version.
xmmsc_result_txmmsc_visualization_init (xmmsc_connection_t *c)
 Initializes a new visualization dataset.
int xmmsc_visualization_init_handle (xmmsc_result_t *res)
xmmsc_result_txmmsc_visualization_start (xmmsc_connection_t *c, int vv)
 Initializes a new visualization connection.
void xmmsc_visualization_start_handle (xmmsc_connection_t *c, xmmsc_result_t *res)
bool xmmsc_visualization_started (xmmsc_connection_t *c, int vv)
bool xmmsc_visualization_errored (xmmsc_connection_t *c, int vv)
xmmsc_result_txmmsc_visualization_property_set (xmmsc_connection_t *c, int vv, const char *key, const char *value)
 Deliver one property.
xmmsc_result_txmmsc_visualization_properties_set (xmmsc_connection_t *c, int vv, xmmsv_t *props)
 Deliver some properties.
void xmmsc_visualization_shutdown (xmmsc_connection_t *c, int vv)
 Says goodbye and cleans up.
int check_drawtime (double ts, int drawtime)
int xmmsc_visualization_chunk_get (xmmsc_connection_t *c, int vv, short *buffer, int drawtime, unsigned int blocking)
 Fetches the next available data chunk.
double tv2ts (struct timeval *t)
double net2ts (int32_t *s)
void ts2net (int32_t *d, double t)
void tv2net (int32_t *d, struct timeval *t)
char * packet_init_data (xmmsc_vis_udp_data_t *p)
char * packet_init_timing (xmmsc_vis_udp_timing_t *p)

Detailed Description

This manages the visualization transfer.

Common structs for the visualization client and server.


Define Documentation

#define XMMS_VISPACKET_SHMCOUNT   500

Definition at line 54 of file xmmsc_visualization.h.

Referenced by setup_shm_handle(), and setup_shm_prepare().

#define XMMS_VISPACKET_UDP_OFFSET   (1 + sizeof (uint16_t))

Definition at line 91 of file xmmsc_visualization.h.

#define XMMS_VISPACKET_VERSION   1

Definition at line 47 of file xmmsc_visualization.h.

#define XMMSC_VIS_UNALIGNED_READ ( dst,
src,
typ   ) 
Value:
do {    \
    typ *__s = (src);                   \
    memcpy (&(dst), __s, sizeof (typ));         \
  } while (0)

Definition at line 84 of file xmmsc_visualization.h.

Referenced by read_do_udp().

#define XMMSC_VIS_UNALIGNED_WRITE ( dst,
src,
typ   ) 
Value:
do {    \
    typ *__d = (dst);                   \
    typ __s = (src);                    \
    memcpy (__d, &__s, sizeof (typ));           \
  } while (0)

Definition at line 78 of file xmmsc_visualization.h.

#define XMMSC_VISUALIZATION_WINDOW_SIZE   512

Definition at line 27 of file xmmsc_visualization.h.


Enumeration Type Documentation

Possible data modes.

Enumerator:
VIS_PCM 
VIS_SPECTRUM 
VIS_PEAK 

Definition at line 112 of file xmmsc_visualization.h.

Enumerator:
VIS_NEW 
VIS_TRYING_UNIXSHM 
VIS_TO_TRY_UDP 
VIS_TRYING_UDP 
VIS_ERRORED 
VIS_WORKING 

Definition at line 150 of file xmmsc_visualization.h.

Possible vis transports.

Enumerator:
VIS_UNIXSHM 
VIS_UDP 
VIS_NONE 

Definition at line 144 of file xmmsc_visualization.h.


Function Documentation

int check_drawtime ( double  ts,
int  drawtime 
)

Definition at line 308 of file client.c.

Referenced by read_do_shm(), and read_do_udp().

xmmsc_visualization_t* get_dataset ( xmmsc_connection_t c,
int  vv 
)
double net2ts ( int32_t *  s  ) 

Referenced by read_do_shm(), and read_do_udp().

char* packet_init_data ( xmmsc_vis_udp_data_t p  ) 

Referenced by read_do_udp().

char* packet_init_timing ( xmmsc_vis_udp_timing_t p  ) 
void ts2net ( int32_t *  d,
double  t 
)

Referenced by read_do_udp().

void tv2net ( int32_t *  d,
struct timeval *  t 
)
double tv2ts ( struct timeval *  t  ) 

Referenced by check_drawtime(), and read_do_udp().

int xmmsc_visualization_chunk_get ( xmmsc_connection_t c,
int  vv,
short *  buffer,
int  drawtime,
unsigned int  blocking 
)

Fetches the next available data chunk.

Definition at line 339 of file client.c.

bool xmmsc_visualization_errored ( xmmsc_connection_t c,
int  vv 
)

Definition at line 213 of file client.c.

xmmsc_result_t* xmmsc_visualization_init ( xmmsc_connection_t c  ) 

Initializes a new visualization dataset.

Definition at line 65 of file client.c.

int xmmsc_visualization_init_handle ( xmmsc_result_t res  ) 

Definition at line 94 of file client.c.

xmmsc_result_t* xmmsc_visualization_properties_set ( xmmsc_connection_t c,
int  vv,
xmmsv_t *  props 
)

Deliver some properties.

Definition at line 249 of file client.c.

xmmsc_result_t* xmmsc_visualization_property_set ( xmmsc_connection_t c,
int  vv,
const char *  key,
const char *  value 
)

Deliver one property.

Definition at line 229 of file client.c.

void xmmsc_visualization_shutdown ( xmmsc_connection_t c,
int  vv 
)

Says goodbye and cleans up.

Definition at line 271 of file client.c.

xmmsc_result_t* xmmsc_visualization_start ( xmmsc_connection_t c,
int  vv 
)

Initializes a new visualization connection.

Definition at line 119 of file client.c.

void xmmsc_visualization_start_handle ( xmmsc_connection_t c,
xmmsc_result_t res 
)

Definition at line 155 of file client.c.

bool xmmsc_visualization_started ( xmmsc_connection_t c,
int  vv 
)

Definition at line 201 of file client.c.

xmmsc_result_t* xmmsc_visualization_version ( xmmsc_connection_t c  ) 

Querys the visualization version.

Definition at line 53 of file client.c.


Generated on Tue Feb 23 18:17:57 2010 for XmmsClient by  doxygen 1.6.1