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 booleanTRACE-
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 intclose(AVFormatLibrary.URLContext h)intopen(AVFormatLibrary.URLContext h, java.lang.String filename, int flags)Flags may be a combination of: AVFormatLibrary.URL_RDONLY, AVFormatLibrary.URL_WRONLY, AVFormatLibrary.URL_RDWR.intread(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)longseek(AVFormatLibrary.URLContext h, long pos, int whence)Implementations need to be very careful about returning -1.intwrite(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:CallbackURLProtocolHandlerFlags may be a combination of: AVFormatLibrary.URL_RDONLY, AVFormatLibrary.URL_WRONLY, AVFormatLibrary.URL_RDWR.- Specified by:
openin interfaceCallbackURLProtocolHandler
-
read
public int read(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
- Specified by:
readin interfaceCallbackURLProtocolHandler
-
write
public int write(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
- Specified by:
writein interfaceCallbackURLProtocolHandler
-
seek
public long seek(AVFormatLibrary.URLContext h, long pos, int whence)
Description copied from interface:CallbackURLProtocolHandlerImplementations 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:
seekin interfaceCallbackURLProtocolHandler
-
close
public int close(AVFormatLibrary.URLContext h)
- Specified by:
closein interfaceCallbackURLProtocolHandler
-
-