Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

MFCaptureToFile / EnumDevices problem

adamb500
2012-04-29
2012-11-08
  • adamb500
    adamb500
    2012-04-29

    Hi snarfle

    We've spoken about the CaptureToFile sample previously, but I wanted to check
    to see if you or other developers had seen the problem of the EnumDevices call
    only ever returning an array with a single IMFActivate, despite the
    DeviceCount parameter being >1 (and of course there being more than one
    capture device installed).

    Can you shed any light?

    Thanks

    Adam

     
  • snarfle
    snarfle
    2012-04-29

    I was experiencing a similar problem with the .Net 2.0 framework, but it seems
    to be working correctly in v4.0. Can you try a different framework?

     
  • snarfle
    snarfle
    2012-04-29

    Note that you'll likely need to recompile the library as well as your app.

     
  • Igor
    Igor
    2012-06-27

    Replace declaration of MFEnumDeviceSources to ( Add - )
    Current implementation return one element only!

    public static extern int MFEnumDeviceSources(
    IMFAttributes pAttributes,
    out IMFActivate pppSourceActivate,
    out int pcSourceActivate
    );

     
  • pumpa
    pumpa
    2012-11-08

    Hi,
    I have the same issue that I can't to enumerate more than one device.
    What did you mean: "Replace declaration of MFEnumDeviceSources to ( Add - )"??
    Should it be changed in method importing from dll?? I have tried to change the import declaration to
    public static extern int MFEnumDeviceSources(
    IMFAttributes pAttributes,
    out IMFActivate pppSourceActivate,
    out int pcSourceActivate
    );
    but it didn't work in my app.
    Could you explain this more??