a simple video player that plays videos from a directory, auto plays all, and has arrow key inputs for jumping to next or previous movie file.[move] >>[/move][move]<<[/move]
currently all movies are without sound. seems to play well and jump to the next video.
after a few days i get this error:
OF: OF_LOG_ERROR: GStreamer Plugin: Embedded video playback halted; module mpegpsdemux1827 reported: Internal data stream error.
(<unknown>:6047): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
(<unknown>:6047): GStreamer-WARNING **: adding flushing pad 'src0' to running element 'multiqueue1849', you need to use gst_pad_set_active(pad,TRUE) before adding it.
OF: OF_LOG_WARNING: GStreamer: cannot query time duration
** (<unknown>:6047): WARNING **: gstvideo: failed to get caps of pad sink:sink
OF: OF_LOG_ERROR: GStreamer: cannot query width and height
33 files loaded
359861 load time
(<unknown>:6047): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
** (<unknown>:6047): WARNING **: gstvideo: failed to get caps of pad sink:sink
OF: OF_LOG_ERROR: GStreamer: cannot query width and height
the app is a mod of videoplayer, ofdirlist examples with arrow keys inputs
void mrmovie::next()
{
set( (currentFile + 1) % files.size() );
}
void mrmovie::previous()
{
set( (currentFile - 1 + files.size()) % files.size() );
}
void mrmovie::set(int i)
{
currentFile = i;
movie.closeMovie();
movie.loadMovie(files[currentFile]);
movie.play();
}
//--------------------------------------------------------------
void mrmovie::update()
{
movie.idleMovie();
if (movie.getIsMovieDone())
next();
// every once in a while check directory to see if any new movies, load them into files[]
if ((ofGetElapsedTimef()-loadedAtS) > 5000.0)
load();
}
there is also code related to sending tweets but i don’t believe this is causing the error. https://github.com/danpaluska/mrMovie/blob/master/src/mrmovie.cpp
of possible importance or totally unrelated?
Motion -"http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome" is running as well on the machine.
in another version, i was using a directory of movies with somewhat inconsistent soundtracks lengths and this would also often cause gstreamer to get stuck, usually much faster. but i can live without the audio on the movies.
currently it just runs 24hours a day. screensaver turns on at certain times but
goal for this: unattended relatively long term installation type setting. on for ~8-10 hours a day.
options for long life running?
-change code?
-catch errors and try some additional closing or pausing?
-something to shut down the program each [n] days, restart it fresh?
i’m guess im leaning towards the last option happening nightly.
tanx!