Class: M3u8::Scte35SpliceInsert
- Inherits:
-
Object
- Object
- M3u8::Scte35SpliceInsert
- Defined in:
- lib/m3u8/scte35_splice_insert.rb
Overview
Represents a splice_insert SCTE-35 command (type 0x05)
Instance Attribute Summary collapse
-
#avail_num ⇒ Object
readonly
Returns the value of attribute avail_num.
-
#avails_expected ⇒ Object
readonly
Returns the value of attribute avails_expected.
-
#break_auto_return ⇒ Object
readonly
Returns the value of attribute break_auto_return.
-
#break_duration ⇒ Object
readonly
Returns the value of attribute break_duration.
-
#out_of_network_indicator ⇒ Object
readonly
Returns the value of attribute out_of_network_indicator.
-
#pts_time ⇒ Object
readonly
Returns the value of attribute pts_time.
-
#splice_event_cancel_indicator ⇒ Object
readonly
Returns the value of attribute splice_event_cancel_indicator.
-
#splice_event_id ⇒ Object
readonly
Returns the value of attribute splice_event_id.
-
#unique_program_id ⇒ Object
readonly
Returns the value of attribute unique_program_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Scte35SpliceInsert
constructor
A new instance of Scte35SpliceInsert.
Constructor Details
#initialize(options = {}) ⇒ Scte35SpliceInsert
Returns a new instance of Scte35SpliceInsert.
11 12 13 14 15 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 11 def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#avail_num ⇒ Object (readonly)
Returns the value of attribute avail_num.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def avail_num @avail_num end |
#avails_expected ⇒ Object (readonly)
Returns the value of attribute avails_expected.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def avails_expected @avails_expected end |
#break_auto_return ⇒ Object (readonly)
Returns the value of attribute break_auto_return.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def break_auto_return @break_auto_return end |
#break_duration ⇒ Object (readonly)
Returns the value of attribute break_duration.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def break_duration @break_duration end |
#out_of_network_indicator ⇒ Object (readonly)
Returns the value of attribute out_of_network_indicator.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def out_of_network_indicator @out_of_network_indicator end |
#pts_time ⇒ Object (readonly)
Returns the value of attribute pts_time.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def pts_time @pts_time end |
#splice_event_cancel_indicator ⇒ Object (readonly)
Returns the value of attribute splice_event_cancel_indicator.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def splice_event_cancel_indicator @splice_event_cancel_indicator end |
#splice_event_id ⇒ Object (readonly)
Returns the value of attribute splice_event_id.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def splice_event_id @splice_event_id end |
#unique_program_id ⇒ Object (readonly)
Returns the value of attribute unique_program_id.
6 7 8 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 6 def unique_program_id @unique_program_id end |
Class Method Details
.parse_from(reader, _length) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/m3u8/scte35_splice_insert.rb', line 17 def self.parse_from(reader, _length) attrs = { splice_event_id: reader.read_bits(32) } attrs[:splice_event_cancel_indicator] = reader.read_flag reader.skip_bits(7) # reserved return new(**attrs) if attrs[:splice_event_cancel_indicator] parse_splice_detail(reader, attrs) end |