Skip to content

Fix EXT-X-PROGRAM-DATE-TIME in stream#58036

Merged
uvjustin merged 7 commits intohome-assistant:devfrom
uvjustin:fix-hls-datetime
Oct 25, 2021
Merged

Fix EXT-X-PROGRAM-DATE-TIME in stream#58036
uvjustin merged 7 commits intohome-assistant:devfrom
uvjustin:fix-hls-datetime

Conversation

@uvjustin
Copy link
Copy Markdown
Contributor

Proposed change

The extra #EXT-X-PROGRAM-DATE-TIME tags added to HLS playlists for LL-HLS were incorrect which may have caused issues with some players including Exoplayer. This PR fixes those tags.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link
Copy Markdown

Hey there @hunterjm, @allenporter, mind taking a look at this pull request as it has been labeled with an integration (stream) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Oct 20, 2021
Copy link
Copy Markdown
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

Apologies, i had a draft review that I forgot to send!

@frenck frenck removed the smash Indicator this PR is close to finish for merging or closing label Oct 22, 2021
Copy link
Copy Markdown
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

Feel free to add tests as a follow up.

My streams currently are still displayed with relative zero based timestamps, and not an absolute time fwiw.

@uvjustin
Copy link
Copy Markdown
Contributor Author

Feel free to add tests as a follow up.

My streams currently are still displayed with relative zero based timestamps, and not an absolute time fwiw.

This actually led me down a small rabbit hole of revisiting the part boundary behavior and adjusting some minor tests. I will see if I can add them to this PR today.

@uvjustin uvjustin marked this pull request as draft October 23, 2021 14:06
@uvjustin
Copy link
Copy Markdown
Contributor Author

uvjustin commented Oct 23, 2021

@allenporter I made some updates and force pushed everything, so this needs another look.
I ended up just using the simpler solution of resetting to the adjusted time.
However, this causes a problem regarding the issue with starting timestamps we discussed before. Even though an arbitrary offset won't matter, and you noticed that the offsets always seem to be 0 anyway, we run into problems in the case of discontinuities? We could reset the start_time there, but we would still need to assume that the stream's timestamps get reset to a consistent number which I'm not sure about. The previous method of constantly updating the start_time should avoid this problem.

Edit: I just pushed a commit to reset the start_time in discontinuity(). I'm ok with this - you noted that your cameras reset to 0 and mine seem to reset consistently too. Also this is the current behavior which doesn't seem to be causing any issues.

@uvjustin uvjustin marked this pull request as ready for review October 25, 2021 02:38
@uvjustin uvjustin merged commit 06008bc into home-assistant:dev Oct 25, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2021
@uvjustin uvjustin deleted the fix-hls-datetime branch November 7, 2021 11:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants