Share via


IOCTL_STREAM_SET_MEDIA_SIZE

This IOCTL sets the packet and frame sizes for a given medium type.

Parameters

  • hDevice
    [in] Handle to the target object. To get a device handle, call the CreateFile function with a name dynamically obtained from the SetupDiEnumDeviceInterfaces function.
  • dwIoControlCode
    [in] IOCTL for the operation. This value identifies the target operation and the type of device on which to perform the operation. For this operation, use IOCTL_STREAM_SET_MEDIA_SIZE.
  • lpInBuffer
    [in] Must be filled in with a properly initialized STREAM_SetMediaSize_Request structure. The ssms_MediaType and ssms_FrameSize members must be pre-initialized.
  • BufferSize
    [in] Set to sizeof(STREAM_SetMediaSize_Request).
  • lpOutBuffer
    [in] This field is unused and should be set to NULL.
  • nOutBufferSize
    [in] This field should be set to zero.
  • lpBytesReturned
    [out] Pointer to a DWORD variable that receives the actual count of bytes returned by the function in the output buffer.
  • lpOverlapped
    [out] If not used, set to NULL. Otherwise, this should point to a completely filled out OVERLAPPED structure that contains a valid event. The event will be signaled when the I/O operation is complete.

Return Values

If the operation succeeds, the DeviceIoControl function returns a non-zero value. If the operation fails, DeviceIoControl returns zero. To obtain extended error information, call GetLastError.

Remarks

The frame size to set should be an even multiple of the packet size. The packet size for the given media type can be obtained by using the IOCTL_STREAM_GET_MEDIA_SIZE IOCTL.

The core use for this function is for instructing the streaming filter driver to utilize a value other than its default for the size of buffers to be queued to it using the IOCTL_STREAM_ATTACH_BUFFER IOCTL. For some media types, this is inadvisable. Digital video (DV), for instance, equates a logical frame with a video frame, and therefore cannot function with varied frame sizes. For other types, such as MPEG, the logical frame, the frame discussed here, merely represents a collection of data and can be resized at will.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Avc_stream.h.

See Also

IOCTL_STREAM_GET_MEDIA_SIZE | IOCTL_STREAM_ATTACH_BUFFER | CreateFile | STREAM_SetMediaSize_Request | DeviceIoControl

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.