New plugin hook: finalizeTranscoderArgs

Discuss issues related to PS3 Media Server development (only for programmers)

New plugin hook: finalizeTranscoderArgs

Postby chocolateboy » Sun Jun 19, 2011 9:44 pm

As of PMS 1.30.0, a new plugin hook will be available (actually, it's available already, but the API is fixed in 1.30.0). The hook allows plugins to easily customize transcoder command-line arguments before PMS launches the command.

Plugins that wish to utilize this hook can do so by implementing the net.pms.external.FinalizeTranscoderArgsListener interface:

Code: Select all
public interface FinalizeTranscoderArgsListener extends ExternalListener {
    public List<String> finalizeTranscoderArgs(
        Player player,
        String filename,
        DLNAResource dlna,
        DLNAMediaInfo media,
        OutputParams params,
        List<String> cmdList

The parameters should be self-explanatory. Plugins can modify cmdList in-place and return that or return a new List. The hook is called at the last point before the command is executed.

This hook is available for all built-in engines (MEncoderVideo, MPlayerAudio, TSMuxerVideo &c.) and can easily be used by custom subclasses of the builtin engines (see PMSEncoder for an example of a custom transcoding engine).

For an example plugin that uses the new API, see PMS-EDL.
Project Member
Posts: 2581
Joined: Wed Sep 16, 2009 10:05 am

Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests