-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for channels #1
Conversation
It would be nice to hear your views before I PR to grafov |
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.
This is way too many changes and to just add CHANNELS to the master playlist.
Especially if this should be submitted as a PR it must be focused on the one thing that it addresses and make it without big changes to any files.
M3U8.md
Outdated
@@ -83,14 +83,14 @@ Legend for playlist types: | |||
IETF drafts notes | |||
----------------- | |||
|
|||
[IETF](http://ietf.org) document currently in Draft status. Different versions of the document introduce changes of HLS protocol playlist formats. Latest version of the HLS protocol is version 7. |
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.
Why do this crappy updates on HLS version which has nothing to do with Channels?
If you do this, do this properly. The latest draft of HLS is https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-10 and the latest version of HLS is 10.
I'd suggest to just drop this and the next changes to the repo.
reader.go
Outdated
case "CHANNELS": | ||
channels, err := strconv.Atoi(v) | ||
if err != nil { | ||
return fmt.Errorf("non-integer value \"%s\" for CHANNELS attribute", v) |
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.
use %q instead of "%s"
@@ -156,6 +156,11 @@ func (p *MasterPlaylist) Encode() *bytes.Buffer { | |||
p.buf.WriteRune('"') | |||
} | |||
p.buf.WriteRune('\n') | |||
if alt.Channels != 0 { |
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.
This must go before the newline just above.
@@ -0,0 +1,152 @@ | |||
#EXTM3U |
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.
why this extremely long list to check for one simple attribute?
And why remove media-playlist-large and add media-playlist-long instead?
reader_test.go
Outdated
} | ||
} | ||
|
||
func TestDecodeMediaPlaylistLong(t *testing.T) { |
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.
What does this test have to do with channels?
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.
Nothing, technically, but:
the other Channels-PR grafov#168 had an increase of the Playlist size. I was making sure that was not necessary
494c07e
to
610edb6
Compare
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.
LGTM 👍
I should also add |
@TobbeEdgeware @TSonono @nilsandgren @lithammer
Enjoy!
It seems after all that you are supposed merge upstream from your own fork.