View Single Post
Posts: 1 | Thanked: 0 times | Joined on Oct 2008
#1
I'm trying to write a small note-taking program that will include the ability to take photographs. I'm writing it in python and using gstreamer to grab the actual picture.

My pipeline is built using

Code:
self.video_pipeline = gst.parse_launch("v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=8/1 ! ffmpegcolorspace ! xvimagesink")
This creates a new window showing the output of the camera without trouble. However, if I add the line

Code:
bus.connect("sync-message::element", self.on_sync_message)
and then define

Code:
def video_sync(self, bus, message):
    if message.structure is None:
        return
    if message.structure.get_name() == "prepare-xwindow-id":
        sink = message.src
        sink.set_property("force-aspect-ratio", True)
        sink.set_xwindow_id(self.video_window.window.xid)
This is in Diablo. The gtk.DrawingArea I'm telling xvimagesink to write to shows up as a big green rectangle.

If I run the exact same code on my computer (adjusting the caps for my webcam) the image appears in the frame as expected.

Any idea why it doesn't work on the tablet? Thanks so much for your help.