ffmpeg(10) parsing section
来源:互联网 发布:数据库模式怎么理解 编辑:程序博客网 时间:2024/05/22 09:44
刚开始看13818-1时,总有一个疑问,如果section太大,一个TS packet放不下,而是放在几个TS packet中,那么这个section到底是怎么解析的,到底是以TS packet为单位,每个TS packet中的部分section都分别去解析呢,还是将几个 TS packet中的section组成部分,先拼凑成一个完整的section,然后再去解析呢?
看ffmpeg源码,看到函数write_section_data这个函数,这个问题的答案就很确定了,将几个TS packet中的section组成部分先分别分离出来,组成一个完整的section,然后再去解析。
在结构体:
typedef struct MpegTSSectionFilter
{
int section_index;
int section_h_size;
uint8_t *section_buf;
unsigned int check_crc : 1;
unsigned int end_of_section_reached : 1;
SectionCallback *section_cb;
void *opaque;
}
MpegTSSectionFilter;
section_buf是存放各个TS packet中分离出来的section组成数据,待组装成一个完整的section,再进行解析:
tss->section_cb(tss1, tss->section_buf, tss->section_h_size);
section_cb是section对应的回调解析函数,以PAT表为例,section_cb则是函数:
static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)
static void write_section_data(AVFormatContext *s, MpegTSFilter *tss1,
const uint8_t *buf, int buf_size, int is_start)
- ffmpeg(10) parsing section
- FUNCTION line.count does not exist. Check the 'Function Name Parsing and Resolution' section in the
- section
- Section()
- 错误码: 1630 FUNCTION count does not exist. Check the 'Function Name Parsing and Resolution' section in
- 错误码: 1630 FUNCTION count does not exist. Check the 'Function Name Parsing and Resolution' section in
- ffmpeg写mp4时不断打印:Error parsing ADTS frame header!
- parsing sql
- Parsing Html
- Parsing error...
- String Parsing
- Parsing error
- Parsing error
- Parsing error
- Parsing URL
- Parsing URL
- URL Parsing
- Number Parsing
- 黑马程序员_Java基础——加强篇(下)
- 使用Java的子类调用构造方法super()和this()
- 数据库之关系代数
- [LeetCode112]Triangle
- Codeforces Testing Round #10 A. Forgotten Episode
- ffmpeg(10) parsing section
- (Struts2学习篇) Struts2文件处理之文件上传
- Git GPG error signing tags
- codeforces round #250 div1
- picketView-点餐-文字
- 【ACM训练计划】 数论、组合数学 好题精选+解题报告
- 安装piwik报错: you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribut
- Codeforces Testing Round #10 B. Balancer
- 从输入 URL 到页面加载完成的过程中都发生了什么事情?