Class: MediaInfo::Stream

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Stream

Returns a new instance of Stream.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/media_info/stream.rb', line 54

def initialize(params = {})
  @_others = {}
  @raw_attributes = params

  params.each do |key, value|
    unless respond_to?(key)
      @_others.merge!(Hash[key, value])
      next
    end

    if respond_to?("#{key}=", true)
      send("#{key}=", value)
    else
      instance_variable_set("@#{key}", value)
    end
  end
end

Instance Attribute Details

#_othersObject (readonly)

Returns the value of attribute _others.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def _others
  @_others
end

#codecObject (readonly)

Returns the value of attribute codec.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec
  @codec
end

#codec_extensionsObject

Returns the value of attribute codec_extensions.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_extensions
  @codec_extensions
end

#codec_idObject (readonly)

Returns the value of attribute codec_id.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_id
  @codec_id
end

#codec_id_descriptionObject (readonly)

Returns the value of attribute codec_id_description.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_id_description
  @codec_id_description
end

#codec_id_hintObject (readonly)

Returns the value of attribute codec_id_hint.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_id_hint
  @codec_id_hint
end

#codec_id_infoObject (readonly)

Returns the value of attribute codec_id_info.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_id_info
  @codec_id_info
end

#codec_id_stringObject (readonly)

Returns the value of attribute codec_id_string.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_id_string
  @codec_id_string
end

#codec_id_urlObject (readonly)

Returns the value of attribute codec_id_url.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_id_url
  @codec_id_url
end

#codec_stringObject (readonly)

Returns the value of attribute codec_string.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def codec_string
  @codec_string
end

#countObject

Returns the value of attribute count.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def count
  @count
end

#first_packet_orderObject

Returns the value of attribute first_packet_order.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def first_packet_order
  @first_packet_order
end

#formatObject (readonly)

Returns the value of attribute format.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format
  @format
end

#format_commercialObject (readonly)

Returns the value of attribute format_commercial.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_commercial
  @format_commercial
end

#format_commercial_if_anyObject (readonly)

Returns the value of attribute format_commercial_if_any.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_commercial_if_any
  @format_commercial_if_any
end

#format_compressionObject (readonly)

Returns the value of attribute format_compression.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_compression
  @format_compression
end

#format_extensionsObject

Returns the value of attribute format_extensions.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_extensions
  @format_extensions
end

#format_infoObject (readonly)

Returns the value of attribute format_info.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_info
  @format_info
end

#format_profileObject (readonly)

Returns the value of attribute format_profile.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_profile
  @format_profile
end

#format_settingsObject (readonly)

Returns the value of attribute format_settings.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_settings
  @format_settings
end

#format_urlObject (readonly)

Returns the value of attribute format_url.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_url
  @format_url
end

#format_versionObject (readonly)

Returns the value of attribute format_version.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def format_version
  @format_version
end

#idObject (readonly) Also known as: stream_id

Returns the value of attribute id.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def id
  @id
end

#id_stringObject (readonly)

Returns the value of attribute id_string.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def id_string
  @id_string
end

#informObject (readonly)

Returns the value of attribute inform.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def inform
  @inform
end

#internet_media_typeObject (readonly)

Returns the value of attribute internet_media_type.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def internet_media_type
  @internet_media_type
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def status
  @status
end

#stream_countObject

Returns the value of attribute stream_count.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_count
  @stream_count
end

#stream_kindObject (readonly)

Returns the value of attribute stream_kind.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_kind
  @stream_kind
end

#stream_kind_idObject

Returns the value of attribute stream_kind_id.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_kind_id
  @stream_kind_id
end

#stream_kind_posObject (readonly)

Returns the value of attribute stream_kind_pos.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_kind_pos
  @stream_kind_pos
end

#stream_kind_stringObject (readonly)

Returns the value of attribute stream_kind_string.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_kind_string
  @stream_kind_string
end

#stream_orderObject (readonly)

Returns the value of attribute stream_order.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_order
  @stream_order
end

#stream_sizeObject

Returns the value of attribute stream_size.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size
  @stream_size
end

#stream_size_proportionObject

Returns the value of attribute stream_size_proportion.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_proportion
  @stream_size_proportion
end

#stream_size_stringObject (readonly)

Returns the value of attribute stream_size_string.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_string
  @stream_size_string
end

#stream_size_string1Object (readonly)

Returns the value of attribute stream_size_string1.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_string1
  @stream_size_string1
end

#stream_size_string2Object (readonly)

Returns the value of attribute stream_size_string2.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_string2
  @stream_size_string2
end

#stream_size_string3Object (readonly)

Returns the value of attribute stream_size_string3.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_string3
  @stream_size_string3
end

#stream_size_string4Object (readonly)

Returns the value of attribute stream_size_string4.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_string4
  @stream_size_string4
end

#stream_size_string5Object (readonly)

Returns the value of attribute stream_size_string5.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def stream_size_string5
  @stream_size_string5
end

#unique_idObject (readonly)

Returns the value of attribute unique_id.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def unique_id
  @unique_id
end

#unique_id_stringObject (readonly)

Returns the value of attribute unique_id_string.



8
9
10
# File 'lib/media_info/stream.rb', line 8

def unique_id_string
  @unique_id_string
end

Instance Method Details

#raw_attributesObject



72
73
74
# File 'lib/media_info/stream.rb', line 72

def raw_attributes
  @raw_attributes
end