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

Support for channels #1

Merged
merged 4 commits into from
Feb 1, 2022
Merged

Support for channels #1

merged 4 commits into from
Feb 1, 2022

Conversation

megaadam
Copy link
Collaborator

@TobbeEdgeware @TSonono @nilsandgren @lithammer
Enjoy!

It seems after all that you are supposed merge upstream from your own fork.

@megaadam
Copy link
Collaborator Author

It would be nice to hear your views before I PR to grafov

Copy link

@TobbeEdgeware TobbeEdgeware left a 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.

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)

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 {

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

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) {

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?

Copy link
Collaborator Author

@megaadam megaadam Jan 28, 2022

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

@megaadam megaadam force-pushed the support-for-CHANNELS branch from 494c07e to 610edb6 Compare January 31, 2022 11:13
Copy link

@TobbeEdgeware TobbeEdgeware left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@megaadam
Copy link
Collaborator Author

megaadam commented Feb 1, 2022

I should also add CHANNEL tests for the writer. But I need to merge and move on now.

@megaadam megaadam merged commit 38bb922 into master Feb 1, 2022
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.

2 participants