June 5, 2008

Hacking away…

Filed under: Software, Tech — Alex @ 5:19 pm

r5u870
We’re pushing out a release within the next week! 0.11.1 contains a whole heap of bugfixes, including a nasty syslog spamming one.

I’m also hoping to start adding proper support for 3 new webcams, with the help of some friendly folk in the community. Hopefully reverse-engineering it won’t be too difficult.

Also, if you use this driver and haven’t already, please sign yourself up to the mailing lists. I do love all bug reports, but it gets too much sometimes. There’s also a bug tracker, too!

Android
I’ve been doing a bit hacking with Android lately. It’s really quite a cool platform, and it’s good to see an open platform being integrated in some smart phones (not quite here yet, but still). I’ve been doing some hacking on a classLoader to work around the Dalvik virtual machine, which is quite interesting, really (as a VM). Most of the work has been going into making i-jetty work smoother (Jetty is a web server for Java, you should pimp it out; i-jetty is an embeeded version for Android, and both are opensource). I might blog properly about this later…

Banshee
1.0 is coming real soon; and it’s going to rock your world! 1.1 is probably going to be slightly more polished, and luckily, you shouldn’t have to wait long after 1.0 for some more wholesome Banshee-loving goodness.

I’ve already got a library watcher extension coded up, and myself and Will Farrington have been doing a bit of hacking on the Radio extension.

Bongo
I’ve pushed this back far enough, but I intend to get some decent work done on dragonfly-ng next weekend (sadly, I have real work this week/weekend). Alex has mentioned doing a server-bits only release, and then following up with the new client bits later on.

If you’re wondering what dragonfly-ng is, basically, I decided to stop the work I was doing on the brand new XHTML interface, and just re-use what we had already, aside from all the old Javascript. dragonfly-ng is completely client UI independent, in that you can easily slap on a different looking HTML/CSS frontend and just change the client definition file (which says what each element’s name is, etc) and away you go!

There’s only really a few things that need to be done before I think we should be relatively release-ready:

  • Pagination! Looking at a single page of main is kinda boring.
  • A composer view. A limited textarea would be sufficient for this release.
  • Making sure that all our URLs are handled correctly and making sure it works against our current Dragonfly server and Crystal (half-completed).

I’ve also got a secret project underway, which I’ll be launching soon with a good mate of mine. Stay tuned!

January 25, 2008

Code monkey

Filed under: Life, Software, Tech — Alex @ 5:03 pm

Pushed out a new release of r5u870 last night. Woohoo! Few cool changes in this release:

  • Includes recode-fw.scm. Very useful tool to extract the firmware blobs from your device driver, if your device isn’t supported. Instructions on how to use are on the wiki.
  • Giant code merge from new modular usbcam library, posted by Sam to LKML back in May 2007.
  • Support for the 05ca 183b, 05ca 1837 and 05ca 1839 UVC cameras! Sweetness! The HP Pavilion’s 1812 camera is currently experimental, though, I’d love folks to give it a go.
  • Updated ChangeLog entries! What, you mean I wasted half an hour of my life?!

If you notice any bugs, don’t be afraid to email me (check the wiki for FAQs first, though). For those who already emailed me about stuff from previous releases, please upgrade, give it a go, and then email me back your status. I haven’t forgotten, I’ve just been very busy.

In other news, I’ve also managed to get the equalizer code for Banshee merged into trunk, so I’m pretty stoked about that. Style changes and all that have been sorted. Works lovely with both the older-gen equalizer element, and the current one in CVS. The element is currently in gst-plugins-bad, though, it’s moving to -good before the next release.

The new Banshee’s going to be sweet, I tell you!

Also managed to code up a pretty cool IRC log search script for Bongo. You can check (Jonny: not Czech ;) it out here. Looks a bit ugly, yes, but it sure does the job damn fine.

Well, I think that’s enough for now. Microsoft are at our LUG meeting this afternoon for a Q&A session. Hopefully we get some nice flames going, though, the committee has asked us not to. Though, cmon, we’re a loud bunch - someone can’t resist, I’m sure!

Gah, and I have to pack tomorrow, too. I hate packing.

January 21, 2008

Coming soon…

Filed under: Shiny, Software, Tech — Alex @ 4:08 pm

… to a Banshee near you:

Banshee EQ

January 2, 2008

r5u870

Filed under: Software, Tech — Alex @ 2:19 pm

r5u870 is a terrific little driver written by Sam Revitch that provides support for Ricoh R5U870 webcams.
The original driver itself supports the following devices:

05ca:1810 HP Pavilion Webcam - UVC
05ca:1830 Sony Visual Communication Camera VGP-VCC2 (for VAIO SZ)
05ca:1832 Sony Visual Communication Camera VGP-VCC3 (for VAIO UX)
05ca:1833 Sony Visual Communication Camera VGP-VCC2 (for VAIO AR1)
05ca:1834 Sony Visual Communication Camera VGP-VCC2 (for VAIO AR2)
05ca:1835 Sony Visual Communication Camera VGP-VCC5 (for VAIO SZ)
05ca:1836 Sony Visual Communication Camera VGP-VCC4 (for VAIO FE)
05ca:1870 HP Pavilion Webcam / HP Webcam 1000

Now, since the kernel doesn’t come with this driver, I couldn’t use my webcam on my laptop. Sucky.
After a bit of researching, I found that this appeared to be the driver I needed. So, I clicked on the link to download the driver off Sam’s website (http://lsb.blogdns.net/ry5u870/ via the Wayback Machine). Guess what? The site’s down. Damn.

After a bit of peeking around in different places, I managed to download a .deb from here and took the source from the upstream/ directory inside. Haha, now I had the source.

I installed the linux-headers-2.6.xxx package (kernel-source on OpenSUSE 10.3; they’re headers package doesn’t work AFAIK) and compiled. Success! Go-go-gadget modprobe. The module loaded OK, but the driver didn’t detect my webcam. I went back and checked the original device support list - my device wasn’t there. It was actually a VGP-VCC7 (05ca:183a), which wasn’t built into the driver. Another quick Google sent me here. Ah hah, so I needed to patch the driver so it could support my device, and extract the firmware from the original driver.

After I had applied the patch, and got the firmware going, I compiled and installed. Finally, it seemed to have worked!
I fired gstreamer-properties and tried to test the video input - it failed. After installing xawtv, I ran it and see what came up - my webcam. Apparently it doesn’t like being run through GStreamer, which sucks, ’cause that’s where Cheese is at.

So, I spent the rest of the weekend debugging, and compiling, and debugging…

At the end, I came up with this: r5u870 0.10.1. And it works! See? (please don’t ask what happened to my eye, I must’ve been blinking at the same time, or something.. =)

My ugly mug.

r5u870 0.10.1 is actually modified version of the original device driver, that has several advantages:

  • Properly implements V4L version 1 query functions. While version 1 has been obsoleted, it’s still necessary to have support for it as a number of apps still use it, including GStreamer’s v4lsrc element (v4l2src is on the way, I believe it’s in gst-plugins-bad at the moment).
  • Native support for VGP-VCC7, including supplied microcode.
  • Can compile against Linux kernels 2.6.24+. OpenSUSE 11.0 Alpha 0 uses this at the moment, I expect more distros to start using it sooner or later.

If you want to download or contribute, head over to it’s wiki page. I should probably note I’m merely the maintainer of the driver until Sam comes back from the null void, if that happens. I might attempt to get this into the current kernel tree, too.

December 10, 2007

TemplateBit and stuff…

Filed under: Bongo, Software — Alex @ 6:26 pm

More Javascript hacking!

I’ve been working a little utility class called TemplateBit that enables you to create little template things out of HTML elements in Javascript. There are several advantages for using TemplateBit instead of doing things the traditional way:

  • Keeps your code seperated and neat. Don’t mix up your HTML and Javascript.
  • Easy to modify and theme.
  • Less code required to write your web application.

You can check out the source of TemplateBit, the demo source (useful if you want to know how it worked) and the demo itself. Be sure to view the demo JS source, as its easier for you to see than for me to explain.

You can also check out a version created without using TemplateBit here.

Hopefully we can utilise this for Avocado and Flasher at some stage.

Speaking of Bongo, I’m planning to do some Bongo work at some stage during the next week or two, and will be spending most of my break working towards the stuff I didn’t finish for M3. I’ve had been fairly busy of late, as (for those who didn’t already know), I had a lot of work dumped on my plate at the last minute, and the fact that my internet went down for a bit didn’t make things any better.

I also want to get the finalised planning for Crystal underway, probably after a meeting with probably the Chief Moo, and who ever else wants to come along. I’ll give out proper details as to when we’ll be discussing it so you can come and join the fun. I’m not sure if we should use IRC or the -devel.

I think that’s enough blogging for one day by my standards.

November 10, 2007

Pie menus in Javascript

Filed under: Software — Alex @ 3:49 pm

Wanting to try out some of the cool new stuff in MooTools 1.2, I’ve written a radial/pie menu in Javascript.
Seeing as I’ll probably need one in the near future, I thought I might as well spend my time doing something useful.

Pie menus are actually quite useful. Shamelessly copied from Wikipedia:

Pie menus are faster and more reliable to select from than linear menus, because selection depends on direction instead of distance. The circular menu slices are large in size and near the pointer for fast interaction (see Fitts’ law). Experienced users use muscle memory without looking at the menu while selecting from it. Nested pie menus can efficiently offer many options, and some pie menus can pop up linear ones. Pie menus are shown only when requested, resulting in less distraction and clutter than toolbars and menu bars that are always shown.

You can check out a demo page (hastily put together with a full MooTools download uncompressed, eek) I’ve put up, as well as the source. You’ll probably need to remove one or two lines from the show/hide functions if you’re not building your MooTools download with Fx.Tween. The only other requirement(s) are the Array stuff, the Class stuff, as well as the CSS Selectors module.

I’ve also included proper event handling in the code, so you can have listeners for when the menu is popped up; eg:
var menu = new PieMenu('containerclass', 'menudiv');
menu.addEvent('onShown', function() { alert('Menu shown!'); });

Any improvements/comments/suggestions welcome!