vid: Only put 100 files in the playlist to workaround vlc memleaking.
This commit is contained in:
parent
5ab7ad938f
commit
cca4f04bd1
2
G/G
2
G/G
|
@ -134,6 +134,8 @@ if($opt::g and @cmd) {
|
||||||
}
|
}
|
||||||
sub cache_gitdir {
|
sub cache_gitdir {
|
||||||
# cat all files in .git to /dev/null
|
# cat all files in .git to /dev/null
|
||||||
|
# this will (hopefully) move it into disk cache
|
||||||
|
# so seeks can be avoided
|
||||||
my $dir = shift;
|
my $dir = shift;
|
||||||
`find "$dir" -type f -print0 | xargs -0 cat >/dev/null`;
|
`find "$dir" -type f -print0 | xargs -0 cat >/dev/null`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ use Getopt::Long;
|
||||||
sub version();
|
sub version();
|
||||||
sub help();
|
sub help();
|
||||||
$Global::progname = "tracefile";
|
$Global::progname = "tracefile";
|
||||||
$Global::version = 20230409;
|
$Global::version = 20230410;
|
||||||
|
|
||||||
Getopt::Long::Configure("bundling","require_order");
|
Getopt::Long::Configure("bundling","require_order");
|
||||||
get_options_from_array(\@ARGV) || die_usage();
|
get_options_from_array(\@ARGV) || die_usage();
|
||||||
|
@ -390,7 +390,7 @@ while(<IN>) {
|
||||||
{
|
{
|
||||||
my %warned;
|
my %warned;
|
||||||
|
|
||||||
sub warn_missing {
|
sub warn_unknown {
|
||||||
my $func = shift;
|
my $func = shift;
|
||||||
$warned{$func}++ or
|
$warned{$func}++ or
|
||||||
warning("'$func' is unknown. Please report at",
|
warning("'$func' is unknown. Please report at",
|
||||||
|
@ -407,7 +407,7 @@ while(<IN>) {
|
||||||
if($funcs{$func}) {
|
if($funcs{$func}) {
|
||||||
return ($funcs{$func} eq "r");
|
return ($funcs{$func} eq "r");
|
||||||
} else {
|
} else {
|
||||||
warn_missing($func);
|
warn_unknown($func);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -421,7 +421,7 @@ while(<IN>) {
|
||||||
if($funcs{$func}) {
|
if($funcs{$func}) {
|
||||||
return ($funcs{$func} eq "w");
|
return ($funcs{$func} eq "w");
|
||||||
} else {
|
} else {
|
||||||
warn_missing($func);
|
warn_unknown($func);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -534,7 +534,7 @@ sub version() {
|
||||||
print join
|
print join
|
||||||
("\n",
|
("\n",
|
||||||
"$Global::progname $Global::version",
|
"$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.",
|
"Foundation, Inc.",
|
||||||
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>",
|
"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.",
|
"This is free software: you are free to change and redistribute it.",
|
||||||
|
|
7
vid/vid
7
vid/vid
|
@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
=head1 DEPENDENCIES
|
=head1 DEPENDENCIES
|
||||||
|
|
||||||
B<vid> uses B<G>, and B<vlc>.
|
B<vid> uses B<G>.
|
||||||
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
@ -145,8 +145,9 @@ stdin() {
|
||||||
stdout() {
|
stdout() {
|
||||||
if [ -t 1 ] ; then
|
if [ -t 1 ] ; then
|
||||||
# STDOUT = terminal
|
# STDOUT = terminal
|
||||||
# start VLC
|
# start $VIDEOPLAYER
|
||||||
parallel --halt now,done=1 --lb -Xj1 vlc
|
VIDEOPLAYER=${VIDEOPLAYER:-vlc --}
|
||||||
|
shuf | parallel --halt now,done=1 --lb -n100 -Xj1 $VIDEOPLAYER
|
||||||
else
|
else
|
||||||
cat
|
cat
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue