[gst-devel] So what's this 'Warsaw Pakt' stuff anyway?

daniel fischer dan at f3c.com
Mon Nov 28 03:55:01 CET 2005

Hi all,

i understand that my late releases might cause some confusion, it is not quite clear what this stuff actually does. I'll try here to write up some info about it. It's not really much that couldn't be found in the READMEs, but well, it might have a different perspective:

Warsaw Pakt, not the historical military treaty, nor the 70s punk band, but the anno 2000+ free software around GStreamer, is really two things: Pakt, and Warsaw (duh!). It's two very different technologies that both interface to GStreamer, but from two sides:

1. Pakt

Pakt is an "Networked XML abstraction layer for GObjects". A pakt server (paktd) runs a model of GObjects (which might well be a GStreamer pipeline), and publishes that as an XML document. Clients can connect to the server using various methods, the most popular being Flash-like XMLSockets (just TCP-sockets with document fragments separated by null bytes), and query and change the model. As GTK widgets are also "just" GObjects, pakt can also instantiate and run a simple GUI.

There is one basic thing with pakt that i use often, and that might explain some ideas behind it: paktc, the "generic" pakt client. It's actually not really such a generic client. paktc connects to a pakt server running a GStreamer pipeline, requests the complete XML model describing the pipeline, transforms it with a witty XSLT stylesheet to an XML-representation of a simple GTK GUI to control the pipeline. The GUI elements are indeed hooked up (using some helper classes) to send network commands to the server to actually change parameters. So, a simple paktd/paktc combination is something like gst-launch-gui via network.

To see this in action, assuming you installed pakt fine, run, in terminal A:
  paktd --gst "videotestsrc ! xvimagesink"
That should open a window showing the common GStreamer test video, very much like gst-launch. But now, as promised, the structure of the pipeline is published on the network, you could request the complete model with
to get an idea of what's there. Something like
  pget -t /pipeline0
will request only a certain part of the model, and
  pset -t '<set target="/pipeline0/videotestsrc0/pattern" value="snow"/>'
will send the given XML to the pakt server, effectively changing the "pattern" property of videotestsrc0 to snow. The displayed video should change.

Now, a simple
will do all the magic of requesting the model, transforming it to GTK, instantiating (thus displaying) that GUI, and hooking up the interface elements to the server.

That's the basics of pakt. There's more, but i leave that to your imagination for now.

2. Warsaw

Warsaw, on the other hand, is something completely different. While pakt "wraps GStreamer" (and other GObject libraries), Warsaw (or libwarsaw to be more precise) is a "middleware" library that allows you (and me) to write new GStreamer elements in C++, saving a lot of typing and (IMHO) making element-making much more elegant. Warsaw separates "processing model" from "data model", and relies on C++ templating to re-unite these for a specific element. Unclear what i mean? Imagine a class like that:
  class myFilter : public wInplace<wRGBAVideo>
defines a new filter class (myFilter), that is an in-place processor of RGBA video. It will have to override its main process function,
	virtual bool Process( wRGBAVideo *data )
to do the actual processing. The wRGBAVideo structure provides some convenience methods to query the "caps" (format) of the data, and, of course, pointer and size to the current buffer to process. A new element can also (of course) define parameters. Just have a look at some simple elements included in warsaw, you'll get the idea.

Warsaw can be useful to others (not only me), in two ways: first, you might want to use it, like me, to write actual GStreamer elements. It won't do for really complex elements, there you'll be better off writing it in "plain GObject C". But if it's rather simple, warsaw might be of help. I recently updated warsaw to use gst-0.9's new "base classes", and didn't really have to change much about my elements. That's the idea there. On the other hand, you might not be interested to write your own elements yourself, but just use some of mine. I've integrated a few image processing functions from Intel's OpenCV library, and some to draw stuff with cairographics. There will be more, the current warsaw distribution includes only a few basic, useful plugins. I think there'll be a warsaw-exp to feature some more experimental stuff.

3. So What?

What is this all about you ask? Well, i do work with this, you can have a look at some of my projects at
, they mostly have to do with realtime video processing. And yes, of course, i use gstreamer for that. I publish this software as free software in an attempt to contribute back to the community/ies that helps me so much. Until now, very little people except me really use any of that. But there have been, even successful, attempts to do so, and i'm still quite helpful if anyone gives it a shot. Doing proper releases and such also helps me to stabilize things. If it just hangs around my harddrive, y'know, well, bitrot and such.

I hope this gave a little introduction to my motivation and the workings of this weird thing called Warsaw Pakt or so. You're invited to try it. And comments are always appreciated.

Oh, and while i still have your attention: this 0.9 thing just totally rocks! "Ful Kul", as they sometimes say here in slovenia :)


More information about the gstreamer-devel mailing list