GNOME Bugzilla – Bug 708772
caps: caps in structure are converted by serialization / deserialization to simple structure with more fields
Last modified: 2014-05-04 10:25:19 UTC
Created attachment 255708 [details] Simple python script to examplify, second field number should be 1 Or, worded otherwise, the fields of the caps become the fields of the structure.
Created attachment 255726 [details] [review] value: fix caps serialization when there are caps inside caps This fixes this scenario, but how deep do we want to go with this? If we have caps inside caps inside caps, the pair of "" of level 2 will clash with the ones from level 3 and it will break. Also if there is any string containing *"* it will break the parsing. Do we want to care about those scenarios? Doesn't seem common for our current use cases.
Yes of course, having a single token for opening and closing doesn't lend itself very well to recursion :) A solution would be to use <video/x-raw, format=blabla> but that introduces a new set of reserved tokens. My favorite solution, but I'm not sure it could be merged, would be to go from a C-type cast syntax to a functionnal cast syntax for the type of the field, like so: instead of having (GstCaps) video/x-raw, format=blabla , you would have GstCaps(video/x-raw, format=blabla). Would be super nice but not sure we could change the syntax like that :) Anyway we worked around it so that's not critical to us, would just be nice if it could be done :)
I don't think we care about caps-in-caps (structure-in-structure: maybe, but not caps-in-caps imho)
Dash/smoothstreaming demuxers use caps in caps, but just one level.
Oh, I thought that was discussed and we wanted to fix that :-/ It should still be fixed really if possible at all
I think the attached patch is fine, let's keep it that way and put something in the documentation to warn about the limitations.
Comment on attachment 255726 [details] [review] value: fix caps serialization when there are caps inside caps Please push after adding something to the docs that warns about the limitations
commit 007c0e5fe155abbc3fc0d801c47ba7388cda3f48 Author: Thiago Santos <ts.santos@partner.samsung.com> Date: Wed Sep 25 19:06:55 2013 -0300 value: fix caps serialization when there are caps inside caps Wrap caps strings so that it can handle serialization and deserialization of caps inside caps. Otherwise the values from the internal caps are parsed as if they were from the upper one https://bugzilla.gnome.org/show_bug.cgi?id=708772