[gst-devel] [gst-cvs] gst-plugins-base: oggdemux: Handle unknown streams

David Schleef ds at entropywave.com
Fri Nov 27 22:38:59 CET 2009


On Fri, Nov 27, 2009 at 09:08:46AM +0100, Edward Hervey wrote:
> On Thu, 2009-11-26 at 14:17 -0800, David Schleef wrote:
> > Module: gst-plugins-base
> > Branch: master
> > Commit: a8e99f80dff7bb35d9e66770a6cf825132edba50
> > URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=a8e99f80dff7bb35d9e66770a6cf825132edba50
> > 
> > Author: David Schleef <ds at schleef.org>
> > Date:   Wed Nov 25 16:53:26 2009 -0800
> > 
> > oggdemux: Handle unknown streams
> 
> >      pad->have_type = gst_ogg_stream_setup_map (&pad->map, packet);
> > +    if (!pad->have_type) {
> > +      pad->map.caps = gst_caps_new_simple ("application/x-unknown", NULL);
> > +    }
> 
>   Isn't there an extra qualifier we could get from the underlying
> streams and add to the caps ?
>   Something like application/x-ogg-unknown,format=BLAH ? That would help
> identify somewhat the various unknown streams. We do the same with avi
> (x-avi-unknown or sth like that) and it's actually quite helpful when
> detecting missing codecs (and/or mappings).

Ogg identifies codecs/mappings by the first 4 to 8 or so bytes in
the bos packet.  These bytes are not necessarily printable ASCII,
although often are.  You can see the identification strings here:

  http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/ogg/gstoggstream.c#n962

I suppose one could put the first 8 bytes, or even the entire bos
packet, into the -unknown caps, but it would only be useful for
debugging, not for actually identifying missing mappings.

In practice, there aren't likely to be any missing mappings, except
maybe experimental ones.

The OGM mapping, which is incomplete in oggdemux, uses a fourcc
identifier like AVI, so that should use application/x-ogm-unknown,format=
when it's implemented.

>   If ogg can't provide it, then too bad, but it wold be a nice addition.

Agreed.



dave...





More information about the gstreamer-devel mailing list