Class: M3Uzi::Stream
Instance Attribute Summary collapse
-
#bandwidth ⇒ Object
Returns the value of attribute bandwidth.
-
#codecs ⇒ Object
Returns the value of attribute codecs.
-
#path ⇒ Object
Returns the value of attribute path.
-
#program_id ⇒ Object
Returns the value of attribute program_id.
-
#resolution ⇒ Object
Returns the value of attribute resolution.
Instance Method Summary collapse
-
#attribute_string ⇒ Object
Unsupported tags: EXT-X-MEDIA, EXT-X-I-FRAME-STREAM-INF Unsupported attributes of EXT-X-STREAM-INF: AUDIO, VIDEO.
- #format ⇒ Object
- #valid? ⇒ Boolean
Instance Attribute Details
#bandwidth ⇒ Object
Returns the value of attribute bandwidth.
4 5 6 |
# File 'lib/m3uzi/stream.rb', line 4 def bandwidth @bandwidth end |
#codecs ⇒ Object
Returns the value of attribute codecs.
4 5 6 |
# File 'lib/m3uzi/stream.rb', line 4 def codecs @codecs end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/m3uzi/stream.rb', line 4 def path @path end |
#program_id ⇒ Object
Returns the value of attribute program_id.
4 5 6 |
# File 'lib/m3uzi/stream.rb', line 4 def program_id @program_id end |
#resolution ⇒ Object
Returns the value of attribute resolution.
4 5 6 |
# File 'lib/m3uzi/stream.rb', line 4 def resolution @resolution end |
Instance Method Details
#attribute_string ⇒ Object
Unsupported tags: EXT-X-MEDIA, EXT-X-I-FRAME-STREAM-INF Unsupported attributes of EXT-X-STREAM-INF: AUDIO, VIDEO
9 10 11 12 13 14 15 16 |
# File 'lib/m3uzi/stream.rb', line 9 def attribute_string s = [] s << "PROGRAM-ID=#{(program_id || 1).to_i}" s << "BANDWIDTH=#{bandwidth.to_i}" s << "CODECS=\"#{codecs}\"" if codecs s << "RESOLUTION=#{resolution}" if resolution s.join(',') end |
#format ⇒ Object
18 19 20 |
# File 'lib/m3uzi/stream.rb', line 18 def format "#EXT-X-STREAM-INF:#{attribute_string}\n#{path}" end |
#valid? ⇒ Boolean
22 23 24 |
# File 'lib/m3uzi/stream.rb', line 22 def valid? !!(path && bandwidth) end |