8000 Persist EXT-OATCLS-SCTE35 in Segment.dumps by bbayles · Pull Request #290 · globocom/m3u8 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 3 commits into from
Aug 5, 2022

Conversation

bbayles
Copy link
Contributor
@bbayles bbayles commented Aug 1, 2022

This PR enhances support for SCTE-35 enhanced manifests.

Segment.oatcls_scte35 is now set for Segments with a EXT-OATCLS-SCTE35 tag. That property is also set for Segments in the same EXT-X-CUE-OUT to EXT-X-CUE-IN block.

Segment.dumps now preserves EXT-OATCLS-SCTE35 as well.

Fixes #183

@@ -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)
Copy link
Contributor Author

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.

Copy link
Contributor

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'
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! Nice catch

8000
@@ -6,7 +6,13 @@
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 (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#EXT-OATCLS-SCTE35 tag is getting removed
2 participants
0