commit d3eae7cf0fe96700836a1211241e76d7c25b1ee4
parent bc5be5eb901131c5b405a25e8eaba5f22637c691
Author: Oliver Lowe <o@olowe.co>
Date: Sat, 11 May 2024 19:40:56 +1000
internal/scte35: shorten UPIDType const names
By removing redundant "Type". While here remove unused EncryptedPacket
structs leftover from github.com/comcast/scte35-go; we keep this data
in SpliceInfo now.
Diffstat:
3 files changed, 19 insertions(+), 34 deletions(-)
diff --git a/internal/scte35/encrypted_packet.go b/internal/scte35/encrypted_packet.go
@@ -3,21 +3,6 @@
package scte35
-const (
- EncryptionAlgorithmNone uint32 = iota
- EncryptionAlgorithmDESECB
- EncryptionAlgorithmDESCBC
- EncryptionAlgorithmTripleDES
-)
-
-// EncryptedPacket represents payload encryption information.
-type EncryptedPacket struct {
- // Specifies which cipher is used.
- // See SCTE 35 section 11.3.
- EncryptionAlgorithm uint32
- CWIndex uint32
-}
-
// cipher is a 6-bit field specifying the algorithm used to encrypt
// payloads as defined in SCTE 35 section 11.3.
type Cipher uint8
diff --git a/internal/scte35/scte35_test.go b/internal/scte35/scte35_test.go
@@ -24,7 +24,7 @@ var samples = []sample{
Restrictions: NoRegionalBlackout | ArchiveAllowed | DeviceRestrictionsNone,
Duration: newuint64(0x0001a599b0),
UPID: UPID{
- Type: UPIDTypeTI,
+ Type: UPIDTI,
Value: []byte{0x00, 0x00, 0x00, 0x00, 0x2c, 0xa0, 0xa1, 0x8a},
},
Type: 0x34,
diff --git a/internal/scte35/splice_descriptor.go b/internal/scte35/splice_descriptor.go
@@ -227,25 +227,25 @@ type UPIDType uint8
// Valid UPIDType values defined in Table 22, SCTE 35 section 10.3.3.1.
const (
- UPIDTypeNone UPIDType = 0 + iota
- _ // User Defined, deprecated, use MPU.
- _ // ISCI, deprecated, use AdID.
- UPIDTypeAdID
- UPIDTypeUMID
+ UPIDNone UPIDType = 0 + iota
+ _ // User Defined, deprecated, use MPU.
+ _ // ISCI, deprecated, use AdID.
+ UPIDAdID
+ UPIDUMID
_ // ISAN, deprecated, use ISAN.
- UPIDTypeISAN
- UPIDTypeTID
- UPIDTypeTI
- UPIDTypeADI
- UPIDTypeEIDR
- UPIDTypeATSCContentID
- UPIDTypeMPU
- UPIDTypeMID
- UPIDTypeADSInfo
- UPIDTypeURI
- UPIDTypeUUID
- UPIDTypeSCR
- UPIDTypeReserved
+ UPIDISAN
+ UPIDTID
+ UPIDTI
+ UPIDADI
+ UPIDEIDR
+ UPIDATSCContentID
+ UPIDMPU
+ UPIDMID
+ UPIDADSInfo
+ UPIDURI
+ UPIDUUID
+ UPIDSCR
+ UPIDReserved
)
// TimeDescriptor represents a moment in time as used in the Precision