Question

I'm trying to interact with a webcam from Java on Windows (without going through the FMJ or JMF frameworks) by using COM4j. However, I'm unable to find the typelib identifier for Direct Show in order to build the interfaces. The COM4j site recommends using OleView to find the typelib, but I've gone through the list of typelibs there and have had no luck finding anything that looks like it might provide the DirectShow interfaces.

Was it helpful?

Solution

Loathe as I am to provide a link that might be dead tomorrow, the only help I found was this site which contains a link to a tlb file for the DirectShow interfaces. The COM4j library can interact with this file to generate its interfaces.

Curiously, it didn't create a ClassFactory method for creating the interface I needed, possibly because the ClassFactory naming convention is to name a method 'createXXX' where XXX is the name of the interface, and the interface in question is createDevEnum. However a little manual tweaking to the ClassFactory class fixed this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top