De Tout Et De Rien

To content | To menu | To search

Wednesday, February 13 2008

Extracting iLBC code from RFC 3951

iLBC (internet Low Bitrate Codec) is a free speech codec suitable for robust voice communication over IP. It is provided as freeware under a royalty-free licence from Global IP Solutions. This codec is used within Skype for the sound transport.

One nice thing is that Global IP Solutions has setup a developer community which provides everything for the iLBC implementation and distribution and they also have submitted two Requests For Comment (RFC 3951 and RFC 3952) related to iLBC codec.

Unfortunately, the source code is not available as a tarball, but it is embedded in the RFC 3951. Yes, it is embedded. You can find various Open Source projects that have extracted the source code and embedded it in their source trunk. But if you want to use the code from the RFC you have to extract it yourself, and the best way is Awk scripting. Here is the script:

# extract.awk
BEGIN { srcname = "nothing"; }
{ if (/^A\.[0-9][0-9]*\. [a-zA-Z][a-zA-Z_0-9]*\.[ch]/) {
if (srcname != "nothing")
close(srcname);
srcname = $2;
printf("creating source file %s\n", srcname);
}else if (srcname != "nothing") {
if (/Andersen\, et al\./ || /Internet Low Bit Rate Codec *December 2004/)
printf("skipping %s\n", $0);
else
print $0 >> srcname;
}
}
END {
printf("ending file %s\n", srcname);
close(srcname);
}

Put the RFC text and the script in the same folder and run the following comand:

awk -f extract.awk rfc3951.txt

Et VoilĂ  !!!

Thursday, November 27 2003

DocBook, you want some ?

In my constant search of lazyness, I was interesting in the DocBook format. I reckon that the DocBook XML format is not the most user-friendly XML format, BUT, I think it is one of the most complete one.

Why ? In fact, DocBook is appealing because of another related project : the DocBook XSL Project. This project provides the XSL stylesheets needed to convert a DocBook XML instance into whatever you want : HTML, JavaHelp, Man pages and more if needed.

Just take your DocBook document and process it with one of the many stylesheets available. That's it. One thing you realize immediatly after, is that the default XSL stylesheets aren't sexy at all. Yes, they are usable, but I want MY style, not the one everybody will use. And with zero effort.

Here come the XSL stylesheets customization. If you think like me that XSL is a like a toy, I suggest you to take a look at the DocBook files : the incarnation of the power and flexibility of XSL. You never will look a stylesheet the same way. This doesn't mean that customization is hard, but it must follow the patterns.

After struggling and googling, I managed to have two wonderful stylesheets : one for chunk HTML and one for XSL:FO. XSL:FO is then processed to produce a nice PDF document.

As a bonus, some useful links:

  • DocBook site. You can grab the DTD or the Schema.
  • DocBook XSL Project provides more than XSL (like DSSSL).
  • The XSLTProc tool for Unixes and Cygwin. Very, very fast XSL processor.
  • The PassiveTex extension to Tex. One of the various way to transform XSL:FO into PDF.

Friday, June 20 2003

Solaris 9.0/x86

I have recently upgraded to Solaris 9.0 for x86 architecture. Very happy with it.

Purchase and Installation

Despite the fact that now the media are not free, I think that $20 for an operating system is not a high cost. In fact, I have choosen the cheaper solution, buying the downloads media and then burn them on a set of 5 CD-R. Downloads were done in one night, as I am pretty easy with my cable bandwith (512KBits), and burning was done the next night.
The installation was like a breeze. The only thing is that it is a pretty long operation. When I say long, it is almost as long as installing Windows 2000 with all the security patches. The major difference with Solaris is that you only reboot your machine 3 or 4 times. Anyway, after that, you have a nice Unix operting system that works fine.

Software

To make things with Solaris, you have to install some software. So I check http://www.sunfreeware.com/ and I got all what I need. The software that is not available is easily build with the sources. Again, like a breeze.
As my goal is make heavy Java development, I have also installed some Java stuff, JDKs and Jakarta. I have also sucessfully compile Eclipse as described in my previous entries.

Conclusion

If you want to give a try on a Unix for x86 (other than Linux of course) and have $20 to spend, I recommend you Solaris 9.0. As a prerequisite, I would also say to Unix skill and Solaris knowledge are a plus.

Wednesday, April 23 2003

Install of Solaris/X86

I finally managed to install Solaris 2.8 on my computer. I have found two good resources that are a must :
- http://www.solaris-x86.org/ : a nice place with a tons of links (how to have a dual-boot Sol/Win, tutorials, FAQs and drivers...)
- http://www.sunfreeware.com/ : a cool place to find everything you need, and especially GNU tools ready to install. It saves you time and hairs.

Anyway, it runs fine. Well almost, since my sound card is recognized but not active.

The next step is to compile Eclipse 2.1 to run it, and I will be happy.