[gst-devel] GStreamer wrappers for KDE/Qt

Christian Fredrik Kalager Schaller Uraeus at linuxrising.org
Sun Aug 18 02:33:02 CEST 2002


This is really cool Tim, thanks for the great work. AS a sidenote maybe
it would be a good idea to mirror the bindings code in GStreamer CVS
also?

Christian

On Sat, 2002-08-17 at 18:46, Tim Jansen wrote:
> Hi..
> 
> At the last KDE multimedia/arts meeting, the (few) participating people agreed 
> to split the next-generation multimedia system into three parts: 
> 1. a sound server
> 2. a multimedia framework
> 3. something for music creation/synthesis
> Here is my contender for number 2. 
> 
> I have written wrappers for GStreamer (http://gstreamer.net). Most classes and 
> functions have been translated 1:1 to C++/Qt. This should be almost 
> everything that you need to write GStreamer applications with a Qt'ish 
> feeling. You can find the code in KDE CVS, kdenonbeta/gst 
> (http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdenonbeta/gst). To get a first 
> impression of the API, see the short example at the end of the mail. You can 
> find more complete examples, including a gui-based video player, in the 
> repository.
> 
> What's still missing?
> - support for dynamic parameters
> - testing, most wrapper functions have not been tested yet (I don't expect 
> many bugs though, most implementations have 1-2 lines)
> - please note that GStreamer itself is not mature yet
> 
> What's next?
> - backend-independent KPlayObject and KVideoWidget-equivalents to allow easy 
> porting of existing apps and to allow developers to use audio/video without  
> GStreamer knowledge
> - KIO-based source and sink elements for a better integration with KDE-apps
> 
> 
> - snip! ----- Example --------------------------------------------------------
> /* Play mp3, function blocks until finished, all error handling removed */
> void playMp3(const QString &file) { 
> 	Pipeline *bin;
> 	Element *filesrc, *decoder, *osssink;
> 	
> 	/* create a pipeline to hold the elements */
> 	bin = new Pipeline();
> 	
> 	/* create a disk reader */
> 	filesrc = ElementFactory::make("filesrc");
> 	filesrc->setString("location", file);
> 	
> 	/* get the mp3 decoder */
> 	decoder = ElementFactory::make("mad");
> 
> 	/* and an audio sink (OSS based) */
> 	osssink = ElementFactory::make("osssink");
> 	
> 	/* add objects to the pipeline */
> 	bin->add(filesrc, decoder, osssink);
> 	
> 	/* connect the elements in the pipeline*/
> 	filesrc->connect(decoder)
> 	decoder->(osssink);
> 	
> 	/* start playing */
> 	bin->setState(Element::STATE_PLAYING);
> 	while (bin->iterate());
> 	
> 	/* stop the bin and delete it */
> 	bin->setState(Element::STATE_NULL);
> 	delete bin;
> }
> 
> 
> bye...
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> 






More information about the gstreamer-devel mailing list