Class CallbackURLProtocolMgr
java.lang.Object
net.sf.ffmpeg_java.custom_protocol.CallbackURLProtocolMgr
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static AVFormatLibrary.URLProtocol
static void
register
(AVFormatLibrary AVFORMAT) static void
-
Field Details
-
URL_PREFIX
- See Also:
-
-
Constructor Details
-
CallbackURLProtocolMgr
public CallbackURLProtocolMgr()
-
-
Method Details
-
getURLProtocol
-
register
-
addCallbackURLProtocolHandler
-
removeCallbackURLProtocolHandler
-