From cca4f04bd15566f7dbd0ccf7c312dd575b999f73 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 12 Apr 2023 21:31:46 +0200 Subject: [PATCH] vid: Only put 100 files in the playlist to workaround vlc memleaking. --- G/G | 2 ++ tracefile/tracefile | 10 +++++----- vid/vid | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/G/G b/G/G index f47e984..86b70a2 100755 --- a/G/G +++ b/G/G @@ -134,6 +134,8 @@ if($opt::g and @cmd) { } sub cache_gitdir { # cat all files in .git to /dev/null + # this will (hopefully) move it into disk cache + # so seeks can be avoided my $dir = shift; `find "$dir" -type f -print0 | xargs -0 cat >/dev/null`; } diff --git a/tracefile/tracefile b/tracefile/tracefile index b275455..fa0c165 100755 --- a/tracefile/tracefile +++ b/tracefile/tracefile @@ -255,7 +255,7 @@ use Getopt::Long; sub version(); sub help(); $Global::progname = "tracefile"; -$Global::version = 20230409; +$Global::version = 20230410; Getopt::Long::Configure("bundling","require_order"); get_options_from_array(\@ARGV) || die_usage(); @@ -390,7 +390,7 @@ while() { { my %warned; - sub warn_missing { + sub warn_unknown { my $func = shift; $warned{$func}++ or warning("'$func' is unknown. Please report at", @@ -407,7 +407,7 @@ while() { if($funcs{$func}) { return ($funcs{$func} eq "r"); } else { - warn_missing($func); + warn_unknown($func); return 0; } } @@ -421,7 +421,7 @@ while() { if($funcs{$func}) { return ($funcs{$func} eq "w"); } else { - warn_missing($func); + warn_unknown($func); return 0; } } @@ -534,7 +534,7 @@ sub version() { print join ("\n", "$Global::progname $Global::version", - "Copyright (C) 2020-2022 Ole Tange, http://ole.tange.dk and Free Software", + "Copyright (C) 2020-2023 Ole Tange, http://ole.tange.dk and Free Software", "Foundation, Inc.", "License GPLv3+: GNU GPL version 3 or later ", "This is free software: you are free to change and redistribute it.", diff --git a/vid/vid b/vid/vid index 2045475..4e29b46 100755 --- a/vid/vid +++ b/vid/vid @@ -57,7 +57,7 @@ along with this program. If not, see . =head1 DEPENDENCIES -B uses B, and B. +B uses B. =head1 SEE ALSO @@ -145,8 +145,9 @@ stdin() { stdout() { if [ -t 1 ] ; then # STDOUT = terminal - # start VLC - parallel --halt now,done=1 --lb -Xj1 vlc + # start $VIDEOPLAYER + VIDEOPLAYER=${VIDEOPLAYER:-vlc --} + shuf | parallel --halt now,done=1 --lb -n100 -Xj1 $VIDEOPLAYER else cat fi