New oggcodecs release

I'm proudly presenting Oggcodecs "Nikolaus" release.

This version has lots of bugfixes, particularly to Theora and FLAC. I've added support for Windows x64 versions.

For Windows XP x64 you will need to use Media Player Classic Home Cinema or some other 64 bit player, because Windows Media Player doesn't install the 64 bit version.

If you want to use Windows Media Center on Windows Vista x64 you will need to point it to the 64 bit Windows Media Player.

Windows Vista x64 has the 32 bit version of Windows Media Player set by default. For more information about this issue visit this page.

Oggcodecs installer sets the file associations to the 64 bit version of Windows Media Player, so it will work out of the box without needing to switch on the 64 bit version.

For more information about the release visit the Oggcodecs DirectShow homepage


A fish called Xiphophorus

The current unstable version of DirectShow OggCodecs is coming along nicely. In order to prepare for a release party (OggCodecs or Theora 1.0), I've asked my girlfriend if she could paint a T-Shirt with the "Fish".

Here are some pictures documenting the process:

Thank you Alina-Simona!


GMX Multimessenger uses(?) oggcodecs

Today I've installed a new Instant Messenger program - GMX Multimessenger (available only in German).

By looking in the programs instalation folder (while trying to enable HTTP Proxy) I found out these familiar DLLs:

Those DLLs are part of oggcodecs! thus meaning that they use oggcodecs, or?

Although they mention Theora in Settings page:

while trying to use Video Chat an Adobe Flash window was opened. Video Chat is done using Adobe Flash!

I've tried to enable Theora Video Chat but failed, the above mentioned DLLs are not even loaded by the process.

They mention Xiph.org, CSIRO and Zentaro Kavanagh in About dialog, but I don't know how they use Theora codec:


They don't make'em as they used to...

Why does Thread.Sleep Method (Int32) have a signed parameter for the duration of time? Can you go back in time with a negative value? Is this an undocumented method of undoing things?

Compare this (System.Threading.Thread.Sleep) with this (Win32 Sleep).

Usually INFINITE is set to the maximum value. For Win32 API this would be 2^32 -1, for .NET that would be 2^31-1. The .NET INFINITE is half of the Win32 API INFINITE.

Instead of maximum sleep time of 49.71 days you get only 24.85 days... :)



Today I've visited IBC in Amsterdam. I must say that it was impressive. I have failed to cover everything in just six hours. Somehow I've missed the Fluendo booth, but had a short talk with a guy from BBC's Dirac booth.

Next year I plan to visit more. No pictures at the moment, hopefully I can get some from one of my colleagues.

Edit: And the promised picture is here:

ADAM - Professional Audio (Ogg that is :)


First CodeProject Article!

My first CodeProject Article - regsvr42: Generate SxS Manifest Files from Native DLLs for Registration-Free COM. It was really fun to write, not to mention very useful. I wish I had this tool a few years ago, when I was hunting after COM interfaces into COM components.

Don't forget to logon CodeProject and give a high mark! :-)


Boost 1.36.0

Boost 1.36.0 has been released and is available from SourceForge.

This release include four new libraries:
  • Accumulators: Framework for incremental calculation, and collection of statistical accumulators, from Eric Niebler.
  • Exception: A library for transporting of arbitrary data in exception objects, and transporting of exceptions between threads, from Emil Dotchevski.
  • Units: Zero-overhead dimensional analysis and unit/quantity manipulation and conversion, from Matthias Schabel and Steven Watanabe
  • Unordered: Unordered associative containers, from Daniel James.
Updated libraries include Asio, Assign, Function, Hash, Interprocess, Intrusive, Math, MPI, Multi-index Containers, PtrContainer, Spirit, Thread, Wave, and Xpressive.

On the same note Microsoft released the first Service Pack for Visual Studio 2008. C++ gets TR1 (shared_ptr, regex and more!) and new MFC face lift classes.


Visual C++ 2008 Keybinding Reference Poster

One thing I haven't studied since my first encounter with Visual Studio, and back then I haven't had such a nice pdf, is the Visual C++ Keybinding.

Microsoft has nicely made this available for Visual C++ 2008!

I did not know that CTRL+SHIFT+INS is the keymapping for Edit.CycleClipboardRing, I always used Visual Assist's CTRL+SHIFT+V functionality - a menu, not some selected text which you can cycle through. This functionality can come in handy when you don't have access to Visual Assist, either by being stranded in C# land where the landlord is named Resharper or by using the Express (no addons) edition.

Don't forget to print the "Poster", you! might learn something new about Visual C++ Keybinding.

Note: Usually I'm OK with the default Visual C++ keybinding, but since Visual C++ 2003 they've changed the F7 keybinding from "Build Project" to "Build Solution". Visual C++ 2008 has F7 or CTRL+SHIFT+B mapped to "Build Solution". I've customized F7 to Build.BuildSelection (works somehow better than Build.BuildOnlyProject)


Windows XP Manifest File Maker

Windows XP has introduced a new theming API. You can make your applications to use this new theming API by the use of a .manifest file. This manifest file can sit alongside your application or in your applications resource part.

Here is a batch file which creates such a manifest file:

@echo off

rem (c) 2008 Cristian Adam

if [%1] == [] (

echo Usage: make_manifest file.exe

) else (

if exist %1.manifest goto :EOF

echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes" ?^> >> %1.manifest
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^> >> %1.manifest
echo ^<description^>Windows Forms Common Control manifest^</description^> >> %1.manifest
echo ^<dependency^> >> %1.manifest
echo ^<dependentAssembly^> >> %1.manifest
echo ^<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /^> >> %1.manifest
echo ^</dependentAssembly^> >> %1.manifest
echo ^</dependency^> >> %1.manifest
echo ^</assembly^> >> %1.manifest


And now a screenshot to show the before and after state:


First release of oggcodecs

I've released my first release of oggcodecs:

Current UNSTABLE Version (0.80.15039) - 14.06.2008
Changes this version

* Support for Microsoft Windows Vista
* Updated compiler to Visual Studio 2008 Express, which drops support for Windows 9x, NT 4.
* Updated libspeex to version 1.2 beta 1
* Updated libvorbis to version 1.2.1 (20080501)
* Updated libogg to version 1.1.3
* Updated libtheora to version 1.0beta3 (20080416)
* Updated libFLAC to version 1.2.1
* Fixed crash at the end of incomplete Theora files.


Google Translate Learned Romanian

I found out recently that Google translate knows how to translate from Romanian to English and from English to Romanian.

I've used Goosh - Google Shell - to translate a quote from a previous post:

guest@goosh.org:/web> translate en ro This is a great victory for the glorious people of Romania!
translating "This is a great victory for the glorious people of Romania!" from "english" to "romanian":

"Aceasta este o mare victorie pentru oamenii de glorie a Romaniei!"

It's pretty good, with time it will become better :-)


Why Microsoft? Why?!

Take the cab file format. It's present on every windows from Windows 95. If you use the LZW compression algorithm you get small archives.
986.875 oggcodecs.7z
1.150.890 oggcodecs.cab
1.618.917 oggcodecs.zip

It's better than zip and a bit worse as 7-zip.

The problem with cab file format it's that it's hard to use it in command line.

For example here is what you need to code to compress one directory into a cab file:
for %%i in (oggcodecs\*.*) do echo "%cd%\%%i" >> files.ddf
makecab /L . /D CompresionMemory=21 /D CompressionType=LZX /D DestinationDir=oggcodecs /F files.ddf
del files.ddf
move disk1\1.cab oggcodecs.cab
rmdir disk1
del setup.inf
del setup.rpt

Pretty hard core. One might say that this is not a tool to be used from a command line as rar or other popular archiving programs. This is done only once by me in a script file, so I can live with it.

The problem is with the extraction method. I have created a folder inside that cab file, which I can see with Total Commander, 7-zip File Manager etc, but with Windows Explorer I see directly the files, without the directory. There is one command line program which handles cab archives - expand.exe. Expand.exe doesn't know about directories in cab files, there is no switch to instruct him to preserve the directory structure from the cab file.

Why Microsoft? Why?

The solution is simple, create the destination folder first, d'oh!

mkdir oggcodecs
expand oggcodecs.cab -F:* oggcodecs\

Why not use 7-zip and ignore all this trouble? A cab file I can digitally sign and you can see it's coming from me and you don't need a 3rd party program to unpack!


Why Microsoft? Why?!

I haven't mentioned here that I lost my fate in Microsoft that they can deliver good development tools a long time ago, I guess that was when I saw Visual Studio .NET 2002 for the first time. The .NET age fuc*ed it up real good.

At work I have Visual Studio 2003 and 2005 installed on D drive. Now I had to install Visual Studio 2008 on my system. I choose D drive, I verify every component that it should install on D drive and click Next, Next... Finish.

To my surprise the C++ component (VC directory) was installed on C drive, I said to myself... hmm, maybe I've forgot to install it on D, but it was working and I've ignored the issue.

The problem was when I've tried to compile something from the console. I've opened a console, setup the environment variables "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" and then hit nmake.

It complained that it could not find rc.exe, WTF. Then I found out that rc.exe is part of the Microsoft SDK which was on D (D:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\). When I try to setup the environment variables for Microsoft SDK ("d:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd" ) it complains that it can not find a compiler...

So now I'm installing everything on C drive, because for Microsoft, C++ should stay on C drive.

Edit: It works now (everything is on drive D), I've uninstalled all the programs that had a connection with Visual Studio 2008. If at first you don't succeed then try again, and again, and again.



By using code signing with a certificate provided by Certum I was able to change how the oggcodecs installer looks on Windows Vista from this:

to this:

The name of the installer looks different, but my name is displayed under :)

Maintainer for Directshow Filters for Ogg Vorbis, Speex, Theora and FLAC

I probably should have blogged sooner, but here it is: I'm the current maintainer for Directshow Filters for Ogg Vorbis, Speex, Theora and FLAC.

If you want a hardware Ogg Player you should consider buying a Trekstor Samsung (most of their MP3 players support Ogg Vorbis and FLAC formats) product!


New beta version of Y!M 9

Yahoo Messesnger 9.0 has reached version This version fixes the long standing bug with Romanian „ă” character inserted with AltGr-A which was interpreted as Ctrl-Alt-A.

This is a great victory for the glorious people of Romania!


Pimpin' Windows XP's cmd.exe

I like the command line interface, not because I own a Das Keyboard and I'm forced to look at the screen, but because I like to type.

Windows XP's cmd.exe was not one of my favorite consoles, it lacked configurability, especially in the font area. You have only two options when it comes fonts: raster fonts and "Lucida Console".

I grew accustomed with "DejaVu Sans Mono" font from my Linux days and since then when I think about a monospaced font I think of "DejaVu Sans Mono".

One option is to use an alternative console, but I found out that it's not as fast as cmd.exe.

The solution is to replace "Lucida Console" with "DejaVu Sans Mono"! Just fire you your favourite font editor and do the required changes, then install the new "Lucida Console" and that's it.

Here is a screenshot with my pimped cmd.exe

In the meantime I've found an easier way of changing the console font, read more about it here


Limba noastră-i o comoară

This post is intended to the Romanian audience.

Astăzi am dat peste ceva la care nu m-am gândit niciodată, să traduc în limba română cuvintele cheie din C/C++.

Soluţia este simplă, se foloseşte preprocesorul, iată un exemplu:

#include <cstdio>
#include "romanian.h"

folosim spatiunume::std;

int principal()
    scrie("Salutare Lume!\n");

Arată foarte interesant. Am văzut acest lucru la semnătura lui Marian Dragomir, iar fişiereul "romanian.h" arată astfel:

#ifndef ROMANIAN_H
#define ROMANIAN_H

#define asm asm
#define auto auto
#define pausa break
#define caz case
#define cara char
#define const const
#define continua continue
#define predefinit default
#define fa do
#define dublu double
#define altfel else
#define enum enum
#define extern extern
#define flotador float
#define pentru for
#define dutela goto
#define daca if
#define expandeaza inline
#define int int
#define lung long
#define registru register
#define restrict restrict
#define intoarce return
#define mic short
#define semnat signed
#define marimede sizeof
#define static static
#define structura struct
#define comuta switch
#define definestetip typedef
#define tipde typeof
#define uniune union
#define farasemn unsigned
#define vid void
#define inflamabil volatile
#define atitcit while
/* definitii pentru C++ */
#define bool bool
#define prinde catch
#define clasa class
#define mold_const const_cast
#define sterge delete
#define mold_dinamic dynamic_cast
#define explicit explicit
#define export export
#define fals false
#define prieten friend
#define mutabil mutable
#define spatiunume namespace
#define nou new
#define operator operator
#define privat private
#define protejat protected
#define public public
#define mold_reinterpreteaza
#define molda_static static_cast
#define sablon template
#define acesta this
#define arunca throw
#define adevarat true
#define intentioneaza try
#define numetip typename
#define idtip typeid
#define folosim using
#define virtual virtual
#define lchar_t wchar_t

/* definitii de functii comune */
#define principal main
#define scrie printf


Spor la scris „poezii”! ;-)