Writings Photos Code Contact Resume Me
This is my website. It's mainly dedicated to GNU/Linux, my writings, code, thoughts, news, ... You won't find any windows related materials here, So don't panic!

Reverse engineered libomap3camd header file for N9 and N950

Submitted by msameer on Sun, 17/02/2013 - 6:46pm

A short introduction about N9 camera stack:
Camera stack for N9 is built on top of V4L2 subdev and media controller interfaces.


Justin TV without flash!

Submitted by msameer on Sun, 11/03/2012 - 5:18pm

Justin TV is a streaming service that uses the broken flash concept in order to allow you to view channels.

Unfortunately it's the only source of Arabic movies, series and shows.

I wrote a GStreamer source that retrieves the channel information and uses libRTMP to connect to the Justin streaming server. The rest is handled by GStreamer ;-)

If you want to watch http://www.justin.tv/ammartv for example, you simply do

gst-launch-0.10 playbin uri=jtv://ammartv

The 2nd plugin is a Totem plugin that indirectly utilizes the GStreamer source.
Given a language code (ar or en or ...), it will download the list of channels in that language and shows them in Totem's side panel. One can then easily double click on a channel and simply watch it. I originally wanted to do the Totem plugin in python but the inability to do asynchronous callback based HTTP requests prevented me :-(

Be warned that the code is of course a bit buggy and needs a lot of cleanups, it's been years since I coded anything in Gtk and that Justin might find out and either block the source somehow or even change the protocol but let's wait until that happens ;-)


خبرتي في التصويت خارج مصر

Submitted by msameer on Mon, 28/11/2011 - 12:08am

توجهت اليوم الي السفاره المصرية في هلسنكي لتسليمهم المظروف المحتوي علي بطاقات الاقتراع الخاصة بي
طبعا كان ممكن تتبعت بالبريد لكن المشكله هي:
اولا وصلتنا تعليمات التصويت من السفاره متاخرا


N9/N950 camera with zoom during video recording!

Submitted by msameer on Thu, 10/11/2011 - 2:17pm

If you are using PR 1.1 then you can simply enable zoom during video recording.

Just create a file /etc/camera.conf and add the following lines:

[debug]
recording-zoom = true

restart camera, enjoy and send postcards to the Harmattan camera team :)

I hope someone will create an Ovi store app for that ;)


Increase the font size of the N9 conversation view.

Submitted by msameer on Thu, 03/11/2011 - 12:42am

If you care about the readability more than you care about the eye candy then that's for you ;-)

1) You need to enable developer mode and ssh to the N9.

2) # mkdir -p /usr/share/themes/blanco/meegotouch/libmessagingwidgets0/style/

3) # vi /usr/share/themes/blanco/meegotouch/libmessagingwidgets0/style/libmessagingwidgets0.css

4) Insert the following lines:

BubbleItem MLabelStyle#BubbleItemMessageIncoming {
font: $FONT_FAMILY 32px;
}

BubbleItem MLabelStyle#BubbleItemMessageOutgoing {
font: $FONT_FAMILY 32px;
}

BubbleItem MLabelStyle#BubbleTimeStampLabelOutgoing {
font: $FONT_FAMILY light 32px;
}

BubbleItem MLabelStyle#BubbleTimeStampLabelIncoming {
font: $FONT_FAMILY light 32px;
}

5) # su - user
6) $ killall -KILL messaging-ui
7) Enjoy :-)


Introducing vcamera, a virtual V4L2 camera.

Submitted by msameer on Mon, 20/06/2011 - 7:03pm

This is a kernel module I cooked in a couple of days. The idea is to expose a v4l device that gets its data from user space.

I had 2 use cases in mind:
1) Educational purpose for myself (I'm really a kernel noob).
2) Streaming movies over skype, google talk, ... etc.

The idea could be good or completely rubbish but hey ? Learning can only be done with stupid ideas!

The code is highly unstable. It shouldn't oops the kernel but I'm not responsible. I've been developing and testing it inside qemu.

Clone it from the git repository via:

git clone git@gitorious.org:vcamera/vcamera.git

Here are a few missing bits off the top of my head:

* I'm not following the kernel coding style yet ;-)
* I'm sure my locking, unlocking and concurrency handling is flawed.
* The code is a bit fragile.
* It'd be nice to implement mmap support for the character device. This should eliminate data copies.
* Perhaps expose the character device all the time and generate "fake" frames when streaming starts ? Problem now is one has to be very fast in feeding data to the module otherwise select() on the v4l device will timeout.
* Many more...

If someone finds this idea useful, please drop me a line.
Comments, use cases, ideas and tips are really welcomed!

If I see a lot of interest, I might try to push it to the kernel tree one day ;-)

Update: Seems vloopback already exists and renders my code useless. I might still do something with it as my idea seems a bit simpler but whatever.

Update 2: There's also v4l2loopback and its fork.


Egypt, Internet cut off. A massacre will follow. Please help.

Submitted by msameer on Fri, 28/01/2011 - 1:49am

Egypt has been fighting for freedom already for 3 days now.

The whole country has experienced a large number of street demonstrations and protests within the last 3 days to be continued also on Friday, the 28th of January and afterwards.

The protests' main goal is to oust dictator Hosni Mubarak's regime, which has been in power for almost 30 years.

We want him out.

A massacre has happened in Suez. Police used live ammunition and tear gas. There are unconfirmed rumors that the army might interfere.

Even a bigger protest is supposed to take place a few hours from now. After the Prayer on Friday.

The internet has been shutdown completely. Egypt is no longer online since Friday, the 28th of January 00:45 AM.

Text messages to cell phones have been cut off too and all cell phones services will be following. No one knows exactly the intentions of the regime but it doesn't sound good.

Please help us.
Please blog about it in English and in all languages.
Please spread the news everywhere.
Please talk to media.
Please petition your government if that will help.

If there's anything that you can do, please do it and help us save the country and the people.

More news from twitter #jan25.


Prayer timetable parser for Helsinki (2011)

Submitted by msameer on Sun, 09/01/2011 - 12:12am

One of the local mosques here used to publish the prayer timetable for the whole year in HTML format.


Twitter OAuth Proxy

Submitted by msameer on Tue, 14/09/2010 - 10:55pm

I'm using Twitter plugin for Contacts and Conversations to twitter on my N900.

Twitter recently moved to OAuth. Problem is the Maemo package is outdated and seems to be unmaintained.

I did some research and came across a blog entry about exploring OAuth-protected APIs and some code. Nice idea but not usable for me.

I ended up sitting down and writing a small python script that will re-route your HTTP requests to api.twitter.com after adding all the OAuth bills and whistles, read the reply from twitter and send it back. Neat ? :-)

There's also supertweet.net which I've discovered after I finished writing my script but seems they don't support all of the twitter API call while my script does that.

The script is simple without much error checking but it's been working for me for a few days already.

Last thing, I'm not interested in running a service like supertweet. I'll not be implementing the full OAuth protocol. Need to use it ? Register your own application.

Get the code while hot!

git clone git@gitorious.org:twitter-proxy/twitter-proxy.git

Next step: Thinking of maintaining the twitter plugin for Maemo. I already compiled the latest code and it sort of works fine :-)


QTestLib tip

Submitted by msameer on Fri, 20/08/2010 - 3:52pm

If you are doing a data driven test using QTestLib, make sure the column names you define in the data function matches the variable name you pass to QFETCH()