Structure that defines a buffered media format
See below.
This structure defines a Multimedia library-specific structure that includes the general AODataFormat_t structure, as well as buffer constraints for use when negotiating formats between filters. The Multimedia library uses this structure to negotiate between filters with buffered channels. The negotiation works like this:
- The library queries the output filter for the formats it will output by calling the IterateFormats method of the filter's MediaOutput interface.
- The library then gets the input filter to rate each of the formats using the RateFormat method of the filter's MediaInput interface.
- The library then selects the most highly rated format, and sets the format for both channels by calling the SetFormat() method of the input filter's MediaInput interface and output filter's MediaOutput interface.
This structure has at least the following members:
- AODataFormat_t mf
- The media type, FOURCC, and format.
- int32_t min_buffersize
- The minimum buffer size, in bytes.
- int32_t max_buffersize
- The maximum buffer size, in bytes.
|
The max_buffersize member isn't used by any QNX-provided filters.
|
- int32_t align_width
- For video formats, the number of pixels to align the width with. Can be 2, 4, or 8 pixels.
- int32_t align_height
- For video formats, the number of pixels to align the height with. Can be 2, 4, or 8 pixels.
- int32_t align_start
- The number of bytes to align the start address on, if special alignment is required.
- int32_t align_stride
- The number of bytes to align the stride with, if stride alignment is required.
- int32_t scatter_gather
- Indicates whether scatter/gather DMA can be used, where 0 is no and 1 is yes.
- int32_t min_buffers
- The minimum number of buffers to use.
- int32_t max_buffers
- The maximum number of buffers to use.
|
The max_buffers member isn't used by any QNX-provided filters.
|
- int32_t matchflags
- Flags used for format negotiation. These flags indicate how the filter prefers to allocate memory. The flags are:
- MM_ALLOCATE_VIDEO -- prefers to allocate buffers in video memory.
- MM_ALLOCATE_SHARED -- prefers to allocate buffers in shared memory.
- MM_ALLOCATE_RAM -- prefers to allocate buffers in RAM.
- int32_t exclflags
- Flags used for format negotiation. These flags indicate whether the filter requires buffers to be allocated, and who should allocate them. If neither filter allocates buffers, the Multimedia library uses the default MediaBufferAllocator. If either filter sets these flags, it must also implement its own MediaBufferAllocator interface. The flags are:
- MM_ALLOCATE_FILTER -- set this flag if the filter requires buffers to be allocated. Then OR in one of the other flags.
- MM_ALLOCATE_INPUT -- the input filter must allocate the buffers.
- MM_ALLOCATE_OUTPUT -- the output filter must allocate the buffers.
Neutrino
The Extending the Multimedia Framework
chapter.