Package com.avpkit.core
Class Global
- java.lang.Object
-
- com.avpkit.ferry.RefCounted
-
- com.avpkit.core.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 longDEFAULT_PTS_PER_SECONDThe default time units per second that we use for decoded
{IAudioSamples} and {IVideoPicture} objects.static java.util.concurrent.TimeUnitDEFAULT_TIME_UNITThe default unit of time thatIAudioSamplesandIVideoPicturetime stamps are represented in.static longNO_PTSA 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.-
Fields inherited from class com.avpkit.ferry.RefCounted
swigCMemOwn
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GlobalcopyReference()Create a new Global object that is actually referring to the exact same underlying native object.booleanequals(java.lang.Object obj)Compares two values, returning true if the underlying objects in native code are the same object.static intgetAVCodecVersion()Get the version of the FFMPEG libavcodec library we are compiled against.static java.lang.StringgetAVCodecVersionStr()Get the version of the FFMPEG libavcodec library we are compiled against.static intgetAVFormatVersion()Get the version of the FFMPEG libavformat library we are compiled against.static java.lang.StringgetAVFormatVersionStr()Get the version of the FFMPEG libavformat library we are compiled against.static longgetCPtr(Global obj)Internal Only.longgetMyCPtr()Internal Only.static longgetVersion()Returns a 64 bit version number for this library.
static intgetVersionMajor()Get the major version number of this library.static intgetVersionMinor()Get the minor version number of this library.static intgetVersionRevision()Get the revision number of this library.static java.lang.StringgetVersionStr()Get a string representation of the version of this library.inthashCode()Get a hashable value for this object.static voidinit()Internal Only.static voidsetFFmpegLoggingLevel(int level)Internal Only.-
Methods inherited from class com.avpkit.ferry.RefCounted
acquire, delete, getCPtr, getCurrentRefCount, getJavaRefCount, release
-
-
-
-
Field Detail
-
DEFAULT_TIME_UNIT
public static final java.util.concurrent.TimeUnit DEFAULT_TIME_UNIT
The default unit of time thatIAudioSamplesandIVideoPicturetime stamps are represented in.
-
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.
-
-
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:
getMyCPtrin classRefCounted- 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:
copyReferencein classRefCounted- 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:
equalsin classjava.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:
hashCodein classjava.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.
-
-