summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-07 11:21:50 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-07 11:21:50 +0000
commit2210d8717feefc9ab7f50714a351b94503cee321 (patch)
tree6fab55b440509fc6c8f85e60525a8a2903610817
parent11a540bbf2bfd43668b01168f1a9d00035c8962e (diff)
Add code to use MPEG instead of Ogg Theora for the pause screen, to
see if the memory leak in VLC can be worked around that way.
-rwxr-xr-xfrikanalen/bin/scheduler21
1 files changed, 16 insertions, 5 deletions
diff --git a/frikanalen/bin/scheduler b/frikanalen/bin/scheduler
index b6faf28..bed05f4 100755
--- a/frikanalen/bin/scheduler
+++ b/frikanalen/bin/scheduler
@@ -264,10 +264,18 @@ sub generate_program {
my $tmpdv = "temp.dv";
system("image2raw -r $len $tmppng > $tmpdv");
- # Generate Ogg Theora, VLC do not understand raw DV
-
- my $resultfile = "test.ogv";
- system("ffmpeg2theora --width 384 --height 288 -o $resultfile $tmpdv");
+ my $resultfile;
+ # Generate Ogg Theora or MPEG, VLC do not understand raw DV
+ if (0) {
+ # VLC leak memory when looping over a Ogg Theora file
+ $resultfile = "test.ogv";
+ system("ffmpeg2theora", "--width", "384", "--height", "288",
+ "-o", $resultfile, $tmpdv);
+ } else {
+ $resultfile = "test.mpeg";
+ unlink($resultfile);
+ system("ffmpeg", "-s", "384x288", "-i", $tmpdv, $resultfile);
+ }
unlink $tmppng;
unlink $tmpdv;
print "Done generating pause screen DV\n";
@@ -328,7 +336,9 @@ sub vlc_start {
# push(@vlcargs, "--sout='#duplicate{dst=display,dst=\"transcode{vcodec=theo,vb=256,acodec=vorb,ab=64,vfilter=canvas{width=320,height=240,canvas-aspect=4:3}}:standard{mux=ogg,dst=source:$icecastpasswd\@$icecastserver/live.ogv,access=shout}\"}'");
print "starting VLC: vlc ". join(" ", @vlcargs) . "\n";
- exec("vlc", @vlcargs);
+ exec(
+# "valgrind", "--leak-check=full",
+ "vlc", @vlcargs);
exit 0;
} else {
$vlc->{url} = "http://localhost:8080/";
@@ -382,4 +392,5 @@ sub vlc_play {
$postfunc->($vlc, $url);
}
}
+ sleep(1);
}