Class CallbackURLProtocolMgr
- java.lang.Object
-
- net.sf.ffmpeg_java.custom_protocol.CallbackURLProtocolMgr
-
public class CallbackURLProtocolMgr extends java.lang.Object
Provides a single ffmpeg URLProtocol, using the prefix callback:, which calls back to Java code to access the data. A particular handler for a particular stream is set with addCallbackURLProtocolHandler, using a generated URL. Before using, the CallbackURLProtocolMgr needs to be registered using register. Then, to register a new stream, and open it with ffmpeg: final String callbackURL = CallbackURLProtocolMgr.addCallbackURLProtocolHandler(new FileCallbackURLProtocolHandler(new File(filePath))); final PointerByReference ppFormatCtx = new PointerByReference(); if (AVFORMAT.av_open_input_file(ppFormatCtx, callbackURL, null, 0, null) != 0) throw new RuntimeException("Couldn't open file"); // Couldn't open file- Author:
- Ken Larson
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
URL_PREFIX
-
Constructor Summary
Constructors Constructor Description CallbackURLProtocolMgr()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
addCallbackURLProtocolHandler(CallbackURLProtocolHandler h)
static AVFormatLibrary.URLProtocol
getURLProtocol()
static void
register(AVFormatLibrary AVFORMAT)
static void
removeCallbackURLProtocolHandler(CallbackURLProtocolHandler h)
-
-
-
Field Detail
-
URL_PREFIX
public static final java.lang.String URL_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getURLProtocol
public static AVFormatLibrary.URLProtocol getURLProtocol()
-
register
public static void register(AVFormatLibrary AVFORMAT)
-
addCallbackURLProtocolHandler
public static java.lang.String addCallbackURLProtocolHandler(CallbackURLProtocolHandler h)
-
removeCallbackURLProtocolHandler
public static void removeCallbackURLProtocolHandler(CallbackURLProtocolHandler h)
-
-