Class: Ffprober::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/ffprober/stream.rb

Direct Known Subclasses

AudioStream, VideoStream

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object_attribute_hash) ⇒ Stream

Returns a new instance of Stream.



9
10
11
12
13
14
# File 'lib/ffprober/stream.rb', line 9

def initialize(object_attribute_hash)
  object_attribute_hash.map do |(k, v)|
    writer_m = "#{k}="
    send(writer_m, v) if respond_to?(writer_m)
  end
end

Instance Attribute Details

#avg_frame_rateObject

Returns the value of attribute avg_frame_rate.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def avg_frame_rate
  @avg_frame_rate
end

#codec_long_nameObject

Returns the value of attribute codec_long_name.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def codec_long_name
  @codec_long_name
end

#codec_nameObject

Returns the value of attribute codec_name.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def codec_name
  @codec_name
end

#codec_tagObject

Returns the value of attribute codec_tag.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def codec_tag
  @codec_tag
end

#codec_tag_stringObject

Returns the value of attribute codec_tag_string.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def codec_tag_string
  @codec_tag_string
end

#codec_time_baseObject

Returns the value of attribute codec_time_base.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def codec_time_base
  @codec_time_base
end

#codec_typeObject

Returns the value of attribute codec_type.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def codec_type
  @codec_type
end

#durationObject

Returns the value of attribute duration.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def duration
  @duration
end

#nb_framesObject

Returns the value of attribute nb_frames.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def nb_frames
  @nb_frames
end

#r_frame_rateObject

Returns the value of attribute r_frame_rate.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def r_frame_rate
  @r_frame_rate
end

#start_timeObject

Returns the value of attribute start_time.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def start_time
  @start_time
end

#time_baseObject

Returns the value of attribute time_base.



3
4
5
# File 'lib/ffprober/stream.rb', line 3

def time_base
  @time_base
end