/usr/share/perl5/SReview/Video/Concat.pm is in sreview-common 0.3.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | package SReview::Video::Concat;
use Moose;
extends 'SReview::Video';
has 'components' => (
traits => ['Array'],
isa => 'ArrayRef[SReview::Video]',
required => 1,
is => 'rw',
handles => {
add_component => 'push',
},
);
has '+duration' => (
builder => '_build_duration',
);
sub readopts {
my $self = shift;
if(($self->has_pass && $self->pass < 2) || !$self->has_pass) {
die "refusing to overwrite file " . $self->url . "!\n" if (-f $self->url);
print "Writing " . $self->url . " with content:\n";
open CONCAT, ">" . $self->url;
foreach my $component(@{$self->components}) {
my $input = $component->url;
print "file '$input'\n";
print CONCAT "file '$input'\n";
}
close CONCAT;
}
return ('-f', 'concat', '-safe', '0', $self->SReview::Video::readopts());
}
sub _build_duration {
my $self = shift;
my $rv = 0;
foreach my $component(@{$self->components}) {
$rv += $component->duration;
}
return $rv;
}
sub _probe {
my $self = shift;
return $self->components->[0]->_get_probedata;
}
no Moose;
1;
|