>> "M" == Martin wrote:

    M> * Matt Swift <[EMAIL PROTECTED]> [2006-05-19 12:11]:
    >> The current test looks for the file in os.environ.get("PATH", "").
    >> 
    >> The test should look for the file in sys.path, which is different.
    >> This is the load path for Python modules.

    M> Right, but I'm not looking for the Python module.  I'm looking for the
    M> Unix executable that is your ripper or encoder.

I don't know what you're looking for :)

I am telling you that Jack is using the code we've been discussing to
look for the plugin, i.e., the Python module.  If this code is
designed to be used when looking for something else such as the ripper
executable, then the code is being invoked on the wrong thing.

    M> What's wrong with the following patch:
    >> 
    >> 1) It's wrong to  remove the "plugin_" prefix.  The correct
    >> full path for a plugin is "~/.jack_plugins/jack_plugin_lame.py".  I

    M> Yes, but I'm not looking for this... I'm looking for the "lame"
    M> executable.  As far as I know, your encoder is specified as
    M> "plugin_lame" (i.e. jack -E plugin_lame or something similar in the
    M> config file).  I then remove the plugin_ prefix and check for the
    M> rest, i.e lame.

No, I don't think so.  The ripper executable is not the plugin name
with the "plugin_" prefix removed.  The ripper executable is specified
in the plugin Python module ('cmd' or 'vbr-cmd', etc.) and is
arbitrary.  It doesn't have to have anything to do with the named
encoder.  The value of the user-selectable ripper must be a "helper"
defined in either jack_helpers.py or a plugin; the value is not the
name of an executable (with or without prefixes/suffixes).

Maybe this behavior changed when Jack was extended to use plugins, and
this change is the source of the problem.


    >> don't know if the "plugin_" prefix is required, but removing it
    >> here is going cause the test to fail because it's looking for a
    >> file that does not exist: "lame.py".

    M> I'm not looking for the Python module, but the Unix executable.

    M> So, having said this, does my patch work and get rid of the original
    M> error?

No.  I get the same error, e.g.:

    This is jack 3.1.1 (C)2004 Arne Zellentin <[EMAIL PROTECTED]>
     *error* Helper encoder 'lame_mono' not found on your system.

I attach .jack3rc and the plugin it refers to.  Note the same error
would occur if the plugin had the same base name ("lame" instead of
"lame_mono") as the executable.

-----------
# jackrc-version:31
rename_fmt:%n %t
base_dir:/cletus/audio/jack
keep_wavs:yes
query_on_start

vbr_quality:2
encoder:plugin_lame_mono

---------------- ~/.jack_plugins/jack_plugin_lame_mono.py:

### lame plugin for jack
# MSS modified from /usr/share/doc/jack/examples

plugin_helpers = {
# for mono recordings, e.g., birdsong, spoken word
    'plugin_lame_mono': {
        'type': "encoder",
        'target': "mp3",
# normal lame: 0 best, 9 smallest
# inverted lame: -1 smallest, 10 best, can be float
        'inverse-quality': 1,
# put xxx to cause error with commands I haven't customized
        'cmd': "lamexxx --preset cbr %r --strictly-enforce-ISO %i %o",
        'vbr-cmd': "lame -V %q -m m --nohist --strictly-enforce-ISO %i %o",
        'otf-cmd': "lamexxx --preset cbr %r --strictly-enforce-ISO - %o",
        'vbr-otf-cmd': "lamexxx -V %q --vbr-new --nohist --strictly-enforce-ISO 
- %o",
        'status_blocksize': 160,
        'bitrate_factor': 1,
        'status_start': "%",
        'percent_fkt': r"""
s = string.split(i['buf'], '\r')
if len(s) >= 2: s=s[-2]
if len(s) == 1: s=s[0]
if string.find(s, "%") >= 0:       # status reporting starts here
    y = string.split(s, "/")
    y1 = string.split(y[1], "(")[0]
    percent = float(y[0]) / float(y1) * 100.0
elif string.find(s, "Frame:") >= 0:    # older versions, like 3.13
    y = string.split(s, "/")
    y0 = string.split(y[0], "[")[-1]
    y1 = string.split(y[1], "]")[0]
    percent = float(y0) / float(y1) * 100.0
else:
    percent = 0
""",
    },
}



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to