Thursday, March 29, 2012

Measure Twice Cut Once

More research today. I've been mucking around with some of Collabora's code. They are releasing Farstream on Fedora 17 soon. I also found out that there will be a version of Sugar on F17 released in July. Farstream comes with python bindings by default and supports a lot of useful things by default including, RTP and ICE. ICE will be useful as it allows the program to navigate around firewalls and NATs. This should be a valid approach so long as I can get a hold of the development build of Sugar. I don't think I'll have any problems with that though.

If that isn't possible I should be able to continue with current Sugar builds by using telepathy-farsight. This should be very similar to farstream except I'll need to manually pull in the ICE library and perhaps a few other things.

Overall I feel like I'm getting a firm grasp of what needs to happen to get everything working properly. Next week I'm going to start hacking on the OVC code to figure out how I can integrate these new libraries.

Tuesday, March 27, 2012

OVC Research

I dove into the pyGst docs today to try and wrap my head around what exactly is going on. I found the docs to be really confusing at first. Luckily there was an accompanying tutorial that explained things very nicely.

Unfortunately, the tutorial only outlined how to do local streaming. I searched around a little more and discovered that OLPC has a page about gstreamer on the XO's specifically. This page has a lot of information on it. According to that, I need to use a udpsink with an IP to send video to another XO.

At this point I started picking through the code to figure out where the problems might be. I know that somewhere along the way the connection isn't being set up correctly. Either the XO's are failing to get each other's IP's or the video connection isn't establishing.

The part of the code in that deals with IP's is as such:
@signal(dbus_interface=IFACE, signature='s')
def announce_ip(self, ip):
    self.ip = ip

def announce_ip_cb(self, ip, sender=None):
    if sender !=
        self.cb('ip', ip)
This is most likely where the problem is occurring. Basically, the XO's are just spitting out their IP and hoping the other one gets it. If this is the root of the problem, I should be able to solve it with a home spun TCP-like interface where it listens for a return signal.

The other part of the code I've been looking at is here in

        # Add udpsink
        udp_sink = gst.element_factory_make("udpsink")
        udp_sink.set_property("host", ip)

It may be the case that I need to find an alternative to udpsink. Maybe there is something like rtpsink? I'm not sure at this point. Next I think I will start picking at the code to try and determine exactly where it's failing to make the connection.

Sunday, March 25, 2012

Migrating OVC

Well I haven't talked about Open Video Chat lately. The project has been pretty stagnant for a while. I'm picking it up again this quarter as part of an independent study. Expect weekly updates about the project.

The first order of business is to migrate the project to github. Fedora Hosted was nice but it simply doesn't compare to github for community involvement and collaboration tools. The new repo can be found here:

This quarter I would like to get OVC working with RTP. The current system uses UDP steaming 100% of the time. This means that more often than not the connection packets are dropped since the XO's have horrible connection reliability. RTP fixes this by using a hybrid of TCP and UDP. It uses TCP to ensure the connection is made, then UDP for fast media streaming.

After I complete the RTP conversion I want to focus on getting some more documentation and unit tests for OVC. Right now there is absolutely nothing. When I graduate in May there will no longer be any of the original collaborators at RIT. Providing docs and unit tests will make it easier for other students to pick this up when I'm gone.