iheartradio / open-m3u8

Open Source m3u8 Parser
Other
248 stars 94 forks source link

Added support for additional tags #2

Closed derjust closed 9 years ago

derjust commented 9 years ago

Hi!

This pull request adds support for the tags

based on the latest spec v14 and Adobe's "addition": https://helpx.adobe.com/adobe-media-server/dev/configuring-content-protection-hls.html -

Please let me know if I violated any basic ideas or something. Happy to adopt accordingly.

(I don't know what happend on the fork and why it forked it based on v0.0.2. The v0.0.3 commit appear with different hashes in this branch, too?!)

Wopple commented 9 years ago

I don't know where those identical commits with different hashes came from, but it won't matter when I rebase to master. I will only select the new commits.

Since Adobe is adding things to the specification, I think it would be a good idea for the user code to be able to configure the parser to support different features not in the standard. This will require some architectural changes so I would like to wait on EXT-X-FAXS-CM.

I think the initialization vector can be relaxed and remove ParseExceptionType.INVALID_IV_SIZE altogether so we won't need Constants.IV_SIZE_ALTERNATIVE. I see no reason to only allow AES 128.

Wopple commented 9 years ago

It looks like the tag handlers are going to have to learn some new tricks. I did not anticipate multiple handlers sharing the same attributes. I can probably accept the inheritance for now and refactor it to use composition afterwards.

derjust commented 9 years ago
Wopple commented 9 years ago

Strict and lenient modes sound fine for now.

derjust commented 9 years ago

Hi!

I hope I addressed all the issues and removed EXT-X-FAXS-CM for the time being. I got this lenient mode in the works but like to finish that PR before opening up too many construction sites in parallel.

Please let me know if the current master works for you.

Wopple commented 9 years ago

This PR has been merged with some minor alterations. I removed some unused constants, fixed a little formatting, and changed the wording for a TODO.

Please be aware that I am "merging" changes in this repo with rebase / cherry-pick. The reason is to provide a much more legible history. I recommend using rebase to catch your local branches up with master rather than merge since merge and rebase don't play well together in many cases.