sub do_convert { # via wq_do
my ($self) = @_;
- $self->input_stdin;
for my $input (@{$self->{inputs}}) {
$self->input_path_url($input);
}
$self->{-wq_nr_workers} = $j // 1; # locked
my ($op_c, undef) = $lei->workers_start($self, 'lei_import', $j, $ops);
$lei->{imp} = $self;
- $self->wq_io_do('input_stdin', []) if $self->{0};
net_merge_complete($self) unless $lei->{auth};
$op_c->op_wait_event($ops);
}
}
}
-sub input_stdin {
- my ($self) = @_;
- my $in = delete $self->{0} or return;
- $self->input_fh($self->{lei}->{opt}->{'in-format'}, $in, '<stdin>');
-}
-
sub input_path_url {
my ($self, $input, @args) = @_;
my $lei = $self->{lei};
@$inputs and return
$lei->fail("--stdin and @$inputs do not mix");
check_input_format($lei) or return;
- $self->{0} = $lei->{0};
+ push @$inputs, '/dev/stdin';
}
my $net = $lei->{net}; # NetWriter may be created by l2m
my $fmt = $lei->{opt}->{'in-format'};
$self->{vmd_mod} = $vmd_mod;
my ($op_c, undef) = $lei->workers_start($self, 'lei_mark', 1, $ops);
$lei->{mark} = $self;
- $self->wq_io_do('input_stdin', []) if $self->{0};
net_merge_complete($self) unless $lei->{auth};
$op_c->op_wait_event($ops);
}