Skip to main content

Elisa problems marshalling MediaUri

The short version
If you are having problems with elisa not playing your local media files (see https://code.fluendo.com/elisa/trac/ticket/957 and https://code.fluendo.com/elisa/trac/ticket/961) then you can fix it by editing ~/.elisa/elisa.conf and changing gstreamer:gst_metadata_client to gstreamer:gst_metadata. That is all and it works!

The long version
Ever since I heard about elisa, I have been trying to get it to work as my media center. It was well designed and the vector graphics are awesome. It plays music, videos and displays pictures, and has several plug-ins to play online music and youtube videos etc. You can even get cover arts from amazon from with in the software. But there is just one problem. It could never play my local media. Neither movies, nor music and not even photos. I gave v0.3.3 of elisa a try. It did not play my personal media. I thought, well it is still in development, so why not wait for the next release. I did not even take a look at the logs.

Then came v0.3.4 and that again did not work. So I synced up to the latest code in svn and tried that. No luck. At this point I was starting to think something must be wrong with my configuration or the versions of dependencies that I have installed. This time I looked at the logs and a warning pointed me to a log file in /tmp. A quick look and I could not understand why jelly.py (from twisted) seems to think MediaUri is not a known type. I didn't know much about twisted framework (and I still don't), so I emailed the elisa mailing list. And in response a developer kindly opened a ticket for me. You can view it here https://code.fluendo.com/elisa/trac/ticket/961.

I was waiting for it to get fixed. And then along came the announcement for v0.3.5. I decided to try the latest from source control and it failed to play my media again. This time I was adamant on learning twisted at least up to the point of understanding what jelly.py is and why it is does not know the type of MediaUri. I found out that jelly is used to serialize data to send it over the wire to the server to unmarshall and act on it. That is good enough. Now back to the exception
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 182, in addCallbacks
self._runCallbacks()
File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 307, in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "/home/chandanp/workspace/python/fluendo/elisa/elisa-plugins/elisa/plugins/gstreamer_plugin/gst_metadata.py", line 1429, in got_root
dfr = root.callRemote('get_metadata', dic, low_priority)
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line 380, in callRemote
_name, args, kw)
--- <exception caught here> ---
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line 853, in _sendMessage
netArgs = self.serialize(args, perspective=perspective, method=message)
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line 807, in serialize
return jelly(object, self.security, None, self)
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 879, in jelly
return _Jellier(taster, persistentStore, invoker).jelly(object)
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 464, in jelly
sxp.append(self.jelly(item))
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 468, in jelly
sxp.append([self.jelly(key), self.jelly(val)])
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 489, in jelly
raise NotImplementedError("Don't know the type: %s" % objType)
<type 'exceptions.NotImplementedError'>: Don't know the type: <class 'elisa.core.media_uri.MediaUri'>

This simply means that there is a problem serializing MediaUri. I greped around and found that MediaUri is not extending one of the serializable classes. So that could be the problem. I looked at the gst_metadata.py which is where the RPC is being made. I noticed that there is another way to get metadata, but it is not an asynchronous call. But hey what the heck, I don't care if the UI locks up for a while when it is scanning my media as long as I can get it to work. So if I used gst_metadata instead of gst_metadata_client I can get away from the whole async RPC calls. I edited ~/.elisa/elisa.conf and changed gstreamer:gst_metadata_client to gstreamer:gst_metadata and guess what, it works!

I updated a ticket with the same problem I was having and at least some one is happy being able to play their local media. The link to the ticket is https://code.fluendo.com/elisa/trac/ticket/957. I got so excited that I wrote this blog immediately. Now I will take elisa for a ride.

Comments

Anonymous said…
I had identical error on archlinux using elisa 3.5.5. Following your rationale I tried changing the metadata client line in elisa.conf and downgrading dbus. The problem was in PIL ( python imaging library or whatever), i should have better read the log in /tmp carefully. Hope it helps. Vaquerito

Popular posts from this blog

Attesting General Power of Attorney in SF

Recently I had to go through the motions of getting a General Power of Attorney (GPA) document attested in San Francisco. I am an Indian by birth. My parents were trying to buy a house back in India for me. Since I did not want to travel to India they needed a GPA so that they can act on my behalf to sign all the documents required to buy the house. The problem however is that they needed it urgently because the seller lives in UK and wants to get all the things done quickly so he can go back. My parents send me a GPA document that they obtained from a lawyer. This is a document that will give the power to my parents to buy the said property in the document on my behalf. The lawyer said that I will have to get the document attested at an Indian Consulate in USA. The closest one for me is in SF and I can drive there in about an hour from where I live. So I though it will be like a day's work to get all the things done. I looked up at their  website  for the procedure to att

XBMC / Boxee remote control android app

I have been writing a few android apps over weekends at home and during 20% time at Google. However I never actually released any of them in the android market mainly because they were quick and dirty apps that fit my needs but perhaps would not be appealing to the general public. One such app that I quickly wrote over a couple of weekends is a XBMC remote. The media center that I use at home is XBMC and I have always wanted to have more control and faster access to my media. Using my remote to navigate through the menus is not as fast. Especially when I wanted to queue a lot of music it is very slow. So I wrote this nice little app called "XBMC remote" for my android phone to control XBMC from anywhere :). Give it a try. Search for "xbmc" in android market and install it if you use XBMC as your media center. When you first launch the app you will start with this screen. You will have to setup your web server address, username and password (if required) by

gtkdocize not found

If you are ever configuring an app and see the message "gtkdocize not found" in Gentoo, then you need to emerge gtk-doc. I had some hard time figuring this out so I am writing it in my blog for the next time. When I saw that error message I did an "emerge -s gtkdocize". Usually it is that simple in Gentoo. But not this time. The emerge command returned no results at all. Then I searched for gtkdoc and still no luck. After searching in Google, I still did not have a solution. After thinking for a while I decided to try to search for gtk-doc. Bingo! That worked! Interestingly, this is my first post from my Virtual machine :-)