Maarten Lankhorst wrote:
I'm having troubles sending a media sample over the graph, I'm wondering wether that is because of the receiving filter or my own fault.
the thing I'm trying to send is a uncompressed 24 bit image, the bitmap info header data of it is pretty much as this:
mediatype: BI_RGB24 Width: 320 Height: 240 Bitcount: 24 Size of the image in bytes: 230400 compression: BI_RGB
so my questions about it are:
- What should I do with the ALLOCATOR_PROPERTIES
props.cbAlign - do you have any alignment requirements? if not, set to 1. props.cbPrefix - do you have any private data you want to include before the sample? if not, set to 0. props.cbBuffer - maximum size of the buffer (recommended is 0x20000 or 64kb) props.cBuffers - how many samples will you be processing at once?
- What do I have to put in IMediaSample SetActualDataLength
The value corresponding to "Size of the image in bytes."
- How can I fill the pointer returned by IMediaSample GetPointer so
that the sample gets accepted?
The media sample contains no format information so it shouldn't be rejected. Just memcpy the bytes.
Rob