Class Global


  • public class Global
    extends RefCounted
    A collection of static functions that refer to the entire package (like version getters).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long DEFAULT_PTS_PER_SECOND
      The default time units per second that we use for decoded
      {IAudioSamples} and {IVideoPicture} objects.
      static java.util.concurrent.TimeUnit DEFAULT_TIME_UNIT
      The default unit of time that IAudioSamples and IVideoPicture time stamps are represented in.
      static long NO_PTS
      A value that means no time stamp is set for a given object.
      if the {IMediaData#getTimeStamp()} method of an
      object returns this value it means the time stamp wasn't set.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Global​(long cPtr, boolean cMemoryOwn)
      Internal Only.
      protected Global​(long cPtr, boolean cMemoryOwn, java.util.concurrent.atomic.AtomicLong ref)
      Internal Only.
    • Field Detail

      • NO_PTS

        public static final long NO_PTS
        A value that means no time stamp is set for a given object.
        if the {IMediaData#getTimeStamp()} method of an
        object returns this value it means the time stamp wasn't set.
      • DEFAULT_PTS_PER_SECOND

        public static final long DEFAULT_PTS_PER_SECOND
        The default time units per second that we use for decoded
        {IAudioSamples} and {IVideoPicture} objects.

        This means that 1 tick of a time stamp is 1 Microsecond.
    • Constructor Detail

      • Global

        protected Global​(long cPtr,
                         boolean cMemoryOwn)
        Internal Only.
      • Global

        protected Global​(long cPtr,
                         boolean cMemoryOwn,
                         java.util.concurrent.atomic.AtomicLong ref)
        Internal Only.
    • Method Detail

      • getCPtr

        public static long getCPtr​(Global obj)
        Internal Only. Not part of public API. Get the raw value of the native object that obj is proxying for.
        Parameters:
        obj - The java proxy object for a native object.
        Returns:
        The raw pointer obj is proxying for.
      • getMyCPtr

        public long getMyCPtr()
        Internal Only. Not part of public API. Get the raw value of the native object that we're proxying for.
        Overrides:
        getMyCPtr in class RefCounted
        Returns:
        The raw pointer we're proxying for.
      • copyReference

        public Global copyReference()
        Create a new Global object that is actually referring to the exact same underlying native object.
        Overrides:
        copyReference in class RefCounted
        Returns:
        the new Java object.
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares two values, returning true if the underlying objects in native code are the same object. That means you can have two different Java objects, but when you do a comparison, you'll find out they are the EXACT same object.
        Overrides:
        equals in class java.lang.Object
        Returns:
        True if the underlying native object is the same. False otherwise.
      • hashCode

        public int hashCode()
        Get a hashable value for this object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashable value.
      • getVersion

        public static long getVersion()
        Returns a 64 bit version number for this library.

        Returns:
        a 64-bit integer version number for this library. The top 16 bits is
        the {#getVersionMajor()} value. The next 16-bits are the {#getVersionMinor()}
        value, and the last 32-bits are the {#getVersionRevision()} value.
      • getVersionMajor

        public static int getVersionMajor()
        Get the major version number of this library.
        Returns:
        the major version number of this library or 0 if unknown.
      • getVersionMinor

        public static int getVersionMinor()
        Get the minor version number of this library.
        Returns:
        the minor version number of this library or 0 if unknown.
      • getVersionRevision

        public static int getVersionRevision()
        Get the revision number of this library.
        Returns:
        the revision number of this library, or 0 if unknown.
      • getVersionStr

        public static java.lang.String getVersionStr()
        Get a string representation of the version of this library.
        Returns:
        the version of this library in string form.
      • getAVFormatVersion

        public static int getAVFormatVersion()
        Get the version of the FFMPEG libavformat library we are compiled against.
        Returns:
        the version.
      • getAVFormatVersionStr

        public static java.lang.String getAVFormatVersionStr()
        Get the version of the FFMPEG libavformat library we are compiled against.
        Returns:
        the version.
      • getAVCodecVersion

        public static int getAVCodecVersion()
        Get the version of the FFMPEG libavcodec library we are compiled against.
        Returns:
        the version.
      • getAVCodecVersionStr

        public static java.lang.String getAVCodecVersionStr()
        Get the version of the FFMPEG libavcodec library we are compiled against.
        Returns:
        the version.
      • init

        public static void init()
        Internal Only. Do not call.
        Methods using the C++ interface that will not necessarily
        create other Global object should call this. In general,
        unless you're extending core directly yourself, ordinary
        users of this library don't need to call this.


        It's main purpose is to ensure any FFmpeg required environment
        initialization functions are called, and any AVPKit required
        environmental contexts are set up.

      • setFFmpegLoggingLevel

        public static void setFFmpegLoggingLevel​(int level)
        Internal Only. This method can be used to turn up or
        down FFmpeg's logging level.
        Parameters:
        level - An integer value for level. Lower numbers
        mean less logging. A negative number tells FFmpeg to
        shut up.