Monday I completed the automatic dialog creation thing. It also handles loading and saving of the status of a class. Basically I decide which fields in a class need to be edited, I give the types and tag names, then, a routine will create a dialog, while another will save or load the fields data in a given file. This is a very basic need to quickly tweak things around.
After that I reviewed my DirectShow capture code. DShow is really messy, possibly the worst part of DirectX. Complexity aside, I had some serious flaws in my handling of the capture. DShow captures in a separate thread (one that takes a lot of CPU time unfortunately 8( ). Testing with my Sony MiniDV camera attached to the Firewire port, it seems that DShow will always try give me 29.97 frames per second. That’s the NTSC standard, but really too many for a videochat/webcamera application. I changed my code to reject the extra frames, but I hope in future to be able to tell to DirectShow ahead what’s the desired framerate.. as it would save a lot of CPU time. Where the flaw really came was in the multi-threaded code, which wasn’t being nice about sharing the captured buffer data. Now it’s all much smoother, and the videochat/webcam application seems to be doing its job well.
Next, I may work a bit more on the videochat portion of it. It’s all still in black&white and the compression sends whole frames every time. The reason why I’m speeding the videochat thing is that recently I introduced my parents to Skype, and as a response, they have been asking for video too. We used to videochat before with my software, but that was without voice.
Posted by Davide Pasca in Uncategorized
