vid: Only put 100 files in the playlist to workaround vlc memleaking.

This commit is contained in:
Ole Tange 2023-04-12 21:31:46 +02:00
parent 5ab7ad938f
commit cca4f04bd1
3 changed files with 11 additions and 8 deletions

2
G/G
View file

@ -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`;
}

View file

@ -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(<IN>) {
{
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(<IN>) {
if($funcs{$func}) {
return ($funcs{$func} eq "r");
} else {
warn_missing($func);
warn_unknown($func);
return 0;
}
}
@ -421,7 +421,7 @@ while(<IN>) {
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 <https://gnu.org/licenses/gpl.html>",
"This is free software: you are free to change and redistribute it.",

View file

@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
=head1 DEPENDENCIES
B<vid> uses B<G>, and B<vlc>.
B<vid> uses B<G>.
=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