Hello Everybody,
This is a question related to 1394 isochronous transfer in Windows.
I am just wondering how to use the 1394_SCATTER_GATHER_HEADER
to send variable size payload during isoch transmission.
we have our own structure defined as
typedef struct mystruct
{
USHORT HeaderLength;
USHORT DataLength;
UCHAR Header[8];
}
We are adopting the following procedure ----
Step 1# ALLOCATE ISOCH RESOURCES :
fulSpeed = SPEED_FLAGS_400
fulFlags = RESOURCE_USED_IN_TALKING |
RESOURCE_VARIABLE_ISOCH_PAYLOAD
nBytesPerFrame = 16; (8 bytes header + 8 bytes data)
numberofbuffers = 3 (1header + 1data + 1extra)
nMaxBufferSize = sizeof (mystruct);
RESULT = STATUS_SUCCESS (a valid resource handle is obtained)
2# INIT HEADER DESCRIPTOR
initialize mystruct (headerLen = 8, dataLen = 8)
Allocate MDL (size = sizeof(mystruct)) assign it to pHdrMdl
desc->Mdl = pHdrMdl
desc->ulLength = sizeof (mystruct)
desc->nMaxBytesPerFrame = sizeof (mystruct)
desc->ulTag = 1
3# INIT DATA DESCRIPTOR
Allocate MDL (size = 8) assign it to pDataMdl
desc->Mdl = pDataMdl
desc->ulLength = 8
desc->nMaxBytesPerFrame = 8;
4# ATTACH DESCRIPTORS
When we do REQUEST_ISOCH_ATTACH_BUFFERS, we get the return value as STATUS_INSUFFICIENT_RESOURCES.
Why does this result code get returned? What are we doing wrong?
We have another observation:
In the above case, if nMaxBytesPerFrame is not set in DATA DESCRIPTOR
we get the return value as STATUS_INVALID_PARAMETER ???
Where are we going wrong??
Any pointers in this regard will be greatly appreciated.
Regards
Venky