streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

commit b3fe201d0ff0f46894b72a43318de23db09c3acc
parent 6c65438854fef924686286ebc2b20dbfd647c52b
Author: Oliver Lowe <o@olowe.co>
Date:   Thu, 23 May 2024 19:48:52 +1000

m3u8: implement Stringer for HDCPLevel

So when we encode and/or debug print we get something easy to read.

Diffstat:
Mm3u8/m3u8.go | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/m3u8/m3u8.go b/m3u8/m3u8.go @@ -228,6 +228,18 @@ const ( HDCPType1 ) +func (l HDCPLevel) String() { + switch l { + case HDCPNone: + return "NONE" + case HDCPType0: + return "TYPE-0" + case HDCPType1: + return "TYPE-1" + } + return "unknown" +} + // IFrameInfo represents the EXT-X-I-FRAME-STREAM-INF tag. // It has the same structure as Variant, but the following fields should be unset: // - FrameRate