Class Configuration

    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        A main program that just prints information on all avaiable AVPKit options.
        Parameters:
        args - ignored
      • printHelp

        public static void printHelp​(java.io.PrintStream stream)
        Print out help about this AVPKit installation. Specifically all installed and supported container formats, installed and supported codecs, all IContainer options, all IStreamCoder options and all IVideoResampler options.
        Parameters:
        stream - stream to print to
      • printSupportedContainerFormats

        public static void printSupportedContainerFormats​(java.io.PrintStream stream)
        Print out all installed and supported container formats on this system.
        Parameters:
        stream - stream to print to
      • printSupportedCodecs

        public static void printSupportedCodecs​(java.io.PrintStream stream)
        Print out all installed and supported codecs on this system.
        Parameters:
        stream - stream to print to
      • printSupportedVideoResamplerProperties

        public static void printSupportedVideoResamplerProperties​(java.io.PrintStream stream)
        Print out all IVideoResampler supported properties, if that option is supported in this version of AVPKit.
        Parameters:
        stream - stream to print to.
      • printOption

        public static void printOption​(java.io.PrintStream stream,
                                       IConfigurable configObj,
                                       IProperty prop)
        Print information about the property on the configurable object.
        Parameters:
        stream - stream to print to
        configObj - configurable object
        prop - property on object
      • configure

        public static int configure​(java.util.Properties properties,
                                    IConfigurable config)
        Configures an IConfigurable from a set of Java Properties.

        Here's some sample code that shows configuring a IStreamCoder from a FFmpeg preset file:

           Properties props = new Properties();
           props.load(new FileInputStream(file));
           IStreamCoder coder = IStreamCoder.make(Direction.ENCODING);
           int retval = Configuration.configure(props, coder);
           if (retval < 0)
              throw new RuntimeException("Could not configure object");
         
        Parameters:
        properties - The properties to use.
        config - The item to configure.
        Returns:
        <0 on error; >= 0 on success.
        Since:
        3.4
      • configure

        public static int configure​(java.lang.String file,
                                    IConfigurable config)
        Configures an IConfigurable from a file.

        This is a handy way to configure a AVPKit IConfigurable object, and will also work with FFmpeg preset files.

        Parameters:
        file - A filename for the properties file.
        config - The item to configure.
        Returns:
        <0 on error; >= 0 on success.
        Since:
        3.4