Documentation
¶
Index ¶
Constants ¶
const MP3 = "mp3"
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