Kevin West
unread,Feb 22, 2011, 10:19:06 PM2/22/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gstreamer-java
Hi all. I'm using gstreamer-java in order to create a pipeline for
generating thumbnails from video files. I call Gst.init() once as my
program launches, and only de-init when we are shutting down. This is
important so as to cache the gstreamer plugins for quicker thumbnail
generation. As part of the process, I am often creating and disposing
pipelines, one per thumbnail.
The problem I am running into is that for each thumbnail I generate my
memory usage seems to spike quite a bit, around 5-10MB per thumbnail
(going by Activity Monitor in OSX). I have connected a java memory
profiler, and I can see that the heap space being used in java space
is quite small. I also have noticed that if I trigger the GC in java
space my overall memory usage does not decrease. In addition to
memory usage, there are extra native threads sitting around.
I suspect that the memory that is being used is all in native space,
and the gstreamer components are not being disposed properly. The way
I dispose of things right now is simply setting the pipeline state to
NULL, and then calling the dispose method. I have also tried
disposing every Element that is a child of the pipeline, and
disconnecting all bus message handlers, but that doesn't seem to free
things up either.
So my question is, am I doing something wrong here? Is there some
special step I need to take to dispose the pipeline properly? Could
this be an issue with the pipeline I'm creating?
Thanks!