Sunday, November 28, 2010

GTK3 HTML5

http://blogs.gnome.org/alexl/2010/11/23/gtk3-vs-html5/

Sunday, October 31, 2010

Maemo: Incompatible application package

Recently I copied some package to the N900 and when I tried to install it from the FileManager the installation failed and I got following message:
Unable to install 'qt4-homescreen-loader'. Incompatible application package.
The workaround is to install it manually from the XTerm:

sudo gainroot
dpkg -i DEBIAN_PACKAGE_FILENAME

In order to get the root access the certain application needs to be installed. More information can be found here.

I didn't dig into the problem so it might be that there was really something wrong with the package.

WinXP guest (VMWare Player) hangs every few seconds on the Ubunut 10.04 host

WinXP guest (VMWare Player 3.1.2 build-301548) hangs every few seconds on the Ubunut 10.04 host. To solve the problem add the following lines to your .vmx file:

MemTrimRate = "0"
mainMem.useNamedFile=false
sched.mem.pshare.enable = "FALSE"
prefvmx.useRecommendedLockedMemSize = "TRUE"

More details can be found here.


Sunday, August 22, 2010

Acer 4820TG - problem with a microphone and a headset on Linux

My headset ports didn't work on Ubuntu 10.04 64bits until I ran a command below and restarted my computer:

sudo apt-get install linux-backports-modules-alsa-lucid-generic

Information about it I found on this forum:
http://ubuntuforums.org/showthread.php?t=1046137&page=104

Saturday, August 21, 2010

Acer 4820TG - a problem with graphics cards on Linux

Recently I was struggling with running Ubuntu 10.04 on Acer Aspire Timeline X 4820TG. After I installed ATI/AMD proprietary FGLRX graphics driver X didn't start. I didn't have time to solve the problem properly but I found out that after I've changed SWITCHABLE mode to DISCRETE in a BIOS settings for graphics cards I'm able to start Ubuntu properly.

Tuesday, May 25, 2010

Simple template for an application using Gnome Tracker client

Recently I've been investigating Gnome Tracker. It is a very nice project.

To learn some basics I wrote a very simple example. Although there were some good examples on the wiki I thought that for the very beginners it would be nice to have whole files and at the same time I could contribute to open source:). Here is the result:

http://live.gnome.org/Tracker/Documentation/ClientDevelopmentFromScratch

Friday, May 21, 2010

VMware on Ubuntu 10

Very quick fix for VMware on Ubuntu 10 (Lucid):
http://blog.gnu-designs.com/solved-building-vmware-workstation-modules-on-linux-2-6-32

Just follow the wintamute's suggestion in the comments.

Wednesday, May 12, 2010

GStreamer Rulez!

I heard about GStreamer every now and then but I didn't really know what it is about. Today I decided to check it out. It is awesome! :) To get excited about it check the notes below...

My environment: Ubuntu 9.10, with installed gstreamer and additional plugins (gstreamer0.10-plugins-gl, frei0r-plugins)

Below you can find instructions how to add a repository with additional plugins:
https://launchpad.net/~gstreamer-developers/+archive/ppa/

About GStreamer:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-gstreamer.html

GStreamer:
http://www.gstreamer.net/

List of all gstreamer plugins - including effects, etc.:
http://gstreamer.freedesktop.org/documentation/plugins.html

Other blogs which were very helpful:
http://vimeo.com/groups/14747/videos/6673554 - this contains a sample video
http://bluwiki.com/go/GStreamer
http://www.twm-kd.com/computers/software/webcam-and-linux-gstreamer-tutorial/

Now the best part. Playing with videos!

Here is the original video:


The line below will turn a video into a cartoon:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! ffmpegcolorspace ! frei0r-filter-cartoon ! ffmpegcolorspace ! xvimagesink


The line below will add some plasma effect:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! ffmpegcolorspace ! frei0r-filter-distort0r ! ffmpegcolorspace ! xvimagesink

The line below will play the video on the cube rotating above the mirror and save it as .ogg file:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! glupload ! glfiltercube ! glfilterglass ! gldownload ! queue ! ffmpegcolorspace ! theoraenc ! queue ! oggmux ! filesink location=Elphel_RV_2_cube_glass.ogg

The line below will play the video on the cube rotating above the mirror:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! glupload ! glfiltercube ! glfilterglass ! gldownload ! queue ! ffmpegcolorspace ! xvimagesink


For more info about plugins run:
$ gst-inspect-0.10 glfiltercube

Beside .ogg also other formats are supported, for example mp4.


Monday, May 10, 2010

Git

Very good tutorial about interesting Version Control System - Git by Bart Trojanowski:
http://excess.org/article/2008/07/ogre-git-tutorial/

Commands which I found very useful:
  • git clone, git fetch, git rebase,
  • git checkout, git branch, git merge
  • git stash

Friday, March 26, 2010

Application crash

Recently I had very interesting problem. There was an object which caused an application crash when it was deleted. During debugging the content of the object's destructor worked properly, but after a closing bracket application just crashed. After time consuming investigation I found out that the object was defined as global, on the stack. Then a pointer to it was passed to some method which at some point deleted this object using that pointer. Of course when the program exited it tried to destroy already destroyed object.

QObject::deleteLater() - the best way to hide bugs

The method deleteLater() is very often used to avoid application crashes. In fact in most cases it just hides the real problem! Qt provides several methods to avoid dangling pointers and control objects lifetime. For example QObject::setParent can be used or "destroyed" signal. Developers should use them and really dig to the problem, understand what is going on in their product.

Additionally it is important to remember that deleteLater() works only if a main loop (qapp.exec()) of an application is already running or is going to be started after the call. Otherwise the object won't be deleted. In some cases even if there is no memory leaks when a program is running objects might not be cleaned before the program exists. In general it is not a problem since the memory will be freed by the system. Unfortunately it is not possible for valgrind to check if this is the case what basically means that it will report many memory leaks. It is then time consuming to investigate which leaks are real.

http://doc.trolltech.com/4.6/qobject.html#details
http://doc.trolltech.com/4.6/objecttrees.html
http://doc.trolltech.com/4.6/qobject.html#dtor.QObject
http://doc.trolltech.com/4.6/qobject.html#deleteLater

Monday, March 22, 2010

Git

Extremely good presentation about Git:
http://excess.org/article/2008/07/ogre-git-tutorial/

Saturday, January 30, 2010

Declarative UI in Qt - Qml

I'm really happy to say that finally there is declarative support for UI development in Qt coming. This is what I've been waiting for. This was WPF advantage over Qt.

More details here: Declarative UI