Class: M3u8::Scte35SegmentationDescriptor
- Inherits:
-
Object
- Object
- M3u8::Scte35SegmentationDescriptor
- Defined in:
- lib/m3u8/scte35_segmentation_descriptor.rb
Overview
Represents a segmentation_descriptor (tag 0x02) in SCTE-35
Constant Summary collapse
- CUEI_IDENTIFIER =
0x43554549- DESCRIPTOR_TAG =
0x02
Instance Attribute Summary collapse
-
#segment_num ⇒ Object
readonly
Returns the value of attribute segment_num.
-
#segmentation_duration ⇒ Object
readonly
Returns the value of attribute segmentation_duration.
-
#segmentation_event_cancel_indicator ⇒ Object
readonly
Returns the value of attribute segmentation_event_cancel_indicator.
-
#segmentation_event_id ⇒ Object
readonly
Returns the value of attribute segmentation_event_id.
-
#segmentation_type_id ⇒ Object
readonly
Returns the value of attribute segmentation_type_id.
-
#segmentation_upid ⇒ Object
readonly
Returns the value of attribute segmentation_upid.
-
#segmentation_upid_type ⇒ Object
readonly
Returns the value of attribute segmentation_upid_type.
-
#segments_expected ⇒ Object
readonly
Returns the value of attribute segments_expected.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Scte35SegmentationDescriptor
constructor
A new instance of Scte35SegmentationDescriptor.
Constructor Details
#initialize(options = {}) ⇒ Scte35SegmentationDescriptor
Returns a new instance of Scte35SegmentationDescriptor.
14 15 16 17 18 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 14 def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#segment_num ⇒ Object (readonly)
Returns the value of attribute segment_num.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segment_num @segment_num end |
#segmentation_duration ⇒ Object (readonly)
Returns the value of attribute segmentation_duration.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segmentation_duration @segmentation_duration end |
#segmentation_event_cancel_indicator ⇒ Object (readonly)
Returns the value of attribute segmentation_event_cancel_indicator.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segmentation_event_cancel_indicator @segmentation_event_cancel_indicator end |
#segmentation_event_id ⇒ Object (readonly)
Returns the value of attribute segmentation_event_id.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segmentation_event_id @segmentation_event_id end |
#segmentation_type_id ⇒ Object (readonly)
Returns the value of attribute segmentation_type_id.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segmentation_type_id @segmentation_type_id end |
#segmentation_upid ⇒ Object (readonly)
Returns the value of attribute segmentation_upid.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segmentation_upid @segmentation_upid end |
#segmentation_upid_type ⇒ Object (readonly)
Returns the value of attribute segmentation_upid_type.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segmentation_upid_type @segmentation_upid_type end |
#segments_expected ⇒ Object (readonly)
Returns the value of attribute segments_expected.
9 10 11 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 9 def segments_expected @segments_expected end |
Class Method Details
.parse_from(reader, _length) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/m3u8/scte35_segmentation_descriptor.rb', line 20 def self.parse_from(reader, _length) attrs = { segmentation_event_id: reader.read_bits(32) } attrs[:segmentation_event_cancel_indicator] = reader.read_flag reader.skip_bits(7) # reserved return new(**attrs) if attrs[:segmentation_event_cancel_indicator] parse_segmentation_detail(reader, attrs) end |