smil

package
v0.0.0-...-4a248c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audio

type Audio struct {
	XMLName xml.Name `xml:"audio"`
	Src     string   `xml:"src,attr"`
	Params  []Param  `xml:"param"`
}

Audio source

type Body

type Body struct {
	XMLName xml.Name `xml:"body"`
	Switch  Switch   `xml:"switch"`
}

Body of the smil file

type Head struct {
	XMLName xml.Name `xml:"head"`
	Meta    []Meta   `xml:"meta"`
}

Head of the SMIL file, mostly for overall metadata

type Main

type Main struct {
	XMLName xml.Name `xml:"smil"`
	Head    Head     `xml:"head"`
	Body    Body     `xml:"body"`
}

Main is the base SMIL struct

func Unmarshall

func Unmarshall(data []byte) (Main, error)

Unmarshall a XML file in smil format

type Meta

type Meta struct {
	XMLName xml.Name `xml:"meta"`
	Name    string   `xml:"name,attr"`
	Content string   `xml:"content,attr"`
}

Meta data for the SMIL file in general

type Param

type Param struct {
	XMLName   xml.Name `xml:"param"`
	Name      string   `xml:"name,attr"`
	Value     string   `xml:"value,attr"`
	ValueType string   `xml:"valuetype,attr"`
}

Param contains additional informaion for Audio, Video, Text such as resolution, language, etc.

type Switch

type Switch struct {
	XMLName xml.Name     `xml:"switch"`
	Videos  []Video      `xml:"video"`
	Audios  []Audio      `xml:"audio"`
	Subs    []Textstream `xml:"textstream"`
}

Switch element allows an author to specify a set of alternative elements from which only the first acceptable element is chosen. ^^ Above is copy pasted from https://www.w3.org/TR/SMIL2/smil-content.html#edef-switch Basically it's a wrapper saying everything in here is the same material in different formats

type Textstream

type Textstream struct {
	XMLName        xml.Name `xml:"textstream"`
	Src            string   `xml:"src,attr"`
	SystemLanguage string   `xml:"systemLanguage,attr"`
	SubtitleName   string   `xml:"subtitleName,attr"`
}

Textstream it the subtitle source

type Video

type Video struct {
	XMLName        xml.Name `xml:"video"`
	Src            string   `xml:"src,attr"`
	IncludeAudio   string   `xml:"includeAudio,attr"`
	SystemLanguage string   `xml:"systemLanguage,attr"`
	AudioName      string   `xml:"audioName,attr"`
}

Video source

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL