Old -> New

Been working with Marlin over past few days. Mostly in my head.

The upgrade to GStreamer 0.10 has allowed me to rethink how everything fits together.

The old way

The old pipeline was two threads: The decoding thread, and the sink thread. The src passed it to the decoder which decoded it, passed it to audioconvert because we’re pretending we’re proaudio and so we want audio/x-raw-float.

After this we split the audio into mono streams. The Deinterleaver splits the data and creates a new src pad for each stream. As these pads are created we create the queue element and get a new sink pad on the sink. This increments the number of channels in the sink (duh) and also sets the number of channels on the sample that is associated with the sink.

This is quite annoyingly complicated and a lot of weird stuff went on in the sink to co-ordinate the incoming pads and link the pads.

The new way

First thing to notice is one thread. wooo. Hopefully I won’t need any other threads but because I’ve not coded this yet I dunno.

The src and decoder do the same. However, the decoder isn’t linked to anything until it knows the number of channels/sample rate etc and creates the srcpad for it. Because we now know this when we create the rest of the pipeline, we can set the format on the sample associated with the load pipeline in one go, not first create one pad, set it to mono, create the second, stereo, third….etc like we used to. This means we can remove the logic for controlling the sample format away from the sink.

Audioconvert and deinterlacer do their same thing (although deinterlacer should be deinterleaver, but its 2am, so sue me.)

Now however, instead of having on sink that deals with the sample as a whole, we have a sink for each channel. Instead of having lots of sinkpads, this sink only has one, and doesn’t care about the other channels.

Advantages

We can now associate a channel sink with a certain channel, which we couldn’t before. So even if we disconnect the pipeline, the left channel will still be connected to the left channel when we reconnect. Moving the sample logic simplifies whats going on a lot, and making each sink be mono allowed us (me) to use GstBaseSink which seems to deal with all the hard stuff for me. The sink code has shrunk from 800 lines to about 300. Wooo

pizzapizzapizza

> Name: 	Iain
> Address: 	******, Belfast, *******, N. Ireland
> Email: 	iain******@******.com
> Telephone: 	+44***********
> Comments: 	Is there anyway to get PizzaPizza delivered to N. 
> Ireland. Its been 8 years since I left Canada, and I miss it, and 
> quite frankly the pizza over here doesn't quite compare. If possible 
> I'd like a medium thin base with chicken, bacon and extra cheese. Do 
> you still do that buy one get a second free offer that you did back 
> in 1998?

from: 	info@pizzapizza.ca

Thank you so much for your kind words. We really appreciate the fact that you took the time to let us know that you enjoy Pizza Pizza.

We value you as a Customer, and we're sorry that you are unable to order in Belfast.

We are always growing bigger, and some day we may have more restaurants to serve the public.

Thank you again, it was very good of you to give us some positive feedback.

Thank you Mr. Holmes.

Pizza Pizza Customer Service

Evil what I done

Productive Easter Monday

I have a hardware sampler now and I have a CD collection of samples. 10,000 samples on 8 discs. Except they all have very helpful names like “rcx00003.wav”. So I wrote this:

It plays the samples as you scroll around them with your cursor keys.

Simple, but lets you preview all the samples really quicky.

Then, for a laugh I wrote this:

I call it Lyricist. At the moment it adds a button to the Muine player window (I made a few modifications to Muine for that…yey for iMuine), and retrieves the lyrics for the family singalong. Sorry Ross, but no bouncing ball.

Also visible in the shot is the button that I added to Muinescrobbler that allows you to tag songs in Last.FM but its not finished yet, so let’s not talk anymore about it.

I also got the first ever “present” for a piece of software I wrote. Chris Daniel paid for 3 months of Last.FM scription for me. Thanks Chris, you rock.

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.

RMS and Bruce Perens Come To Belfast

Big Free Software conference in Belfast today. Here’s my notes from it (in chronological order)

* Bruce Perens is not a ghost. I’m slightly saddened by this.
* Google exists to “Organise the worlds information and make it universally accessible and useful”
* Google’s homepage is sparse and simple because in the beginning they didn’t know HTML well enough to make it more complicated.
* RMS acts like a dick
* Google is “still a relatively small company”
* Behdad’s photo onscreen during Summer of Code talk
* Birmingham City Council using Linux in libraries.
* Publisher is the only hurdle remaining for them to remove XP from their staff desktops – public workstations all using Linux
* RMS acts like a dick again
* BCC didn’t publish that they were using Linux because they didn’t want a million geeks emailing them to say they were using the wrong desktop/distro/package…
* To make the decision they set up 5 machines
– Windows like
– Mac like
– Best of GNOME
– Best of KDE
– (another I’ve forgotten)
And put a usability questionaire beside each one
The best rated were the GNOME and KDE ones. Didn’t reveal which was best.
* Initially used GNOME, had some “major issues” with it so now they use KDE.
* Bruce Perens does not loves Everyone Loves Eric S Raymond. He does not think it is funny to laugh at Eric, because he can’t help the way he is.
* RMS does not like people saying Linux or Open Source. And he tells us so. At length.
* He doesn’t like patents either.
* Or DRM.
* Man in audience does not like RMS comparing the London bombings to a car crash.
* RMS tells man in audience he missed his point.
* Man in audience does not like RMS.
* RMS dons cape and halo and pretends he’s a saint.
* Man in audience (same as above) accuses RMS of wanting to totally change the worlds economy and equates wanting all software to be Free with being able to make a copy of a car.
* RMS says that if indeed there were car copying machines, he would have no problem with someone copying his car. But there isn’t, so its a bit of a moot point.
* BP chimes in and says that there are book copying machines and yet he still sells lots of copies of his book.
* RMS agrees
* RMS and BP argue over some story of people being threatened with rape for copying software
* RMS tells the story of how he got physically ejected from Belfast International Airport.
* Google gave me lots of free crap.

I spoke to the man from BCC about the issues they had with GNOME. He tells me he doesn’t know the details but it was mainly gnopernicus not working well with Openoffice. Don’t see why using KDE would make it work any better. He’s given me his email, and says if I email him, he’ll forward it to the technical guys.

Bringing up the rear

Ireland is famous for many things.
Being wet and green are two of them.
Guiness is another.
Bombs and Father Ted must come high up there too

But if you were to take a list of 1000 things Ireland is renowned for,
And you studied for days
One thing you would find missing from that list
Are bloody mountains ranges.

(Not to mention the insinuation that its sunny here too)

(Sly dig: This just goes to show that KDE is 3 years behind GNOME)

Tango Man

Continuing the trend to make shit icons in a shit style for shit games I present

Who knows / cares what I’ll draw next, but I will, because I’m a graphics ninja! That means if you know about graphics, then I know more than you!

Yesterday

Yesterday I turned 28.
Didn’t do anything to celebrate.
Got the 3rd series of Scrubs.

1st March is a strange day for my family
Not only is it my birthday,
Its also my grandparents on my mother’s sides wedding anniversary.
But also on my father’s side, it’s the anniversary of my grandfather’s death.
So it’s hard to know how to “celebrate” as it is mixed with sorrow and joy
And you know that when my gran is telling me to have a great day
That she’s not going to have a good one.
So really, for the last 17 years, my birthday has sort of just come and go.