diff --git a/src/iso.c b/src/iso.c index 76ba13a..0d5aa9f 100644 --- a/src/iso.c +++ b/src/iso.c @@ -316,6 +316,14 @@ static int _raw1394_iso_xmit_queue_packets(raw1394handle_t handle) packets.n_packets++; if(disp == RAW1394_ISO_DEFER) { + /* queue an event so that we don't hang in the next read() */ + if(ioctl(handle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0)) + goto out_produce; + break; + } else if(disp == RAW1394_ISO_AGAIN) { + /* the last packet was not ready, decrement counter */ + packets.n_packets--; + /* queue an event so that we don't hang in the next read() */ if(ioctl(handle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0)) goto out_produce; diff --git a/src/raw1394.h b/src/raw1394.h index 833915f..4f8fa4b 100644 --- a/src/raw1394.h +++ b/src/raw1394.h @@ -106,6 +106,11 @@ enum raw1394_iso_disposition { /* (transmission only) - like ISO_STOP, but don't wait for the buffer to empty */ RAW1394_ISO_STOP_NOSYNC = 4, + + /* (transmission only) - use this if the data you need for the packet was not ready yet + * The packet queueing will retry at a later point + */ + RAW1394_ISO_AGAIN = 5, }; enum raw1394_modify_mode {