gstadapter

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MP3 = "mp3"
View Source
const OGG = "ogg"

Variables

This section is empty.

Functions

This section is empty.

Types

type GstAdapter

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

GstAdapter contains the AppSrc for accessing Gstreamer.

func New

func New() *GstAdapter

New creates a new MAC OSX compatible gstreamer pipeline that will play device video and audio in a nice little window :-D

func NewWithAudioPipeline

func NewWithAudioPipeline(outfile string, audiotype string) (*GstAdapter, error)

func NewWithCustomPipeline

func NewWithCustomPipeline(pipelineString string) (*GstAdapter, error)

NewWithCustomPipeline will parse the given pipelineString, connect the videoAppSrc to whatever element has the name "video_target" and the audioAppSrc to "audio_target" see also: https://gstreamer.freedesktop.org/documentation/application-development/appendix/programs.html?gi-language=c

func (*GstAdapter) Consume

func (gsta *GstAdapter) Consume(buf coremedia.CMSampleBuffer) error

Consume will transfer AV data into a Gstreamer AppSrc

func (GstAdapter) Stop

func (gsta GstAdapter) Stop()

Stop sends an EOS (end of stream) event downstream the gstreamer pipeline. Some Elements need this to correctly finish. F.ex. writing mp4 video without sending EOS will result in a broken mp4 file

Jump to

Keyboard shortcuts

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