January 2007 Archives

Digital TV

| | Comments (2)

If you believe the hype, then your old TV will stop working on April 7, 2009. This is because old-style broadcasts (analog) will be replaced with new-style (digital), and your old TV receives only analog. Digital broadcasts have been occurring for years, but most people aren't aware of them because (a) their TVs can't receive them, or (b) they have cable or satellite.

This weekend I decided to look into what it takes to receive over-the-air digital TV broadcasts. I was optimistic because my setup is favorable: I live on the top of a hill in San Mateo, California, and gigantic Sutro Tower broadcasts several TV channels across the San Francisco Bay Area. So in theory it should work.

I bought a $70 digital TV tuner card for my computer and a $25 passive antenna. I plugged them in, put the antenna on the bookshelf in my office, and found I could tune in NBC, CBS, ABC, Fox, PBS, UPN, WB, and a bunch of independent stations. Moreover, many of them broadcast in high definition!

And it gets better. Digital reception is perfect. There is no fuzz, static, snow, or distortion. Even after transcoding the programs to MPEG-4, the reception is obviously better than my analog cable TV.

After some software twiddling, I now have a set of family favorites (Oprah for Mary, The Simpsons for me, and Sesame Street for the kids) recording automatically, after which they're recompressed and stored on my media server for later viewing. It's not as convenient as my Tivo, but the quality is better, and there's some satisfaction in knowing that I have the freedom to discontinue my cable TV service.

xpidl and #ifdef

| | Comments (0)

You may be surprised to find that the Mozilla xpidl compiler doesn't support #ifdef, which seems to be the right way to conditionally define members in your IDL files. So how are you supposed to define debug-only stuff, for example?

Turns out it's quite possible through a flexible passthrough mechanism. Just wrap your C++-isms in blocks like this:

%{C++
#ifdef DEBUG
%}
    readonly attribute long myDebugStuff;
%{C++
#endif
%}

This will appear as expected in the generated .h file. Thanks, Darin, for the tip!

Update 2/22/2007: This is just enough rope to hang yourself. Be careful about mismatches between the caller and callee's understanding of the vtable layout!

About this Archive

This page is an archive of entries from January 2007 listed from newest to oldest.

December 2006 is the previous archive.

February 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.2-en