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


Java BaseDanmakuParser类代码示例

本文整理汇总了Java中master.flame.danmaku.danmaku.parser.BaseDanmakuParser的典型用法代码示例。如果您正苦于以下问题:Java BaseDanmakuParser类的具体用法?Java BaseDanmakuParser怎么用?Java BaseDanmakuParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BaseDanmakuParser类属于master.flame.danmaku.danmaku.parser包,在下文中一共展示了BaseDanmakuParser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadDanmakus

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
protected void loadDanmakus(BaseDanmakuParser parser) {
    this.danmakuList = parser.setConfig(this.mContext).setDisplayer(this.mDisp).setTimer(this.mTimer).getDanmakus();
    if (!(this.danmakuList == null || this.danmakuList.isEmpty() || this.danmakuList.first().flags != null)) {
        IDanmakuIterator it = this.danmakuList.iterator();
        while (it.hasNext()) {
            BaseDanmaku item = it.next();
            if (item != null) {
                item.flags = this.mContext.mGlobalFlagValues;
            }
        }
    }
    this.mContext.mGlobalFlagValues.resetAll();
    if (this.danmakuList != null) {
        this.mLastDanmaku = this.danmakuList.last();
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:17,代码来源:DrawTask.java

示例2: createParser

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的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;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:22,代码来源:WatchLiveActivity.java

示例3: loadDanmakus

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
protected void loadDanmakus(BaseDanmakuParser parser) {
    danmakuList = parser.setConfig(mContext).setDisplayer(mDisp).setTimer(mTimer).getDanmakus();
    if (danmakuList != null && !danmakuList.isEmpty()) {
        if (danmakuList.first().flags == null) {
            IDanmakuIterator it = danmakuList.iterator();
            while (it.hasNext()) {
                BaseDanmaku item = it.next();
                if (item != null) {
                    item.flags = mContext.mGlobalFlagValues;
                }
            }
        }
    }
    mContext.mGlobalFlagValues.resetAll();

    if(danmakuList != null) {
        mLastDanmaku = danmakuList.last();
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:20,代码来源:DrawTask.java

示例4: createParser

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的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;

}
 
开发者ID:CarGuo,项目名称:GSYVideoPlayer,代码行数:32,代码来源:DanmakuVideoPlayer.java

示例5: createParser

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的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;

}
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:22,代码来源:VideoViewActivity.java

示例6: createParser

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的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;

    }
 
开发者ID:amikey,项目名称:DanmakuFlameMaster,代码行数:26,代码来源:MainActivity.java

示例7: createParser

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的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;
}
 
开发者ID:dotcool,项目名称:mvideo,代码行数:26,代码来源:BiliVideoViewActivity.java

示例8: initDanmaku

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
protected void initDanmaku(DanmakuSurfaceView danmakuSurfaceView, BaseDanmakuParser parser) {
  if (danmakuSurfaceView != null) {
    //parser = createParser(null);
    danmakuSurfaceView.setCallback(new DrawHandler.Callback() {
          @Override public void updateTimer(DanmakuTimer timer) {
          }

          @Override public void prepared() {
            danmakuSurfaceView.start();
          }
        });
    danmakuSurfaceView.prepare(parser);
    //danmakuSurfaceView.showFPS(true);
    danmakuSurfaceView.enableDanmakuDrawingCache(true);
    danmakuSurfaceView.setZOrderOnTop(true);
    danmakuSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
  }
}
 
开发者ID:pkliang,项目名称:gankmaku,代码行数:19,代码来源:BaseDanmakuFragment.java

示例9: createParser

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的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;
  }
 
开发者ID:pkliang,项目名称:gankmaku,代码行数:24,代码来源:BaseDanmakuFragment.java

示例10: testDanMu

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
protected void testDanMu(DanmakuSurfaceView danmakuSurfaceView, BaseDanmakuParser mParser,
    String string, int textColor, int borderColor) {
  BaseDanmaku danmaku = DanmakuFactory.createDanmaku(BaseDanmaku.TYPE_SCROLL_RL);

  danmaku.text = string;
  danmaku.padding = 5;
  danmaku.priority = 1;
  danmaku.time = mParser.getTimer().currMillisecond + 100;
  danmaku.textSize = 25f * (mParser.getDisplayer().getDensity() - 0.6f);
  //danmaku.textSize = 25f;
  danmaku.textColor = textColor;
  danmaku.textShadowColor = Color.WHITE;
  //danmaku.underlineColor = Color.GREEN;
  danmaku.borderColor = borderColor;

  danmakuSurfaceView.addDanmaku(danmaku);
}
 
开发者ID:pkliang,项目名称:gankmaku,代码行数:18,代码来源:BaseDanmakuFragment.java

示例11: setDisplayer

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
@Override
public BaseDanmakuParser setDisplayer(IDisplayer disp) {
    super.setDisplayer(disp);
    mDispScaleX = mDispWidth / DanmakuFactory.BILI_PLAYER_WIDTH;
    mDispScaleY = mDispHeight / DanmakuFactory.BILI_PLAYER_HEIGHT;
    return this;
}
 
开发者ID:WeDevelopTeam,项目名称:HeroVideo-master,代码行数:8,代码来源:BiliDanmukuParser.java

示例12: downloadXML

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
public static Observable<BaseDanmakuParser> downloadXML(final String uri) {

    return Observable.create(new Observable.OnSubscribe<BaseDanmakuParser>() {

      @Override
      public void call(final Subscriber<? super BaseDanmakuParser> subscriber) {

        if (TextUtils.isEmpty(uri)) {
          subscriber.onNext(new BaseDanmakuParser() {

            @Override
            protected IDanmakus parse() {

              return new Danmakus();
            }
          });
        }

        ILoader loader = null;
        try {
          HttpConnection.Response rsp = (HttpConnection.Response)
              Jsoup.connect(uri).timeout(20000).execute();
          InputStream stream = new ByteArrayInputStream(BiliDanmukuCompressionTools.
              decompressXML(rsp.bodyAsBytes()));

          loader = DanmakuLoaderFactory.
              create(DanmakuLoaderFactory.TAG_BILI);
          loader.load(stream);
        } catch (IOException | DataFormatException | IllegalDataException e) {
          e.printStackTrace();
        }

        BaseDanmakuParser parser = new BiliDanmukuParser();
        assert loader != null;
        IDataSource<?> dataSource = loader.getDataSource();
        parser.load(dataSource);
        subscriber.onNext(parser);
      }
    }).subscribeOn(Schedulers.io());
  }
 
开发者ID:MUFCRyan,项目名称:BilibiliClient,代码行数:41,代码来源:BiliDanmukuDownloadUtil.java

示例13: setDisplayer

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
@Override
public BaseDanmakuParser setDisplayer(IDisplayer disp) {
  super.setDisplayer(disp);
  mDispScaleX = mDispWidth / DanmakuFactory.BILI_PLAYER_WIDTH;
  mDispScaleY = mDispHeight / DanmakuFactory.BILI_PLAYER_HEIGHT;
  return this;
}
 
开发者ID:MUFCRyan,项目名称:BilibiliClient,代码行数:8,代码来源:BiliDanmukuParser.java

示例14: prepare

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
public void prepare(BaseDanmakuParser parser, DanmakuContext config) {
    prepare();
    this.handler.setConfig(config);
    this.handler.setParser(parser);
    this.handler.setCallback(this.mCallback);
    this.handler.prepare();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:8,代码来源:DanmakuSurfaceView.java

示例15: addDanmukuView

import master.flame.danmaku.danmaku.parser.BaseDanmakuParser; //导入依赖的package包/类
/**
 * 添加弹幕
 */
public IjkVideoView addDanmukuView(DanmakuView danmakuView, DanmakuContext context, BaseDanmakuParser parser) {
    this.mDanmakuView = danmakuView;
    this.mContext = context;
    this.mParser = parser;
    return this;
}
 
开发者ID:dueeeke,项目名称:dkplayer,代码行数:10,代码来源:DanmukuVideoView.java


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