Month: June 2009

WoW! My ICQ still alive

I can’t believe it: my ICQ still working!

I got my ICQ# 190580 (yes, it is my birthday) more than 10 years ago and I stopped to use it about 6 years ago.

Everything dies, but ICQ will be remembered forever…

Use ack to search pattern

Normally I use find, xargs and grep to search pattern on source code (besides cscope):

find . -type f | xargs grep pattern

But it is not efficient mainly because it will search on all binary file and it will search on .cvs, .svn, .git directory.

A good alternative it the “ack” program:

On Ubuntu you can just install ack-grep package:
sudo apt-get install ack-grep


$ ack-grep mxc-mmc
45:#define DRIVER_NAME "mxc-mmc"

546:    _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
547:    _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)

274:    .name = "mxc-mmc",
281:    .name = "mxc-mmc",

369:       .name           = "mxc-mmc",
400:       .name           = "mxc-mmc",

638:    _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
639:    _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)
640:    _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk)

Listing video formats supported by your webcam

Currently I am developing an application to encode webcam video stream directly to Ogg Theora. During my search I found some interesting projects and documentation.

The first one is the linpvr (Linux personal video recorder), this is an interesting project, but it is unfinished, then don’t wait to get it working, but it can be used as example to know how to convert RBG to YUV and to convert YUV to Theora:

Other useful project is Etheora, this is a set of API developed to simplify Theora usage, it have many conversion routines (RGBxyz -> YUV420, etc):

I am planing to use a webcam which supports natively YUV420 since this is the input format used on Theora encoding routines. Using VIDIOC_ENUM_FMT we can list what format the webcam and its kernel driver supports.

There is a program developed to test cameras supported natively by Adobe Flash, you can use this sample code to list your webcam capabilities:

In that post’s comments we can find a great listing of webcams and their supported formats.


Today I found something I was looking for long time ago: someone porting FLTK from C++ to C.

It is called uCFLTK mainly focused to microcontrollers (uC) because normally uC doesn’t have C++ compiler available:

Currently it is just on initial stage, but I think it is promising idea!