Class: M2TSParser::TableSelector::AbstractSection

Inherits:
BinaryParser::TemplateBase
  • Object
show all
Defined in:
lib/m2ts_parser/table.rb

Class Method Summary collapse

Class Method Details

.new(binary, parent_scope = nil) ⇒ Object



114
115
116
117
# File 'lib/m2ts_parser/table.rb', line 114

def self.new(binary, parent_scope=nil)
  table_id = binary.sub(:byte_length => 1).to_i
  return TableMapping(table_id).new(binary)
end

.TableMapping(table_id) ⇒ Object

ARIB STD-B10 第2部 表5-2 「テーブルID の割当および送出の基準」による定義



105
106
107
108
109
110
111
112
# File 'lib/m2ts_parser/table.rb', line 105

def self.TableMapping(table_id)
  case table_id
  when 0x4e, 0x4f, 0x50..0x5f, 0x60..0x6f
    EventInformationSection
  else
    UndefinedSection
  end
end