[gstreamer-bugs] [Bug 487969] allow nested GstStructures

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Oct 19 01:13:05 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=487969

  GStreamer | gstreamer (core) | Ver: HEAD CVS




------- Comment #5 from Edgard Lima  2007-10-19 08:13 UTC -------

Ok, not problem if GstCaps add an ';' after each of fields (which, currently,
are just GstStructure) (*1) (*2)

Yes, GstStructure MUST add a delimiter, otherwise, we are forcing all of types
that possible are using a GstValue of type GstStructure to have something like
{ if ( field.type == structure ) append(str, ';'); }

(*1) Yes, it is correct to use a delimiter after each caps field, but remember,
field delimiter (at least regarding GstStructure) is ',' not ';'.....but, yes,
it would break current applications so its is not a big problem to use ';' as
field delimiter for caps.

(*2) There is a requirement that any 'Type' MUST follow, it has to know when it
ends, could be '\"', ')', ';', '\0' or whatever 'cause the 'Thing' that owners
this 'Field' doesn't know what is inside the 'Field', so, the 'Thing' can't
separate the fields and create a new string ended with '\0' to be parsed by the
field_type_from_string. It is because the field can have inside it the same
character that the 'Thing' uses as delimiter.

-

So my suggestion is: (I'm attaching a patch with it)

1- structure put a ';' in the end (it is just a structure mark of end,
currently we could accept also \0 as end mark), in the future we could use '('
and ')' (*5)

2- caps put a ';' as field delimiter, in the future we could change to ','

3- add an additional ';' as Caps mark of end (for now it is still acceptable to
find \0 for backward compatibility reason)

-

(*3) there is something still not solved, what if some type wants to use
GstCaps inside it? How GstCaps knows where it ends? So again...it would be a
good design to use ',' (or whatever) as field separator and ';' (or whatever)
as and of list mark.

(*4) So, each type the has a variable lenght MUST know where it ends

(*5) The only advantage I can see to use '(' and ')' for variable length is
'cause it is more readably by Humans ... but may be I'm missing something here
and it is also better for parsers

[]s
Edgard

please assign me


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=487969.




More information about the Gstreamer-bugs mailing list