Class: Ariblib::ServiceDescriptionTable

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



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/ariblib/ProgramSpecificInformation.rb', line 78

def parse_buf
  ret=[]
  bs=BitStream.new(@buf)
  #service_description_section(){

  table_id                  =bs.read 8 #uimsbf

  #staff_table if table_id == 0x72

  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# < 1024 -3

  transport_stream_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

  original_network_id       =bs.read 16 #uimsbf

  reserved_future_use       =bs.read 8 #bslbf

  ret << [table_id,original_network_id,transport_stream_id]
  len=(section_length+3-4)*8
  while bs.pos < len
    service_id                  =bs.read 16 #uimsbf

    reserved_future_use         =bs.read 3 #bslbf

    fEIT_user_defined_flags     =bs.read 3 #bslbf

    fEIT_schedule_flag          =bs.read 1 #bslbf

    fEIT_present_following_flag =bs.read 1 #bslbf

    running_status              =bs.read 3 #uimsbf

    free_CA_mode                =bs.read 1 #bslbf

    descriptors_loop_length     =bs.read 12 #uimsbf

    desc=descriptor(bs,descriptors_loop_length)
    ret << [service_id,desc]
  end
  cCRC_32  =bs.read 32 #rpchof

  ret
end