gstreamer

package
v0.0.0-...-cd2df2e Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidGstState = fmt.Errorf("not a valid GstState, try [%s]", strings.Join(_GstStateNames, ", "))
View Source
var ErrInvalidGstStateChangeReturn = fmt.Errorf("not a valid GstStateChangeReturn, try [%s]", strings.Join(_GstStateChangeReturnNames, ", "))

Functions

func GstStateChangeReturnNames

func GstStateChangeReturnNames() []string

GstStateChangeReturnNames returns a list of possible string values of GstStateChangeReturn.

func GstStateNames

func GstStateNames() []string

GstStateNames returns a list of possible string values of GstState.

Types

type AppSrcWriter

type AppSrcWriter struct {
	// contains filtered or unexported fields
}

func NewAppSrcWriter

func NewAppSrcWriter(appsrc *GstElement) *AppSrcWriter

func (*AppSrcWriter) Close

func (a *AppSrcWriter) Close() error

func (*AppSrcWriter) Write

func (a *AppSrcWriter) Write(p []byte) (n int, err error)

type GstBuffer

type GstBuffer struct {
	// contains filtered or unexported fields
}

func NewGstBuffer

func NewGstBuffer(size int) *GstBuffer

func (*GstBuffer) Fill

func (b *GstBuffer) Fill(data []byte, offset int) int

type GstElement

type GstElement struct {
	// contains filtered or unexported fields
}

func NewAppSource

func NewAppSource(name string) *GstElement

func NewGTK4PaintableSink

func NewGTK4PaintableSink(name string) *GstElement

func NewGstElement

func NewGstElement(factoryName, name string) *GstElement

func NewVideoConvert

func NewVideoConvert(name string) *GstElement

func NewVideoTestSource

func NewVideoTestSource(name string) *GstElement

func (*GstElement) AppSrcPushBuffer

func (e *GstElement) AppSrcPushBuffer(b *GstBuffer) int
func (e *GstElement) Link(elem GstElementer) error

func (*GstElement) LinkMany

func (e *GstElement) LinkMany(elems ...GstElementer) error

func (*GstElement) Native

func (e *GstElement) Native() *C.GstElement

func (*GstElement) Object

func (e *GstElement) Object() *glib.Object

func (*GstElement) Property

func (e *GstElement) Property(name string) any

func (*GstElement) PropertyPaintable

func (e *GstElement) PropertyPaintable() gdk.Paintabler

func (*GstElement) SetProperty

func (e *GstElement) SetProperty(name string, value any)

func (*GstElement) SetState

func (e *GstElement) SetState(state GstState) (GstStateChangeReturn, error)

type GstElementer

type GstElementer interface {
	Object() *glib.Object
	Native() *C.GstElement
	Link(elem GstElementer) error
	LinkMany(elems ...GstElementer) error
	SetProperty(name string, value any)
	Property(name string) any
	SetState(state GstState) (GstStateChangeReturn, error)
}

type GstPipeline

type GstPipeline struct {
	// contains filtered or unexported fields
}

func NewGstPipeline

func NewGstPipeline(name string) *GstPipeline

func (*GstPipeline) Add

func (p *GstPipeline) Add(elem GstElementer)

func (*GstPipeline) AddMany

func (p *GstPipeline) AddMany(elems ...GstElementer)
func (p *GstPipeline) Link(elem GstElementer) error

func (*GstPipeline) LinkMany

func (p *GstPipeline) LinkMany(elems ...GstElementer) error

func (*GstPipeline) Native

func (p *GstPipeline) Native() *C.GstElement

func (*GstPipeline) Object

func (p *GstPipeline) Object() *glib.Object

func (*GstPipeline) Property

func (p *GstPipeline) Property(name string) any

func (*GstPipeline) SetProperty

func (p *GstPipeline) SetProperty(name string, value any)

func (*GstPipeline) SetState

func (p *GstPipeline) SetState(state GstState) (GstStateChangeReturn, error)

type GstState

type GstState int

GstState represents the possible states an element can be in. ENUM(VoidPending,Null,Ready,Paused,Playing)

const (
	// GstStateVoidPending is a GstState of type VoidPending.
	GstStateVoidPending GstState = iota
	// GstStateNull is a GstState of type Null.
	GstStateNull
	// GstStateReady is a GstState of type Ready.
	GstStateReady
	// GstStatePaused is a GstState of type Paused.
	GstStatePaused
	// GstStatePlaying is a GstState of type Playing.
	GstStatePlaying
)

func GstStateValues

func GstStateValues() []GstState

GstStateValues returns a list of the values for GstState

func ParseGstState

func ParseGstState(name string) (GstState, error)

ParseGstState attempts to convert a string to a GstState.

func (GstState) String

func (x GstState) String() string

String implements the Stringer interface.

type GstStateChangeReturn

type GstStateChangeReturn int

GstStateChangeReturn represents the possible return values from a state change function. Only Failure is a real failure. ENUM(Failure,Success,Async,NoPreRoll)

const (
	// GstStateChangeReturnFailure is a GstStateChangeReturn of type Failure.
	GstStateChangeReturnFailure GstStateChangeReturn = iota
	// GstStateChangeReturnSuccess is a GstStateChangeReturn of type Success.
	GstStateChangeReturnSuccess
	// GstStateChangeReturnAsync is a GstStateChangeReturn of type Async.
	GstStateChangeReturnAsync
	// GstStateChangeReturnNoPreRoll is a GstStateChangeReturn of type NoPreRoll.
	GstStateChangeReturnNoPreRoll
)

func GstStateChangeReturnValues

func GstStateChangeReturnValues() []GstStateChangeReturn

GstStateChangeReturnValues returns a list of the values for GstStateChangeReturn

func ParseGstStateChangeReturn

func ParseGstStateChangeReturn(name string) (GstStateChangeReturn, error)

ParseGstStateChangeReturn attempts to convert a string to a GstStateChangeReturn.

func (GstStateChangeReturn) String

func (x GstStateChangeReturn) String() string

String implements the Stringer interface.

Jump to

Keyboard shortcuts

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