Class MetadataRenderer

    • Constructor Detail

      • MetadataRenderer

        public MetadataRenderer​(MetadataOutput output,
                                @Nullable
                                Looper outputLooper)
        Creates an instance that uses MetadataDecoderFactory.DEFAULT to create MetadataDecoder instances.
        Parameters:
        output - The output.
        outputLooper - The looper associated with the thread on which the output should be called. If the output makes use of standard Android UI components, then this should normally be the looper associated with the application's main thread, which can be obtained using ContextWrapper.getMainLooper(). Null may be passed if the output should be called directly on the player's internal rendering thread.
      • MetadataRenderer

        public MetadataRenderer​(MetadataOutput output,
                                @Nullable
                                Looper outputLooper,
                                MetadataDecoderFactory decoderFactory)
        Creates an instance.
        Parameters:
        output - The output.
        outputLooper - The looper associated with the thread on which the output should be called. If the output makes use of standard Android UI components, then this should normally be the looper associated with the application's main thread, which can be obtained using ContextWrapper.getMainLooper(). Null may be passed if the output should be called directly on the player's internal rendering thread.
        decoderFactory - A factory from which to obtain MetadataDecoder instances.
      • MetadataRenderer

        public MetadataRenderer​(MetadataOutput output,
                                @Nullable
                                Looper outputLooper,
                                MetadataDecoderFactory decoderFactory,
                                boolean outputMetadataEarly)
        Creates an instance.
        Parameters:
        output - The output.
        outputLooper - The looper associated with the thread on which the output should be called. If the output makes use of standard Android UI components, then this should normally be the looper associated with the application's main thread, which can be obtained using ContextWrapper.getMainLooper(). Null may be passed if the output should be called directly on the player's internal rendering thread.
        decoderFactory - A factory from which to obtain MetadataDecoder instances.
        outputMetadataEarly - Whether the renderer outputs metadata early. When true, render(long, long) will output metadata as soon as they are available to the renderer, otherwise render(long, long) will output metadata in sync with the rendering position.