-
Notifications
You must be signed in to change notification settings - Fork 474
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
Feat: add explicit 'Duration=' parameter to EXT-X-CUE-OUT #362
Conversation
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.
thanks, good work, I believe we must add the parser changes to this pr as well.
m3u8/model.py
Outdated
@@ -629,7 629,7 @@ def dumps(self, last_segment, timespec="milliseconds"): | |||
|
|||
output.append( |
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.
I think we should preserve what the what we receive as input.
Meaning, we should expand the parser to include something like cue_out_duration_property
to true.
elif line.startswith(protocol.ext_x_cue_out):
_parse_cueout(line, state)
state["cue_out_start"] = True
state["cue_out"] = True
if line.contains(somethingsomething):
state["cue_out_explicitly_duration"] = True
And then here, we would need to check to see if we'd need to add the Duration or not. WDYT?
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.
Otherwise we'll transform manifests without Duration to have one.
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.
Yeah, that's true. I changed it and adapted for parsing it only when DURATION is available.
Also, a new test has been created and some code has been refactored regarding the new 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.
thanks for the great work
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.
Awesome work, thank you!
Description
I have been investigating the problem with DURATION parameters.
Firstly, as you already know it isn't compulsory to establish the parameter as you can see in an example where is use and other which not. The use of the parameter will depend on some key points:
#EXT-X-CUE-OUT:DURATION=195.000,BREAKID=103038
I see the change as an improvement for the following reasons:
Regarding all, thank you for making the package and contributing to the open-source community.
A test has been changed for checking the new format