Class FileCallbackURLProtocolHandler
- java.lang.Object
-
- net.sf.ffmpeg_java.custom_protocol.FileCallbackURLProtocolHandler
-
- All Implemented Interfaces:
CallbackURLProtocolHandler
public class FileCallbackURLProtocolHandler extends java.lang.Object implements CallbackURLProtocolHandler
Implements CallbackURLProtocolHandler by using standard Java file I/O.- Author:
- Ken Larson
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
TRACE
-
Fields inherited from interface net.sf.ffmpeg_java.custom_protocol.CallbackURLProtocolHandler
SEEK_CUR, SEEK_END, SEEK_SET
-
-
Constructor Summary
Constructors Constructor Description FileCallbackURLProtocolHandler(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
close(AVFormatLibrary.URLContext h)
int
open(AVFormatLibrary.URLContext h, java.lang.String filename, int flags)
Flags may be a combination of: AVFormatLibrary.URL_RDONLY, AVFormatLibrary.URL_WRONLY, AVFormatLibrary.URL_RDWR.int
read(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
long
seek(AVFormatLibrary.URLContext h, long pos, int whence)
Implementations need to be very careful about returning -1.int
write(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
-
-
-
Field Detail
-
TRACE
public static final boolean TRACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public int open(AVFormatLibrary.URLContext h, java.lang.String filename, int flags)
Description copied from interface:CallbackURLProtocolHandler
Flags may be a combination of: AVFormatLibrary.URL_RDONLY, AVFormatLibrary.URL_WRONLY, AVFormatLibrary.URL_RDWR.- Specified by:
open
in interfaceCallbackURLProtocolHandler
-
read
public int read(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
- Specified by:
read
in interfaceCallbackURLProtocolHandler
-
write
public int write(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
- Specified by:
write
in interfaceCallbackURLProtocolHandler
-
seek
public long seek(AVFormatLibrary.URLContext h, long pos, int whence)
Description copied from interface:CallbackURLProtocolHandler
Implementations need to be very careful about returning -1. Basically, they should support full seek capability, or not at all, because much code in ffmpeg never checks the return value of a seek.- Specified by:
seek
in interfaceCallbackURLProtocolHandler
-
close
public int close(AVFormatLibrary.URLContext h)
- Specified by:
close
in interfaceCallbackURLProtocolHandler
-
-