opencast

package
v0.0.0-...-a21abd4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

opencast implements types used in Opencast (https://opencast.org/).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	MediaPackageElement

	Properties Properties `xml:"http://mediapackage.opencastproject.org additionalProperties,omitempty"`
}

type AudioStream

type AudioStream struct {
	Stream

	BitDepth     int     `xml:"http://mediapackage.opencastproject.org bitdepth,omitempty"`
	Channels     int     `xml:"http://mediapackage.opencastproject.org channels,omitempty"`
	SamplingRate int     `xml:"http://mediapackage.opencastproject.org samplingrate,omitempty"`
	BitRate      float32 `xml:"http://mediapackage.opencastproject.org bitrate,omitempty"`
	PkLevDB      float32 `xml:"http://mediapackage.opencastproject.org peakleveldb,omitempty"`
	RmsLevDB     float32 `xml:"http://mediapackage.opencastproject.org rmsleveldb,omitempty"`
	RmsPKDB      float32 `xml:"http://mediapackage.opencastproject.org rmspeakdb,omitempty"`
}

type Catalog

type Catalog struct {
	MediaPackageElement
}

type Checksum

type Checksum struct {
	Value string       `xml:",chardata"`
	Type  ChecksumType `xml:"type,attr"`
}

type ChecksumType

type ChecksumType string
const (
	MD5ChecksumType ChecksumType = "md5"
)

type Device

type Device struct {
	Type    string `xml:"type,attr,omitempty"`
	Version string `xml:"version,attr,omitempty"`
	Vendor  string `xml:"vendor,attr,omitempty"`
}

type Encoder

type Encoder struct {
	Type    string `xml:"type,attr,omitempty"`
	Version string `xml:"version,attr,omitempty"`
	Vendor  string `xml:"vendor,attr,omitempty"`
}

type Flavor

type Flavor string

type MediaPackage

type MediaPackage struct {
	XMLName xml.Name `xml:"http://mediapackage.opencastproject.org mediapackage"`

	ID string `xml:"id,attr"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Start *time.Time `xml:"start,attr,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Duration int64 `xml:"duration,attr,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Title string `xml:"http://mediapackage.opencastproject.org title,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	SeriesTitle string `xml:"http://mediapackage.opencastproject.org seriestitle,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Language string `xml:"http://mediapackage.opencastproject.org language,omitempty"`

	Series string `xml:"http://mediapackage.opencastproject.org series,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	License string `xml:"http://mediapackage.opencastproject.org license,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Creators []string `xml:"http://mediapackage.opencastproject.org creators>creator,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Contributors []string `xml:"http://mediapackage.opencastproject.org contributors>contributor,omitempty"`

	// Deprecated: This is not guaranteed to be correct. Use the metadata contained in the Dublin Core catalog instead.
	Subjects []string `xml:"http://mediapackage.opencastproject.org subjects>subject,omitempty"`

	Media        []Track       `xml:"http://mediapackage.opencastproject.org media>track,omitempty"`
	Metadata     []Catalog     `xml:"http://mediapackage.opencastproject.org metadata>catalog,omitempty"`
	Attachments  []Attachment  `xml:"http://mediapackage.opencastproject.org attachments>attachment,omitempty"`
	Publications []Publication `xml:"http://mediapackage.opencastproject.org publications>publication,omitempty"`
}

type MediaPackageElement

type MediaPackageElement struct {
	ID        string                 `xml:"id,attr,omitempty"`
	Flavor    Flavor                 `xml:"type,attr,omitempty"`
	Reference *MediaPackageReference `xml:"ref,attr,omitempty"`

	MimeType MimeType  `xml:"http://mediapackage.opencastproject.org mimetype,omitempty"`
	URL      base.URI  `xml:"http://mediapackage.opencastproject.org url,omitempty"`
	Size     int64     `xml:"http://mediapackage.opencastproject.org size,omitempty"`
	Checksum *Checksum `xml:"http://mediapackage.opencastproject.org checksum,omitempty"`
	Tags     []string  `xml:"http://mediapackage.opencastproject.org tags>tag,omitempty"`
}

type MediaPackageReference

type MediaPackageReference struct {
	Type       MediaPackageReferenceType
	ID         string
	Properties map[string]string
}

func (*MediaPackageReference) MarshalText

func (ref *MediaPackageReference) MarshalText() (text []byte, err error)

func (*MediaPackageReference) UnmarshalText

func (ref *MediaPackageReference) UnmarshalText(text []byte) error

type MediaPackageReferenceType

type MediaPackageReferenceType string
const (
	MediaPackageMediaPackageReference MediaPackageReferenceType = "mediapackage"
	TrackMediaPackageReference        MediaPackageReferenceType = "track"
	CatalogMediaPackageReference      MediaPackageReferenceType = "catalog"
	AttachmentMediaPackageReference   MediaPackageReferenceType = "attachment"
	SeriesMediaPackageReference       MediaPackageReferenceType = "series"

	SelfID = "self"
	AnyID  = "*"
)

type MimeType

type MimeType string

type Properties

type Properties map[string]string

func (*Properties) MarshalXML

func (p *Properties) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Properties) UnmarshalXML

func (p *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type Publication

type Publication struct {
	MediaPackageElement

	Channel string `xml:"channel,attr,omitempty"`

	Media       []Track      `xml:"http://mediapackage.opencastproject.org media>track,omitempty"`
	Metadata    []Catalog    `xml:"http://mediapackage.opencastproject.org metadata>catalog,omitempty"`
	Attachments []Attachment `xml:"http://mediapackage.opencastproject.org attachments>attachment,omitempty"`
}

type Resolution

type Resolution struct {
	Width  int `xml:"http://mediapackage.opencastproject.org width,omitempty"`
	Height int `xml:"http://mediapackage.opencastproject.org hight,omitempty"`
}

func (*Resolution) MarshalText

func (res *Resolution) MarshalText() ([]byte, error)

func (*Resolution) UnmarshalText

func (ref *Resolution) UnmarshalText(text []byte) (err error)

type Scan

type Scan struct {
	Type  ScanType  `xml:"type,attr,omitempty"`
	Order ScanOrder `xml:"order,attr,omitempty"`
}

type ScanOrder

type ScanOrder string
const (
	TopFieldFirstScanOrder    ScanOrder = "TopFieldFirst"
	BottomFieldFirstScanOrder ScanOrder = "BottomFieldFirst"
)

type ScanType

type ScanType string
const (
	InterlacedScanType  ScanType = "Interlaced"
	ProgressiveScanType ScanType = "Progressive"
)

type Stream

type Stream struct {
	ID string `xml:"id,attr,omitempty"`

	FrameCount int64   `xml:"http://mediapackage.opencastproject.org framecount,omitempty"`
	Device     Device  `xml:"http://mediapackage.opencastproject.org device,omitempty"`
	Encoder    Encoder `xml:"http://mediapackage.opencastproject.org encoder,omitempty"`
}

type StreamingProtocol

type StreamingProtocol int
const (
	DownloadStreamingProtocol StreamingProtocol = iota
	HLSStreamingProtocol
	DASHStreamingProtocol
	HDSStreamingProtocol
	SmoothStreamingProtocol
	MMSStreamingProtocol
	RTPStreamingProtocol
	RTSPStreamingProtocol
	RTMPStreamingProtocol
	RTMPEStreamingProtocol
	PNMStreamingProtocol
	PNAStreamingProtocol
	IcyStreamingProtocol
	BitTorentLiveStreamingProtocol
	FileStreamingProtocol
	UnknownStreamingProtocol
)

type SubtitleStream

type SubtitleStream struct {
	Stream
}

type Track

type Track struct {
	MediaPackageElement

	Duration    int64             `xml:"http://mediapackage.opencastproject.org duration,omitempty"`
	Live        bool              `xml:"http://mediapackage.opencastproject.org live,omitempty"`
	Master      bool              `xml:"http://mediapackage.opencastproject.org master,omitempty"`
	LogicalName string            `xml:"http://mediapackage.opencastproject.org logicalname,omitempty"`
	Transport   StreamingProtocol `xml:"http://mediapackage.opencastproject.org transport,omitempty"`
	Audio       []AudioStream     `xml:"http://mediapackage.opencastproject.org audio,omitempty"`
	Video       []VideoStream     `xml:"http://mediapackage.opencastproject.org video,omitempty"`
	Subtitle    []SubtitleStream  `xml:"http://mediapackage.opencastproject.org subtitle,omitempty"`
}

type VideoStream

type VideoStream struct {
	Stream

	BitRate    float32     `xml:"http://mediapackage.opencastproject.org bitrate,omitempty"`
	FrameRate  float32     `xml:"http://mediapackage.opencastproject.org framerate,omitempty"`
	Resolution *Resolution `xml:"http://mediapackage.opencastproject.org resolution,omitempty"`
	ScanType   *Scan       `xml:"http://mediapackage.opencastproject.org scantype,omitempty"`
}

Jump to

Keyboard shortcuts

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