[packagekit] GStreamer Structure

Sebastian Heinlein glatzor at ubuntu.com
Sun Dec 7 08:20:07 PST 2008

Am Sonntag, den 07.12.2008, 08:49 +0000 schrieb Richard Hughes:
> On Sat, 2008-12-06 at 15:49 -0800, Sebastian Heinlein wrote:
> > recently the provided Gstreamer plugins have been added to the package
> > meta data in Debian and therefor in Ubuntu too.
> Great news.

Indeed. Perhaps we also get the font information in the cache soon.

> > What I need is to get the Gst object type and the structure to convert
> > it into caps again:
> > 
> > Package.hasGstreamerPlugin("decoder", "audio/mpeg, version=1, layer=3")
> What format is the package metadata in? Can't you just use a flat string
> like "decoder-audio/mpeg, mpgversion=1, layer=3" -- or do you have to
> break the decoder field up?

I have to remove the prefixed decoder/encoder/urisink/urisource/element

> > Could we try to find a format which would avoid all this rewriting?
> To be honest, I think all the backends are going to implement this
> different ways, and encode the data slightly differently, and that we
> just have to document the different formats.

I would like to have a valid gst structure which I can feed to gst.Caps
to reuse the is_subset method for comparing.

So currently I have to remove all the brackets again and replace them by
a comma separated list.

The metadata e.g. for gstreamer0.10-ffmpeg:

Gstreamer-Decoders: application/gxf; application/mxf; application/x-ape;
application/x-gst_ff-voc; application/x-gst_ff-wc3movie;
application/x-gst_ff-wsaud; application/x-gst_ff-wsvqa;
application/x-shockwave-flash; application/x-yuv4mpeg,
y4mversion=(int)2; audio/atrac3; audio/mpeg, mpegversion=(int)1,
layer=(int)[ 1, 3 ]; audio/mpeg, mpegversion=(int)4; audio/x-ac3;
audio/x-adpcm, layout=(string){ 4xm, adx, ct, ea, ea-r1, g726, amv, dk3,
dk4, quicktime, smjpeg, dvi, westwood, microsoft, sbpro2, sbpro3,
sbpro4, swf, thp, xa, yamaha, ea-r3 }; audio/x-aiff; audio/x-alac;
audio/x-dpcm, layout=(string){ interplay, roq, sol, xan }; audio/x-dts;
audio/x-ffmpeg-parsed-ape; audio/x-ffmpeg-parsed-musepack,
streamversion=(int){ 7, 8 }; audio/x-flac; audio/x-gst_ff-mp3adu;
audio/x-gst_ff-mp3on4; audio/x-gst_ff-sonic; audio/x-gst_ff-vmdaudio;
audio/x-gst_ff-ws_snd1; audio/x-mace, maceversion=(int){ 3, 6 };
audio/x-musepack, streamversion=(int)7; audio/x-nellymoser;
audio/x-pn-realaudio, raversion=(int){ 8, 1, 2 }; audio/x-qdm2;
audio/x-shorten; audio/x-truespeech; audio/x-tta; audio/x-ttafile;
audio/x-wma, wmaversion=(int){ 1, 2 }; image/bmp; image/jpeg; image/pbm;
image/png; image/ppm; video/mpeg, mpegversion=(int){ 4, [ 1, 2 ] }, 

Gstreamer-Elements: ffaudioresample, ffdec_4xm, ffdec_8bps, ffdec_aac,
ffdec_aasc, ffdec_ac3, ffdec_adpcm_4xm, ffdec_adpcm_adx, ffdec_adpcm_ct,
ffdec_adpcm_ea, ffdec_adpcm_ea_r1, ffdec_adpcm_ea_r2, ffdec_adpcm_ea_r3,

Gstreamer-Encoders: application/x-3gp; application/x-gst_ff-3g2;
application/x-gst_ff-amr; application/x-gst_ff-mmf;
application/x-gst_ff-vob; audio/mpeg, mpegversion=(int)1, layer=(int)2;
audio/x-ac3; audio/x-adpcm, layout=(string){ adx, g726, quicktime, dvi,
microsoft, swf, yamaha }; audio/x-alac; audio/x-dpcm,
layout=(string)roq; audio/x-gst_ff-sonic; audio/x-gst_ff-sonicls;
audio/x-nellymoser; audio/x-wma, wmaversion=(int){ 1, 2 }; image/bmp;
image/gif; image/jpeg; image/pbm; image/png; image/ppm; video/mpeg,
mpegversion=(int)1, systemstream=(boolean)false; video/mpeg,
systemstream=(boolean)true; video/mpegts, systemstream=(boolean)true; 

Gstreamer-Version: 0.10

More information about the PackageKit mailing list