-
8000
Notifications
You must be signed in to change notification settings - Fork 481
Persist EXT-OATCLS-SCTE35 in Segment.dumps #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persist EXT-OATCLS-SCTE35 in Segment.dumps #290
Conversation
@@ -111,10 +111,13 @@ def parse(content, strict=False, custom_tags_parser=None): | |||
state['cue_out'] = True | |||
|
|||
elif line.startswith(protocol.ext_x_cue_out): | |||
_parse_cueout(line, state, string_to_lines(content)[lineno - 2]) | |||
_parse_cueout(line, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change allowed me to simplify "cue out" parsing. We no longer require the "previous line" to be examined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right! Much better.
@@ -25,7 +25,7 @@ | |||
ext_x_cue_out_cont = '#EXT-X-CUE-OUT-CONT' | |||
ext_x_cue_in = '#EXT-X-CUE-IN' | |||
ext_x_cue_span = '#EXT-X-CUE-SPAN' | |||
ext_x_scte35 = '#EXT-OATCLS-SCTE35' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXT-X-SCTE35
is actually a different tag. It's specified in this document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! Nice catch
@@ -6,7 +6,13 @@ | |||
8000 | import os | ||
import errno | |||
|
|||
from m3u8.protocol import ext_x_start, ext_x_key, ext_x_session_key, ext_x_map | |||
from m3u8.protocol import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
This PR enhances support for SCTE-35 enhanced manifests.
Segment.oatcls_scte35
is now set forSegment
s with aEXT-OATCLS-SCTE35
tag. That property is also set forSegment
s in the sameEXT-X-CUE-OUT
toEXT-X-CUE-IN
block.Segment.dumps
now preservesEXT-OATCLS-SCTE35
as well.Fixes #183