locked
Asynchronous MFT (Hardware) RRS feed

  • Question

  • Do you have any sample for asynchronous hardware MFT ?

    Thanks

    Umesh

    Tuesday, January 11, 2011 11:57 PM

All replies

  • Unfortunately there are no async MFT samples right now.  A hardware asynchronous MFT is the same as a regular asynchronous MFT up until the point where you go to register it, so you do not really need to worry about that distinction at first.  I can only point you to the async MFT documentation, and if you have any questions about the implementation you can post them on this forum.
    Thursday, January 20, 2011 12:09 AM
  • Hi Matt

    We want to support hardware accelerated video encoding using MF framework. We want to use MSFT's AVStream KS driver for this. My queries are:

    1. Can we use our custom hardware MFT in this case  (i.e. we don't need to use MSFT provided MFT) ? What is interface that hardware MFT should use for transferring iinput/output samples with AVStream driver.

    2. Can ICodecAPI be used in conjunction with MSFT's MFT over AVStream driver ? This is to enable proprietary configurations in AVStream driver.

    3. MFT provides GetInputStreamInfo/GetOutputStreamInfo methods for letting media session know about the size/alignment properties for the buffers. Is there any interface for providing how many input and output buffers are required ? This is to optimize hardware performance by keeping the pipeline filled.

    4. Is there any plugin that can be used in conjunction with MSFT's MFT to intercept input and output buffers in MSFT's MFT so that platform specific modification can be done in the buffers before they are passed to the hardware via MSFT's AVStream driver ?

    Thanks

    Umesh

    Wednesday, January 26, 2011 12:26 AM
  • (1) Microsoft provides an AVStream wrapper MFT that makes it easier to expose an AVStream driver as an MFT, but it is not required that you use it.  You can create your own MFT if you like.  Either way, the MFT will need to pass the hardware MFT certification tests in order to receive a certificate necessary to get merit in the MF pipeline.  Since the AVStream wrapper MFT already has passed the certification tests, it means less work on your part if you can use it.

    (2) Yes, ICodecAPI is the standard for configuration properties for hardware codecs.

    (3) An asynchronous MFT controls the number of buffers it processes through events.  If the MFT can process more input, it queues an METransformNeedInput event.  If the MFT has output available, it queues an METransformHaveOutput event.  These events can be sent at will, so you can request as much input as your pipeline can handle without waiting for other requests to complete.

    (4) The AVStream wrapper MFT does not provide a means to intercept and modify input buffers. 

    • Marked as answer by krisgr8 Wednesday, January 26, 2011 6:05 PM
    • Unmarked as answer by krisgr8 Wednesday, January 26, 2011 6:32 PM
    Wednesday, January 26, 2011 2:13 AM
  • Hi Matt

    Thanks for the quick response.

    1. You mentioned that we can create our own custom MFT to work with AVStream driver. I know that ICodecAPI can be used for configuration. But what API should custom MFT use for sending input media samples to AVStream driver in kernel and getting back output buffers from AVStream driver ?

    i.e. how to map custom MFTs ProcessInput/ProcessOutput calls to AVStream drivers Process function for pin-centric/filter-centric processing ?

    2. How can kernel AVStream driver advertise that it can perform in-place transform to MFT/custom MFT ?

    Thanks

    Umesh

    Wednesday, January 26, 2011 5:54 PM
  • (1) You would use kernel streaming (KS) and DeviceIoControl to interact with the AVStream driver.  You can use the DeviceIoControl operation IOCTL_KS_WRITE_STREAM to write sample data and IOCTL_KS_READ_STREAM to read sample data.  KS setup and sample processing can be quite tricky, which is why it is recommended to use the AVStream wrapper MFT when possible.

    (2) You can use the KSPROPERTY_CONNECTION_ALLOCATORFRAMING property to query for this capability; check for the KSALLOCATOR_REQUIREMENTF_INPLACE_MODIFIER flag in the KSALLOCATOR_FRAMING structure.  The AVStream wrapper MFT will not use in-place transform even if it is available, however.

    Friday, February 4, 2011 1:30 AM