Seeking Code That Might Not Exist
I am a master of poorly defined goals. In this project, I am to locate some specific functionality within the Helix Producer’s massive pile of source code. The specific functionality, though, is not well defined. At a meeting last week, I was told to look for code that actually captures video.
So I thought to myself, “how does a program communicate with a device?” The answer is, of course, through device drivers. How do you talk to device drivers? My shaky memory dredges up the word “ioctl”. I grep for “ioctl” in the ProducerSDk code. It appears only once in code dedicated to output filtering. That looked like a dead end.
The Helix Producer SDK Developer’s Guide on page 37 states: “Capture devices are plug-ins that wrap operating-specific capture subsystems,
such as DirectShow or Video4Linux.” This states directly that the ProducerSDK delegates capturing to an underlying system. DirectShow is a Microsoft thing, so I can disregard it. Video4Linux (V4L) is my target.
Somewhere in the ProducerSDK there is code that interacts with V4L - it should be simple enough to find. I downloaded an example of C code that uses V4L (specifically: capture.c). Looking inside, I see lots of calls to “ioctl” to interact with the driver. I see no code in ProducerSDK that looks like this code.
Hmmm, I’m not sure what this means. I wonder if I have the right version of the ProducerSDK.
June 21st, 2007 at 7:30 pm
Wow, that’s nuts.
What about tracking it down from the other direction? On Linux, the hardware capture device is configured in the xml-formatted job file as <VideoDeviceID type="string">/dev/video</VideoDeviceID>
Maybe start tracing that string through the code and see where it gets you?