【问题标题】:Parsing the Program Association Section of a Transport Stream解析传输流的节目关联部分
【发布时间】:2018-02-10 10:31:15
【问题描述】:

我正在尝试查找 PID 的类型(音频、视频等),我已经解析了传输流的 Header 部分并提取了 PIDS。通过阅读传输流标准,我知道我需要解析 PAT 才能得到这个。标准中提到的程序关联部分如下。在下面的部分中,for循环中的'N'实际上是什么意思,谁能帮帮我。(参考标准中的表2-25)

program_association_section() {
  table_id
  section_syntax_indicator
  '0'
  reserved
  section_length
  transport_stream_id
  reserved
  version_number
  current_next_indicator
  section_number
  last_section_number
  for (i = 0; i < N; i++) {
    program_number
    reserved
    if (program_number = = '0') {
      network_PID
    }
    else {
      program_map_PID
    }
  }
  CRC_32
}

【问题讨论】:

    标签: c++ c ffmpeg multimedia


    【解决方案1】:

    程序关联表 (PAT) 可以包含有关多个程序的信息。 PAT 数据包的 PID 始终为 0x00

    要找出流类型,您需要的不仅仅是PAT

    解析PAT 中的程序部分将为每个程序提供程序映射表 (PMT) 的 PID。

    PMT 数据包是您需要的数据包,因为它们包含有关每个程序的基本流的信息,包括流类型。

    您可以找到概览here

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-08-22
    • 2013-11-05
    • 2017-10-19
    • 2014-07-05
    • 2014-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多