GStreamer on mobile devices and "out of memory" handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


hi,

Martin Olsson wrote:
> Hi,
>
> I'm aware of the sane arguments for not adding explicit OOM handling to most apps (i.e. http://0pointer.de/blog/projects/on-oom.html etc).
> However, I'm working with various mobile devices, sometimes with no virtual memory or peculiar OOM killers. Further, my app is the "main application" on the device
> meaning that if it's killed there is no more GUI making a reboot the only way out. So I need to handle OOM gracefully in this app and I have
> good mechanisms for doing that.
>
> I'm looking for a video/audio playback solution for this application and I'd love to use GStreamer, and ideally without maintaining a GStreamer/GLib
> fork so I'd like to avoid making changes to g_malloc etc.
>
> Has anything like this been done before? Is there any GStreamer forks for mobile devices? Is there any other media playback framework that is
> more suited for mobile devices? Can you recommend any particular approach to this problem?
>   
What we do in gstreamer for it is to use g_try_malloc when doing
allocations where the size is based on input data. There might be places
where this is not done. Also objects are allocated using g_slice and
would terminate the app if you run out of memory.

If you get termination on low memory, it would be a good idea to check
the backtrace and file a bug if the code is using g_malloc for data.

Stefan

> So far what I was thinking was maybe I could use setjmp/longjmp to jump out of a modified g_malloc up through the stack to the point where my
> application calls into GStreamer but this of course requires changes to g_malloc (though maybe not so big changes).
>
>
>
> 		Martin
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Gstreamer-embedded mailing list
> Gstreamer-embedded at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-embedded
>   





[Index of Archives]     [Linux Embedded]     [Linux ARM Kernel]     [Linux for ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux Media]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux