Beispiel #1
0
/*
 * cmyth_livetv_get_block(cmyth_recorder_t rec, char *buf, unsigned long len)
 * Scope: PUBLIC
 * Description
 * Read incoming file data off the network into a buffer of length len.
 *
 * Return Value:
 * Sucess: number of bytes read into buf
 * Failure: -1
 */
int
cmyth_livetv_get_block(cmyth_recorder_t rec, char *buf, unsigned long len)
{
	int rtrn;

	if(rec->rec_conn->conn_version >= 26)
		rtrn = cmyth_livetv_chain_get_block(rec, buf, len);
	else
		rtrn = cmyth_ringbuf_get_block(rec, buf, len);

	return rtrn;
}
Beispiel #2
0
/*
 * cmyth_livetv_get_block(cmyth_recorder_t rec, char *buf, unsigned long len)
 * Scope: PUBLIC
 * Description
 * Read incoming file data off the network into a buffer of length len.
 *
 * Return Value:
 * Sucess: number of bytes read into buf
 * Failure: -1
 */
int
cmyth_livetv_get_block(cmyth_recorder_t rec, char *buf, unsigned long len)
{
    int rtrn;

    if (!rec->rec_connected) {
        return -1;
    }

    if (rec->rec_conn->conn_version >= 26) {
        rtrn = cmyth_livetv_chain_get_block(rec, buf, len);
    } else {
        rtrn = cmyth_ringbuf_get_block(rec, buf, len);
    }

    return rtrn;
}