DVswitch tally lights

So you do computer stuff for work, and what do you do in the weekend? Right, more computer stuff.

Not that I dislike it, obviously. But, well.

The computer stuff that I did this weekend was situated mainly around dvswitch. During their talk at the Debian devroom at FOSDEM, Ben and Holger mentioned that one of the things they'd still like to see implemented in DVswitch is the ability to do tally lights. Such lights are useful, not only for the benefit of those in front of the camera, but also for the benefit of those behind the camera—allowing them to know when they're free to roam about in order to find something interesting to show, or when they should keep the camera somewhat stead because they're live.

Since I was planning on using dvswitch to record the concert (dutch only) of the choir group that I'm part of, and since a concert has different requirements than does a talk, I set about implementing tally light functionality. For now, the actual tally light is just a laptop screen—which turns red when you're live, or green when you're not—but there's nothing stopping anyone from changing that into, say, a USB-controlled light or some such.

In any case, it works now. It's not entirely pretty (involving two processes working with the same socket) and not entirely finished yet, either (it only works for primary sources, not secondary sources), but it gets the job done.

It did require me to refresh knowledge that I hadn't used in literally 10 years, however. I had some C++ at school, but haven't used it since my final exam on that course, and while the code is still readable, it did require me to refresh my memory at some levels. Oh my...

Anyway, that was yesterday, for the most part. Today, a friend came over with a DV camera (since I don't have any), and we ran some tests. Most of it worked immediately, but there were a few bugs, which I ironed out today. Right now, it works correctly—the parts that are implemented, at least.

This video stuff is rather fun to play with.