Author Topic: Looking for Perl Master to fix AcidRip's progress output  (Read 2321 times)

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #15 on: May 09, 2010, 06:39:40 PM »
Quote from: AcidRip.pm lines 866-871
      if (/^Pos:\s*(\d+)\.\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+([\d.]+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) {[/color][/b]
          if ( $0 ne $sec )  { $sec  = $1; $::widgets->{'menc_seconds'}->set_text( hhmmss($1) ) }
          if ( $0 ne $fps )  { $fps  = $4; $::widgets->{'menc_fps'}->set_text($4) }
          if ( $0 ne $size ) { $size = $6; $::widgets->{'menc_filesize'}->set_text($6) }
          if ( $0 ne $time ) { $time = $5; $::widgets->{'menc_time'}->set_text($5) }
          if ( $0 ne $rate ) { $rate = $7; $::widgets->{'menc_bitrate'}->set_text($7) }

...Since the data gets updated properly if you make the IF FALSE, I'm at a bit of a loss.

Changing them to $0 makes the IF statements you highlighted (in red) evaluate to TRUE... that is why it works.  If they evaluated to FALSE the data in the progress dialog would not get updated.  I'm pretty sure this is what you meant, but thought I would point it out just in case anyone else is following along.  
;) :D


..looking at it again, I found another (better) fix ..note the quotes in red; no $0 needed (still using updated regex):

Quote
       if (/^Pos:\s*(\d+)\.\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+([\d.]+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) {
          if ( $1 ne $sec )  { $sec  = $1; $::widgets->{'menc_seconds'}->set_text( hhmmss($1) ) }
          if ( $4 ne $fps )  { $fps  = $4; $::widgets->{'menc_fps'}->set_text("$4") }
          if ( $6 ne $size ) { $size = $6; $::widgets->{'menc_filesize'}->set_text("$6") }
          if ( $5 ne $time ) { $time = $5; $::widgets->{'menc_time'}->set_text("$5") }
          if ( $7 ne $rate ) { $rate = $7; $::widgets->{'menc_bitrate'}->set_text("$7") }

8)
« Last Edit: May 09, 2010, 06:49:41 PM by travisn000 »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #16 on: May 09, 2010, 10:43:32 PM »
another fix that might be worth testing...  AcidRip / Gtk was generating errors in console: "GtkSpinButton: setting an adjustment with non-zero page size is deprecated" at various lines in AcidRip's interface.pm...  

I changed them all to zero values (file attached) and the errors are now gone; I haven't tested extensively to see if any new issues pop up as a result, but it seems to work as expected.  If there are any related problems they would show up in the GUI's input boxes that have the up and down arrows for changing number values (ie. file size, video crop size settings, etc).

« Last Edit: May 11, 2010, 03:20:07 PM by travisn000 »

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3739
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #17 on: May 10, 2010, 09:57:12 AM »
Summary, that's also the patch file?
progress output, and interface added as one patch file....

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #18 on: May 10, 2010, 11:03:33 AM »
..looks good;  has anyone other than me tested it?

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3739
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #19 on: May 10, 2010, 11:14:11 AM »
have the package generated and works fine, without any errors

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3739
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #20 on: May 11, 2010, 11:56:04 AM »
send or not send, that's the question  ;D

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #21 on: May 11, 2010, 01:45:58 PM »
It works for me, and it works for you...   nobody else has voiced otherwise, so I say send it up!  ;D

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3739
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #22 on: May 11, 2010, 01:53:50 PM »
ok, i do that... ;)

Offline wyohman

  • Hero Member
  • *****
  • Posts: 1346
  • Texas, USA
    • Shelby Registry
Re: Looking for Perl Master to fix AcidRip's progress output
« Reply #23 on: May 11, 2010, 03:02:21 PM »
I haven't tried it but all of the changes are relatively minor and it's not being worked upstream at all. Send it!

Cheers.
SZ77R5 | I7 3770 | 16GB | Samsung 840Pro | HD6670 | PCLOS 2012
Linux user since kernel 0.93