Enumerate Device & Device Inputs

2013-11-09
2013-11-15
  • Sumesh Gopinath

    Sumesh Gopinath - 2013-11-09

    anybody know how can enumerate Device Inputs without connecting device

    DsDevice[] MyVideoDevice = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);
    this list only VideoDevice Names. but i need to know input from VideoDevice

     
  • snarfle

    snarfle - 2013-11-10

    Not sure what you mean by "without connecting device." If you mean the device isn't connected to the computer, then you probably can't do that.

     
  • Sumesh Gopinath

    Sumesh Gopinath - 2013-11-10

    device is already connected to PC. enumerate Inputs (crosbar) details without Intialzing hardware

     
  • Eric

    Eric - 2013-11-12

    You can enumerate devices using the Setup API, but this is the API used by the DS's "System Device Enumerator" (used by the DS.NET's DsDevice) :
    http://www.codeproject.com/Articles/6445/Enumerate-Installed-Devices-Using-Setup-API

    The medium details are stored in the registry but I don't know where. You could try to read the Windows DDK (or WDK or what ever it is called today) to find that (assuming that its documented...). Documentation about KsProxy seam a good start to search... Considering how complicated it is and how random is the potential result, I don't know if it's a good idea to explore that...

    The other possible way is to relay on the IKsPropertySet interface. But to use it, you must allocate a device instance and you sayed you don't want that.

     
  • mm1352000

    mm1352000 - 2013-11-14

    You could look at pin information in the FilterData:
    https://sourceforge.net/p/directshownet/discussion/460697/thread/99b91a5f

    ...but I don't know if it will tell you enough. Is it not possible to initialise the hardware first time it is detected and store the input information in a file, database etc.

     
  • snarfle

    snarfle - 2013-11-14

    And what's the downside to creating an instance of the filter and querying it? I don't believe the device is "in use" until the graph is actually running.

     
    • mm1352000

      mm1352000 - 2013-11-15

      I think instancing additional instances of filters can disrupt. This is a driver dependent behaviour though. In my experience most drivers don't have a problem with it.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks