Class: Argus::VideoData
- Inherits:
-
Object
- Object
- Argus::VideoData
- Defined in:
- lib/argus/video_data.rb
Instance Attribute Summary collapse
-
#envelope ⇒ Object
readonly
Returns the value of attribute envelope.
-
#frame ⇒ Object
readonly
Returns the value of attribute frame.
-
#socket ⇒ Object
readonly
Returns the value of attribute socket.
Instance Method Summary collapse
-
#initialize(socket) ⇒ VideoData
constructor
A new instance of VideoData.
- #parse_frame ⇒ Object
Constructor Details
#initialize(socket) ⇒ VideoData
Returns a new instance of VideoData.
5 6 7 8 9 |
# File 'lib/argus/video_data.rb', line 5 def initialize(socket) @socket = socket @envelope = VideoDataEnvelope.new(@socket) @frame = parse_frame end |
Instance Attribute Details
#envelope ⇒ Object (readonly)
Returns the value of attribute envelope.
3 4 5 |
# File 'lib/argus/video_data.rb', line 3 def envelope @envelope end |
#frame ⇒ Object (readonly)
Returns the value of attribute frame.
3 4 5 |
# File 'lib/argus/video_data.rb', line 3 def frame @frame end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
3 4 5 |
# File 'lib/argus/video_data.rb', line 3 def socket @socket end |
Instance Method Details
#parse_frame ⇒ Object
11 12 13 |
# File 'lib/argus/video_data.rb', line 11 def parse_frame socket.read(envelope.payload_size) if envelope end |