iheartradio / open-m3u8

Open Source m3u8 Parser
Other
245 stars 94 forks source link

Add support for CHANNELS attribute in EXT-X-MEDIA tag. #54

Closed eventh closed 6 years ago

eventh commented 6 years ago

Solves #53

It can be a list seperated by /, but it is only defined for TYPE: AUDIO, and then only the first parameter is used.

Also updated the test so it contains the CHANNELS attribute.

From the specification: CHANNELS

  The value is a quoted-string that specifies an ordered,
  "/"-separated list of parameters.  If the TYPE attribute is AUDIO
  then the first parameter is a count of audio channels expressed as
  a decimal-integer, indicating the maximum number of independent,
  simultaneous audio channels present in any Media Segment in the
  Rendition.  For example, an AC-3 5.1 rendition would have a
  CHANNELS="6" attribute.  No other CHANNELS parameters are
  currently defined.

  All audio EXT-X-MEDIA tags SHOULD have a CHANNELS attribute.  If a
  Master Playlist contains two renditions encoded with the same
  codec but a different number of channels, then the CHANNELS
  attribute is REQUIRED; otherwise it is OPTIONAL.

Signed-off-by: Even Thomassen even.thomassen@noriginmedia.com

Wopple commented 6 years ago

This looks good! A couple minor things:

@sunglee413 this is good to go once the requested changes are resolved.

eventh commented 6 years ago

@Wopple thanks for the feedback, I've fixed the mentioned issues :)

Wopple commented 6 years ago

LGTM