Class: Ariblib::NetworkInformationTable

Inherits:
ProgramSpecificInformation show all
Defined in:
lib/ariblib/ProgramSpecificInformation.rb

Overview

< 1Kbyte

Instance Attribute Summary

Attributes inherited from ProgramSpecificInformation

#contents

Instance Method Summary collapse

Methods inherited from ProgramSpecificInformation

#arib_to_utf8, #descriptor, #init_buf, #initialize, #set, #set_buf

Constructor Details

This class inherits a constructor from Ariblib::ProgramSpecificInformation

Instance Method Details

#parse_bufObject



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/ariblib/ProgramSpecificInformation.rb', line 196

def parse_buf
  ret=[]
  bs=BitStream.new(@buf)
  table_id                        =bs.read 8 #uimsbf
  section_syntax_indicator        =bs.read 1 #bslbf
  reserved_future_use             =bs.read 1 #bslbf
  reserved                        =bs.read 2 #bslbf
  section_length                  =bs.read 12 #uimsbf
  network_id                      =bs.read 16 #uimsbf
  reserved                        =bs.read 2 #bslbf
  version_number                  =bs.read 5 #uimsbf
  current_next_indicator          =bs.read 1 #bslbf
  section_number                  =bs.read 8 #uimsbf
  last_section_number             =bs.read 8 #uimsbf
  reserved_future_use             =bs.read 4 #bslbf
  network_descriptors_length      =bs.read 12 #uimsbf
  desc=descriptor(bs,network_descriptors_length)
  ret << [:NIT,table_id,desc]
  reserved_future_use             =bs.read 4 #bslbf
  transport_stream_loop_length    =bs.read 12 #uimsbf
  
  len=bs.pos+transport_stream_loop_length*8
  while bs.pos < len
    transport_stream_id           =bs.read 16 #uimsbf
    original_network_id           =bs.read 16 #uimsbf
    reserved_future_use           =bs.read 4 #bslbf
    transport_descriptors_length  =bs.read 12 #uimsbf
    desc=descriptor(bs,transport_descriptors_length)
    ret << [transport_stream_id,original_network_id,desc]
  end
  cCRC_32                         =bs.read 32 #rpchof
  ret
end