Class: WebRTC::VideoFrame
- Inherits:
-
Object
- Object
- WebRTC::VideoFrame
- Defined in:
- lib/webrtc/video_frame.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#rotation ⇒ Object
readonly
Returns the value of attribute rotation.
-
#timestamp_us ⇒ Object
readonly
Returns the value of attribute timestamp_us.
Instance Method Summary collapse
-
#initialize(buffer:, timestamp_us: nil, rotation: 0) ⇒ VideoFrame
constructor
A new instance of VideoFrame.
Constructor Details
#initialize(buffer:, timestamp_us: nil, rotation: 0) ⇒ VideoFrame
Returns a new instance of VideoFrame.
23 24 25 26 27 |
# File 'lib/webrtc/video_frame.rb', line 23 def initialize(buffer:, timestamp_us: nil, rotation: 0) @buffer = buffer @timestamp_us = || (Time.now.to_f * 1_000_000).to_i @rotation = rotation end |
Instance Attribute Details
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
21 22 23 |
# File 'lib/webrtc/video_frame.rb', line 21 def buffer @buffer end |
#rotation ⇒ Object (readonly)
Returns the value of attribute rotation.
21 22 23 |
# File 'lib/webrtc/video_frame.rb', line 21 def rotation @rotation end |
#timestamp_us ⇒ Object (readonly)
Returns the value of attribute timestamp_us.
21 22 23 |
# File 'lib/webrtc/video_frame.rb', line 21 def @timestamp_us end |