"Fossies" - the Fresh Open Source Software Archive

Member "pacpl-code/patches/multiple-format-input.patch" (22 Aug 2019, 1821 Bytes) of package /linux/privat/pacpl-6.1.3.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 Description: Allow converting from multiple source formats
    2  When multiple source formats are used, e.g. by running
    3  `pacpl -t mpc myflac.flac myogg.ogg`, the same decoder is used for all
    4  the files. This patch fixes this bug. 
    5 Author: Matteo Cypriani <mcy@lm7.fr>
    6 Origin: vendor
    7 Last-Update: 2016-10-14
    8 --- a/pacpl
    9 +++ b/pacpl
   10 @@ -2374,6 +2374,7 @@
   11                              $files{"FILE$number"}{EXT}  = "$ext";
   12                              $files{"FILE$number"}{NAME} = "$file";
   13                              $files{"FILE$number"}{OUTD} = "$outfile";
   14 +                            $files{"FILE$number"}{DECODER} = "$decoder";
   15  
   16                              $number++;                  
   17                     }
   18 @@ -2490,7 +2491,7 @@
   19  # convert input to destination format
   20  sub convert {
   21  
   22 -    my ($inf, $outf, $infmt, $iname, $oname) = @_;
   23 +    my ($inf, $outf, $infmt, $iname, $oname, $dec) = @_;
   24  
   25      my $if = $infmt;
   26         $if =~ tr/A-Z/a-z/;
   27 @@ -2505,6 +2506,7 @@
   28         
   29         # check to see if encoder/decoder exists.  if not, see if we have one 
   30         # that supports the desired input/output formats.
   31 +       $decoder = $dec;
   32         check_encoder();
   33         check_decoder($infmt);
   34                           
   35 @@ -2597,7 +2599,7 @@
   36          say "$msg" if not $gui;        
   37          system("kdialog --icon $icon_path --title \"$name\" --passivepopup \"$msg\" 10 &") if $gui and $kde;
   38          system("notify-send \"$name\" \"$msg\" -t 35 -i $icon_path &") if $gui and $gnome;                          
   39 -        convert("$files{$_}{FILE}","$files{$_}{OUTF}","$files{$_}{EXT}","$files{$_}{NAME}","$files{$_}{OUTD}");            
   40 +        convert("$files{$_}{FILE}","$files{$_}{OUTF}","$files{$_}{EXT}","$files{$_}{NAME}","$files{$_}{OUTD}","$files{$_}{DECODER}");
   41          $pm->finish;
   42      }            
   43