Module: AirVideo::AvMap

Defined in:
lib/airvideo.rb

Overview

A two-way parser for AirVideo’s communication protocol.

s = "Hello World!".to_avmap
# => "s\000\000\000\012Hello World!"
p AvMap.parse(s)
# => "Hello World!"

Defined Under Namespace

Classes: BinaryData, BitrateList, Hash

Class Method Summary collapse

Class Method Details

.parse(stream) ⇒ Object

Expects an IO object. I use either a file IO or a StringIO object here.



300
301
302
303
# File 'lib/airvideo.rb', line 300

def self.parse(stream)
  @input = stream
  self.read_identifier
end