The road to 0.10

Once upon a time there was an application called Marlin that used GStreamer 0.8. It used GStreamer 0.8 quite heavily, with about 8000 lines of code solely to deal with GStreamer. Then GStreamer 0.10 came out and there was much rejoicing as it was superior in many respects. But Marlin was unable to take advantage of it.

Then early one very cold morning in Helsinki, it was decided to make Marlin run. But it refused. “No!” it said. Repeatedly. Looking at the code after 6 months revealed new insights about why would always refuse, and it was categorically decided to make it work with the new GStreamer.

A plan was concocted in a warm bed, and the plan was thus:

The first step was to tidy the existing code up. All warnings and errors were fixed and removed, and silly bits of code were made less silly.

This revealed many silly errors, such as

MarlinUndoable *
marlin_undoable_new (MarlinUndoableFunc undo,
		     MarlinUndoableFunc redo,
		     MarlinUndoableFunc destroy,
		     gpointer closure)
	MarlinUndoable *u;

	u = g_new0 (MarlinUndoable, 1);
	u->undo = undo;
	u->redo = redo;
	u->destroy = destroy;
	u->closure = closure;

Once these errors were eradicated the next step was to disable the GStreamer code.

One sidetracking later, in which the evil witch of libxml was banished being replaced by the good GMarkup fairy, and all 8000 lines of GStreamer 0.8 code were disabled and Marlin would run once more, albeit not actually do anything.

Finally it was decreed that the code would be put back in place slowly and carefully, starting with the dead easy simple stuff, and then plan out how to integrate GStreamer 0.10 correctly into Marlin.

Currently, GStreamer is now correctly initialised, and the file chooser can preview a sample…more stuff will come. There is an understanding in the country of how the GStreamer stuff will work.