Class: WebRTC::VideoFrame

Inherits:
Object
  • Object
show all
Defined in:
lib/webrtc/video_frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = timestamp_us || (Time.now.to_f * 1_000_000).to_i
  @rotation = rotation
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



21
22
23
# File 'lib/webrtc/video_frame.rb', line 21

def buffer
  @buffer
end

#rotationObject (readonly)

Returns the value of attribute rotation.



21
22
23
# File 'lib/webrtc/video_frame.rb', line 21

def rotation
  @rotation
end

#timestamp_usObject (readonly)

Returns the value of attribute timestamp_us.



21
22
23
# File 'lib/webrtc/video_frame.rb', line 21

def timestamp_us
  @timestamp_us
end