Class: Bitmovin::Encoding::Encodings::StreamInput

Inherits:
Object
  • Object
show all
Defined in:
lib/bitmovin/encoding/encodings/stream_input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(encoding_id, stream_id, hash) ⇒ StreamInput

Returns a new instance of StreamInput.



3
4
5
6
7
8
9
10
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 3

def initialize(encoding_id, stream_id, hash)
  @errors = []
  @encoding_id = encoding_id
  @stream_id = stream_id
  hash.each do |name, value|
    instance_variable_set("@#{ActiveSupport::Inflector.underscore(name)}", value)
  end
end

Instance Attribute Details

#encoding_idObject

Returns the value of attribute encoding_id.



12
13
14
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 12

def encoding_id
  @encoding_id
end

#input_idObject

Returns the value of attribute input_id.



13
14
15
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13

def input_id
  @input_id
end

#input_pathObject

Returns the value of attribute input_path.



13
14
15
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13

def input_path
  @input_path
end

#input_stream_idObject

Returns the value of attribute input_stream_id.



13
14
15
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13

def input_stream_id
  @input_stream_id
end

#positionObject

Returns the value of attribute position.



13
14
15
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13

def position
  @position
end

#selection_modeObject

Returns the value of attribute selection_mode.



13
14
15
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13

def selection_mode
  @selection_mode
end

#stream_idObject

Returns the value of attribute stream_id.



12
13
14
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 12

def stream_id
  @stream_id
end

Instance Method Details

#errorsObject



24
25
26
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 24

def errors
  @errors
end

#invalid?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 20

def invalid?
  !valid?
end

#to_json(args) ⇒ Object



28
29
30
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 28

def to_json(args)
  collect_attributes.to_json(args)
end

#valid?Boolean

Returns:

  • (Boolean)


15
16
17
18
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 15

def valid?
  validate!
  @errors.empty?
end