streaming

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

commit fc72cfeb7ab4c59a9d53a4cb6c0212c9b2ed9752
parent c70d8b514a2f9bf9fe8ff5cfc5dd69d6143b117f
Author: Oliver Lowe <o@olowe.co>
Date:   Sat, 11 May 2024 19:20:24 +1000

internal/scte35: add sample 14.2 from spec to test cases

Diffstat:
Minternal/scte35/scte35_test.go | 26+++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/internal/scte35/scte35_test.go b/internal/scte35/scte35_test.go @@ -29,7 +29,7 @@ type sample struct { var samples = []sample{ { - name: "14.1", + name: "14.1. time_signal", encoded: "/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==", want: SpliceInfo{ SAPType: SAPNone, @@ -56,6 +56,30 @@ var samples = []sample{ CRC32: 0x9ac9d17e, }, }, + { + name: "14.2. splice_insert", + encoded: "/DAvAAAAAAAA///wFAVIAACPf+/+c2nALv4AUsz1AAAAAAAKAAhDVUVJAAABNWLbowo=", + want: SpliceInfo{ + SAPType: SAPNone, + Tier: 0x0fff, + Command: &Command{ + Type: SpliceInsert, + Insert: &Insert{ + ID: 0x4800008f, + OutOfNetwork: true, + SpliceTime: newuint64(0x07369c02e), + Duration: &BreakDuration{ + AutoReturn: true, + Duration: 0x00052ccf5, + }, + }, + }, + Descriptors: []SpliceDescriptor{ + AvailDescriptor(0x00000135), + }, + CRC32: 0x62dba30a, + }, + }, } func newuint64(i uint64) *uint64 { p := new(uint64); p = &i; return p }