Documentation
¶
Index ¶
- func DebugGSTState(ctx context.Context, pipeline *Pipeline, output string)
- func GSTLogFunction(level gst.DebugLevel, file string, function string, line int, ...)
- type CCTVPipeline
- type CCTVPipelineParams
- type Element
- type InternalError
- type Link
- type LinkWithCaps
- type PartialPipeline
- type Pipeline
- func (p *Pipeline) AddElements(elements ...*Element)
- func (p *Pipeline) AddPartialPipeline(partial PartialPipeline)
- func (p *Pipeline) AddWatch(watch func(element *gst.Message) bool)
- func (p *Pipeline) Build() error
- func (p *Pipeline) Finish(ctx context.Context)
- func (p *Pipeline) Quit()
- func (p *Pipeline) Start(ctx context.Context, mainLoop *glib.MainLoop) (rerr error)
- type SegmentPipelineParams
- type SegmentationPipeline
- func (sg *SegmentationPipeline) Build(pipeline *Pipeline) error
- func (sg *SegmentationPipeline) Connect(source *Element) error
- func (sg *SegmentationPipeline) HandleFormatLocation(g *gst.Element, val uint, sample *gst.Sample) string
- func (sg *SegmentationPipeline) HandleNewSegment(msg *gst.Message) bool
- func (sg *SegmentationPipeline) HandleStreamChange(newState SegmentationPipelineState) (err error)
- func (sg *SegmentationPipeline) Prepare(pipeline *Pipeline) error
- func (sg *SegmentationPipeline) Start(ctx context.Context, pipeline *Pipeline) error
- func (sg *SegmentationPipeline) Stop(ctx context.Context, pipeline *Pipeline) error
- type SegmentationPipelineElements
- type SegmentationPipelineState
- type SourcePipeline
- func (s *SourcePipeline) Build(pipeline *Pipeline) error
- func (s *SourcePipeline) Connect(source *Element) error
- func (s *SourcePipeline) Prepare(pipeline *Pipeline) error
- func (s *SourcePipeline) Start(ctx context.Context, pipeline *Pipeline) error
- func (s *SourcePipeline) Stop(ctx context.Context, pipeline *Pipeline) error
- type SourcePipelineElements
- type SourcePipelineParams
- type StreamPipeline
- func (s *StreamPipeline) Build(pipeline *Pipeline) error
- func (s *StreamPipeline) Connect(source *Element) error
- func (s *StreamPipeline) HandleStreamChange(newState StreamPipelineState) (err error)
- func (s *StreamPipeline) Prepare(pipeline *Pipeline) error
- func (s *StreamPipeline) Start(ctx context.Context, pipeline *Pipeline) error
- func (s *StreamPipeline) Stop(ctx context.Context, pipeline *Pipeline) error
- type StreamPipelineElements
- type StreamPipelineParams
- type StreamPipelineState
- type ThumbnailParams
- type ThumbnailPipeline
- func (th *ThumbnailPipeline) Build(pipeline *Pipeline) error
- func (th *ThumbnailPipeline) Connect(source *Element) error
- func (th *ThumbnailPipeline) CopySample(sample *gst.Sample)
- func (th *ThumbnailPipeline) NewElements() error
- func (th *ThumbnailPipeline) OnBuffer(buffer *gst.Buffer)
- func (th *ThumbnailPipeline) Prepare(pipeline *Pipeline) error
- func (th *ThumbnailPipeline) Start(ctx context.Context, pipeline *Pipeline) error
- func (th *ThumbnailPipeline) Stop(ctx context.Context, pipeline *Pipeline) error
- type ThumbnailPipelineElements
- type ThumbnailPipelineState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GSTLogFunction ¶
func GSTLogFunction( level gst.DebugLevel, file string, function string, line int, object *glib.Object, message string, )
GSTLogFunction is a custom logger than can be used instead of the gstream, which is now TODO: using this causes the following error
(<unknown>:93142): GStreamer-CRITICAL **: 02:22:17.747: The created element should be floating, this is probably caused by faulty bindings
Types ¶
type CCTVPipeline ¶
type CCTVPipeline struct {
// contains filtered or unexported fields
}
func NewCCTVPipeline ¶
func NewCCTVPipeline(params CCTVPipelineParams) (_ *CCTVPipeline, err error)
NewCCTVPipeline constructs a new pipeline accordingly that cctv supports
type CCTVPipelineParams ¶
type CCTVPipelineParams struct { // SourceLocation rtsp uri of where to pull a stream SourceLocation string // DestinationLocation rtsp uri of where to push a stream DestinationLocation string // CameraID CameraID string // SegmentBasePath base path of where to store segments SegmentBasePath string // TargetVideoSegmentationDuration at what duration to make video segments TargetVideoSegmentationDuration time.Duration }
type Element ¶
type Element struct { Factory string Name string Properties map[string]interface{} // contains filtered or unexported fields }
Element struct wraps a gst element
func NewDecodeElement ¶
func NewFileSrcElement ¶
func (*Element) LinkFiltered ¶
type InternalError ¶
type InternalError struct {
// contains filtered or unexported fields
}
func (InternalError) Error ¶
func (i InternalError) Error() string
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
Link struct holds elements that should be linked left -> right
type LinkWithCaps ¶
type LinkWithCaps struct {
// contains filtered or unexported fields
}
type PartialPipeline ¶
type PartialPipeline interface { // Prepare is called before any elements are built or any gst // pipeline has be instantiated Prepare(pipeline *Pipeline) error // Build is called after all elements have been added to the pipeline // gst pipeline has been instantiated Build(pipeline *Pipeline) error // Connect is called to connect a target element from one segment to // another Connect(source *Element) error // Start is called when the pipeline has started processing Start(ctx context.Context, pipeline *Pipeline) error // Stop is called when the pipeline has finished processing Stop(ctx context.Context, pipeline *Pipeline) error }
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline wrapper around go-gst
func NewPipeline ¶
NewPipeline returns a new pipeline given a name
func (*Pipeline) AddElements ¶
AddElements to the pipeline
func (*Pipeline) AddPartialPipeline ¶
func (p *Pipeline) AddPartialPipeline(partial PartialPipeline)
AddPartialPipeline to the pipeline
type SegmentPipelineParams ¶
type SegmentPipelineParams struct {
// contains filtered or unexported fields
}
type SegmentationPipeline ¶
type SegmentationPipeline struct { // elements Elements SegmentationPipelineElements // segment counter SegmentCounter uint32 // contains filtered or unexported fields }
SegmentationPipeline will split a given stream into smaller parts
func NewSegmentationPipeline ¶
func NewSegmentationPipeline(params SegmentPipelineParams) (sg *SegmentationPipeline, err error)
NewSegmentationPipeline create a new segmentation pipeline
func (*SegmentationPipeline) Build ¶
func (sg *SegmentationPipeline) Build(pipeline *Pipeline) error
func (*SegmentationPipeline) Connect ¶
func (sg *SegmentationPipeline) Connect(source *Element) error
func (*SegmentationPipeline) HandleFormatLocation ¶
func (*SegmentationPipeline) HandleNewSegment ¶
func (sg *SegmentationPipeline) HandleNewSegment(msg *gst.Message) bool
func (*SegmentationPipeline) HandleStreamChange ¶
func (sg *SegmentationPipeline) HandleStreamChange(newState SegmentationPipelineState) (err error)
func (*SegmentationPipeline) Prepare ¶
func (sg *SegmentationPipeline) Prepare(pipeline *Pipeline) error
type SegmentationPipelineElements ¶
type SegmentationPipelineElements struct {
// contains filtered or unexported fields
}
type SegmentationPipelineState ¶
type SegmentationPipelineState struct {
// contains filtered or unexported fields
}
type SourcePipeline ¶
type SourcePipeline struct { // elements Elements SourcePipelineElements // contains filtered or unexported fields }
SourcePipeline will split a given Source into smaller parts
func NewSourcePipeline ¶
func NewSourcePipeline(params SourcePipelineParams) (sp *SourcePipeline, err error)
SourcePipeline create a new source pipeline
func (*SourcePipeline) Build ¶
func (s *SourcePipeline) Build(pipeline *Pipeline) error
func (*SourcePipeline) Connect ¶
func (s *SourcePipeline) Connect(source *Element) error
func (*SourcePipeline) Prepare ¶
func (s *SourcePipeline) Prepare(pipeline *Pipeline) error
type SourcePipelineElements ¶
type SourcePipelineElements struct {
// contains filtered or unexported fields
}
type SourcePipelineParams ¶
type SourcePipelineParams struct {
RtspUri string
}
type StreamPipeline ¶
type StreamPipeline struct { // elements Elements StreamPipelineElements // contains filtered or unexported fields }
StreamPipeline will split a given stream into smaller parts
func NewStreamPipeline ¶
func NewStreamPipeline(params StreamPipelineParams) (s *StreamPipeline, err error)
func (*StreamPipeline) Build ¶
func (s *StreamPipeline) Build(pipeline *Pipeline) error
func (*StreamPipeline) Connect ¶
func (s *StreamPipeline) Connect(source *Element) error
func (*StreamPipeline) HandleStreamChange ¶
func (s *StreamPipeline) HandleStreamChange(newState StreamPipelineState) (err error)
func (*StreamPipeline) Prepare ¶
func (s *StreamPipeline) Prepare(pipeline *Pipeline) error
type StreamPipelineElements ¶
type StreamPipelineElements struct {
// contains filtered or unexported fields
}
type StreamPipelineParams ¶
type StreamPipelineParams struct { // RtspSink location of where to send stream RtspSink string }
type StreamPipelineState ¶
type StreamPipelineState struct {
// contains filtered or unexported fields
}
type ThumbnailParams ¶
type ThumbnailParams struct {
// contains filtered or unexported fields
}
func (ThumbnailParams) Caps ¶
func (tp ThumbnailParams) Caps() *gst.Caps
Caps generates *gst.Caps for the provided image dimension
type ThumbnailPipeline ¶
type ThumbnailPipeline struct { // elements Elements ThumbnailPipelineElements // contains filtered or unexported fields }
ThumbnailPipeline will split a given stream into smaller parts
func NewThumbnailPipeline ¶
func NewThumbnailPipeline(params ThumbnailParams) (sg *ThumbnailPipeline, err error)
NewThumbnailPipeline create a new thumbnail generation pipeline
func (*ThumbnailPipeline) Build ¶
func (th *ThumbnailPipeline) Build(pipeline *Pipeline) error
func (*ThumbnailPipeline) Connect ¶
func (th *ThumbnailPipeline) Connect(source *Element) error
func (*ThumbnailPipeline) CopySample ¶
func (th *ThumbnailPipeline) CopySample(sample *gst.Sample)
CopySample will push a *gst.Sample to appsrc, pushing a sample has the benefits that the *gst.Caps get set onto the appsrc
func (*ThumbnailPipeline) NewElements ¶
func (th *ThumbnailPipeline) NewElements() error
func (*ThumbnailPipeline) OnBuffer ¶
func (th *ThumbnailPipeline) OnBuffer(buffer *gst.Buffer)
OnBuffer connects pushes a buffer onto the appsrc buffer to be processed it is expected that the appsink's *gst.Caps get updated before calling this method
func (*ThumbnailPipeline) Prepare ¶
func (th *ThumbnailPipeline) Prepare(pipeline *Pipeline) error
type ThumbnailPipelineElements ¶
type ThumbnailPipelineElements struct {
// contains filtered or unexported fields
}
type ThumbnailPipelineState ¶
type ThumbnailPipelineState struct {
// contains filtered or unexported fields
}