- * period of time between sending data chunks
- */
- struct timeval chunk_tv; /* length of one chunk of data */
- /**
- * end of file timeout - do not load new audio file until this time
- *
- */
- struct timeval eof_tv; /* timeout on eof */
- /**
- * Pointer to the optional get-header function.
- *
- * This is called from a sender in case a new client connects in the middle of
- * the stream. The audio format handler may set this to NULL to indicate that
- * this audio format does not need any special header treatment. If non-NULL,
- * the function it points to must return a pointer to a buffer holding the
- * current audio file header, together with the header length.
- */
- char *(*get_header_info)(int *header_len);
- /**
- * check if this audio format handler can handle the file
- *
- * This is a pointer to a function returning whether a given file is valid for
- * this audio format. A negative return value indicates that this audio format
- * handler did not recognize the given file. On success, the function is
- * expected to return a positive value and to fill in \arg info_str, \arg
- * chunks and \arg seconds appropriately.
- */
- int (*get_file_info)(FILE *audio_file, char *info_str,
- long unsigned *chunks, int *seconds);
- /**
- * cleanup function of this audio format handler
- *
- * This close function should deallocate any resources
- * associated with the current audio file. In particular, it is responsible
- * for closing the file handle. It is assumed to succeed.
- */
- void (*close_audio_file)(void);
- /**
- * function responsible for reading one data chunk.