implement tag matching for rawiso reception
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@101 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
parent
ce3cc1bd34
commit
e6e6375cee
12
src/iso.c
12
src/iso.c
|
@ -290,15 +290,23 @@ int raw1394_iso_recv_set_channel_mask(raw1394handle_t handle, u_int64_t mask)
|
|||
/**
|
||||
* raw1394_iso_recv_start - begin isochronous reception
|
||||
* @start_on_cycle: isochronous cycle number on which to start (-1 if you don't care)
|
||||
* @tag_mask: mask of tag fields to match (-1 to receive all packets)
|
||||
* @sync: not used, reserved for future implementation
|
||||
**/
|
||||
int raw1394_iso_recv_start(raw1394handle_t handle, int start_on_cycle)
|
||||
int raw1394_iso_recv_start(raw1394handle_t handle, int start_on_cycle, int tag_mask, int sync)
|
||||
{
|
||||
int args[3];
|
||||
|
||||
if(!handle->iso_buffer)
|
||||
return -1;
|
||||
if(!handle->iso_recv_handler)
|
||||
return -1;
|
||||
|
||||
if(ioctl(handle->fd, RAW1394_ISO_RECV_START, start_on_cycle))
|
||||
args[0] = start_on_cycle;
|
||||
args[1] = tag_mask;
|
||||
args[2] = sync;
|
||||
|
||||
if(ioctl(handle->fd, RAW1394_ISO_RECV_START, &args[0]))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -120,7 +120,7 @@ typedef struct arm_request_response {
|
|||
/* ioctls */
|
||||
#define RAW1394_ISO_XMIT_INIT 1 /* arg: raw1394_iso_status* */
|
||||
#define RAW1394_ISO_RECV_INIT 2 /* arg: raw1394_iso_status* */
|
||||
#define RAW1394_ISO_RECV_START 3 /* arg: int, starting cycle */
|
||||
#define RAW1394_ISO_RECV_START 3 /* arg: int[3], { starting cycle, tag, sync } */
|
||||
#define RAW1394_ISO_XMIT_START 8 /* arg: int[2], { starting cycle, prebuffer } */
|
||||
#define RAW1394_ISO_STOP 4
|
||||
#define RAW1394_ISO_GET_STATUS 5 /* arg: raw1394_iso_status* */
|
||||
|
|
|
@ -118,7 +118,7 @@ int raw1394_iso_recv_unlisten_channel(raw1394handle_t handle, unsigned char chan
|
|||
int raw1394_iso_recv_set_channel_mask(raw1394handle_t handle, u_int64_t mask);
|
||||
|
||||
int raw1394_iso_xmit_start(raw1394handle_t handle, int start_on_cycle, int prebuffer_packets);
|
||||
int raw1394_iso_recv_start(raw1394handle_t handle, int start_on_cycle);
|
||||
int raw1394_iso_recv_start(raw1394handle_t handle, int start_on_cycle, int tag_mask, int sync);
|
||||
|
||||
void raw1394_iso_stop(raw1394handle_t handle);
|
||||
void raw1394_iso_shutdown(raw1394handle_t handle);
|
||||
|
|
Reference in New Issue