Category Archives: Maemo

Yet another plugin tutorial

Following Gustavo, I’m posting this “tutorial plugin” that was created with the help of Caio (cmarcelo @ Freenode). This is a presentation tool, where each slide is a Model and each presentation is a ModelFolder. It’s very simple, but supports transitions and uses some very basic concepts of Canola’s plugin framework.

I recommend also the download of Gustavo’s plugin because there is a very good readme.txt there that explains how everything works (so you don’t have to just find out reading the code).

Some details about this plugin: it looks for “.edj” (edje files) inside /tmp but you can change that inside a prefs file (cnl-set-prefs). Then just do your presentation using Edje (there is also a demo presentation in this tgz).

In the next days we should post an “SDK” that will make developer’s life easier, so they’ll be able to develop and test plugins on the desktop.

Canola Show

xine 4 Maemo ?

I have been thinking about a port of xine to maemo since a long time ago. Maybe you are thinking: “why have xine when you already have gstreamer and mplayer ?”

Well, the problem is that it’s very hard to use mplayer as a backend for media players but it’s actually the best video player for the platform, thanks to Siarhei and some other developers that contribute with the project. It’s very hard because mplayer was not develop having in mind that it would be used by other applications, it’s “just” an application that accepts commands from the standard input. So, it’s very annoying to handle errors and send/receive commands to/from mplayer.

If we had xine for the platform, we could still have mplayer as a video player and also have xine as a library so it would be easier for multimedia applications to make use of all the features provided by xine. I’m specially interested in gapless playback of mp3 files (it’s a feature that Canola’s users just want) and to use every optimization that mplayer has, as it’ll be good for both engines.

I’ve already started playing around with xine. I compiled it on scratchbox and tried on my brand new n810. The audio was just choppy =/ . So I took a look on mplayer’s alsa code and discovered that it would need a trick: instead of sending number_of_frames to alsa, I needed to calc the correct amount of data to send to alsa:

ย int write_size = number_of_frames / this->bytes_per_frame;

ย After that, just good sound out of speakers =) . Of course, video playback was nothing compared to mplayer but it has potential, as both share the same ffmpeg library.

So, if you are interested in helping me with this task, you’re welcome ๐Ÿ˜‰

Canola 2 Beta Launch

After some days nights working very hard we are proud to announce Canola’s 2 Beta version launch.

There are some known small issues that we are already working on, but this should not affect the general use of the application. It would be great if users could download, install and give us some bug report, so in the end we can have a great application ๐Ÿ˜‰ I also hope that developers get interested in developing plugins for Canola.

Thank you everybody and just follow Canola’s developers blogs and Canola’s official site to stay up to date to documentation, new releases and other news =)

stamp

Canola’s Media Player

Canola’s team have been busy during the last months trying to make real Marcelo’s dreams and thoughts.

Now the first results are being exposed and it’s a good idea to explain it all ๐Ÿ˜‰

Kenneth mentioned on his blog about the picture viewer and album’s art view. He made an overview of this features and I’m not going to explain the same stuff again, but I’ll try to make an overview about Canola’s Music/Video player (and it’s engine).

As Leonardo Sobral pointed out before, we developed a media engine codenamed “Atabake” in order to support some features that the default media engine was not able to support. It has a plugin architecture, so it’s easy to extend and do some more cool stuff.

If you develop a plugin to Canola and want to make use of audio you can simply ask Atabake to stop the current player and start playing your own sounds. After closing your plugin, Atabake will gently restore the player’s session.

To play audios we are still using osso-media-server as it works very well for audio playback, and for videos we started using MPlayer (anybody asking for libxine in the future?? ๐Ÿ˜‰ ). MPlayer just rocks about video playback…

The player plugin for Canola can be used by any other plugin that wants to consume media. More details about all this technical stuff will come just after Canola’s launch (I still need to bug fix, and finish other details hehe).

Some audio and video screenshot for you guys:

Audio PLayer

Video Player

As you can see, it’s very easy to use Canola even on desktop and you can expect a very responsive and fancy UI ๐Ÿ˜‰

Videocenter for Maemo

Today it was announced “videocenter” for maemo. Videocenter is an application to receive video streams, download videos and also manage your videos on the platform.You have services like Internet videos (rss), Internet TV, Remote EPG and soon you will also have Video Remote. Ow, and there is also one tab to manage the videos you have in your device and in your mmc.

This Video Remote feature that is missing on this release will be able to get streams from MythTV and some other services that you can run on your own machine (even ftp server). Now let’s explain why it’s not there: there is a bug on osso-media-engine that prevents the MythTV to properly work. The process of streaming from MythTV is very trick because we have to transcode the video before sending for the device as most of the users have DVB at their home, and because of this bug on osso-media-engine it doesn’t wait enough time for buffering (for users that are still using analog tv cards it just works fine). In order to receive this MythTV stream the user needs to install the gmyth library on the desktop that will work as the transcoder: the best option is to use the same desktop where you have MythTV backend.

Well, the best way of showing something is with a video, so here it is!

PS: if the movie is not that good it’s because Marko Sakkinen just shooted me too much yesterday on paintball! =P

MPlayer vo_nokia770 wid support

Last weeks I played a lot with MPlayer for maemo. First I did that Xv + “-wid” patch in order to ignore those “Bad Values”ย  when going back from fullscreen on windowed mode. Now it was time of making vo_nokia770 works with “-wid”.

The first point was that vo_nokia770 was pretty much faster than vo_xv due to some optimizations that Siarhei did (this optimizations will hopefully be on the next platform release). The second point was that for n770′ s users it’ s the best driver so far (as they will not have an official release of a fixed X server).

Asking a lot of questions for Siarhei andย  taking a deep look on vo_nokia770′ s code, I was able to understand it’ s idea: create an X window to handle events and just put the video directly onto the framebuffer using the optimized code. Sound’ s easy ? Hehe, well I got some problems but after coding it, it doesn’ t look that hard…just needed a little bit of experience on X programming to understand what was happening.

It still needs some improvement but it’ s working and just waiting Siarhei’ s approval =)

Xv and MPlayer on Maemo

Last week I had a problem with MPlayer using the option “-wid” while doing some test applications: every time that the video came back from fullscreen (while playing on a given window) it crashed.

After some a lot of tests with the help of Leonardo Sobral, we discovered that Maemo’s Xv had a problem with X errors. Following some info on the maemo-dev list we reached a thread where Daniel Stone (Nokia) and Siarhei Siamashka (MPlayer for Maemo) were having a discussion about bugs on Xv and video output in general.

Daniel Stone gave us a tip of ignoring X errors and just “keep going” as they never happened. After changing some emails with Siarhei, we decided that it was probably the best thing to do.

After that I started reading this document about X (it’s a really good doc for beginners on X) and realized that it was easy to make a patch for MPlayer (actually, Xv driver for MPlayer) to just ignore X errors (we were getting Bad Value error).

Using the function XSetErrorHandler I could set a function to be the error handler. This function must have a signature like this:

ย x_window_error_handler(Display *display, XErrorEvent *error_event)

And you can get the error (integer value) inside error_event->error_code . Just did some log procedures and then returned 0 (zero) as nothing happened and there is it! A fully working fullscreen feature on MPlayer when it’s using Xv and “-wid”.

How to install GMS and GMyth

How To Set-Up GMyth

This How-To assumes that you have a fully working MythTV installation. Pay attention that this has not been tested too much and that in the future it’ll be a lot easier to do all of this (I’m working on a script to automate this). All these steps are meant to be done on the transcode machine (that also can be the mythtv machine).

I recommend doing everything from SVN as the debs are not done yet.

1. – Installing GMyth
———————————–

1.1 – Debian Packages
———————-
Just install gmyth_0.3_i386.deb and gmyth-utils_0.3_i386.deb like this:

* sudo dpkg -i gmyth_0.3_i386.deb
* sudo dpkg -i gmyth-utils_0.3_i386.deb

1.2 – SVN
—————-

First of all check-out the svn:

* svn co https://gmyth.svn.sourceforge.net/svnroot/gmyth/trunk/gmyth gmyth

Compile GMyth and install it:

* cd gmyth
* ./autogen.sh –prefix=/usr –sysconfdir=/etc
* make && sudo make install

2. – Installing gstreamer plugins for MythTV
————————————————————————–

2.1 – Debian Packages
———————-
Just install gstreamer0.10-indt-mythtvsrc_0.10.2.debian-1_i386.deb

* sudo dpkg -i gstreamer0.10-indt-mythtvsrc_0.10.2.debian-1_i386.deb

2.2 – SVN
—————–
First of all check-out the svn:

* svn co https://svn.sourceforge.net/svnroot/gmyth/trunk/gst-gmyth gst-gmyth

Compile and install it:

* cd gst-gmyth
* ./autogen.sh –prefix=/usr –sysconfdir=/etc
* make && sudo make install

3. – Installing libgnomevfs2-mythtv
——————————————————–

3.1 – Debian Packages
—————————————
Just install libgnomevfs2-mythtv_0.3_i386.deb

* sudo dpkg -i libgnomevfs2-mythtv_0.3_i386.deb

3.2 – SVN
———–
First of all check-out the svn:

* svn co https://svn.sourceforge.net/svnroot/gmyth/trunk/libgnomevfs2-mythtv libgnomevfs2-mythtv

Compile and install it:

* cd libgnomevfs2-mythtv
* ./autogen.sh –prefix=/usr –sysconfdir=/etc
* make && sudo make install

4. – Installing GMyth-Streamer
—————————————————

3.1 – Debian Packages
————————————–
* TODO

3.2 – SVN
———–
First of all check-out the svn:

* svn co https://svn.sourceforge.net/svnroot/gmyth/trunk/gmyth-stream/server/0.3/ gms

Then just run it:

* cd gms
* python gms.py

5. – Installing GMencoder
——————————————–

You need this packages installed:

* libgstreamer-plugins-base0.10-dev
* libgstreamer0.10-dev
* libglib2.0

5.1 – Debian Packages
————————————
* TODO

5.2 – SVN
—————–
First of all check-out the svn:

* svn co https://svn.sourceforge.net/svnroot/gmyth/trunk/gmyth-stream/gmemcoder/

Compile and install int:

* cd gmencoder
* ./autogen.sh
* make && sudo make install

5.3 – gst-ffmpeg (CVS)
————————————–
You must instal gst-ffmpeg from cvs:

* cvs -d:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer/ co gst-ffmpeg
* cd gst-ffmpeg
* ./autogen.sh –prefix=/usr –sysconfdir=/etc
* make && sudo make install

5.4 – gstreamer0.10-fluendo-mpegdemux (CVS)
——————————————————————————
The package that comes with Ubuntu has a bug, so you need to use it from CVS:

* apt-get remove gstreamer0.10-fluendo-mpegdemux
* svn co https://core.fluendo.com/gstreamer/svn/trunk/gst-fluendo-mpegdemux/
* cd gst-fluendo-mpegdemux
* ./autogen.sh –prefix=/usr –sysconfdir=/etc
* make && sudo make install

6. – Installing Mencoder from SVN
———————————————————-
You need this packages installed:

* libxvidcore4-dev
* libxvidcore4

Then check-out the svn:

* svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Compile and install it:

* cd mplayer
* ./configure
* make && sudo make install

GMyth-Streamer v0.3 ‘released’

At least some news here! =)

First of all, I’m proud to say that GMyth-Streamer was able to stream mpeg2 content (digital-tv) over 2 networks that were in different countries with the help of GMyth. It was amazing to watch some live content from Europe! ๐Ÿ˜‰

Secondly, due to some requests I’m releasing today version 0.3 of GMyth-Streamer with some good improvements:

————————————————————————-
r724 | morphbr | 2007-05-29 17:24:48 -0300 (Tue, 29 May 2007) | 19 lines

* GMyth-Streamer version 0.3 released
– Improved Log architecture;
– Creation of a history for the transcoder’s actions
– Creation of an id for each transcoder instanciated
– Also wrapps default actions for python’s default logger

– Created new functions to make use of this new Log architecture;
– serve_new_id
– serve_get_log
– serve_get_all_log

Lot of small bug fixes;

– Inserted header for all files;

– Splited files with too many lines (more than 1 class per file) in more files;
One of the small bug fixes is related to the name of the stream when retrieving the stream: usually it comes with “stream.do” as filename, but now you can use “http://../name.avi?action=stream.do” and be happy…your receiver will understand that the name of the file being streamed is name.avi (you can use any name you want). This is specially useful for embedded browsers (anybody thinking about PS3 ๐Ÿ˜‰ yes..now you can make PS3’s browser download the videos converted using GMyth-Streamer). Btw, anybody knows which is the browser that the PS3 uses ? I think it’s Opera.

Another good improvement is the Log system: now each transcoder receives an ID (before I was using the tuple (IP, PORT) in some cases and on another ones (IP, FILE). I don’t need to say that this can cause a lot of problems. With this new architecture, we are now able to retrieve the whole log of the transcoders as well use this ID to make actions on them and keep record of “dead” ones. Talking about death: fixed the bug that each transcoding was leaving one instance of mencoder alive each time it was used.

Well, some people said they’ve some patches for me but never sent it and some people was asking about how to use GMyth or GMyth-Streamer. I think it’s easy to people to contact me, because I would write too much to cover all the use cases =) .