Caption support (#2462)

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
cj
2022-05-05 20:59:28 -05:00
committed by GitHub
parent ab1b30ffb7
commit c1a096a1a6
114 changed files with 16899 additions and 17 deletions

35
vendor/github.com/asticode/go-astits/data_tot.go generated vendored Normal file
View File

@@ -0,0 +1,35 @@
package astits
import (
"fmt"
"time"
"github.com/asticode/go-astikit"
)
// TOTData represents a TOT data
// Page: 39 | Chapter: 5.2.6 | Link: https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
type TOTData struct {
Descriptors []*Descriptor
UTCTime time.Time
}
// parseTOTSection parses a TOT section
func parseTOTSection(i *astikit.BytesIterator) (d *TOTData, err error) {
// Create data
d = &TOTData{}
// UTC time
if d.UTCTime, err = parseDVBTime(i); err != nil {
err = fmt.Errorf("astits: parsing DVB time failed: %w", err)
return
}
// Descriptors
if d.Descriptors, err = parseDescriptors(i); err != nil {
err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
return
}
return
}