本文整理汇总了Java中com.xuggle.xuggler.io.IURLProtocolHandler类的典型用法代码示例。如果您正苦于以下问题:Java IURLProtocolHandler类的具体用法?Java IURLProtocolHandler怎么用?Java IURLProtocolHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IURLProtocolHandler类属于com.xuggle.xuggler.io包,在下文中一共展示了IURLProtocolHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHandler
import com.xuggle.xuggler.io.IURLProtocolHandler; //导入依赖的package包/类
@Override
public IURLProtocolHandler getHandler(String protocol, String url, int flags) {
try {
return new JarURLProtocolHandler(url);
} catch (final IOException e) {
e.printStackTrace();
return null;
}
}
示例2: getHandler
import com.xuggle.xuggler.io.IURLProtocolHandler; //导入依赖的package包/类
public IURLProtocolHandler getHandler(String protocol, String url, int flags) {
if( protocol.equals("hdfs") ) {
return new HDFSProtocolHandler(conf);
}
return null;
}
示例3: getHandler
import com.xuggle.xuggler.io.IURLProtocolHandler; //导入依赖的package包/类
/**
* Called by XUGGLE.IO to get a a handler for a given URL. The handler
* must have been registered via
* {@link #registerStream(IEventIOHandler, ISimpleMediaFile)}
*
* WARNING: It really only makes sense to have one active ProtocolHandler
* working on a AVStreamingQueue at a time; it's up to the caller to ensure
* this happens; otherwise you may get deadlocks as all the protocol
* handlers compete for events.
*
* @param protocol
* The protocol (e.g. "mpegts")
* @param url
* The url being opened, including the protocol (e.g. "mpegts:stream01")
* @param flags
* The flags that FFMPEG is opening the file with.
*
*/
public synchronized IURLProtocolHandler getHandler(String protocol, String url, int flags) {
log.debug("Get handler - protocol: {} url: {}", protocol, url);
IURLProtocolHandler result = null;
// Note: We need to remove any protocol markers from the url
String streamName = URLProtocolManager.getResourceFromURL(url);
MpegTsIoHandler handler = streams.get(streamName);
if (handler != null) {
result = new MpegTsHandler(handler, streamsInfo.get(streamName), url, flags);
}
return result;
}