Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.
/*******************************************************************************
* Copyright (c) 2013, Art Clarke. All rights reserved.
*
* This file is part of Humble-Video.
*
* Humble-Video is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Humble-Video is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Humble-Video. If not, see .
*******************************************************************************/
package io.humble.ferry;
import java.lang.ref.WeakReference;
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicLong;
import io.humble.ferry.FerryJNI;
/**
* Returned by {@link Buffer#getByteBuffer(int, int, java.util.concurrent.atomic.AtomicReference)}
* for users that want to explicitly manage when the returned {@link java.nio.ByteBuffer}
* is released.
*
* This class creates a {@link WeakReference} that Ferry classes will use for
* memory management. We do this to avoid relying on Java's finalizer thread to
* keep up and instead make every new native allocation first release any
* unreachable objects.
*
* Most times these objects are managed behind the scenes when you
* call {@link RefCounted#delete()}. But when we return
* {@link java.nio.ByteBuffer} objects, there is no equivalent of
* delete(), so this object can be used if you want to explicitly control
* when the {@link ByteBuffer}'s underlying native memory is freed.
*
*
*/
public final class JNIReference extends WeakReference