OpenSG Browser Plugin
June 29, 2009
Well the summer has finally arrived, and I’ve finally got around to publishing this on the research groups website. It is a small application making use of the Qt4 browser-plugin API to provide an OpenSG canvas within a web browser. It wouldn’t take much effort to make it easily installable for users. (Just statically link the whole thing into a single binary I’m guessing)
The advantage of using OpenSG rather than OpenGL as a canvas for web3d graphics is that you can build upon the scenegraph, take all of it’s functioanltiy, rather than you worrying about creating file loaders etc. The URL for the plugin is http://novellab.brighton.ac.uk/?q=projects/opensgplugin
P.S. If anyone is able to help me solve https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/389441 it’ll be great.
gsoap and fedora
August 6, 2008
Here is a quick tutorial on how to access the SOAP interface for a fedora repositary. (For more info about fedora see here.)
We need the gsoap package for Ubuntu 8.04 Hardy. So:
sudo apt-get install gsoap
Once installed we use some tools called wsdl2h and soapcpp2 to create stubs for us. So:
wsdl2h -c -o fedora-a.h http://www.fedora.info/definitions/1/0/api/Fedora-API-A.wsdl (You can use -r <proxy> in the wsdl2h command if your behind a web proxy) soapcpp2 fedora-a.h
Then open soapClient.c in your favorite editor and replace all occurrences of localhost with the hostname/ip address of your server.
We need a simple application which allows us to make use of these stubs. This can be found here. You’ll need to change the username and password to match what you have configured on the server.
The application then needs compiling which is easily done with the following command.
g++ simple-client.cpp soapC.c soapClient.c /usr/include/gsoap/stdsoap2.c \ -o simple-soap-client
This applications should then be able to connect to your fedora server and print out the information describing your repository.
Digitalising Home Movies on Ubuntu Hardy with a PVR-150
July 16, 2008
I had a need at home to convert some out VHS movies to digital so I purchased myself a WinTV-PVR-150 MCE. This would enable me to play video from a VCR, outputting via a SCART cable which split into composite video and audio. Hardware encoding of the analogue signal enabled the captured input to easily be transfered to a digital file (mpeg2). As usual from Hauppauge linux support is excellent with the card fully supported out of the box with Hardy.
To take the input from the card and save it into a file I simply needed to do:
cat /dev/video /path/to/file
To switch between the various inputs on the card I need to use the following commands (v4l2-ctl is available in the ivtv-utils package):
v4l2-ctl -i 0 for the tuner
v4l2-ctl -i 1 for svideo
v4l2-ctl -i 2 for composite
All in all I found the card very easy to use for my purpose, and will now be looking to use it within my Mythbuntu installation.
Video Textures in OpenSG
July 15, 2008
I’ve mentioned OpenSG on this blog. It is a scene-graph based API I use at work for rendering of 3D scenes. As part of these scenes you can create textures on these objects, which are basically pictures. Well my co-worker, Karina, has produced some code for displaying video on these textures, which is really cool.
We’ve been playing around with video playing over our tiled wall cluster both playing just a video, or wrapping the video around an object such as a sphere. We’ll be releasing the source code for it soon on our website along with some other cool things we’ve been producing. But before hand I’d just like to show you a picture of it running the Big Buck Bunny video (which is cool project as well).
Enabling ply Support for OpenSG on Ubuntu Hardy
July 4, 2008
The OpenSG packages within Ubuntu Hardy don’t contain any of the contrib directory functionality been built. These aren’t prebuilt due to them been work in progress or licensing issues. The ply contribution is restricted due to it’s license to non commercial work only, so it needs to be built outside of the packages distributed.
Normally this would be built and stored within the libOSGSystem.so library, requiring the the library to be built again, which takes a while
So instead I’ll show you how to build it as a separate library for you to link against in your applications.
Within the directory containing the source code, the following command will build it as a shared library called libOSGPly.so.
g++ OSGply.cpp OSGPLYSceneFileType.cpp -I/usr/include/OpenSG/ `pkg-config OSGSystem --libs --cflags` -shared -fPIC -o libOSGPly.so
This then needs to be copied to your system path so the linker can find it, so:
sudo cp libOSGPly.so /usr/lib/.
The header files then require installation, so:
sudo cp *.h /usr/include/OpenSG/.
Now all you need to do is add -lOSGPly to your linker options to use the library.
I’m sure the same trick can be used with the other contrib features if you wish to enable them easily.
Keeping mythtv-backend Alive
June 23, 2008
I’ve a small problem with my mythtv-backend in that it will crash once or twice a week without giving a clue as to the problem, even when running it through gdb. When restarting, it would work fine again therefore there was the need to detect a crash and restart when it happens.
This is currently been worked on for the next version of Mythbuntu through the use of upstart scripts, however I was needing a soultion before then. This lead to the development of the script below, which checks to see if it’s running, and restart it if it’s not.
The script is limited in that you need to manually start it after the machine has booted. I run the script within a screen console (so I can detatch it) using watch to run the script every 60 seconds.
So in screen:
sudo watch -n 60 ./keep-myth-server-alive.sh
The script:
#!/bin/bash
# Copyright (C) 2008
# David Morris (david.morris@greenacre.no-ip.com)
#
# This program is free software; you can
# redistribute it and/or modify it under the terms
# of the GNU General Public License as published by
# the Free Software Foundation, version 2 or later.
#
if [ `ps -ef | grep -c mythbackend` == '1' ];
then
sudo /etc/init.d/mythtv-backend start
fi
iplayer scraper
May 2, 2008
I’ve paid a bit of attention to the iPlayer development that has been occuring for linux over the last few months, with flash and mp4 versions. http://po-ru.com/ provides a ruby download script for the mp4 when passed the PID.
Now I’ve been thinking we can easily make this into a standalone player which users can browse on a desktop through the use of a GTK applications, or as a plugin for mythtv. To this end, I’ve hacked up a python scraper to generate the iPlayer listings and I’m publishing it here in the hope it’ll be of help to people.
It returns:
- URL with the PID
- URL for the thumbnail
- Title of show
- Date show was aired
- Duration of show
- Synopsis of show
I’ve create the core module and a small script to demonstrate how it can be called. What you choose to do with the data once it’s returned is left to yourselves.
Building OpenSG Nodes with the Ubuntu packages
January 24, 2008
The way which I was originally shown to build new nodes for OpenSG involved using the existing OpenSG build system. It usually existed of these steps
- Putting your node code into the source dir (I can’t remember which one)
- Re-running configure for it to be copyied to the build dir
- Use make and sudo make install to rebuild OpenSG and re install it all
Of course if your installing binaries from the repo’s you don’t want to be doing this. Instead you’ll need something like the following to build and link against the binaries. (with the -dev packages installed)
g++ -I`pwd` -I/usr/include/OpenSG `pkg-config OSGBase --cflags --libs` `pkg-config OSGSystem --cflags --libs` -shared -fPIC *.cpp -o libOSG<nodename>
Of course you’ll need to link against other libraries if you need them.
The compiled library can then just be copied into /usr/lib and you can start using it. The above build command can easily be broken down to work with autotools as well, allowing your new node to built on other distros which make use of pkg-config and have installed to different paths.
Ubuntu packaging – my 1st package
December 11, 2007
Well I’ve cut my first teeth now with regard to Ubuntu packaging and had my 1st package accepted into the hardy release
The package I used was cpptest which is a portable and powerful, yet simple, unit testing framework for handling automated tests in C++. I used this testing framework for my Masters work and decided to simplify the tool chain for others to build and use my work.
It’s great after around 3 -4 weeks of learning around my job to have it accepted and I’m looking forward to getting my other two packages in the queue accepted for hardy. I’d like to thanks the MOTU’s which have helped me get this package done through reviewing it namely sistpoty, persia, apachelogger and norsetto.
Remote Wonder 2 in Mythbuntu
December 10, 2007
I’ve had a few searches for this hitting my blog and seen people having problems with it as well. I just redid mine on Ubuntu Gutsy and this should work the same. Here is what I did
sudo dpkg-reconfigure lirc
I then chose the userspace driver
sudo nano /etc/modprobe.d/lirc
Here I commented out blacklisting of the `lirc_atiusb’ module.
Once this is done you can load it with
sudo modprobe lirc_atiusb
You’ll then need to install the lircrc file to /home/<myth user>/.mythtv/lircrc
Restart and it should all work fine. I’ve attached my config files for you to check against as well. If you need more help post here or find me (davemorris) on irc.freenode.net
irw is a great little program to run in a terminal to see what buttons your pressing and tsee what they are mapped to.
/etc/modprobe.d/lirc
