Skip to content

基于RTSP应用协议H264拉流,并将H264实时显示在TextureView或SurfaceView上 亲测好用

Notifications You must be signed in to change notification settings

lckjcnWq/Smart-Android-RTSP-H264

Repository files navigation

RTSP长连接进行H264拉流

本案例是基于RTSP协议进行H264拉流的案列,并且把H264流以文件的格式保存到本地以及通过mediaCodec显示在常见的TextureView或者SurfaceView上

当前内容

1.拉流H264保存到本地

2.拉流H264显示在SurfaceView上

3.拉流H264显示在TextureView上

使用说明

初始化

client = new TCP4RtspUtil("rtsp路径", new VideoStreamImpl(new H264StreamInterface() {
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
 public void process(final byte[] stream) {

 });
client.doStart();
client.play();

通过上面就能获取到H264流的回调

About

基于RTSP应用协议H264拉流,并将H264实时显示在TextureView或SurfaceView上 亲测好用

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages