Class CallbackURLProtocolMgr

java.lang.Object
net.sf.ffmpeg_java.custom_protocol.CallbackURLProtocolMgr

public class CallbackURLProtocolMgr extends 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