Wednesday, September 30, 2009

Nokia Browntooth enabled…(Engrish.com Repost)


"Let me call you back, we’ve got a crappy connection…"

I wonder that this isn't what Nokia means by Qt everywhere...

Wednesday, September 2, 2009

Qt for S60 Still Bogged Down By Symbian

Qt for S60 has brought the simplicity and power of Qt to Symbian phones, but there are still a few corner cases which are hurting, and one of those is the camera, whose code is still heavily tied to old Symbian cruft.

Symbian's code for cameras returns captured images as CFbsBitmaps. Don't even begin to guess what CFbs stands for, you'll just end up crying "why, why!?" Luckily Qt for S60 provides a function which converts CFbsBitmaps to QPixmaps, but it seems that the image capture is faulty, even though if at any point you take an image from the viewfinder and convert it it turns out fine.

So I decided to debug to see if the CFbsBitmap returned from the camera's viewfinder on capture was the source of the problems, and not Qt's conversion function.

After an hour or so of Googling (tm) and messing around in the Nokia forums in dead ends, I've found this wonderful snippet of code to save the CFbsBitmap to a file to see if that's the case (http://discussion.forum.nokia.com/forum/showthread.php?p=636992). (Note: CFbsBitmap's Save() function merely saves the binary CFbsBitmap to a file, unopenable by anybody other than Symbian, and thus useless):

------------------------------------------------

_LIT(KFileName, "c:\\1.bmp");
_LIT8(KMime, "image/bmp");
RFs& fs = CEikonEnv::Static()->FsSession();
CImageEncoder* encoder = CImageEncoder::FileNewL(fs, KFileName(), KMime(), CImageEncoder::EOptionAlwaysThread);
TRequestStatus status = KRequestPending;
encoder->Convert(&status, *bitmap);
User::WaitForRequest(status);
delete encoder;
User::LeaveIfError(status.Int());

------------------------------------------------

Let's break this monster down:
· _LIT8 is one of Symbian's ass-backwards ways of declaring a "string" for example a string called KMimeType with value "image/bmp"
· RFs is a file session, which is basically a guy that manages accesses to files, and here we pull out the manager for the application using CEikonEnv (again, don't ask)
· Then we create an encoder to change the CFbsBitmap into a real bitmap and save it to a file with the rest of this wonderful piece of code

The Qt equivalent of this is:

QPixmap *pix:
pix.save( "somewhere.format" );

Why was this so hard to program into Symbian!? If you're going to put a function to save the raw binary of a CFbsBitmap to a file, why not a truly encoded one?

Every day I code in Symbian, I feel a piece of my logical mind get torn to pieces.

Sunday, August 16, 2009

Amarok 2: Universal Mass Storage Device Support Here


Ok, so you can now do the usual with UMS devices that you can with other devices. Due to some issues with Solid detection in Amarok, to make sure your device is found you must:

- create a file ".is_audio_player" at the root of your device
- start Amarok
- the device should show up next to the local collection
- right-click it and click "read device"

Then it should parse, and you're ready to go. You can copy and delete files from outside of Amarok, and Amarok should update accordingly. Copying and deleting from within Amarok, and editing track details also works.

OPTIONAL:
If you want to set a music folder on your device, then put this in your ".is_audio_player" file:

audio_folder=musicfolder

... where "musicfolder" is a relative path from the mountpoint of the device, so this would set the folder to: /media/yourdevicemountpoint/musicfolder

NOTES:
- reading of the device is not done automatically right now since we don't want unpleasant surprises for people with huge external hard drives that happen to be mounted
- yes, the ability to set custom device paths and mountpoints will be coming, but not just yet
- yes, support for multiple music folders on the device is planned
- no, artwork isn't yet supported
- no, saving playlists isn't yet supported

And... bug reports are now welcome, so test away!

Thursday, August 6, 2009

Monday, July 13, 2009

GCDS: Wrap-Up

A few things since last blog post:

  • Met lots of people and didn't get stuck with the same group the entire time
  • Got some work toward Amarok done (not as much, thanks to beer/people)
  • Got to talk to Gnomies, civilized conversations

Obligatory pictures:




Picture of Nikolaj taking a picture of the city with a far better camera than mine.

Metal giraffe meets metal man-thing!  I don't know, this was near one of the parties and I thought it was weird enough to merit a photo.


"Taiwanese" restaurant, ended up going 3 times to mainly because it was cheap.  Ranks 4-6 on the 1-10 scale of delicious/price ratio for Chinese food.  The people working there were mainlanders, not Taiwanese.  Not what I'm used to, but amazing enough to find a Chinese restaurant on an island off the coast of Africa I guess.


Paid breathalyzer test!   You blow into a straw into this machine, and it tells you if you can drive or not.  Yeah...

Anyway, a good conference, read everyone else's long blogposts about things that happened and opinions on things and such.  That's all for this one.

Tuesday, July 7, 2009

ATTN: OWNER OF AN ONITY PASS CARD

I've found an Onity pass card that could be from a hotel or something, it says "Onity innovative thinking" on the front and has operating instructions on the back. If you have lost a card, please let me know.

Sunday, July 5, 2009

Gran Canaria: A Few Photos

Words are boring, keeping it short:
  • Good keynote speakers
  • People misconstruing speech
  • Overpriced food
  • Coffee and Ice Cream
  • Bad internet, no plugs
  • Good discussions with cool people
  • Same warm weather each day (twilight zone)
  • People who speak odd/bad Spanish, and no English
  • Having to translate for everyone due to the above



Vodka for breakfast anyone? For some reason the buffet here thought this was a good idea. I suppose the rich old Europeans might get impatient and need something to calm their nerves while their mountains of high-calorie food arrive.



It seems that a ~ is missing in a most unfortunate place. For those of you who don't know Spanish, this cake says something like "Happy anuses."



1/2 a kilo of ice cream for about 6 euros 50. Downed it between Leinir and me.

More to blog at some point when I have more words. This blogpost was a day in the making. That's how long it took to upload my photos without a timeout. Right then, bye for now!