Exemplo n.º 1
0
/*
 * cmyth_livetv_request_block(cmyth_recorder_t file, unsigned long len)
 * 
 * Scope: PUBLIC
 *
 * Description
 *
 * Request a file data block of a certain size, and return when the
 * block has been transfered. This function will select the appropriate
 * call to use based on the protocol.
 *
 * Return Value:
 *
 * Sucess: number of bytes transfered
 *
 * Failure: an int containing -errno
 */
int
cmyth_livetv_request_block(cmyth_recorder_t rec, unsigned long size)
{
	unsigned long rtrn;

	if(rec->rec_conn->conn_version >= 26)
		rtrn = cmyth_livetv_chain_request_block(rec, size);
	else
		rtrn = cmyth_ringbuf_request_block(rec, size);

	return rtrn;
}
Exemplo n.º 2
0
/*
 * cmyth_livetv_request_block(cmyth_recorder_t file, unsigned long len)
 *
 * Scope: PUBLIC
 *
 * Description
 *
 * Request a file data block of a certain size, and return when the
 * block has been transfered. This function will select the appropriate
 * call to use based on the protocol.
 *
 * Return Value:
 *
 * Sucess: number of bytes transfered
 *
 * Failure: an int containing -errno
 */
int
cmyth_livetv_request_block(cmyth_recorder_t rec, unsigned long size)
{
    unsigned long rtrn;

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

    if (rec->rec_conn->conn_version >= 26) {
        rtrn = cmyth_livetv_chain_request_block(rec, size);
    } else {
        rtrn = cmyth_ringbuf_request_block(rec, size);
    }

    return rtrn;
}