gstreamer with smaller footprint for low memory devices

Nicolas Dufresne nicolas at ndufresne.ca
Tue Nov 19 12:24:31 UTC 2019


Le mardi 19 novembre 2019 à 10:34 +0100, Edward Hervey a écrit :
> Hi,
> 
> On Tue, 2019-11-19 at 05:59 +0000, Muralidhar S R wrote:
> > Hello,
> > 
> >  
> > 
> > I was looking for a tiny gstreamer core, but found that around 2.7+
> > MB is consumed by Glib only.

Just an add-on, we found that GLib UTF-8 tables takes a lot of space.
If you don't use anything else then ansi (and C locales), you maybe
managed to reach slower size my commenting out these tables.

> 
>   It depends under what circumstances. Also some parts can be compiled
> out if needed.
> 
> > And looks like gstreamer is tightly coupled with glib.
> > 
> >  
> > 
> > Is there any in-progress task/bug for decoupling the glib with
> > gstreamer ?
> > 
> >  
> > 
> > Also, will it a better idea to decouple glib and then integrate with
> > musl instead of glibc to reduce memory footprint.
> > Appreciate any suggestions or advice on this ?
> 
>   glib and glibc are not the same thing. For example The Alpine
> distribution uses musl instead of glibc and gstreamer works fine on
> there.
> 
>   GStreamer use *glib* for 3 things:
>   * libglib: platform abstraction (such as threading primitives) and
> basic types (linked list, hash tables, ...).
>   * libgobject: Dynamic object-based instropectable system. This allows
> us to do "object-based" programming in C with types loaded at runtime.
>   * libgio: i/o abstraction so that we don't have to care about
> accessing socket/files/... on any platform. This is mostly used for
> some networking-related components, for which we also have alternative
> implementations (curl) or for which we could look at implementing
> native plugins.
> 
>   Everything else in glib is not used that much. You could build a glib
> with all optional parts stripped out and would gain a lot. Note that a
> good part of the memory usage of glib is due to unicode/iconv support.
> If you're targetting an "international" system you will need support
> for that one way or another.
> 
>   Converting GStreamer to *not* use glib/gobject would take too much
> effort for very little gain (glib/gobject has been optimized a lot over
> the years). If your goal is reducing the memory footprint it would be
> more beneficial to look at stripping down glib to your requirements.
> 
>   In the end, it all depends on your requirements. 
> 
>   Best Regards,
> 
>     Edward
> 
> > Regards
> > Murali
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list