当前位置: 首页>>代码示例>>Java>>正文


Java IURLProtocolHandler类代码示例

本文整理汇总了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;
	}
}
 
开发者ID:openimaj,项目名称:openimaj,代码行数:10,代码来源:JarURLProtocolHandlerFactory.java

示例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;
}
 
开发者ID:openpreserve,项目名称:video-batch,代码行数:7,代码来源:HDFSProtocolHandlerFactory.java

示例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;
}
 
开发者ID:Red5,项目名称:red5-hls-plugin,代码行数:30,代码来源:MpegTsHandlerFactory.java


注:本文中的com.xuggle.xuggler.io.IURLProtocolHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。