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 tube_speak.py 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.tube.get_unique_name():
        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 gst_stack.py:

        # 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.

No comments:

Post a Comment