Giter Club home page Giter Club logo

liblebconnectionsdk's Introduction

快直播传输层SDK - libLebConnectionSDK

1. 主要功能

  • 音视频拉流,兼具优异的低延迟性能和抗弱网能力
  • 视频支持H264、H265和AV1,支持B帧,视频输出格式为视频帧裸数据(H264/H265为AnnexB,AV1为OBU)
  • 音频支持AAC和OPUS,音频输出格式为音频帧裸数据
  • 支持Android、iOS、Windows、Linux和Mac平台

2. SDK接口调用流程

image

3. SDK接口说明

3.1 基础接口说明

  • 创建快直播连接
LEB_EXPORT_API LebConnectionHandle* OpenLebConnection(void* context, LebLogLevel loglevel);
  • 注册回调函数
LEB_EXPORT_API void RegisterLebCallback(LebConnectionHandle* handle, const LebCallback* callback);
  • 开始连接拉流
LEB_EXPORT_API void StartLebConnection(LebConnectionHandle* handle, LebConfig config);
  • 停止连接
LEB_EXPORT_API void StopLebConnection(LebConnectionHandle* handle);
  • 关闭连接
LEB_EXPORT_API void CloseLebConnection(LebConnectionHandle* handle);

3.2 回调接口说明

typedef struct LebCallback {
  // 日志回调
  OnLogInfo onLogInfo;
  // 视频信息回调
  OnVideoInfo onVideoInfo;
  // 音频信息回调
  OnAudioInfo onAudioInfo;
  // 视频数据回调
  OnEncodedVideo onEncodedVideo;
  // 音频数据回调
  OnEncodedAudio onEncodedAudio;
  // MetaData回调
  OnMetaData onMetaData;
  // 统计信息回调
  OnStatsInfo onStatsInfo;
  // 错误回调
  OnError onError;
} LebCallback;

Notes:详细数据结构定义请见头文件leb_connection_api.h

4. FFmpeg集成

SDK提供FFmpeg webrtc demuxer源码:webrtc_demuxer.c,可以实现FFmpeg快直播拉流和媒体处理,以及ffplay播放

FFmpeg配置编译可以参考:快直播传输层SDK FFmpeg集成说明

5. 播放器集成示例

image 具体可以参考:基于ijkplayer的快直播传输层SDK应用实践

liblebconnectionsdk's People

Contributors

feiwei9696 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.