Reply
Thread Tools
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#1
Hello,

I am trying to port Maemo Camera Example to QT and run into problems.

PROBLEM 1: SOLVED
I guess I am getting the:
/home/klen/workplace/maemo/DistanceQT/src/cameraN900.cpp:399: undefined reference to `gst_x_overlay_get_type'
/home/klen/workplace/maemo/DistanceQT/src/cameraN900.cpp:399: undefined reference to `gdk_x11_drawable_get_xid'
/home/klen/workplace/maemo/DistanceQT/src/cameraN900.cpp:399: undefined reference to `gst_x_overlay_set_xwindow_id'


because I am missing libraries. Bellow is my QMAKE FILE:
CFLAGS=-O0 -g
CXXFLAGS=-O0 -g
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QMAKE_CLEAN += distanceqt

#Includes
INCLUDEPATH +=. /usr/include/ \
/usr/include/gtk-2.0/ \
/usr/include/gtk-2.0/gtk/ \
/usr/include/gstreamer-0.10/ \
/usr/include/glib-2.0/ \
/usr/include/glib-2.0/glib/ \
/usr/include/glib-2.0/gio/ \
/usr/include/glib-2.0/gobject/ \
/usr/include/cairo/ \
/usr/include/pango-1.0/ \
/usr/include/atk-1.0/ \
/usr/include/libxml2/ \
/usr/include/dbus-1.0/ \
/usr/lib/gtk-2.0/include \
/usr/lib/gstreamer-0.10 \
/usr/lib \
/usr/lib/glib-2.0/include \
/usr/lib/dbus-1.0/include

LIBS += -L/usr/lib/glib-2.0 -lglib-2.0 \
-L/usr/lib/gstreamer-0.10 -lgstreamer-0.10 \

HEADERS += src/appdata.h src/camerafield.h src/cameraN900.h
SOURCES += src/appdata.cpp src/camerafield.cpp src/main.cpp src/cameraN900.cpp


I googled and found out that I should link in gstinterfaces-0.10 and gtk-2.0. If I add these two libraries in the same way as I did the others:

-L/usr/lib/gtk-2.0 -lgtk+-2.0 \
-L/usr/lib/ -lgstinterfaces


I get an error:
cannot find -lgtk+-2.0
cannot find -lgstinterfaces


What should I do to include these tow libraries in my QMAKE file. Do I need to find a workaround by manually updating the make file?

PROBLEM 2: SOLVED

I have a problem linking the gstreamer pipeline sink to any of QT objects. There was a suggestion by mmurfin87 to check Phonon. I am looking into Phonon now. Any other suggestions?

Thanks,
Klen

Last edited by klen; 2010-03-03 at 11:35. Reason: Better deduction
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#2
sounds like you need to install the gstreamer tools. on my device so can't search easily for you. but the terminal commands is in one of my healthcheck threads/posts.
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#3
Originally Posted by noobmonkey View Post
sounds like you need to install the gstreamer tools.
I checked if I have gstremaer tools.

[sbox-FREMANTLE_ARMEL: ~] > dpkg -l |grep gstreamer0.10-tool
ii gstreamer0.10-tools 0.10.25-0maemo2+0m5 Tools for use with GStreamer

I guess I have it.

I am looking at your post now.

http://talk.maemo.org/showthread.php...hcheck+threads

Thanks,
Klen

Last edited by klen; 2010-02-26 at 14:15.
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#4
I checked your post that was mentioned above and the source code. Nice starting app.

I see you create an image and save it into the phones memory and then use that image to create a QPixmap and display it on the screen. I am not sure if this is the way how I should implement camera example on QT, as I want to display a continues stream of video until the photo is taken. This is why I think I need to use x_overlay.

However, I would also like to draw on top of the video stream like the native camera app on N900 does.

Any other suggestions?

Cheers,
Klen
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#5
Originally Posted by klen View Post
I checked your post that was mentioned above and the source code. Nice starting app.

I see you create an image and save it into the phones memory and then use that image to create a QPixmap and display it on the screen. I am not sure if this is the way how I should implement camera example on QT, as I want to display a continues stream of video until the photo is taken. This is why I think I need to use x_overlay.

However, I would also like to draw on top of the video stream like the native camera app on N900 does.

Any other suggestions?

Cheers,
Klen
hmmmm ask the burgerface designer - he seems to know what he is doing

I'm going to also want to use the video part of it soon, if i find out, will let you know
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -

Last edited by noobmonkey; 2010-03-01 at 23:49.
 
Posts: 307 | Thanked: 157 times | Joined on Jul 2009 @ Illinois, USA
#6
This is a totally uninformed opinion, but maybe you should look into Phonon. Its the QT OO front end to gstreamer.
 

The Following User Says Thank You to mmurfin87 For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#7
Originally Posted by mmurfin87 View Post
This is a totally uninformed opinion, but maybe you should look into Phonon. Its the QT OO front end to gstreamer.
seems to be no documentation for phonon, well google just brings up bug reports (Using python)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#8
I managed to link the needed libraries. I could not do it automatically using pkg-config instead of manually (i.e. -L/usr/lib/gtk-2.0 -lgtk+-2.0).

I added one line to my QMAKE file, where I add a linker flag and define names of libraries that are needed.

QMAKE_LFLAGS += `pkg-config --libs gtk+-2.0 \
--libs gstreamer-interfaces-0.10

One problem solved, one to go.

I still did not manage to link the pipeline sink to any of QT objects. I am looking into Phonon now. Looks promising. Hope it gets me somewhere.

Klen
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#9
Originally Posted by noobmonkey View Post
seems to be no documentation for phonon, well google just brings up bug reports (Using python)

The documentation for Phonon can be found:
QT Phonon 4.4: http://qt.nokia.com/doc/4.4/phonon-module.html
QT Phonon 4.6: http://qt.nokia.com/doc/qt-maemo-4.6...-overview.html
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#10
Found a useful link. It might get there eventually.

http://stackoverflow.com/questions/1...upon-gstreamer

Klen
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:42.