ffmpeg之rtmp分析(一)
来源:互联网 发布:centos 编辑文件 编辑:程序博客网 时间:2024/06/05 22:47
ffmpeg自身写了一个的支持rtmp协议的代码,与rtmp对应的AVInputFormat为:
AVInputFormat ff_flv_demuxer = { .name = "flv", .long_name = NULL_IF_CONFIG_SMALL("FLV (Flash Video)"), .priv_data_size = sizeof(FLVContext), .read_probe = flv_probe, .read_header = flv_read_header, .read_packet = flv_read_packet, .read_seek = flv_read_seek, .read_close = flv_read_close, .extensions = "flv", .priv_class = &flv_class,};
在文件libavformat/flvdec.c中
对应的URLProtocol为:
#define RTMP_PROTOCOL(flavor) \static const AVClass flavor##_class = { \ .class_name = #flavor, \ .item_name = av_default_item_name, \ .option = rtmp_options, \ .version = LIBAVUTIL_VERSION_INT, \}; \ \const URLProtocol ff_##flavor##_protocol = { \ .name = #flavor, \ .url_open = rtmp_open, \ .url_read = rtmp_read, \ .url_read_seek = rtmp_seek, \ .url_read_pause = rtmp_pause, \ .url_write = rtmp_write, \ .url_close = rtmp_close, \ .priv_data_size = sizeof(RTMPContext), \ .flags = URL_PROTOCOL_FLAG_NETWORK, \ .priv_data_class= &flavor##_class, \};RTMP_PROTOCOL(rtmp)RTMP_PROTOCOL(rtmpe)RTMP_PROTOCOL(rtmps)RTMP_PROTOCOL(rtmpt)RTMP_PROTOCOL(rtmpte)RTMP_PROTOCOL(rtmpts)
在文件libavformat/rtmpproto.c中
阅读全文
0 0
- ffmpeg之rtmp分析(一)
- RTMP协议分析 一、RTMP包头
- RTMP协议分析 一、RTMP包头
- RTMP协议分析 一、RTMP包头
- RTMP协议分析 一、RTMP包头
- ffmpeg RTMP
- ffmpeg RTMP
- ffmpeg 教程之 rtmp 推送器
- OBS源码分析之rtmp
- FFmpeg分析基础一
- ffmpeg源码分析一
- FFmpeg之Rtsp分析(一):Pause和seek
- iOS ffmpeg 之Linux下搭建rtmp nginx服务器
- ffmpeg rtmp直播命令
- ffmpeg RTMP【转】
- python+ngnix+ffmpeg+rtmp
- FFmpeg的rtmp
- FFMpeg处理RTMP流
- peerconnection_client demo总流程(一)
- peerconnection_client demo总流程(二)
- peerconnection_client demo总流程(三)
- NAT的4种类型
- p2p建立连接过程
- ffmpeg之rtmp分析(一)
- P2870 (poj 3617) [USACO07DEC]最佳牛线,黄金Best Cow Line, Gold 可爱的贪心
- rtmp协议整理
- [最短路 杂题] Codeforces 806D VK Cup 2017 Round 3 D. Perishable Roads
- [线段树 杂题] Codeforces 806E VK Cup 2017 Round 3 E. Blog Post Rating
- [杂题] Codeforces 799E Round #413 E. Aquarium decoration
- Qt简单知识点
- [随机 Hash] Codeforces 799F Round #413 F. Beautiful fountains rows
- 我的课程与服务