pbutils

package
v0.0.0-...-60d5db4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: LGPL-2.1 Imports: 6 Imported by: 0

Documentation

Overview

Package pbutils contains bindings for libgstpbutils.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discoverer

type Discoverer struct{ *glib.Object }

Discoverer represents a GstDiscoverer

func NewDiscoverer

func NewDiscoverer(timeout time.Duration) (*Discoverer, error)

NewDiscoverer creates a new Discoverer with the provided timeout.

func (*Discoverer) DiscoverURI

func (d *Discoverer) DiscoverURI(uri string) (*DiscovererInfo, error)

DiscoverURI synchronously discovers the given uri.

func (*Discoverer) Instance

func (d *Discoverer) Instance() *C.GstDiscoverer

Instance returns the underlying GstDiscoverer instance.

type DiscovererAudioInfo

type DiscovererAudioInfo struct{ *DiscovererStreamInfo }

DiscovererAudioInfo contains info specific to audio streams.

func (*DiscovererAudioInfo) GetBitate

func (d *DiscovererAudioInfo) GetBitate() uint

GetBitate returns the bitrate for the audio stream.

func (*DiscovererAudioInfo) GetChannelMask

func (d *DiscovererAudioInfo) GetChannelMask() uint64

GetChannelMask returns the channel mask for the audio stream.

func (*DiscovererAudioInfo) GetChannels

func (d *DiscovererAudioInfo) GetChannels() uint

GetChannels returns the number of channels in the stream.

func (*DiscovererAudioInfo) GetDepth

func (d *DiscovererAudioInfo) GetDepth() uint

GetDepth returns the number of bits used per sample in each channel.

func (*DiscovererAudioInfo) GetLanguage

func (d *DiscovererAudioInfo) GetLanguage() string

GetLanguage returns the language of the stream, or an empty string if unknown.

func (*DiscovererAudioInfo) GetMaxBitrate

func (d *DiscovererAudioInfo) GetMaxBitrate() uint

GetMaxBitrate returns the maximum bitrate of the stream in bits/second.

func (*DiscovererAudioInfo) GetSampleRate

func (d *DiscovererAudioInfo) GetSampleRate() uint

GetSampleRate returns the sample rate of the stream in Hertz.

func (*DiscovererAudioInfo) Instance

Instance returns the underlying GstDiscovererAudioInfo instance.

type DiscovererContainerInfo

type DiscovererContainerInfo struct{ *DiscovererStreamInfo }

DiscovererContainerInfo specific to container streams.

func (*DiscovererContainerInfo) GetStreams

func (d *DiscovererContainerInfo) GetStreams() []*DiscovererStreamInfo

GetStreams returns the list of streams inside this container.

func (*DiscovererContainerInfo) Instance

Instance returns the underlying GstDiscovererContainerInfo instance.

type DiscovererInfo

type DiscovererInfo struct{ *glib.Object }

DiscovererInfo represents a GstDiscovererInfo

func (*DiscovererInfo) Copy

func (d *DiscovererInfo) Copy() *DiscovererInfo

Copy creates a copy of this instance.

func (*DiscovererInfo) GetAudioStreams

func (d *DiscovererInfo) GetAudioStreams() []*DiscovererAudioInfo

GetAudioStreams finds all the DiscovererAudioInfo contained in info.

func (*DiscovererInfo) GetContainerStreams

func (d *DiscovererInfo) GetContainerStreams() []*DiscovererContainerInfo

GetContainerStreams finds all the DiscovererContainerInfo contained in info.

func (*DiscovererInfo) GetDuration

func (d *DiscovererInfo) GetDuration() time.Duration

GetDuration returns the durartion of the stream.

func (*DiscovererInfo) GetLive

func (d *DiscovererInfo) GetLive() bool

GetLive returns whether this is a live stream.

func (*DiscovererInfo) GetResult

func (d *DiscovererInfo) GetResult() DiscovererResult

GetResult returns the result type.

func (*DiscovererInfo) GetSeekable

func (d *DiscovererInfo) GetSeekable() bool

GetSeekable returns whether the stream is seekable.

func (*DiscovererInfo) GetStreamInfo

func (d *DiscovererInfo) GetStreamInfo() *DiscovererStreamInfo

GetStreamInfo returns the topology of the URI.

func (*DiscovererInfo) GetStreamList

func (d *DiscovererInfo) GetStreamList() []*DiscovererStreamInfo

GetStreamList returns the list of all streams contained in the info.

func (*DiscovererInfo) GetSubtitleStreams

func (d *DiscovererInfo) GetSubtitleStreams() []*DiscovererSubtitleInfo

GetSubtitleStreams returns the info about subtitle streams.

func (*DiscovererInfo) GetTOC

func (d *DiscovererInfo) GetTOC() *gst.TOC

GetTOC returns the TOC for the URI stream.

func (*DiscovererInfo) GetTags

func (d *DiscovererInfo) GetTags() *gst.TagList

GetTags retrieves the tag list for the URI stream.

func (*DiscovererInfo) GetURI

func (d *DiscovererInfo) GetURI() string

GetURI returns the URI for this info.

func (*DiscovererInfo) GetVideoStreams

func (d *DiscovererInfo) GetVideoStreams() []*DiscovererVideoInfo

GetVideoStreams finds all the DiscovererVideoInfo contained in info.

func (*DiscovererInfo) Instance

func (d *DiscovererInfo) Instance() *C.GstDiscovererInfo

Instance returns the underlying GstDiscovererInfo instance.

type DiscovererResult

type DiscovererResult int

DiscovererResult casts a GstDiscovererResult

const (
	DiscovererResultOK             DiscovererResult = C.GST_DISCOVERER_OK              // (0) – The discovery was successful
	DiscovererResultURIInvalid     DiscovererResult = C.GST_DISCOVERER_URI_INVALID     // (1) – the URI is invalid
	DiscovererResultError          DiscovererResult = C.GST_DISCOVERER_ERROR           // (2) – an error happened and the GError is set
	DiscovererResultTimeout        DiscovererResult = C.GST_DISCOVERER_TIMEOUT         // (3) – the discovery timed-out
	DiscovererResultBusy           DiscovererResult = C.GST_DISCOVERER_BUSY            // (4) – the discoverer was already discovering a file
	DiscovererResultMissingPlugins DiscovererResult = C.GST_DISCOVERER_MISSING_PLUGINS // (5) – Some plugins are missing for full discovery
)

Type castings

type DiscovererSerializeFlags

type DiscovererSerializeFlags int

DiscovererSerializeFlags casts GstDiscovererSerializeFlags.

const (
	DiscovererSerializeBasic DiscovererSerializeFlags = C.GST_DISCOVERER_SERIALIZE_BASIC // (0) – Serialize only basic information, excluding caps, tags and miscellaneous information
	DiscovererSerializeCaps  DiscovererSerializeFlags = C.GST_DISCOVERER_SERIALIZE_CAPS  // (1) – Serialize the caps for each stream
	DiscovererSerializeTags  DiscovererSerializeFlags = C.GST_DISCOVERER_SERIALIZE_TAGS  // (2) – Serialize the tags for each stream
	DiscovererSerializeMisc  DiscovererSerializeFlags = C.GST_DISCOVERER_SERIALIZE_MISC  // (4) – Serialize miscellaneous information for each stream
	DiscovererSerializeAll   DiscovererSerializeFlags = C.GST_DISCOVERER_SERIALIZE_ALL   // (7) – Serialize all the available info, including caps, tags and miscellaneous
)

Type castings

type DiscovererStreamInfo

type DiscovererStreamInfo struct{ *glib.Object }

DiscovererStreamInfo is the base structure for information concerning a media stream.

func (*DiscovererStreamInfo) GetCaps

func (d *DiscovererStreamInfo) GetCaps() *gst.Caps

GetCaps returns the caps from the stream info.

func (*DiscovererStreamInfo) GetStreamID

func (d *DiscovererStreamInfo) GetStreamID() string

GetStreamID returns the stream ID of this stream.

func (*DiscovererStreamInfo) GetStreamTypeNick

func (d *DiscovererStreamInfo) GetStreamTypeNick() string

GetStreamTypeNick returns a human readable name for the stream type

func (*DiscovererStreamInfo) GetTOC

func (d *DiscovererStreamInfo) GetTOC() *gst.TOC

GetTOC gets the TOC contained in this stream

func (*DiscovererStreamInfo) GetTags

func (d *DiscovererStreamInfo) GetTags() *gst.TagList

GetTags gets the tags contained in this stream

func (*DiscovererStreamInfo) Instance

Instance returns the underlying GstDiscovererStreamInfo instance.

type DiscovererSubtitleInfo

type DiscovererSubtitleInfo struct{ *DiscovererStreamInfo }

DiscovererSubtitleInfo contains info specific to subtitle streams

func (*DiscovererSubtitleInfo) GetLanguage

func (d *DiscovererSubtitleInfo) GetLanguage() string

GetLanguage returns the language of the subtitles.

func (*DiscovererSubtitleInfo) Instance

Instance returns the underlying GstDiscovererSubtitleInfo instance.

type DiscovererVideoInfo

type DiscovererVideoInfo struct{ *DiscovererStreamInfo }

DiscovererVideoInfo contains info specific to video streams

func (*DiscovererVideoInfo) GetBitrate

func (d *DiscovererVideoInfo) GetBitrate() uint

GetBitrate returns the average or nominal bitrate of the video stream in bits/second.

func (*DiscovererVideoInfo) GetDepth

func (d *DiscovererVideoInfo) GetDepth() uint

GetDepth returns the depth in bits of the video stream.

func (*DiscovererVideoInfo) GetFramerateDenom

func (d *DiscovererVideoInfo) GetFramerateDenom() uint

GetFramerateDenom returns the framerate of the video stream (denominator).

func (*DiscovererVideoInfo) GetFramerateNum

func (d *DiscovererVideoInfo) GetFramerateNum() uint

GetFramerateNum returns the framerate of the video stream (numerator).

func (*DiscovererVideoInfo) GetHeight

func (d *DiscovererVideoInfo) GetHeight() uint

GetHeight returns the height of the video stream in pixels.

func (*DiscovererVideoInfo) GetMaxBitrate

func (d *DiscovererVideoInfo) GetMaxBitrate() uint

GetMaxBitrate returns the maximum bitrate of the video stream in bits/second.

func (*DiscovererVideoInfo) GetPARDenom

func (d *DiscovererVideoInfo) GetPARDenom() uint

GetPARDenom returns the Pixel Aspect Ratio (PAR) of the video stream (denominator).

func (*DiscovererVideoInfo) GetPARNum

func (d *DiscovererVideoInfo) GetPARNum() uint

GetPARNum returns the Pixel Aspect Ratio (PAR) of the video stream (numerator).

func (*DiscovererVideoInfo) GetWidth

func (d *DiscovererVideoInfo) GetWidth() uint

GetWidth returns the width of the video stream in pixels.

func (*DiscovererVideoInfo) Instance

Instance returns the underlying GstDiscovererVideoInfo instance.

func (*DiscovererVideoInfo) IsImage

func (d *DiscovererVideoInfo) IsImage() bool

IsImage returns TRUE if the video stream corresponds to an image (i.e. only contains one frame).

func (*DiscovererVideoInfo) IsInterlaced

func (d *DiscovererVideoInfo) IsInterlaced() bool

IsInterlaced returns TRUE if the stream is interlaced.

Jump to

Keyboard shortcuts

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