Skip to content
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

Expand HLS segment name metadata #4135

Merged
merged 4 commits into from
Sep 15, 2024
Merged

Expand HLS segment name metadata #4135

merged 4 commits into from
Sep 15, 2024

Conversation

toots
Copy link
Member

@toots toots commented Sep 15, 2024

This PR expands the metadata available when returning HLS segment's name. Most specifically, it ads the segment's duration, in seconds (float) and in ticks (main ticks).

With these changes, it is now possible to keep track of a segment's duration in its filename:

def segment_name(metadata) =
  "#{metadata.stream_name}_#{metadata.duration}.#{metadata.extname}"
end

This data is only available when closing the segment so the filename computation is delayed until the segment is being closed.

To prevent the segment_function from further breakage if/when adding more data, its signature is changed to a single record containing all the available attributes.

@toots toots enabled auto-merge September 15, 2024 15:48
@toots toots added this pull request to the merge queue Sep 15, 2024
Merged via the queue into main with commit 24f3733 Sep 15, 2024
25 checks passed
@toots toots deleted the hls-segment-meta branch September 15, 2024 17:12
toots added a commit that referenced this pull request Jan 3, 2025
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.

1 participant