Skip to content

Commit

Permalink
更新注释
Browse files Browse the repository at this point in the history
  • Loading branch information
Doikki committed May 29, 2018
1 parent 1137f7b commit a259ddd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}


// String url = "rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov";
String rtspUrl = "rtsp://ajj:12345678@218.21.217.122:65523/h264/ch40/sub/av_stream";
String rtspUrl = "rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov";
// String rtspUrl = "rtsp://ajj:12345678@218.21.217.122:65523/h264/ch40/sub/av_stream";
// String rtspUrl = "rtsp://live.3gv.ifeng.com/live/71";
// String url = "http://storage.gzstv.net/uploads/media/huangmeiyan/jr05-09.mp4";
//测试concat,将项目根目录的other文件夹中的test.ffconcat文件复制到sd卡根目录测试
Expand Down Expand Up @@ -73,7 +73,7 @@ public void setOptions() {
mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "safe", 0);
mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "protocol_whitelist",
"rtmp,concat,ffconcat,file,subfile,http,https,tls,rtp,tcp,udp,crypto,rtsp");
//支持rtsp
//使用tcp方式拉取rtsp流,默认是通过udp方式
mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp");
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,34 @@

public interface VideoListener {

/**
* 播放暂停
*/
void onVideoStarted();

/**
* 继续播放
*/
void onVideoPaused();

//播放完成
/**
* 播放完成
*/
void onComplete();

//准备完成
/**
* 准备播放完成
*/
void onPrepared();

/**
* 播放出错
*/
void onError();

/**
* 播放器内部事件回调
*/
void onInfo(int what, int extra);

}

0 comments on commit a259ddd

Please sign in to comment.