[gst-devel] basic opengl - adding a cube

puredata at 11h11.com puredata at 11h11.com
Sun May 4 04:51:24 CEST 2008


hi,

anybody can help me with glimagesink. i want to show a simple 3d cube. somebody
have an example showing where to add the code? consider this code (in pygst):

import pygst
pygst.require("0.10")
import gst
import pygtk
import gtk

#GStreamer
class Main:
	def __init__(self):
		self.pipeline = gst.Pipeline("mypipeline")

		self.videotestsrc = gst.element_factory_make("v4l2src", "webcam")
		self.pipeline.add(self.videotestsrc)

		self.cc = gst.element_factory_make("ffmpegcolorspace", "colorconvert")
		self.pipeline.add(self.cc)

		self.sink = gst.element_factory_make("glimagesink", "opengl")
		self.pipeline.add(self.sink)

		self.videotestsrc.link(self.cc)
		self.cc.link(self.sink)
		
		self.pipeline.set_state(gst.STATE_PLAYING)

start=Main()
gtk.main()


patrick




More information about the gstreamer-devel mailing list