Skip to content

Commit

Permalink
Add Interface for Descriptor Data
Browse files Browse the repository at this point in the history
- The purpose of the change is to allow the application to add support for other descriptors (without need to modify/update the library)
  • Loading branch information
Kamran Rauf committed Jan 23, 2024
1 parent 6884fe7 commit da3c4a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions psi/pmtdescriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const (
// PmtDescriptor represents operations currently necessary on descriptors found in the PMT
type PmtDescriptor interface {
Tag() uint8
Data() []byte
Format() string
IsIso639LanguageDescriptor() bool
IsMaximumBitrateDescriptor() bool
Expand Down Expand Up @@ -114,6 +115,10 @@ func (descriptor *pmtDescriptor) Tag() uint8 {
return descriptor.tag
}

func (descriptor *pmtDescriptor) Data() []byte {
return descriptor.data
}

func (descriptor *pmtDescriptor) String() string {
return descriptor.decode()
}
Expand Down

0 comments on commit da3c4a3

Please sign in to comment.