XmmsClient
Data Structures | Macros | Enumerations | Functions
Visualization

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...
 

Macros

#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. More...
 
xmmsc_result_txmmsc_visualization_init (xmmsc_connection_t *c)
 Initializes a new visualization dataset. More...
 
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. More...
 
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. More...
 
xmmsc_result_txmmsc_visualization_properties_set (xmmsc_connection_t *c, int vv, xmmsv_t *props)
 Deliver some properties. More...
 
void xmmsc_visualization_shutdown (xmmsc_connection_t *c, int vv)
 Says goodbye and cleans up. More...
 
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. More...
 
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.

Macro Definition Documentation

#define XMMS_VISPACKET_SHMCOUNT   500
#define XMMS_VISPACKET_UDP_OFFSET   (1 + sizeof (uint16_t))
#define XMMS_VISPACKET_VERSION   1
#define XMMSC_VIS_UNALIGNED_READ (   dst,
  src,
  typ 
)
Value:
do { \
typ *__s = (src); \
memcpy (&(dst), __s, sizeof (typ)); \
} while (0)

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)
#define XMMSC_VISUALIZATION_WINDOW_SIZE   512

Enumeration Type Documentation

Possible data modes.

Enumerator
VIS_PCM 
VIS_SPECTRUM 
VIS_PEAK 
Enumerator
VIS_NEW 
VIS_TRYING_UNIXSHM 
VIS_TO_TRY_UDP 
VIS_TRYING_UDP 
VIS_ERRORED 
VIS_WORKING 

Possible vis transports.

Enumerator
VIS_UNIXSHM 
VIS_UDP 
VIS_NONE 

Function Documentation

int check_drawtime ( double  ts,
int  drawtime 
)

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.

bool xmmsc_visualization_errored ( xmmsc_connection_t c,
int  vv 
)
xmmsc_result_t* xmmsc_visualization_init ( xmmsc_connection_t c)

Initializes a new visualization dataset.

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

Deliver some properties.

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

Deliver one property.

void xmmsc_visualization_shutdown ( xmmsc_connection_t c,
int  vv 
)

Says goodbye and cleans up.

xmmsc_result_t* xmmsc_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 
)
xmmsc_result_t* xmmsc_visualization_version ( xmmsc_connection_t c)

Querys the visualization version.