This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
Handling the condition that #EXT-X-KEY Method is NONE refs #68 #69
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
waffle.io Badge
Let the client determine if it should cache or not unless we are publishing a live stream.
Fixing typos in a parsing commands (patch by jamie-stackhouse).
Fix EXT-X-PLAYLIST-TYPE parsing
Doc update. No code changes.
Fixes grafov#10 request.
Both parsing and generation added. With these tags library fully supports M3U8 of ver. 4 of the HLS protocol. Version bumped up to 0.3-dev.
Minor change. As described in https://golang.org/pkg/testing/
Year updated to current. Added missed copyleft headers.
It feature completes support for version 5 of the protocol.
Function declared as DuratiofAsInt(yes bool) so seems like set arg to true will set segments durations to integer values, but it has reverse logic. It was fixed and function now works as expected. It changes public API!
It also apply to EXT-X-PROGRAM-DATE-TIME parsing. Unit tests updated.
Docs synchronized with README information.
Export count of mediaplaylist segments
Removed link to streamsurfer as the project unfinished and stopped.
I really don't remember when it was broken or it feature just made unfinished :\ Anyway it passed tests now and seems worked ok.
p.Decode expects a Bytes object, p.DecodeFrom accepts the reader
decodeLineOfMediaPlaylist currently expects a playlist to have *either* a EXTINF or a EXT-X-BYTERANGE because it's using an if EXTINF {} else if EXT-X-BYTERANGE {}, this is incorrect as EXTINF is required and therefore a playlist must always have an EXTINF, the EXT-X-BYTERANGE is optional. This change also fixes a bug when an offset given in EXT-X-BYTERANGE is not reset in its state, so segments without an offset would incorrect be given the last offset set. Also includes unit tests to reproduce the issue.
decodeLineOfMasterPlaylist is process a I-Frame line expecting the URI to be located on the next line, however, the EXT-X-I-FRAME-STREAM-INF attribute contains the URI as a tag (unlike EXT-X-STREAM-INF. This changes produces a test which reproduces the issue and also removes the state tracking for this attribute as it's not required.
…rafov#52) Currently version is controlled via private version functions and set via the Set* methods when required. This is the ideal method for most applications, as the version is managed by the library This change provides the user the ability to check the version as well as overwrite it, as during some live streams the version number may have been incremented via the Set methods, but once those segments have been removed the version number will change during playback. This isn't ideal as the player may encounter version changes during playback to versions it doesn't support. This provides implementors the ability to announce up front what the version number will be.
Fix file header absence error message
Also link to AUTHORS file in the comments.
Before: BenchmarkDecodeMasterPlaylist-4 100000 22425 ns/op 12195 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 50 23947209 ns/op 12279896 B/op 160059 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1023 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 12931950 ns/op 1748991 B/op 81607 allocs/op After: BenchmarkDecodeMasterPlaylist-4 100000 22472 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 21241158 ns/op 12279906 B/op 160060 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1025 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 13022881 ns/op 1748992 B/op 81607 allocs/op
Before: BenchmarkDecodeMasterPlaylist-4 100000 22455 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 21485138 ns/op 12279915 B/op 160061 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1025 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 13109618 ns/op 1748991 B/op 81607 allocs/op After: BenchmarkDecodeMasterPlaylist-4 50000 22486 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 17205525 ns/op 10999878 B/op 120060 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1016 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 13020206 ns/op 1736192 B/op 81207 allocs/op
Before: BenchmarkDecodeMasterPlaylist-4 100000 22461 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 16692449 ns/op 10999880 B/op 120059 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1025 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 13014814 ns/op 1736192 B/op 81207 allocs/op After: BenchmarkDecodeMasterPlaylist-4 100000 22482 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 15918199 ns/op 10999881 B/op 120060 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1058 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 12738933 ns/op 1736192 B/op 81207 allocs/op
Note, this uses a map as a cache, and does not limit its size and therefore could become very large. If this occurs, there's another option which only caches the last result, but assumes all durations are identical, which isn't always true. But does provide equivalent speed improvements when the durations are identical and doesn't involve a map (just two local variables). Before: BenchmarkDecodeMasterPlaylist-4 100000 22543 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 16008868 ns/op 10999875 B/op 120059 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1020 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 100 12914307 ns/op 1736190 B/op 81207 allocs/op After: BenchmarkDecodeMasterPlaylist-4 100000 22534 ns/op 12194 B/op 77 allocs/op BenchmarkDecodeMediaPlaylist-4 100 16132527 ns/op 10999880 B/op 120059 allocs/op BenchmarkEncodeMasterPlaylist-4 1000000 1016 ns/op 40 B/op 11 allocs/op BenchmarkEncodeMediaPlaylist-4 300 4471880 ns/op 45421 B/op 405 allocs/op
Hori improvements - Alternative approach
It is not reflects real development status and not maintained a long time.
…t-test Add large media playlist test
Thanks @miyaji27 that looks good, are you able to include a test to catch this case too? |
Fixed in #95. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.