本文整理汇总了Java中master.flame.danmaku.danmaku.loader.ILoader类的典型用法代码示例。如果您正苦于以下问题:Java ILoader类的具体用法?Java ILoader怎么用?Java ILoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ILoader类属于master.flame.danmaku.danmaku.loader包,在下文中一共展示了ILoader类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
if (stream == null) {
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例2: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
/**
* 创建解析器对象,解析输入流
*
* @param stream
* @return
*/
private BaseDanmakuParser createParser(InputStream stream) {
if (stream == null) {
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例3: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
if (stream == null) {
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例4: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
if (stream == null) {
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例5: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
private BaseDanmakuParser createParser(InputStream stream) {
if(stream==null){
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例6: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
protected BaseDanmakuParser createParser(InputStream stream) {
if (stream == null) {
return new BaseDanmakuParser() {
@Override protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例7: instance
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
public static ILoader instance() {
if(instance == null){
synchronized (DanmakuLoader.class){
if(instance == null)
instance = new DanmakuLoader();
}
}
return instance;
}
示例8: create
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
public static ILoader create(String tag) {
if (TAG_BILI.equalsIgnoreCase(tag)) {
return BiliDanmakuLoader.instance();
}
if (TAG_ACFUN.equalsIgnoreCase(tag)) {
return AcFunDanmakuLoader.instance();
}
return null;
}
示例9: instance
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
public static ILoader instance() {
if (instance == null) {
synchronized (AcFunDanmakuLoader.class) {
if (instance == null) {
instance = new AcFunDanmakuLoader();
}
}
}
return instance;
}
示例10: create
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
public static ILoader create(String tag) {
if (TAG_BILI.equalsIgnoreCase(tag)) {
return BiliDanmakuLoader.instance();
} else if(TAG_ACFUN.equalsIgnoreCase(tag))
return AcFunDanmakuLoader.instance();
return null;
}
示例11: instance
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
public static ILoader instance() {
if(instance == null){
synchronized (AcFunDanmakuLoader.class){
if(instance == null)
instance = new AcFunDanmakuLoader();
}
}
return instance;
}
示例12: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
/**
* 弹幕解析器
*/
private BaseDanmakuParser createParser(String uri) {
if (uri == null) {
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
try {
if(uri == null){
return null;
}
loader.load(uri);
} catch (IllegalDataException e) {
e.printStackTrace();
}
BaseDanmakuParser parser = new BiliDanmukuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例13: createParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
public static BaseDanmakuParser createParser(InputStream stream) {
if (stream == null) {
return new BaseDanmakuParser() {
@Override
protected Danmakus parse() {
return new Danmakus();
}
};
}
// ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_BILI);
ILoader loader = DanmakuLoaderFactory.create(DanmakuLoaderFactory.TAG_ACFUN);
try {
loader.load(stream);
} catch (IllegalDataException e) {
e.printStackTrace();
}
// BaseDanmakuParser parser = new BiliDanmukuParser();
BaseDanmakuParser parser = new AcFunDanmakuParser();
IDataSource<?> dataSource = loader.getDataSource();
parser.load(dataSource);
return parser;
}
示例14: setDanmakuCustomParser
import master.flame.danmaku.danmaku.loader.ILoader; //导入依赖的package包/类
/**
* 自定义弹幕解析器,配合{@link #setDanmakuSource}使用,先于{@link #setDanmakuSource}调用
*
* @param parser 解析器
* @param loader 加载器
* @param converter 转换器
* @return
*/
public IjkPlayerView setDanmakuCustomParser(BaseDanmakuParser parser, ILoader loader, BaseDanmakuConverter converter) {
mDanmakuParser = parser;
mDanmakuLoader = loader;
mDanmakuConverter = converter;
return this;
}