GSVideo constantly creating new threads which leads to Invalid memory access on Mac OS X
in
Contributed Library Questions
•
11 months ago
Hi,
It seems like GSVideo is constantly creating new threads when running a basic example like this:
- package org.ixagon.gsvideotest;
- import java.util.ArrayList;
- import codeanticode.glgraphics.GLConstants;
- import codeanticode.glgraphics.GLTexture;
- import codeanticode.gsvideo.GSMovie;
- import processing.core.PApplet;
- @SuppressWarnings("serial")
- public class GSVideoTest extends PApplet {
- private GSMovie movie;
- private GLTexture tex;
- @Override
- public void setup() {
- size(640, 480, GLConstants.GLGRAPHICS);
- background(0);
- movie = new GSMovie(this, "sample.avi");
- tex = new GLTexture(this);
- movie.setPixelDest(tex);
- movie.loop();
- }
- public void movieEvent(GSMovie movie) {
- movie.read();
- }
- @Override
- public void draw() {
- if (tex.putPixelsIntoTexture()) {
- image(tex, 0, 0);
- }
- }
- public static void main(String args[]) {
- ArrayList<String> argList = new ArrayList<String>();
- argList.add("org.ixagon.gsvideotest.GSVideoTest");
- PApplet.main(argList.toArray(new String[0]));
- }
- }
If you run the example in Debug mode and check the Debug in Eclipse you will see that it creates a new thread per frame, it seems to dump the old one, but still, creating a new thread.
When running the sketch for about 12 hours it crashes with an "Invalid memory access of location" on a thread called "Thread 2683867", which is the thread count it has reached.
I've checked the source code of GSVideo and it doesn't create any new threads anywhere in there. Is it an issue with gstreamer?
Many many thanks in advance.
1