io.humble.video.MuxerStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of humble-video-noarch Show documentation
Show all versions of humble-video-noarch Show documentation
This is the main Humble Video Java library. It contains no native code, but all Java runtime code.
It must be paired up with the correct humble-video-arch-*.jar library for your OS. For most
users, depending on humble-video-all will work better.
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.6
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package io.humble.video;
import io.humble.ferry.*;
/**
* A ContainerStream object representing a stream contained in a writable Container.
*/
public class MuxerStream extends ContainerStream {
// JNIHelper.swg: Start generated code
// >>>>>>>>>>>>>>>>>>>>>>>>>>>
/**
* This method is only here to use some references and remove
* a Eclipse compiler warning.
*/
@SuppressWarnings("unused")
private void noop()
{
Buffer.make(null, 1);
}
private volatile long swigCPtr;
/**
* Internal Only.
*/
protected MuxerStream(long cPtr, boolean cMemoryOwn) {
super(VideoJNI.MuxerStream_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
/**
* Internal Only.
*/
protected MuxerStream(long cPtr, boolean cMemoryOwn,
java.util.concurrent.atomic.AtomicLong ref)
{
super(VideoJNI.MuxerStream_SWIGUpcast(cPtr),
cMemoryOwn, ref);
swigCPtr = cPtr;
}
/**
* Internal Only. Not part of public API.
*
* Get the raw value of the native object that obj is proxying for.
*
* @param obj The java proxy object for a native object.
* @return The raw pointer obj is proxying for.
*/
protected static long getCPtr(MuxerStream obj) {
if (obj == null) return 0;
return obj.getMyCPtr();
}
/**
* Internal Only. Not part of public API.
*
* Get the raw value of the native object that we're proxying for.
*
* @return The raw pointer we're proxying for.
*/
protected long getMyCPtr() {
if (swigCPtr == 0) throw new IllegalStateException("underlying native object already deleted");
return swigCPtr;
}
/**
* Create a new MuxerStream object that is actually referring to the
* exact same underlying native object.
*
* @return the new Java object.
*/
@Override
public MuxerStream copyReference() {
if (swigCPtr == 0)
return null;
else
return new MuxerStream(swigCPtr, swigCMemOwn, getJavaRefCount());
}
/**
* 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.
*
* @return True if the underlying native object is the same. False otherwise.
*/
public boolean equals(Object obj) {
boolean equal = false;
if (obj instanceof MuxerStream)
equal = (((MuxerStream)obj).swigCPtr == this.swigCPtr);
return equal;
}
/**
* Get a hashable value for this object.
*
* @return the hashable value.
*/
public int hashCode() {
return (int)swigCPtr;
}
// <<<<<<<<<<<<<<<<<<<<<<<<<<<
// JNIHelper.swg: End generated code
/**
* info about this stream
* @return information about this stream
*/
@Override
public String toString()
{
StringBuilder result = new StringBuilder();
result.append(this.getClass().getName()+"@"+hashCode()+"[");
result.append("index:"+getIndex()+";");
result.append("id:"+getId()+";");
result.append("framerate:"+getFrameRate()+";");
result.append("timebase:"+getTimeBase()+";");
result.append("]");
return result.toString();
}
/**
* Get the Coder that this stream was created with.
* Note: this can be either an Encoder or a Decoder.
*/
public Coder getCoder() {
long cPtr = VideoJNI.MuxerStream_getCoder(swigCPtr, this);
return (cPtr == 0) ? null : new Coder(cPtr, false);
}
/**
* Get the Muxer that this stream belongs to.
*/
public Muxer getMuxer() {
long cPtr = VideoJNI.MuxerStream_getMuxer(swigCPtr, this);
return (cPtr == 0) ? null : new Muxer(cPtr, false);
}
}