def parse_buf
		#TS_program_map_section() 
			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
			len=section_length*8+bs.pos-32
			program_number          =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                =bs.read 3 #bslbf
			iPCR_PID                =bs.read 13 #uimsbf
			reserved                =bs.read 4 #bslbf
			program_info_length     =bs.read 12 #uimsbf
			descriptor(bs,program_info_length)

			while(bs.pos < len)
				stream_type     =bs.read 8 #uimsbf
				reserved        =bs.read 3 #bslbf
				elementary_PID  =bs.read 13 #uimsnf
				reserved        =bs.read 4 #bslbf
				es_info_length  =bs.read 12 #uimsbf
				descriptor(bs,es_info_length)
			end
			cCRC_32  =bs.read 32 #rpchof
			nil
		end
def parse_buf
		#TS_program_map_section() 
			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
			len=section_length*8+bs.pos-32
			program_number          =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                =bs.read 3 #bslbf
			iPCR_PID                =bs.read 13 #uimsbf
			reserved                =bs.read 4 #bslbf
			program_info_length     =bs.read 12 #uimsbf
			descriptor(bs,program_info_length)

			while(bs.pos < len)
				stream_type     =bs.read 8 #uimsbf
				reserved        =bs.read 3 #bslbf
				elementary_PID  =bs.read 13 #uimsnf
				reserved        =bs.read 4 #bslbf
				es_info_length  =bs.read 12 #uimsbf
				descriptor(bs,es_info_length)
			end
			cCRC_32  =bs.read 32 #rpchof
			nil
		end
< 1Kbyte