Thanks for the response. Currently, we have ruled out DMA for some
testing on our device.
So, we are left with two options.
- Use PC DMA
- Use allocator method.
PC DMA can’t be used as it is meant for ISA/EISA devices. Thus, this is
the only option we are left with.
We did some work on getting it to work. Is there any FLAG or combination
of FLAGS we need to inform the graph builder in order to enable our own
allocator?
I think following are the available flag values in KSALLOCATOR_FRAMING
structure.
Requirement Flags
- KSALLOCATOR_REQUIREMENTF_INPLACE_MODIFIER
- KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY
- KSALLOCATOR_REQUIREMENTF_FRAME_INTEGRITY
- KSALLOCATOR_REQUIREMENTF_MUST_ALLOCATE
- KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY
Option Flags
- KSALLOCATOR_OPTIONF_COMPATIBLE
- KSALLOCATOR_OPTIONF_SYSTEM_MEMORY
We don’t see even our “AVStrMiniInitializeAllocator” function callback
getting called.
Thanks & Regards
Abhishek Joshi
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, January 08, 2008 1:38 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] AVStream Driver Allocator
Abhishek Joshi wrote:
Hi All,
We are working on an AV stream driver and would like to use our own
allocator to provide input/output data buffers.
We would like to avoid the memcopy to system memory by making the
frames available on the allocator with the memory mapped to user
space.
I see that MSDN says that it is possible to provide your own
allocator. I also know the documentation available online says that
the direct show graph builder might or might NOT accept my allocator.
But I still want to give it a try.
Does anyone have any related information in this area?
Kesava Guptha just asked this question. Are you working on the same
project?
You can’t force another component to accede to your wishes. You can
offer, but there’s no guarantee the graph will accept your offer.
However, the big problem is that you are micro-optimizing. The memcpy
overhead is insignificant. First, get it to work, and THEN see if it is
too slow. If you have a PCI device that does DMA, the avshws sample
shows how to do DMA using the user’s buffers directly, so you don’t need
a copy. If you have a USB device, then just do the memcpy.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer