Class: Mediakit::FFmpeg::Options::StreamSpecifier
- Inherits:
-
Object
- Object
- Mediakit::FFmpeg::Options::StreamSpecifier
- Defined in:
- lib/mediakit/ffmpeg/options.rb
Overview
Constant Summary collapse
- STREAM_TYPES =
['v', 'a', 's'].freeze
Instance Attribute Summary collapse
-
#metadata_tag_key ⇒ Object
readonly
Returns the value of attribute metadata_tag_key.
-
#metadata_tag_value ⇒ Object
readonly
Returns the value of attribute metadata_tag_value.
-
#program_id ⇒ Object
readonly
Returns the value of attribute program_id.
-
#stream_index ⇒ Object
readonly
Returns the value of attribute stream_index.
-
#stream_type ⇒ Object
readonly
Returns the value of attribute stream_type.
-
#usable ⇒ Object
readonly
Returns the value of attribute usable.
Instance Method Summary collapse
-
#initialize(stream_index: nil, stream_type: nil, program_id: nil, metadata_tag_key: nil, metadata_tag_value: nil, usable: nil) ⇒ StreamSpecifier
constructor
A new instance of StreamSpecifier.
- #to_s ⇒ Object
Constructor Details
#initialize(stream_index: nil, stream_type: nil, program_id: nil, metadata_tag_key: nil, metadata_tag_value: nil, usable: nil) ⇒ StreamSpecifier
Returns a new instance of StreamSpecifier.
168 169 170 171 172 173 174 175 176 |
# File 'lib/mediakit/ffmpeg/options.rb', line 168 def initialize(stream_index: nil, stream_type: nil, program_id: nil, metadata_tag_key: nil, metadata_tag_value: nil, usable: nil) raise(ArgumentError, "invalid args stream_type = #{stream_type}") if stream_type && !STREAM_TYPES.include?(stream_type) @stream_index = stream_index @stream_type = stream_type @program_id = program_id @metadata_tag_key = @metadata_tag_value = @usable = usable end |
Instance Attribute Details
#metadata_tag_key ⇒ Object (readonly)
Returns the value of attribute metadata_tag_key.
165 166 167 |
# File 'lib/mediakit/ffmpeg/options.rb', line 165 def @metadata_tag_key end |
#metadata_tag_value ⇒ Object (readonly)
Returns the value of attribute metadata_tag_value.
165 166 167 |
# File 'lib/mediakit/ffmpeg/options.rb', line 165 def @metadata_tag_value end |
#program_id ⇒ Object (readonly)
Returns the value of attribute program_id.
165 166 167 |
# File 'lib/mediakit/ffmpeg/options.rb', line 165 def program_id @program_id end |
#stream_index ⇒ Object (readonly)
Returns the value of attribute stream_index.
165 166 167 |
# File 'lib/mediakit/ffmpeg/options.rb', line 165 def stream_index @stream_index end |
#stream_type ⇒ Object (readonly)
Returns the value of attribute stream_type.
165 166 167 |
# File 'lib/mediakit/ffmpeg/options.rb', line 165 def stream_type @stream_type end |
#usable ⇒ Object (readonly)
Returns the value of attribute usable.
165 166 167 |
# File 'lib/mediakit/ffmpeg/options.rb', line 165 def usable @usable end |
Instance Method Details
#to_s ⇒ Object
178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/mediakit/ffmpeg/options.rb', line 178 def to_s case when stream_index?, stream_type? stream_specifier when program? program_specifier when when usable? usable_specifier else raise(RuntimeError) end end |