GNOME Bugzilla – Bug 331255
Shrinking gst_parse_launch bloat
Last modified: 2006-03-03 15:34:03 UTC
After taking a look at the parse launch lexer, it seems we can cut down the size significantly using the attached patch. With this change, the size of the gstreamer.so here drops from 2193KB to 1565KB. The big reduction comes from dropping support for quoted strings and mimetypes in our parse launch syntax, which I don't think anyone uses anyway. I will solicit more comments on this from the website. I've added a testsuite of various parse launch lines to CVS, and all continue to work with this patch.
Created attachment 59398 [details] [review] Remove quoted-caps-string support
Where by, "from the website", I mean "from the mailing list"
Can you give an example of the situation before and after...
gst-launch fakesrc ! \"video/x-raw-int , width=\(int\)640\" ! fakesink won't work any more, but gst-launch fakesrc ! video/x-raw-int , width=\(int\)640 ! fakesink still does gst-launch fakesrc ! \"video/x-raw-int;encoding=blah\" ! fakesink used to create a mimetype of video/x-raw-int;encoding=blah, but won't work now. A mime type containing ; used to screw up when you converted caps_to_String and back anyway, because the quotes get lost, and then ; will be interpreted as a new chained caps instead. encoding=blah should be part of the caps anyway, I think - not the mimetype. \"my random string\" used to be a valid mimetype and the quotes stripped, but now only x-string/string is allowed. These are not 630KB of features IMO
Since several people have expressed approval, and noone has disapproved, and since this doesn't break anything I've been able to find, I've just committed it: * gst/parse/parse.l: Commit patch for parse_launch syntax from #331255. Removes support for quoted strings and mimetypes when writing filtered caps. See the bug report for more details - I'm pretty sure this obscure feature is not in use by _anyone_ anywhere. With this simple change, the size of the gstreamer.so here drops from 2193KB to 1565KB.