diff options
| author | 2003-01-15 06:36:19 +0000 | |
|---|---|---|
| committer | 2003-01-15 06:36:19 +0000 | |
| commit | e6e6375ceeef247586113cd8a39ea3e2f2124338 (patch) | |
| tree | 382193f5686ec771dffcf5d80577367be5898bad /src | |
| parent | back out previous commit - don't drop the legacy API just yet (diff) | |
implement tag matching for rawiso reception
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@101 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso.c | 12 | ||||
| -rw-r--r-- | src/kernel-raw1394.h | 2 | ||||
| -rw-r--r-- | src/raw1394.h | 2 |
3 files changed, 12 insertions, 4 deletions
@@ -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; diff --git a/src/kernel-raw1394.h b/src/kernel-raw1394.h index f3b5716..f19afd6 100644 --- a/src/kernel-raw1394.h +++ b/src/kernel-raw1394.h @@ -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* */ diff --git a/src/raw1394.h b/src/raw1394.h index c3e8c04..d0b0794 100644 --- a/src/raw1394.h +++ b/src/raw1394.h @@ -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); |
