Package com.avpkit.core.io
Class FfmpegIO
- java.lang.Object
-
- com.avpkit.core.io.FfmpegIO
-
public class FfmpegIO extends java.lang.Object
For Internal Use Only. This is the global (static) object that implements the AVPKit IO library.The following methods are not meant to be generally called by code (although they can be).
You should never need to call this method. CallingURLProtocolManager.registerFactory(String, IURLProtocolHandlerFactory)should cause it to be instantiated. They are generally 'thread-aware' but not 'thread-safe', meaning if you use a handle on a thread, you are a responsible for making sure you don't reuse it on other threads. They forward into ffmpeg's URL read/write/seek capabilities and allow our test scripts to make sure our URLProtocolHandlers (and FFMPEG's native handlers) work as expected. Lastly this class, unlike other classes in the library, does not use SWIG to generate the Java objects, so you need to be careful not to change method names as the corresponding native code relies on specific naming and parameters.- Author:
- aclarke
-
-
Constructor Summary
Constructors Constructor Description FfmpegIO()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidinit()Internal Only.static voidload()Force a load of all native libraries; not normally neededstatic intregisterProtocolHandlerFactory(long containerSwigCPtr, IContainer container, IURLProtocolHandlerFactory factory)This method is called by URLProtocolManager to register itself as a protocol manager for different FFMPEG protocols.static inturl_close(FfmpegIOHandle handle)static inturl_open(FfmpegIOHandle handle, java.lang.String filename, int flags)static inturl_read(FfmpegIOHandle handle, byte[] buffer, int length)static longurl_seek(FfmpegIOHandle handle, long position, int whence)static inturl_write(FfmpegIOHandle handle, byte[] buffer, int length)
-
-
-
Constructor Detail
-
FfmpegIO
public FfmpegIO()
-
-
Method Detail
-
load
public static void load()
Force a load of all native libraries; not normally needed
-
init
public static void init()
Internal Only. Do not use.
-
registerProtocolHandlerFactory
public static int registerProtocolHandlerFactory(long containerSwigCPtr, IContainer container, IURLProtocolHandlerFactory factory)
This method is called by URLProtocolManager to register itself as a protocol manager for different FFMPEG protocols.- Parameters:
container-factory-
-
url_open
public static int url_open(FfmpegIOHandle handle, java.lang.String filename, int flags)
-
url_read
public static int url_read(FfmpegIOHandle handle, byte[] buffer, int length)
-
url_close
public static int url_close(FfmpegIOHandle handle)
-
url_write
public static int url_write(FfmpegIOHandle handle, byte[] buffer, int length)
-
url_seek
public static long url_seek(FfmpegIOHandle handle, long position, int whence)
-
-