Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update section.go #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions descriptors.go
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ package cuei

import (
"fmt"
"log"
)

// audioCmpt is a struct for audioDscptr Components
@@ -55,16 +56,15 @@ type Descriptor struct {
}

// Return Descriptor as JSON
func (dscptr *Descriptor)Json() string{
return mkJson(dscptr)
func (dscptr *Descriptor) Json() string {
return mkJson(dscptr)
}

// Print Descriptor as JSON
func (dscptr *Descriptor)Show(){
func (dscptr *Descriptor) Show() {
fmt.Printf(dscptr.Json())
}


/*
*
Decode returns a Splice Descriptor by tag.
@@ -153,7 +153,11 @@ func (dscptr *Descriptor) timeDescriptor(bd *bitDecoder, tag uint8, length uint8
func (dscptr *Descriptor) segmentationDescriptor(bd *bitDecoder, tag uint8, length uint8) {
dscptr.Tag = tag
dscptr.Length = length
fmt.Println("Seg Desc Length: ", dscptr.Length)
dscptr.Identifier = bd.asAscii(32)
if dscptr.Identifier != "0x43554549" {
log.Fatal("Segmentation Descriptor Identifies is not 0x43554549")
}
futzu marked this conversation as resolved.
Show resolved Hide resolved
dscptr.Name = "Segmentation Descriptor"
dscptr.SegmentationEventID = bd.asHex(32)
dscptr.SegmentationEventCancelIndicator = bd.asFlag()