deprecate old gst functions and types

This commit is contained in:
RSWilli
2025-09-16 22:36:07 +02:00
parent 8c0ce6e826
commit 2ff1eda904
130 changed files with 4401 additions and 17 deletions

8
go.mod
View File

@@ -2,13 +2,19 @@ module github.com/go-gst/go-gst
go 1.24.0 go 1.24.0
require github.com/diamondburned/gotk4 v0.3.1 require (
github.com/diamondburned/gotk4 v0.3.1
github.com/go-gst/go-glib v1.4.0
github.com/go-gst/go-pointer v0.0.0-20241127163939-ba766f075b4c
)
require ( require (
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.10.0 // indirect github.com/fatih/color v1.10.0 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-pointer v0.0.1 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/sync v0.8.0 // indirect golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect
) )

8
go.sum
View File

@@ -6,14 +6,22 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/go-gst/go-glib v1.4.0 h1:FB2uVfB0uqz7/M6EaDdWWlBZRQpvFAbWfL7drdw8lAE=
github.com/go-gst/go-glib v1.4.0/go.mod h1:GUIpWmkxQ1/eL+FYSjKpLDyTZx6Vgd9nNXt8dA31d5M=
github.com/go-gst/go-pointer v0.0.0-20241127163939-ba766f075b4c h1:x8kKRVDmz5BRlolmDZGcsuZ1l+js6TRL3QWBJjGVctM=
github.com/go-gst/go-pointer v0.0.0-20241127163939-ba766f075b4c/go.mod h1:qKw5ZZ0U58W6PU/7F/Lopv+14nKYmdXlOd7VnAZ17Mk=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
github.com/rswilli/gotk4 v0.0.0-20250502131654-c922409941a2 h1:BoGvQ/dV7fIfDF7hyXfEHG/Y9yHuPG6sSN6hyHbbWH8= github.com/rswilli/gotk4 v0.0.0-20250502131654-c922409941a2 h1:BoGvQ/dV7fIfDF7hyXfEHG/Y9yHuPG6sSN6hyHbbWH8=
github.com/rswilli/gotk4 v0.0.0-20250502131654-c922409941a2/go.mod h1:bvqvG9zCPsZpqPMKfx0TvmR6ltWKEOaBHzLHY02/Rf8= github.com/rswilli/gotk4 v0.0.0-20250502131654-c922409941a2/go.mod h1:bvqvG9zCPsZpqPMKfx0TvmR6ltWKEOaBHzLHY02/Rf8=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

View File

@@ -10,6 +10,8 @@ import (
gopointer "github.com/go-gst/go-pointer" gopointer "github.com/go-gst/go-pointer"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getSinkCbsFromPtr(userData C.gpointer) *SinkCallbacks { func getSinkCbsFromPtr(userData C.gpointer) *SinkCallbacks {
ptr := gopointer.Restore(unsafe.Pointer(userData)) ptr := gopointer.Restore(unsafe.Pointer(userData))
cbs, ok := ptr.(*SinkCallbacks) cbs, ok := ptr.(*SinkCallbacks)
@@ -20,6 +22,8 @@ func getSinkCbsFromPtr(userData C.gpointer) *SinkCallbacks {
return cbs return cbs
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getSrcCbsFromPtr(userData C.gpointer) *SourceCallbacks { func getSrcCbsFromPtr(userData C.gpointer) *SourceCallbacks {
ptr := gopointer.Restore(unsafe.Pointer(userData)) ptr := gopointer.Restore(unsafe.Pointer(userData))
cbs, ok := ptr.(*SourceCallbacks) cbs, ok := ptr.(*SourceCallbacks)
@@ -30,6 +34,8 @@ func getSrcCbsFromPtr(userData C.gpointer) *SourceCallbacks {
return cbs return cbs
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapCSink(sink *C.GstAppSink) *Sink { func wrapCSink(sink *C.GstAppSink) *Sink {
return wrapAppSink(&gst.Element{ return wrapAppSink(&gst.Element{
Object: &gst.Object{ Object: &gst.Object{
@@ -42,6 +48,8 @@ func wrapCSink(sink *C.GstAppSink) *Sink {
}) })
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapCSource(src *C.GstAppSrc) *Source { func wrapCSource(src *C.GstAppSrc) *Source {
return wrapAppSrc(&gst.Element{ return wrapAppSrc(&gst.Element{
Object: &gst.Object{ Object: &gst.Object{
@@ -55,6 +63,8 @@ func wrapCSource(src *C.GstAppSrc) *Source {
} }
//export goNeedDataCb //export goNeedDataCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goNeedDataCb(src *C.GstAppSrc, length C.guint, userData C.gpointer) { func goNeedDataCb(src *C.GstAppSrc, length C.guint, userData C.gpointer) {
cbs := getSrcCbsFromPtr(userData) cbs := getSrcCbsFromPtr(userData)
if cbs == nil { if cbs == nil {
@@ -69,6 +79,8 @@ func goNeedDataCb(src *C.GstAppSrc, length C.guint, userData C.gpointer) {
} }
//export goEnoughDataDb //export goEnoughDataDb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goEnoughDataDb(src *C.GstAppSrc, userData C.gpointer) { func goEnoughDataDb(src *C.GstAppSrc, userData C.gpointer) {
cbs := getSrcCbsFromPtr(userData) cbs := getSrcCbsFromPtr(userData)
if cbs == nil { if cbs == nil {
@@ -82,6 +94,8 @@ func goEnoughDataDb(src *C.GstAppSrc, userData C.gpointer) {
} }
//export goSeekDataCb //export goSeekDataCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goSeekDataCb(src *C.GstAppSrc, offset C.guint64, userData C.gpointer) C.gboolean { func goSeekDataCb(src *C.GstAppSrc, offset C.guint64, userData C.gpointer) C.gboolean {
cbs := getSrcCbsFromPtr(userData) cbs := getSrcCbsFromPtr(userData)
if cbs == nil { if cbs == nil {
@@ -96,6 +110,8 @@ func goSeekDataCb(src *C.GstAppSrc, offset C.guint64, userData C.gpointer) C.gbo
} }
//export goSinkEOSCb //export goSinkEOSCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goSinkEOSCb(sink *C.GstAppSink, userData C.gpointer) { func goSinkEOSCb(sink *C.GstAppSink, userData C.gpointer) {
cbs := getSinkCbsFromPtr(userData) cbs := getSinkCbsFromPtr(userData)
if cbs == nil { if cbs == nil {
@@ -110,6 +126,8 @@ func goSinkEOSCb(sink *C.GstAppSink, userData C.gpointer) {
} }
//export goSinkNewPrerollCb //export goSinkNewPrerollCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goSinkNewPrerollCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn { func goSinkNewPrerollCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn {
cbs := getSinkCbsFromPtr(userData) cbs := getSinkCbsFromPtr(userData)
if cbs == nil { if cbs == nil {
@@ -126,6 +144,8 @@ func goSinkNewPrerollCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn
} }
//export goSinkNewSampleCb //export goSinkNewSampleCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goSinkNewSampleCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn { func goSinkNewSampleCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn {
cbs := getSinkCbsFromPtr(userData) cbs := getSinkCbsFromPtr(userData)
if cbs == nil { if cbs == nil {
@@ -142,6 +162,8 @@ func goSinkNewSampleCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn
} }
//export goAppGDestroyNotifyFunc //export goAppGDestroyNotifyFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goAppGDestroyNotifyFunc(ptr C.gpointer) { func goAppGDestroyNotifyFunc(ptr C.gpointer) {
gopointer.Unref(unsafe.Pointer(ptr)) gopointer.Unref(unsafe.Pointer(ptr))
} }

View File

@@ -28,6 +28,8 @@ import (
) )
// SinkCallbacks represents callbacks that can be installed on an app sink when data is available. // SinkCallbacks represents callbacks that can be installed on an app sink when data is available.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type SinkCallbacks struct { type SinkCallbacks struct {
EOSFunc func(appSink *Sink) EOSFunc func(appSink *Sink)
NewPrerollFunc func(appSink *Sink) gst.FlowReturn NewPrerollFunc func(appSink *Sink) gst.FlowReturn
@@ -41,6 +43,8 @@ var ErrEOS = errors.New("pipeline has reached end-of-stream")
type Sink struct{ *base.GstBaseSink } type Sink struct{ *base.GstBaseSink }
// NewAppSink returns a new appsink element. // NewAppSink returns a new appsink element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAppSink() (*Sink, error) { func NewAppSink() (*Sink, error) {
elem, err := gst.NewElement("appsink") elem, err := gst.NewElement("appsink")
if err != nil { if err != nil {
@@ -51,6 +55,8 @@ func NewAppSink() (*Sink, error) {
// SinkFromElement checks if the given element is an appsink and if so returns // SinkFromElement checks if the given element is an appsink and if so returns
// a Sink interface. // a Sink interface.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func SinkFromElement(elem *gst.Element) *Sink { func SinkFromElement(elem *gst.Element) *Sink {
if appSink := C.toGstAppSink(elem.Unsafe()); appSink != nil { if appSink := C.toGstAppSink(elem.Unsafe()); appSink != nil {
return wrapAppSink(elem) return wrapAppSink(elem)
@@ -59,14 +65,20 @@ func SinkFromElement(elem *gst.Element) *Sink {
} }
// Instance returns the native GstAppSink instance. // Instance returns the native GstAppSink instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) Instance() *C.GstAppSink { return C.toGstAppSink(a.Unsafe()) } func (a *Sink) Instance() *C.GstAppSink { return C.toGstAppSink(a.Unsafe()) }
// GetBufferListSupport checks if appsink supports buffer lists. // GetBufferListSupport checks if appsink supports buffer lists.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) GetBufferListSupport() bool { func (a *Sink) GetBufferListSupport() bool {
return gobool(C.gst_app_sink_get_buffer_list_support(a.Instance())) return gobool(C.gst_app_sink_get_buffer_list_support(a.Instance()))
} }
// GetCaps gets the configured caps on appsink. // GetCaps gets the configured caps on appsink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) GetCaps() *gst.Caps { func (a *Sink) GetCaps() *gst.Caps {
caps := C.gst_app_sink_get_caps(a.Instance()) caps := C.gst_app_sink_get_caps(a.Instance())
if caps == nil { if caps == nil {
@@ -76,26 +88,36 @@ func (a *Sink) GetCaps() *gst.Caps {
} }
// GetDrop checks if appsink will drop old buffers when the maximum amount of queued buffers is reached. // GetDrop checks if appsink will drop old buffers when the maximum amount of queued buffers is reached.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) GetDrop() bool { func (a *Sink) GetDrop() bool {
return gobool(C.gst_app_sink_get_drop(a.Instance())) return gobool(C.gst_app_sink_get_drop(a.Instance()))
} }
// GetEmitSignals checks if appsink will emit the "new-preroll" and "new-sample" signals. // GetEmitSignals checks if appsink will emit the "new-preroll" and "new-sample" signals.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) GetEmitSignals() bool { func (a *Sink) GetEmitSignals() bool {
return gobool(C.gst_app_sink_get_emit_signals(a.Instance())) return gobool(C.gst_app_sink_get_emit_signals(a.Instance()))
} }
// GetMaxBuffers gets the maximum amount of buffers that can be queued in appsink. // GetMaxBuffers gets the maximum amount of buffers that can be queued in appsink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) GetMaxBuffers() uint { func (a *Sink) GetMaxBuffers() uint {
return uint(C.gst_app_sink_get_max_buffers(a.Instance())) return uint(C.gst_app_sink_get_max_buffers(a.Instance()))
} }
// GetWaitOnEOS checks if appsink will wait for all buffers to be consumed when an EOS is received. // GetWaitOnEOS checks if appsink will wait for all buffers to be consumed when an EOS is received.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) GetWaitOnEOS() bool { func (a *Sink) GetWaitOnEOS() bool {
return gobool(C.gst_app_sink_get_wait_on_eos(a.Instance())) return gobool(C.gst_app_sink_get_wait_on_eos(a.Instance()))
} }
// IsEOS returns true if this AppSink has reached the end-of-stream. // IsEOS returns true if this AppSink has reached the end-of-stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) IsEOS() bool { func (a *Sink) IsEOS() bool {
return gobool(C.gst_app_sink_is_eos((*C.GstAppSink)(a.Instance()))) return gobool(C.gst_app_sink_is_eos((*C.GstAppSink)(a.Instance())))
} }
@@ -112,6 +134,8 @@ func (a *Sink) IsEOS() bool {
// If an EOS event was received before any buffers, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition. // If an EOS event was received before any buffers, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
// //
// This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state. // This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) PullPreroll() *gst.Sample { func (a *Sink) PullPreroll() *gst.Sample {
smpl := C.gst_app_sink_pull_preroll(a.Instance()) smpl := C.gst_app_sink_pull_preroll(a.Instance())
if smpl == nil { if smpl == nil {
@@ -127,6 +151,8 @@ func (a *Sink) PullPreroll() *gst.Sample {
// buffers could consume a lot of memory, especially when dealing with raw video frames. // buffers could consume a lot of memory, especially when dealing with raw video frames.
// //
// If an EOS event was received before any buffers, this function returns NULL. Use IsEOS() to check for the EOS condition. // If an EOS event was received before any buffers, this function returns NULL. Use IsEOS() to check for the EOS condition.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) PullSample() *gst.Sample { func (a *Sink) PullSample() *gst.Sample {
smpl := C.gst_app_sink_pull_sample(a.Instance()) smpl := C.gst_app_sink_pull_sample(a.Instance())
if smpl == nil { if smpl == nil {
@@ -138,6 +164,8 @@ func (a *Sink) PullSample() *gst.Sample {
// SetBufferListSupport instructs appsink to enable or disable buffer list support. // SetBufferListSupport instructs appsink to enable or disable buffer list support.
// //
// For backwards-compatibility reasons applications need to opt in to indicate that they will be able to handle buffer lists. // For backwards-compatibility reasons applications need to opt in to indicate that they will be able to handle buffer lists.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetBufferListSupport(enabled bool) { func (a *Sink) SetBufferListSupport(enabled bool) {
C.gst_app_sink_set_buffer_list_support(a.Instance(), gboolean(enabled)) C.gst_app_sink_set_buffer_list_support(a.Instance(), gboolean(enabled))
} }
@@ -148,6 +176,8 @@ func (a *Sink) SetBufferListSupport(enabled bool) {
// If callbacks are installed, no signals will be emitted for performance reasons. // If callbacks are installed, no signals will be emitted for performance reasons.
// //
// Before 1.16.3 it was not possible to change the callbacks in a thread-safe way. // Before 1.16.3 it was not possible to change the callbacks in a thread-safe way.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetCallbacks(cbs *SinkCallbacks) { func (a *Sink) SetCallbacks(cbs *SinkCallbacks) {
ptr := gopointer.Save(cbs) ptr := gopointer.Save(cbs)
appSinkCallbacks := &C.GstAppSinkCallbacks{ appSinkCallbacks := &C.GstAppSinkCallbacks{
@@ -166,28 +196,38 @@ func (a *Sink) SetCallbacks(cbs *SinkCallbacks) {
// SetCaps sets the capabilities on the appsink element. This function takes a copy of the caps structure. After calling this method, // SetCaps sets the capabilities on the appsink element. This function takes a copy of the caps structure. After calling this method,
// the sink will only accept caps that match caps. If caps is non-fixed, or incomplete, you must check the caps on the samples to get // the sink will only accept caps that match caps. If caps is non-fixed, or incomplete, you must check the caps on the samples to get
// the actual used caps. // the actual used caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetCaps(caps *gst.Caps) { func (a *Sink) SetCaps(caps *gst.Caps) {
C.gst_app_sink_set_caps(a.Instance(), (*C.GstCaps)(unsafe.Pointer(caps.Instance()))) C.gst_app_sink_set_caps(a.Instance(), (*C.GstCaps)(unsafe.Pointer(caps.Instance())))
} }
// SetDrop instructs appsink to drop old buffers when the maximum amount of queued buffers is reached. // SetDrop instructs appsink to drop old buffers when the maximum amount of queued buffers is reached.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetDrop(drop bool) { func (a *Sink) SetDrop(drop bool) {
C.gst_app_sink_set_drop(a.Instance(), gboolean(drop)) C.gst_app_sink_set_drop(a.Instance(), gboolean(drop))
} }
// SetEmitSignals makes appsink emit the "new-preroll" and "new-sample" signals. This option is by default disabled because signal emission // SetEmitSignals makes appsink emit the "new-preroll" and "new-sample" signals. This option is by default disabled because signal emission
// is expensive and unneeded when the application prefers to operate in pull mode. // is expensive and unneeded when the application prefers to operate in pull mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetEmitSignals(emit bool) { func (a *Sink) SetEmitSignals(emit bool) {
C.gst_app_sink_set_emit_signals(a.Instance(), gboolean(emit)) C.gst_app_sink_set_emit_signals(a.Instance(), gboolean(emit))
} }
// SetMaxBuffers sets the maximum amount of buffers that can be queued in appsink. After this amount of buffers are queued in appsink, // SetMaxBuffers sets the maximum amount of buffers that can be queued in appsink. After this amount of buffers are queued in appsink,
// any more buffers will block upstream elements until a sample is pulled from appsink. // any more buffers will block upstream elements until a sample is pulled from appsink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetMaxBuffers(max uint) { func (a *Sink) SetMaxBuffers(max uint) {
C.gst_app_sink_set_max_buffers(a.Instance(), C.guint(max)) C.gst_app_sink_set_max_buffers(a.Instance(), C.guint(max))
} }
// SetWaitOnEOS instructs appsink to wait for all buffers to be consumed when an EOS is received. // SetWaitOnEOS instructs appsink to wait for all buffers to be consumed when an EOS is received.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) SetWaitOnEOS(wait bool) { func (a *Sink) SetWaitOnEOS(wait bool) {
C.gst_app_sink_set_wait_on_eos(a.Instance(), gboolean(wait)) C.gst_app_sink_set_wait_on_eos(a.Instance(), gboolean(wait))
} }
@@ -204,6 +244,8 @@ func (a *Sink) SetWaitOnEOS(wait bool) {
// If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use IsEOS () to check for the EOS condition. // If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use IsEOS () to check for the EOS condition.
// //
// This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires. // This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) TryPullPreroll(timeout gst.ClockTime) *gst.Sample { func (a *Sink) TryPullPreroll(timeout gst.ClockTime) *gst.Sample {
tm := C.GstClockTime(timeout) tm := C.GstClockTime(timeout)
smpl := C.gst_app_sink_try_pull_preroll(a.Instance(), tm) smpl := C.gst_app_sink_try_pull_preroll(a.Instance(), tm)
@@ -220,6 +262,8 @@ func (a *Sink) TryPullPreroll(timeout gst.ClockTime) *gst.Sample {
// consume a lot of memory, especially when dealing with raw video frames. // consume a lot of memory, especially when dealing with raw video frames.
// //
// If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use IsEOS () to check for the EOS condition. // If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use IsEOS () to check for the EOS condition.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Sink) TryPullSample(timeout gst.ClockTime) *gst.Sample { func (a *Sink) TryPullSample(timeout gst.ClockTime) *gst.Sample {
tm := C.GstClockTime(timeout) tm := C.GstClockTime(timeout)
smpl := C.gst_app_sink_try_pull_sample(a.Instance(), tm) smpl := C.gst_app_sink_try_pull_sample(a.Instance(), tm)

View File

@@ -26,6 +26,8 @@ import (
) )
// SourceCallbacks represents callbacks to configure on an AppSource. // SourceCallbacks represents callbacks to configure on an AppSource.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type SourceCallbacks struct { type SourceCallbacks struct {
NeedDataFunc func(src *Source, length uint) NeedDataFunc func(src *Source, length uint)
EnoughDataFunc func(src *Source) EnoughDataFunc func(src *Source)
@@ -46,6 +48,8 @@ const (
type Source struct{ *base.GstBaseSrc } type Source struct{ *base.GstBaseSrc }
// NewAppSrc returns a new AppSrc element. // NewAppSrc returns a new AppSrc element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAppSrc() (*Source, error) { func NewAppSrc() (*Source, error) {
elem, err := gst.NewElement("appsrc") elem, err := gst.NewElement("appsrc")
if err != nil { if err != nil {
@@ -56,6 +60,8 @@ func NewAppSrc() (*Source, error) {
// SrcFromElement checks if the given element is an appsrc and if so returns // SrcFromElement checks if the given element is an appsrc and if so returns
// a Source interface. // a Source interface.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func SrcFromElement(elem *gst.Element) *Source { func SrcFromElement(elem *gst.Element) *Source {
if appSrc := C.toGstAppSrc(elem.Unsafe()); appSrc != nil { if appSrc := C.toGstAppSrc(elem.Unsafe()); appSrc != nil {
return wrapAppSrc(elem) return wrapAppSrc(elem)
@@ -64,16 +70,22 @@ func SrcFromElement(elem *gst.Element) *Source {
} }
// Instance returns the native GstAppSink instance. // Instance returns the native GstAppSink instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) Instance() *C.GstAppSrc { return C.toGstAppSrc(a.Unsafe()) } func (a *Source) Instance() *C.GstAppSrc { return C.toGstAppSrc(a.Unsafe()) }
// EndStream signals to the app source that the stream has ended after the last queued // EndStream signals to the app source that the stream has ended after the last queued
// buffer. // buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) EndStream() gst.FlowReturn { func (a *Source) EndStream() gst.FlowReturn {
ret := C.gst_app_src_end_of_stream((*C.GstAppSrc)(a.Instance())) ret := C.gst_app_src_end_of_stream((*C.GstAppSrc)(a.Instance()))
return gst.FlowReturn(ret) return gst.FlowReturn(ret)
} }
// GetCaps gets the configures caps on the app src. // GetCaps gets the configures caps on the app src.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetCaps() *gst.Caps { func (a *Source) GetCaps() *gst.Caps {
caps := C.gst_app_src_get_caps(a.Instance()) caps := C.gst_app_src_get_caps(a.Instance())
if caps == nil { if caps == nil {
@@ -83,11 +95,15 @@ func (a *Source) GetCaps() *gst.Caps {
} }
// GetCurrentLevelBytes gets the number of currently queued bytes inside appsrc. // GetCurrentLevelBytes gets the number of currently queued bytes inside appsrc.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetCurrentLevelBytes() uint64 { func (a *Source) GetCurrentLevelBytes() uint64 {
return uint64(C.gst_app_src_get_current_level_bytes(a.Instance())) return uint64(C.gst_app_src_get_current_level_bytes(a.Instance()))
} }
// GetDuration gets the duration of the stream in nanoseconds. A negative value means that the duration is not known. // GetDuration gets the duration of the stream in nanoseconds. A negative value means that the duration is not known.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetDuration() gst.ClockTime { func (a *Source) GetDuration() gst.ClockTime {
dur := C.gst_app_src_get_duration(a.Instance()) dur := C.gst_app_src_get_duration(a.Instance())
@@ -95,11 +111,15 @@ func (a *Source) GetDuration() gst.ClockTime {
} }
// GetEmitSignals checks if appsrc will emit the "new-preroll" and "new-buffer" signals. // GetEmitSignals checks if appsrc will emit the "new-preroll" and "new-buffer" signals.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetEmitSignals() bool { func (a *Source) GetEmitSignals() bool {
return gobool(C.gst_app_src_get_emit_signals(a.Instance())) return gobool(C.gst_app_src_get_emit_signals(a.Instance()))
} }
// GetLatency retrieves the min and max latencies in min and max respectively. // GetLatency retrieves the min and max latencies in min and max respectively.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetLatency() (min, max uint64) { func (a *Source) GetLatency() (min, max uint64) {
var gmin, gmax C.guint64 var gmin, gmax C.guint64
C.gst_app_src_get_latency(a.Instance(), &gmin, &gmax) C.gst_app_src_get_latency(a.Instance(), &gmin, &gmax)
@@ -107,22 +127,30 @@ func (a *Source) GetLatency() (min, max uint64) {
} }
// GetMaxBytes gets the maximum amount of bytes that can be queued in appsrc. // GetMaxBytes gets the maximum amount of bytes that can be queued in appsrc.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetMaxBytes() uint64 { func (a *Source) GetMaxBytes() uint64 {
return uint64(C.gst_app_src_get_max_bytes(a.Instance())) return uint64(C.gst_app_src_get_max_bytes(a.Instance()))
} }
// GetSize gets the size of the stream in bytes. A value of -1 means that the size is not known. // GetSize gets the size of the stream in bytes. A value of -1 means that the size is not known.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetSize() int64 { func (a *Source) GetSize() int64 {
return int64(C.gst_app_src_get_size(a.Instance())) return int64(C.gst_app_src_get_size(a.Instance()))
} }
// GetStreamType gets the stream type. Control the stream type of appsrc with SetStreamType. // GetStreamType gets the stream type. Control the stream type of appsrc with SetStreamType.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) GetStreamType() StreamType { func (a *Source) GetStreamType() StreamType {
return StreamType(C.gst_app_src_get_stream_type(a.Instance())) return StreamType(C.gst_app_src_get_stream_type(a.Instance()))
} }
// PushBuffer pushes a buffer to the appsrc. Currently by default this will block // PushBuffer pushes a buffer to the appsrc. Currently by default this will block
// until the source is ready to accept the buffer. // until the source is ready to accept the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) PushBuffer(buf *gst.Buffer) gst.FlowReturn { func (a *Source) PushBuffer(buf *gst.Buffer) gst.FlowReturn {
ret := C.gst_app_src_push_buffer( ret := C.gst_app_src_push_buffer(
(*C.GstAppSrc)(a.Instance()), (*C.GstAppSrc)(a.Instance()),
@@ -135,6 +163,8 @@ func (a *Source) PushBuffer(buf *gst.Buffer) gst.FlowReturn {
// to its source pad. This function takes ownership of buffer_list. // to its source pad. This function takes ownership of buffer_list.
// //
// When the block property is TRUE, this function can block until free space becomes available in the queue. // When the block property is TRUE, this function can block until free space becomes available in the queue.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) PushBufferList(bufList *gst.BufferList) gst.FlowReturn { func (a *Source) PushBufferList(bufList *gst.BufferList) gst.FlowReturn {
return gst.FlowReturn(C.gst_app_src_push_buffer_list( return gst.FlowReturn(C.gst_app_src_push_buffer_list(
a.Instance(), (*C.GstBufferList)(unsafe.Pointer(bufList.Ref().Instance())), a.Instance(), (*C.GstBufferList)(unsafe.Pointer(bufList.Ref().Instance())),
@@ -146,6 +176,8 @@ func (a *Source) PushBufferList(bufList *gst.BufferList) gst.FlowReturn {
// sample if not equal. // sample if not equal.
// //
// When the block property is TRUE, this function can block until free space becomes available in the queue. // When the block property is TRUE, this function can block until free space becomes available in the queue.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) PushSample(sample *gst.Sample) gst.FlowReturn { func (a *Source) PushSample(sample *gst.Sample) gst.FlowReturn {
return gst.FlowReturn(C.gst_app_src_push_sample( return gst.FlowReturn(C.gst_app_src_push_sample(
a.Instance(), (*C.GstSample)(unsafe.Pointer(sample.Instance())), a.Instance(), (*C.GstSample)(unsafe.Pointer(sample.Instance())),
@@ -159,6 +191,8 @@ func (a *Source) PushSample(sample *gst.Sample) gst.FlowReturn {
// If callbacks are installed, no signals will be emitted for performance reasons. // If callbacks are installed, no signals will be emitted for performance reasons.
// //
// Before 1.16.3 it was not possible to change the callbacks in a thread-safe way. // Before 1.16.3 it was not possible to change the callbacks in a thread-safe way.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetCallbacks(cbs *SourceCallbacks) { func (a *Source) SetCallbacks(cbs *SourceCallbacks) {
ptr := gopointer.Save(cbs) ptr := gopointer.Save(cbs)
appSrcCallbacks := &C.GstAppSrcCallbacks{ appSrcCallbacks := &C.GstAppSrcCallbacks{
@@ -176,41 +210,55 @@ func (a *Source) SetCallbacks(cbs *SourceCallbacks) {
// SetCaps sets the capabilities on the appsrc element. This function takes a copy of the caps structure. After calling this method, // SetCaps sets the capabilities on the appsrc element. This function takes a copy of the caps structure. After calling this method,
// the source will only produce caps that match caps. caps must be fixed and the caps on the buffers must match the caps or left NULL. // the source will only produce caps that match caps. caps must be fixed and the caps on the buffers must match the caps or left NULL.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetCaps(caps *gst.Caps) { func (a *Source) SetCaps(caps *gst.Caps) {
C.gst_app_src_set_caps(a.Instance(), (*C.GstCaps)(unsafe.Pointer(caps.Instance()))) C.gst_app_src_set_caps(a.Instance(), (*C.GstCaps)(unsafe.Pointer(caps.Instance())))
} }
// SetDuration sets the duration of the source stream. You should call // SetDuration sets the duration of the source stream. You should call
// this if the value is known. // this if the value is known.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetDuration(dur gst.ClockTime) { func (a *Source) SetDuration(dur gst.ClockTime) {
C.gst_app_src_set_duration((*C.GstAppSrc)(a.Instance()), C.GstClockTime(dur)) C.gst_app_src_set_duration((*C.GstAppSrc)(a.Instance()), C.GstClockTime(dur))
} }
// SetEmitSignals makes appsrc emit the "new-preroll" and "new-buffer" signals. This option is by default disabled because signal emission // SetEmitSignals makes appsrc emit the "new-preroll" and "new-buffer" signals. This option is by default disabled because signal emission
// is expensive and unneeded when the application prefers to operate in pull mode. // is expensive and unneeded when the application prefers to operate in pull mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetEmitSignals(emit bool) { func (a *Source) SetEmitSignals(emit bool) {
C.gst_app_src_set_emit_signals(a.Instance(), gboolean(emit)) C.gst_app_src_set_emit_signals(a.Instance(), gboolean(emit))
} }
// SetLatency configures the min and max latency in src. If min is set to -1, the default latency calculations for pseudo-live sources // SetLatency configures the min and max latency in src. If min is set to -1, the default latency calculations for pseudo-live sources
// will be used. // will be used.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetLatency(min, max uint64) { func (a *Source) SetLatency(min, max uint64) {
C.gst_app_src_set_latency(a.Instance(), C.guint64(min), C.guint64(max)) C.gst_app_src_set_latency(a.Instance(), C.guint64(min), C.guint64(max))
} }
// SetMaxBytes sets the maximum amount of bytes that can be queued in appsrc. After the maximum amount of bytes are queued, appsrc will // SetMaxBytes sets the maximum amount of bytes that can be queued in appsrc. After the maximum amount of bytes are queued, appsrc will
// emit the "enough-data" signal. // emit the "enough-data" signal.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetMaxBytes(max uint64) { func (a *Source) SetMaxBytes(max uint64) {
C.gst_app_src_set_max_bytes(a.Instance(), C.guint64(max)) C.gst_app_src_set_max_bytes(a.Instance(), C.guint64(max))
} }
// SetSize sets the size of the source stream in bytes. You should call this for // SetSize sets the size of the source stream in bytes. You should call this for
// streams of fixed length. // streams of fixed length.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetSize(size int64) { func (a *Source) SetSize(size int64) {
C.gst_app_src_set_size((*C.GstAppSrc)(a.Instance()), (C.gint64)(size)) C.gst_app_src_set_size((*C.GstAppSrc)(a.Instance()), (C.gint64)(size))
} }
// SetStreamType sets the stream type on appsrc. For seekable streams, the "seek" signal must be connected to. // SetStreamType sets the stream type on appsrc. For seekable streams, the "seek" signal must be connected to.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Source) SetStreamType(streamType StreamType) { func (a *Source) SetStreamType(streamType StreamType) {
C.gst_app_src_set_stream_type(a.Instance(), C.GstAppStreamType(streamType)) C.gst_app_src_set_stream_type(a.Instance(), C.GstAppStreamType(streamType))
} }

View File

@@ -8,17 +8,25 @@ import (
"github.com/go-gst/go-gst/gst/base" "github.com/go-gst/go-gst/gst/base"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapAppSink(elem *gst.Element) *Sink { func wrapAppSink(elem *gst.Element) *Sink {
return &Sink{GstBaseSink: &base.GstBaseSink{Element: elem}} return &Sink{GstBaseSink: &base.GstBaseSink{Element: elem}}
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapAppSrc(elem *gst.Element) *Source { func wrapAppSrc(elem *gst.Element) *Source {
return &Source{GstBaseSrc: &base.GstBaseSrc{Element: elem}} return &Source{GstBaseSrc: &base.GstBaseSrc{Element: elem}}
} }
// gobool provides an easy type conversion between C.gboolean and a go bool. // gobool provides an easy type conversion between C.gboolean and a go bool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gobool(b C.gboolean) bool { return int(b) > 0 } func gobool(b C.gboolean) bool { return int(b) > 0 }
// gboolean converts a go bool to a C.gboolean. // gboolean converts a go bool to a C.gboolean.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gboolean(b bool) C.gboolean { func gboolean(b bool) C.gboolean {
if b { if b {
return C.gboolean(1) return C.gboolean(1)

View File

@@ -18,17 +18,23 @@ import (
// FramesToClockTime calculates the Clocktime // FramesToClockTime calculates the Clocktime
// from the given frames and rate. // from the given frames and rate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FramesToClockTime(frames, rate int) gst.ClockTime { func FramesToClockTime(frames, rate int) gst.ClockTime {
ct := C.framesToClockTime(C.gint(frames), C.gint(rate)) ct := C.framesToClockTime(C.gint(frames), C.gint(rate))
return gst.ClockTime(ct) return gst.ClockTime(ct)
} }
// DurationToFrames calculates the number of frames from the given duration and sample rate. // DurationToFrames calculates the number of frames from the given duration and sample rate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func DurationToFrames(dur gst.ClockTime, rate int) int { func DurationToFrames(dur gst.ClockTime, rate int) int {
return int(C.clockTimeToFrames(C.GstClockTime(dur), C.gint(rate))) return int(C.clockTimeToFrames(C.GstClockTime(dur), C.gint(rate)))
} }
// gboolean converts a go bool to a C.gboolean. // gboolean converts a go bool to a C.gboolean.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gboolean(b bool) C.gboolean { func gboolean(b bool) C.gboolean {
if b { if b {
return C.gboolean(1) return C.gboolean(1)
@@ -37,10 +43,14 @@ func gboolean(b bool) C.gboolean {
} }
// gobool provides an easy type conversion between C.gboolean and a go bool. // gobool provides an easy type conversion between C.gboolean and a go bool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gobool(b C.gboolean) bool { func gobool(b C.gboolean) bool {
return int(b) > 0 return int(b) > 0
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ptrToGVal(p unsafe.Pointer) *C.GValue { func ptrToGVal(p unsafe.Pointer) *C.GValue {
return (*C.GValue)(p) return (*C.GValue)(p)
} }

View File

@@ -23,6 +23,8 @@ import (
// ClipBuffer will return a new buffer clipped to the given segment. The given buffer is no longer valid. // ClipBuffer will return a new buffer clipped to the given segment. The given buffer is no longer valid.
// The returned buffer may be nil if it is completely outside the configured segment. // The returned buffer may be nil if it is completely outside the configured segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ClipBuffer(buffer *gst.Buffer, segment *gst.Segment, rate, bytesPerFrame int) *gst.Buffer { func ClipBuffer(buffer *gst.Buffer, segment *gst.Segment, rate, bytesPerFrame int) *gst.Buffer {
buf := C.gst_audio_buffer_clip( buf := C.gst_audio_buffer_clip(
(*C.GstBuffer)(unsafe.Pointer(buffer.Ref().Instance())), (*C.GstBuffer)(unsafe.Pointer(buffer.Ref().Instance())),
@@ -38,6 +40,8 @@ func ClipBuffer(buffer *gst.Buffer, segment *gst.Segment, rate, bytesPerFrame in
// ReorderChannels reorders the buffer against the given positions. The number of channels in each slice // ReorderChannels reorders the buffer against the given positions. The number of channels in each slice
// must be identical. // must be identical.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ReorderChannels(buffer *gst.Buffer, format Format, from []ChannelPosition, to []ChannelPosition) bool { func ReorderChannels(buffer *gst.Buffer, format Format, from []ChannelPosition, to []ChannelPosition) bool {
return gobool(C.gst_audio_buffer_reorder_channels( return gobool(C.gst_audio_buffer_reorder_channels(
(*C.GstBuffer)(unsafe.Pointer(buffer.Instance())), (*C.GstBuffer)(unsafe.Pointer(buffer.Instance())),
@@ -51,6 +55,8 @@ func ReorderChannels(buffer *gst.Buffer, format Format, from []ChannelPosition,
// TruncateBuffer truncates the buffer to finally have the given number of samples, removing the necessary // TruncateBuffer truncates the buffer to finally have the given number of samples, removing the necessary
// amount of samples from the end and trim number of samples from the beginning. The original buffer is no // amount of samples from the end and trim number of samples from the beginning. The original buffer is no
// longer valid. The returned buffer may be nil if the arguments were invalid. // longer valid. The returned buffer may be nil if the arguments were invalid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TruncateBuffer(buffer *gst.Buffer, bytesPerFrame int, trim, samples int64) *gst.Buffer { func TruncateBuffer(buffer *gst.Buffer, bytesPerFrame int, trim, samples int64) *gst.Buffer {
buf := C.gst_audio_buffer_truncate( buf := C.gst_audio_buffer_truncate(
(*C.GstBuffer)(unsafe.Pointer(buffer.Ref().Instance())), (*C.GstBuffer)(unsafe.Pointer(buffer.Ref().Instance())),
@@ -80,6 +86,8 @@ func TruncateBuffer(buffer *gst.Buffer, bytesPerFrame int, trim, samples int64)
// that it is not supported to have a single channel spanning over two or more different GstMemory objects. // that it is not supported to have a single channel spanning over two or more different GstMemory objects.
// Although the map operation will likely succeed in this case, it will be highly sub-optimal and it is // Although the map operation will likely succeed in this case, it will be highly sub-optimal and it is
// recommended to merge all the memories in the buffer before calling this function. // recommended to merge all the memories in the buffer before calling this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func MapBuffer(info *Info, buffer *gst.Buffer, flags gst.MapFlags) (*Buffer, bool) { func MapBuffer(info *Info, buffer *gst.Buffer, flags gst.MapFlags) (*Buffer, bool) {
var audioBuffer C.GstAudioBuffer var audioBuffer C.GstAudioBuffer
ret := gobool(C.gst_audio_buffer_map( ret := gobool(C.gst_audio_buffer_map(
@@ -100,17 +108,25 @@ func MapBuffer(info *Info, buffer *gst.Buffer, flags gst.MapFlags) (*Buffer, boo
// and NumPlanes equals 1. // and NumPlanes equals 1.
// //
// The different channels in planes are always in the GStreamer channel order. // The different channels in planes are always in the GStreamer channel order.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Buffer struct { type Buffer struct {
ptr *C.GstAudioBuffer ptr *C.GstAudioBuffer
} }
// NumSamples returns the size of the buffer in samples. // NumSamples returns the size of the buffer in samples.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) NumSamples() int64 { return int64(b.ptr.n_samples) } func (b *Buffer) NumSamples() int64 { return int64(b.ptr.n_samples) }
// NumPlanes returns the number of available planes. // NumPlanes returns the number of available planes.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) NumPlanes() int { return int(b.ptr.n_planes) } func (b *Buffer) NumPlanes() int { return int(b.ptr.n_planes) }
// Planes returns the planes inside the mapped buffer. // Planes returns the planes inside the mapped buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Planes() [][]byte { func (b *Buffer) Planes() [][]byte {
out := make([][]byte, b.NumPlanes()) out := make([][]byte, b.NumPlanes())
for i := 0; i < b.NumPlanes(); i++ { for i := 0; i < b.NumPlanes(); i++ {
@@ -123,10 +139,14 @@ func (b *Buffer) Planes() [][]byte {
} }
// WritePlane writes data to the plane at the given index. // WritePlane writes data to the plane at the given index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) WritePlane(idx int, data []byte) { func (b *Buffer) WritePlane(idx int, data []byte) {
bufdata := C.audioBufferPlaneData(b.ptr, C.gint(idx)) bufdata := C.audioBufferPlaneData(b.ptr, C.gint(idx))
C.memcpy(unsafe.Pointer(bufdata), unsafe.Pointer(&data[0]), C.gsize(len(data))) C.memcpy(unsafe.Pointer(bufdata), unsafe.Pointer(&data[0]), C.gsize(len(data)))
} }
// Unmap will unmap the mapped buffer. Use this after calling MapBuffer. // Unmap will unmap the mapped buffer. Use this after calling MapBuffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Unmap() { C.gst_audio_buffer_unmap(b.ptr) } func (b *Buffer) Unmap() { C.gst_audio_buffer_unmap(b.ptr) }

View File

@@ -11,6 +11,8 @@ import (
) )
// GetFallbackChannelMask gets the fallback channel-mask for the given number of channels. // GetFallbackChannelMask gets the fallback channel-mask for the given number of channels.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func GetFallbackChannelMask(channels int) uint64 { func GetFallbackChannelMask(channels int) uint64 {
return uint64(C.gst_audio_channel_get_fallback_mask(C.gint(channels))) return uint64(C.gst_audio_channel_get_fallback_mask(C.gint(channels)))
} }
@@ -19,6 +21,8 @@ func GetFallbackChannelMask(channels int) uint64 {
// should have at least channels entries ensured by caller). If mask is set to 0, it is considered // should have at least channels entries ensured by caller). If mask is set to 0, it is considered
// as 'not present' for purpose of conversion. A partially valid mask with less bits set than the // as 'not present' for purpose of conversion. A partially valid mask with less bits set than the
// number of channels is considered valid. This function returns nil if the arguments are invalid. // number of channels is considered valid. This function returns nil if the arguments are invalid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ChannelPositionsFromMask(channels int, mask uint64) []ChannelPosition { func ChannelPositionsFromMask(channels int, mask uint64) []ChannelPosition {
var out C.GstAudioChannelPosition var out C.GstAudioChannelPosition
ret := C.gst_audio_channel_positions_from_mask(C.gint(channels), C.guint64(mask), &out) ret := C.gst_audio_channel_positions_from_mask(C.gint(channels), C.guint64(mask), &out)
@@ -35,6 +39,8 @@ func ChannelPositionsFromMask(channels int, mask uint64) []ChannelPosition {
// ChannelPositionsToMask converts the given channel positions to a bitmask. If forceOrder is true // ChannelPositionsToMask converts the given channel positions to a bitmask. If forceOrder is true
// it additionally checks the channels in the order required by GStreamer. // it additionally checks the channels in the order required by GStreamer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ChannelPositionsToMask(positions []ChannelPosition, forceOrder bool) (mask uint64, ok bool) { func ChannelPositionsToMask(positions []ChannelPosition, forceOrder bool) (mask uint64, ok bool) {
var out C.guint64 var out C.guint64
ok = gobool(C.gst_audio_channel_positions_to_mask( ok = gobool(C.gst_audio_channel_positions_to_mask(
@@ -50,6 +56,8 @@ func ChannelPositionsToMask(positions []ChannelPosition, forceOrder bool) (mask
} }
// ChannelPositionsToString converts the given positions into a human-readable string. // ChannelPositionsToString converts the given positions into a human-readable string.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ChannelPositionsToString(positions []ChannelPosition) string { func ChannelPositionsToString(positions []ChannelPosition) string {
ret := C.gst_audio_channel_positions_to_string( ret := C.gst_audio_channel_positions_to_string(
(*C.GstAudioChannelPosition)(unsafe.Pointer(&positions[0])), (*C.GstAudioChannelPosition)(unsafe.Pointer(&positions[0])),
@@ -60,6 +68,8 @@ func ChannelPositionsToString(positions []ChannelPosition) string {
} }
// ChannelPositionsToValidOrder reorders the given positions from any order to the GStreamer order. // ChannelPositionsToValidOrder reorders the given positions from any order to the GStreamer order.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ChannelPositionsToValidOrder(positions []ChannelPosition) (ok bool) { func ChannelPositionsToValidOrder(positions []ChannelPosition) (ok bool) {
ok = gobool(C.gst_audio_channel_positions_to_valid_order( ok = gobool(C.gst_audio_channel_positions_to_valid_order(
(*C.GstAudioChannelPosition)(unsafe.Pointer(&positions[0])), (*C.GstAudioChannelPosition)(unsafe.Pointer(&positions[0])),
@@ -70,6 +80,8 @@ func ChannelPositionsToValidOrder(positions []ChannelPosition) (ok bool) {
// AreValidChannelPositions checks if the positions are all valid. If forceOrder is true, it also checks // AreValidChannelPositions checks if the positions are all valid. If forceOrder is true, it also checks
// if they are in the order required by GStreamer. // if they are in the order required by GStreamer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func AreValidChannelPositions(positions []ChannelPosition, forceOrder bool) bool { func AreValidChannelPositions(positions []ChannelPosition, forceOrder bool) bool {
return gobool(C.gst_audio_check_valid_channel_positions( return gobool(C.gst_audio_check_valid_channel_positions(
(*C.GstAudioChannelPosition)(unsafe.Pointer(&positions[0])), (*C.GstAudioChannelPosition)(unsafe.Pointer(&positions[0])),
@@ -135,6 +147,8 @@ const (
ChannelPositionSurroundRight ChannelPosition = C.GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT // (27) Surround right (between rear right and side right) ChannelPositionSurroundRight ChannelPosition = C.GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT // (27) Surround right (between rear right and side right)
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c ChannelPosition) String() string { func (c ChannelPosition) String() string {
// ugly hack // ugly hack
return strings.TrimSuffix(strings.TrimPrefix(ChannelPositionsToString([]ChannelPosition{c}), "[ "), " ]") return strings.TrimSuffix(strings.TrimPrefix(ChannelPositionsToString([]ChannelPosition{c}), "[ "), " ]")

View File

@@ -13,6 +13,8 @@ import (
"github.com/go-gst/go-gst/gst" "github.com/go-gst/go-gst/gst"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func init() { func init() {
glib.RegisterGValueMarshalers([]glib.TypeMarshaler{ glib.RegisterGValueMarshalers([]glib.TypeMarshaler{
{ {
@@ -26,37 +28,57 @@ func init() {
} }
// FormatInfo is a structure containing information about an audio format. // FormatInfo is a structure containing information about an audio format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type FormatInfo struct { type FormatInfo struct {
ptr *C.GstAudioFormatInfo ptr *C.GstAudioFormatInfo
} }
// Format returns the format for this info. // Format returns the format for this info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Format() Format { return Format(f.ptr.format) } func (f *FormatInfo) Format() Format { return Format(f.ptr.format) }
// Name returns the name for this info. // Name returns the name for this info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Name() string { return C.GoString(f.ptr.name) } func (f *FormatInfo) Name() string { return C.GoString(f.ptr.name) }
// Description returns a user readable description for this info. // Description returns a user readable description for this info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Description() string { return C.GoString(f.ptr.description) } func (f *FormatInfo) Description() string { return C.GoString(f.ptr.description) }
// Flags returns the flags on this info. // Flags returns the flags on this info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Flags() FormatFlags { return FormatFlags(f.ptr.flags) } func (f *FormatInfo) Flags() FormatFlags { return FormatFlags(f.ptr.flags) }
// Endianness returns the endianness for this info. // Endianness returns the endianness for this info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Endianness() int { return int(f.ptr.endianness) } func (f *FormatInfo) Endianness() int { return int(f.ptr.endianness) }
// Width returns the amount of bits used for one sample. // Width returns the amount of bits used for one sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Width() int { return int(f.ptr.width) } func (f *FormatInfo) Width() int { return int(f.ptr.width) }
// Depth returns the amount of valid bits in width. // Depth returns the amount of valid bits in width.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Depth() int { return int(f.ptr.depth) } func (f *FormatInfo) Depth() int { return int(f.ptr.depth) }
// Silence returns the data for a single silent sample. // Silence returns the data for a single silent sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) Silence() []byte { func (f *FormatInfo) Silence() []byte {
return C.GoBytes(unsafe.Pointer(&f.ptr.silence), C.gint(f.Width()/8)) return C.GoBytes(unsafe.Pointer(&f.ptr.silence), C.gint(f.Width()/8))
} }
// UnpackFormat is the format of unpacked samples. // UnpackFormat is the format of unpacked samples.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FormatInfo) UnpackFormat() Format { return Format(f.ptr.unpack_format) } func (f *FormatInfo) UnpackFormat() Format { return Format(f.ptr.unpack_format) }
// Layout represents the layout of audio samples for different channels. // Layout represents the layout of audio samples for different channels.
@@ -96,6 +118,8 @@ type Format int
var TypeFormat = glib.Type(C.gst_audio_format_get_type()) var TypeFormat = glib.Type(C.gst_audio_format_get_type())
// ToGValue implements a glib.ValueTransformer // ToGValue implements a glib.ValueTransformer
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f Format) ToGValue() (*glib.Value, error) { func (f Format) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(TypeFormat) val, err := glib.ValueInit(TypeFormat)
if err != nil { if err != nil {
@@ -105,11 +129,15 @@ func (f Format) ToGValue() (*glib.Value, error) {
return val, nil return val, nil
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f Format) String() string { func (f Format) String() string {
return C.GoString(C.gst_audio_format_to_string(C.GstAudioFormat(f))) return C.GoString(C.gst_audio_format_to_string(C.GstAudioFormat(f)))
} }
// Info returns the info for this Format. // Info returns the info for this Format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f Format) Info() *FormatInfo { func (f Format) Info() *FormatInfo {
return &FormatInfo{ return &FormatInfo{
ptr: C.gst_audio_format_get_info(C.GstAudioFormat(f)), ptr: C.gst_audio_format_get_info(C.GstAudioFormat(f)),
@@ -117,6 +145,8 @@ func (f Format) Info() *FormatInfo {
} }
// FormatFromString returns the format for the given string representation. // FormatFromString returns the format for the given string representation.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FormatFromString(format string) Format { func FormatFromString(format string) Format {
f := C.CString(format) f := C.CString(format)
defer C.free(unsafe.Pointer(f)) defer C.free(unsafe.Pointer(f))
@@ -132,6 +162,8 @@ const BigEndian int = C.G_BIG_ENDIAN
// FormatFromInteger returns a Format with the given parameters. Signed is whether signed or unsigned format. // FormatFromInteger returns a Format with the given parameters. Signed is whether signed or unsigned format.
// Endianness can be either LittleEndian or BigEndian. Width is the amount of bits used per sample, and depth // Endianness can be either LittleEndian or BigEndian. Width is the amount of bits used per sample, and depth
// is the amount of used bits in width. // is the amount of used bits in width.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FormatFromInteger(signed bool, endianness, width, depth int) Format { func FormatFromInteger(signed bool, endianness, width, depth int) Format {
return Format(C.gst_audio_format_build_integer( return Format(C.gst_audio_format_build_integer(
gboolean(signed), gboolean(signed),
@@ -142,6 +174,8 @@ func FormatFromInteger(signed bool, endianness, width, depth int) Format {
} }
// RawFormats returns all the raw formats supported by GStreamer. // RawFormats returns all the raw formats supported by GStreamer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func RawFormats() []Format { func RawFormats() []Format {
var l C.guint var l C.guint
formats := C.gst_audio_formats_raw(&l) formats := C.gst_audio_formats_raw(&l)
@@ -155,6 +189,8 @@ func RawFormats() []Format {
// MakeRawCaps returns a generic raw audio caps for the formats defined. If formats is nil, all supported // MakeRawCaps returns a generic raw audio caps for the formats defined. If formats is nil, all supported
// formats are used. // formats are used.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func MakeRawCaps(formats []Format, layout Layout) *gst.Caps { func MakeRawCaps(formats []Format, layout Layout) *gst.Caps {
var caps *C.GstCaps var caps *C.GstCaps
if formats == nil { if formats == nil {

View File

@@ -26,6 +26,8 @@ const (
FlagUnpositioned Flags = C.GST_AUDIO_FLAG_UNPOSITIONED // (1) the position array explicitly contains unpositioned channels. FlagUnpositioned Flags = C.GST_AUDIO_FLAG_UNPOSITIONED // (1) the position array explicitly contains unpositioned channels.
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapInfoFull(ptr *C.GstAudioInfo) *Info { func wrapInfoFull(ptr *C.GstAudioInfo) *Info {
info := &Info{ptr} info := &Info{ptr}
runtime.SetFinalizer(info, (*Info).Free) runtime.SetFinalizer(info, (*Info).Free)
@@ -34,38 +36,58 @@ func wrapInfoFull(ptr *C.GstAudioInfo) *Info {
// Info is a structure used for describing audio properties. This can be filled in from caps // Info is a structure used for describing audio properties. This can be filled in from caps
// or converted back to caps. // or converted back to caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Info struct { type Info struct {
ptr *C.GstAudioInfo ptr *C.GstAudioInfo
} }
// NewInfo returns a new Info that is also initialized. // NewInfo returns a new Info that is also initialized.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewInfo() *Info { return wrapInfoFull(C.gst_audio_info_new()) } func NewInfo() *Info { return wrapInfoFull(C.gst_audio_info_new()) }
// InfoFromCaps parses the provided caps and creates an info. It returns true if the caps could be parsed. // InfoFromCaps parses the provided caps and creates an info. It returns true if the caps could be parsed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func InfoFromCaps(caps *gst.Caps) (*Info, bool) { func InfoFromCaps(caps *gst.Caps) (*Info, bool) {
info := NewInfo() info := NewInfo()
return info, gobool(C.gst_audio_info_from_caps(info.ptr, (*C.GstCaps)(unsafe.Pointer(caps.Instance())))) return info, gobool(C.gst_audio_info_from_caps(info.ptr, (*C.GstCaps)(unsafe.Pointer(caps.Instance()))))
} }
// FormatInfo returns the format info for the audio. // FormatInfo returns the format info for the audio.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) FormatInfo() *FormatInfo { return &FormatInfo{i.ptr.finfo} } func (i *Info) FormatInfo() *FormatInfo { return &FormatInfo{i.ptr.finfo} }
// Flags returns additional flags for the audio. // Flags returns additional flags for the audio.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Flags() Flags { return Flags(i.ptr.flags) } func (i *Info) Flags() Flags { return Flags(i.ptr.flags) }
// Layout returns the audio layout. // Layout returns the audio layout.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Layout() Layout { return Layout(i.ptr.layout) } func (i *Info) Layout() Layout { return Layout(i.ptr.layout) }
// Rate returns the audio sample rate. // Rate returns the audio sample rate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Rate() int { return int(i.ptr.rate) } func (i *Info) Rate() int { return int(i.ptr.rate) }
// Channels returns the number of channels. // Channels returns the number of channels.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Channels() int { return int(C.channels(i.ptr)) } func (i *Info) Channels() int { return int(C.channels(i.ptr)) }
// BPF returns the number of bytes for one frame. This is the size of one sample * Channels. // BPF returns the number of bytes for one frame. This is the size of one sample * Channels.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) BPF() int { return int(i.ptr.bpf) } func (i *Info) BPF() int { return int(i.ptr.bpf) }
// Positions returns the positions for each channel. // Positions returns the positions for each channel.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Positions() []ChannelPosition { func (i *Info) Positions() []ChannelPosition {
l := i.Channels() l := i.Channels()
out := make([]ChannelPosition, int(l)) out := make([]ChannelPosition, int(l))
@@ -77,14 +99,20 @@ func (i *Info) Positions() []ChannelPosition {
} }
// Init initializes the info with the default values. // Init initializes the info with the default values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Init() { C.gst_audio_info_init(i.ptr) } func (i *Info) Init() { C.gst_audio_info_init(i.ptr) }
// Free frees the AudioInfo structure. This is usually handled for you by the bindings. // Free frees the AudioInfo structure. This is usually handled for you by the bindings.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Free() { C.gst_audio_info_free(i.ptr) } func (i *Info) Free() { C.gst_audio_info_free(i.ptr) }
// Convert converts among various gst.Format types. This function handles gst.FormatBytes, gst.FormatTime, // Convert converts among various gst.Format types. This function handles gst.FormatBytes, gst.FormatTime,
// and gst.FormatDefault. For raw audio, gst.FormatDefault corresponds to audio frames. This function can // and gst.FormatDefault. For raw audio, gst.FormatDefault corresponds to audio frames. This function can
// be used to handle pad queries of the type gst.QueryConvert. // be used to handle pad queries of the type gst.QueryConvert.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Convert(srcFmt gst.Format, srcVal int64, destFmt gst.Format) (int64, bool) { func (i *Info) Convert(srcFmt gst.Format, srcVal int64, destFmt gst.Format) (int64, bool) {
var out C.gint64 var out C.gint64
ret := C.gst_audio_info_convert( ret := C.gst_audio_info_convert(
@@ -98,16 +126,22 @@ func (i *Info) Convert(srcFmt gst.Format, srcVal int64, destFmt gst.Format) (int
} }
// Copy creates a copy of this Info. // Copy creates a copy of this Info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) Copy() *Info { func (i *Info) Copy() *Info {
return wrapInfoFull(C.gst_audio_info_copy(i.ptr)) return wrapInfoFull(C.gst_audio_info_copy(i.ptr))
} }
// IsEqual checks if the two infos are equal. // IsEqual checks if the two infos are equal.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) IsEqual(info *Info) bool { func (i *Info) IsEqual(info *Info) bool {
return gobool(C.gst_audio_info_is_equal(i.ptr, info.ptr)) return gobool(C.gst_audio_info_is_equal(i.ptr, info.ptr))
} }
// SetFormat sets the format for this info. This initializes info first and no values are preserved. // SetFormat sets the format for this info. This initializes info first and no values are preserved.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) SetFormat(format Format, rate int, positions []ChannelPosition) { func (i *Info) SetFormat(format Format, rate int, positions []ChannelPosition) {
C.gst_audio_info_set_format( C.gst_audio_info_set_format(
i.ptr, i.ptr,
@@ -119,6 +153,8 @@ func (i *Info) SetFormat(format Format, rate int, positions []ChannelPosition) {
} }
// ToCaps returns the caps representation of this info. // ToCaps returns the caps representation of this info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *Info) ToCaps() *gst.Caps { func (i *Info) ToCaps() *gst.Caps {
return gst.FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_audio_info_to_caps(i.ptr))) return gst.FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_audio_info_to_caps(i.ptr)))
} }

View File

@@ -16,10 +16,14 @@ import (
type AudioMeta struct{ *glib.Object } type AudioMeta struct{ *glib.Object }
// FromGstAudioMetaUnsafeNone wraps the given audioMeta with a ref and finalizer. // FromGstAudioMetaUnsafeNone wraps the given audioMeta with a ref and finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstAudioMetaUnsafeNone(audioMeta unsafe.Pointer) *AudioMeta { func FromGstAudioMetaUnsafeNone(audioMeta unsafe.Pointer) *AudioMeta {
return &AudioMeta{glib.TransferNone(audioMeta)} return &AudioMeta{glib.TransferNone(audioMeta)}
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func BufferAddAudioMeta(buffer *gst.Buffer, info *Info, samples int, offsets []int) *AudioMeta { func BufferAddAudioMeta(buffer *gst.Buffer, info *Info, samples int, offsets []int) *AudioMeta {
// offsets is not yet implemented, always pass `nil` or this will panic // offsets is not yet implemented, always pass `nil` or this will panic
if offsets != nil { if offsets != nil {

View File

@@ -24,6 +24,8 @@ type GstBaseSink struct{ *gst.Element }
// ToGstBaseSink returns a GstBaseSink object for the given object. It will work on either gst.Object // ToGstBaseSink returns a GstBaseSink object for the given object. It will work on either gst.Object
// or glib.Object interfaces. // or glib.Object interfaces.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstBaseSink(obj interface{}) *GstBaseSink { func ToGstBaseSink(obj interface{}) *GstBaseSink {
switch obj := obj.(type) { switch obj := obj.(type) {
case *gst.Object: case *gst.Object:
@@ -35,6 +37,8 @@ func ToGstBaseSink(obj interface{}) *GstBaseSink {
} }
// Instance returns the underlying C GstBaseSrc instance // Instance returns the underlying C GstBaseSrc instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) Instance() *C.GstBaseSink { func (g *GstBaseSink) Instance() *C.GstBaseSink {
return C.toGstBaseSink(g.Unsafe()) return C.toGstBaseSink(g.Unsafe())
} }
@@ -49,6 +53,8 @@ func (g *GstBaseSink) Instance() *C.GstBaseSink {
// against the provided types for structs known to be used in this context. The currently known options // against the provided types for structs known to be used in this context. The currently known options
// are events, messages, queries, structures, and buffers. If you come across a need to use this function with // are events, messages, queries, structures, and buffers. If you come across a need to use this function with
// an unsupported type, feel free to raise an Issue or open a PR. // an unsupported type, feel free to raise an Issue or open a PR.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) DoPreroll(obj interface{}) gst.FlowReturn { func (g *GstBaseSink) DoPreroll(obj interface{}) gst.FlowReturn {
miniobj := getPrerollObj(obj) miniobj := getPrerollObj(obj)
if miniobj == nil { if miniobj == nil {
@@ -57,6 +63,8 @@ func (g *GstBaseSink) DoPreroll(obj interface{}) gst.FlowReturn {
return gst.FlowReturn(C.gst_base_sink_do_preroll(g.Instance(), miniobj)) return gst.FlowReturn(C.gst_base_sink_do_preroll(g.Instance(), miniobj))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getPrerollObj(obj interface{}) *C.GstMiniObject { func getPrerollObj(obj interface{}) *C.GstMiniObject {
switch obj := obj.(type) { switch obj := obj.(type) {
case *gst.Event: case *gst.Event:
@@ -75,9 +83,13 @@ func getPrerollObj(obj interface{}) *C.GstMiniObject {
} }
// GetBlocksize gets the number of bytes that the sink will pull when it is operating in pull mode. // GetBlocksize gets the number of bytes that the sink will pull when it is operating in pull mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetBlocksize() uint { return uint(C.gst_base_sink_get_blocksize(g.Instance())) } func (g *GstBaseSink) GetBlocksize() uint { return uint(C.gst_base_sink_get_blocksize(g.Instance())) }
// GetDropOutOfSegment checks if sink is currently configured to drop buffers which are outside the current segment // GetDropOutOfSegment checks if sink is currently configured to drop buffers which are outside the current segment
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetDropOutOfSegment() bool { func (g *GstBaseSink) GetDropOutOfSegment() bool {
return gobool(C.gst_base_sink_get_drop_out_of_segment(g.Instance())) return gobool(C.gst_base_sink_get_drop_out_of_segment(g.Instance()))
} }
@@ -87,6 +99,8 @@ func (g *GstBaseSink) GetDropOutOfSegment() bool {
// //
// The GstCaps on the sample can be used to determine the type of the buffer. Sample will // The GstCaps on the sample can be used to determine the type of the buffer. Sample will
// be nil if no buffer has arrived yet. // be nil if no buffer has arrived yet.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetLastSample() *gst.Sample { func (g *GstBaseSink) GetLastSample() *gst.Sample {
sample := C.gst_base_sink_get_last_sample(g.Instance()) sample := C.gst_base_sink_get_last_sample(g.Instance())
if sample == nil { if sample == nil {
@@ -96,26 +110,36 @@ func (g *GstBaseSink) GetLastSample() *gst.Sample {
} }
// GetLatency gets the currently configured latency. // GetLatency gets the currently configured latency.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetLatency() gst.ClockTime { func (g *GstBaseSink) GetLatency() gst.ClockTime {
return gst.ClockTime(C.gst_base_sink_get_latency(g.Instance())) return gst.ClockTime(C.gst_base_sink_get_latency(g.Instance()))
} }
// GetMaxBitrate gets the maximum amount of bits per second the sink will render. // GetMaxBitrate gets the maximum amount of bits per second the sink will render.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetMaxBitrate() uint64 { func (g *GstBaseSink) GetMaxBitrate() uint64 {
return uint64(C.gst_base_sink_get_max_bitrate(g.Instance())) return uint64(C.gst_base_sink_get_max_bitrate(g.Instance()))
} }
// GetMaxLateness gets the max lateness value. // GetMaxLateness gets the max lateness value.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetMaxLateness() int64 { func (g *GstBaseSink) GetMaxLateness() int64 {
return int64(C.gst_base_sink_get_max_lateness(g.Instance())) return int64(C.gst_base_sink_get_max_lateness(g.Instance()))
} }
// GetProcessingDeadline gets the processing deadline of the sink. // GetProcessingDeadline gets the processing deadline of the sink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetProcessingDeadline() gst.ClockTime { func (g *GstBaseSink) GetProcessingDeadline() gst.ClockTime {
return gst.ClockTime(C.gst_base_sink_get_processing_deadline(g.Instance())) return gst.ClockTime(C.gst_base_sink_get_processing_deadline(g.Instance()))
} }
// GetRenderDelay gets the render delay for the sink. // GetRenderDelay gets the render delay for the sink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetRenderDelay() gst.ClockTime { func (g *GstBaseSink) GetRenderDelay() gst.ClockTime {
return gst.ClockTime(C.gst_base_sink_get_render_delay(g.Instance())) return gst.ClockTime(C.gst_base_sink_get_render_delay(g.Instance()))
} }
@@ -145,35 +169,49 @@ func (g *GstBaseSink) GetRenderDelay() gst.ClockTime {
// } // }
// GetSync checks if the sink is currently configured to synchronize on the clock. // GetSync checks if the sink is currently configured to synchronize on the clock.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetSync() bool { return gobool(C.gst_base_sink_get_sync(g.Instance())) } func (g *GstBaseSink) GetSync() bool { return gobool(C.gst_base_sink_get_sync(g.Instance())) }
// GetThrottleTime gets the time that will be inserted between frames to control maximum buffers // GetThrottleTime gets the time that will be inserted between frames to control maximum buffers
// per second. // per second.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetThrottleTime() uint64 { func (g *GstBaseSink) GetThrottleTime() uint64 {
return uint64(C.gst_base_sink_get_throttle_time(g.Instance())) return uint64(C.gst_base_sink_get_throttle_time(g.Instance()))
} }
// GetTsOffset gets the synchronization offset of sink. // GetTsOffset gets the synchronization offset of sink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) GetTsOffset() gst.ClockTime { func (g *GstBaseSink) GetTsOffset() gst.ClockTime {
return gst.ClockTime(C.gst_base_sink_get_ts_offset(g.Instance())) return gst.ClockTime(C.gst_base_sink_get_ts_offset(g.Instance()))
} }
// IsAsyncEnabled checks if the sink is currently configured to perform asynchronous state changes to PAUSED. // IsAsyncEnabled checks if the sink is currently configured to perform asynchronous state changes to PAUSED.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) IsAsyncEnabled() bool { func (g *GstBaseSink) IsAsyncEnabled() bool {
return gobool(C.gst_base_sink_is_async_enabled(g.Instance())) return gobool(C.gst_base_sink_is_async_enabled(g.Instance()))
} }
// IsLastSampleEnabled checks if the sink is currently configured to store the last received sample. // IsLastSampleEnabled checks if the sink is currently configured to store the last received sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) IsLastSampleEnabled() bool { func (g *GstBaseSink) IsLastSampleEnabled() bool {
return gobool(C.gst_base_sink_is_last_sample_enabled(g.Instance())) return gobool(C.gst_base_sink_is_last_sample_enabled(g.Instance()))
} }
// IsQoSEnabled checks if sink is currently configured to send QoS events upstream. // IsQoSEnabled checks if sink is currently configured to send QoS events upstream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) IsQoSEnabled() bool { func (g *GstBaseSink) IsQoSEnabled() bool {
return gobool(C.gst_base_sink_is_qos_enabled(g.Instance())) return gobool(C.gst_base_sink_is_qos_enabled(g.Instance()))
} }
// ParentEvent calls the parent class's event handler for the given event. // ParentEvent calls the parent class's event handler for the given event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) ParentEvent(ev *gst.Event) bool { func (g *GstBaseSink) ParentEvent(ev *gst.Event) bool {
return gobool(C.baseSinkParentEvent( return gobool(C.baseSinkParentEvent(
g.Instance(), g.Instance(),
@@ -189,6 +227,8 @@ func (g *GstBaseSink) ParentEvent(ev *gst.Event) bool {
// by the upstream elements by setting the minLatency to a strictly positive value. // by the upstream elements by setting the minLatency to a strictly positive value.
// //
// This function is mostly used by subclasses. // This function is mostly used by subclasses.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) QueryLatency() (ok, live, upstreamLive bool, minLatency, maxLatency gst.ClockTime) { func (g *GstBaseSink) QueryLatency() (ok, live, upstreamLive bool, minLatency, maxLatency gst.ClockTime) {
var glive, gupLive C.gboolean var glive, gupLive C.gboolean
var gmin, gmax C.GstClockTime var gmin, gmax C.GstClockTime
@@ -199,26 +239,36 @@ func (g *GstBaseSink) QueryLatency() (ok, live, upstreamLive bool, minLatency, m
// SetAsyncEnabled configures sink to perform all state changes asynchronously. When async is disabled, // SetAsyncEnabled configures sink to perform all state changes asynchronously. When async is disabled,
// the sink will immediately go to PAUSED instead of waiting for a preroll buffer. This feature is useful // the sink will immediately go to PAUSED instead of waiting for a preroll buffer. This feature is useful
// if the sink does not synchronize against the clock or when it is dealing with sparse streams. // if the sink does not synchronize against the clock or when it is dealing with sparse streams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetAsyncEnabled(enabled bool) { func (g *GstBaseSink) SetAsyncEnabled(enabled bool) {
C.gst_base_sink_set_async_enabled(g.Instance(), gboolean(enabled)) C.gst_base_sink_set_async_enabled(g.Instance(), gboolean(enabled))
} }
// SetBlocksize sets the number of bytes this sink will pull when operating in pull mode. // SetBlocksize sets the number of bytes this sink will pull when operating in pull mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetBlocksize(blocksize uint) { func (g *GstBaseSink) SetBlocksize(blocksize uint) {
C.gst_base_sink_set_blocksize(g.Instance(), C.guint(blocksize)) C.gst_base_sink_set_blocksize(g.Instance(), C.guint(blocksize))
} }
// SetDropOutOfSegment configures sink to drop buffers which are outside the current segment. // SetDropOutOfSegment configures sink to drop buffers which are outside the current segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetDropOutOfSegment(drop bool) { func (g *GstBaseSink) SetDropOutOfSegment(drop bool) {
C.gst_base_sink_set_drop_out_of_segment(g.Instance(), gboolean(drop)) C.gst_base_sink_set_drop_out_of_segment(g.Instance(), gboolean(drop))
} }
// SetLastSampleEnabled configures the sink to store the last received sample. // SetLastSampleEnabled configures the sink to store the last received sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetLastSampleEnabled(enabled bool) { func (g *GstBaseSink) SetLastSampleEnabled(enabled bool) {
C.gst_base_sink_set_last_sample_enabled(g.Instance(), gboolean(enabled)) C.gst_base_sink_set_last_sample_enabled(g.Instance(), gboolean(enabled))
} }
// SetMaxBitrate sets the maximum amount of bits per second the sink will render. // SetMaxBitrate sets the maximum amount of bits per second the sink will render.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetMaxBitrate(bitrate uint64) { func (g *GstBaseSink) SetMaxBitrate(bitrate uint64) {
C.gst_base_sink_set_max_bitrate(g.Instance(), C.guint64(bitrate)) C.gst_base_sink_set_max_bitrate(g.Instance(), C.guint64(bitrate))
} }
@@ -226,6 +276,8 @@ func (g *GstBaseSink) SetMaxBitrate(bitrate uint64) {
// SetMaxLateness sets the new max lateness value to max_lateness. This value is used to decide if // SetMaxLateness sets the new max lateness value to max_lateness. This value is used to decide if
// a buffer should be dropped or not based on the buffer timestamp and the current clock time. A // a buffer should be dropped or not based on the buffer timestamp and the current clock time. A
// value of -1 means an unlimited time. // value of -1 means an unlimited time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetMaxLateness(maxLateness int64) { func (g *GstBaseSink) SetMaxLateness(maxLateness int64) {
C.gst_base_sink_set_max_lateness(g.Instance(), C.gint64(maxLateness)) C.gst_base_sink_set_max_lateness(g.Instance(), C.gint64(maxLateness))
} }
@@ -234,11 +286,15 @@ func (g *GstBaseSink) SetMaxLateness(maxLateness int64) {
// for processing the buffer. This is added to the latency of live pipelines. // for processing the buffer. This is added to the latency of live pipelines.
// //
// This function is usually called by subclasses. // This function is usually called by subclasses.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetProcessingDeadline(deadline gst.ClockTime) { func (g *GstBaseSink) SetProcessingDeadline(deadline gst.ClockTime) {
C.gst_base_sink_set_processing_deadline(g.Instance(), C.GstClockTime(deadline)) C.gst_base_sink_set_processing_deadline(g.Instance(), C.GstClockTime(deadline))
} }
// SetQoSEnabled configures sink to send Quality-of-Service events upstream. // SetQoSEnabled configures sink to send Quality-of-Service events upstream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetQoSEnabled(enabled bool) { func (g *GstBaseSink) SetQoSEnabled(enabled bool) {
C.gst_base_sink_set_qos_enabled(g.Instance(), gboolean(enabled)) C.gst_base_sink_set_qos_enabled(g.Instance(), gboolean(enabled))
} }
@@ -251,6 +307,8 @@ func (g *GstBaseSink) SetQoSEnabled(enabled bool) {
// their latency to delay the rendering of their media. // their latency to delay the rendering of their media.
// //
// This function is usually called by subclasses. // This function is usually called by subclasses.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetRenderDelay(delay gst.ClockTime) { func (g *GstBaseSink) SetRenderDelay(delay gst.ClockTime) {
C.gst_base_sink_set_render_delay(g.Instance(), C.GstClockTime(delay)) C.gst_base_sink_set_render_delay(g.Instance(), C.GstClockTime(delay))
} }
@@ -258,10 +316,14 @@ func (g *GstBaseSink) SetRenderDelay(delay gst.ClockTime) {
// SetSync configures sink to synchronize on the clock or not. When sync is FALSE, incoming samples will // SetSync configures sink to synchronize on the clock or not. When sync is FALSE, incoming samples will
// be played as fast as possible. If sync is TRUE, the timestamps of the incoming buffers will be used to // be played as fast as possible. If sync is TRUE, the timestamps of the incoming buffers will be used to
// schedule the exact render time of its contents. // schedule the exact render time of its contents.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetSync(sync bool) { C.gst_base_sink_set_sync(g.Instance(), gboolean(sync)) } func (g *GstBaseSink) SetSync(sync bool) { C.gst_base_sink_set_sync(g.Instance(), gboolean(sync)) }
// SetThrottleTime sets the time that will be inserted between rendered buffers. This can be used to control // SetThrottleTime sets the time that will be inserted between rendered buffers. This can be used to control
// the maximum buffers per second that the sink will render. // the maximum buffers per second that the sink will render.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetThrottleTime(throttle uint64) { func (g *GstBaseSink) SetThrottleTime(throttle uint64) {
C.gst_base_sink_set_throttle_time(g.Instance(), C.guint64(throttle)) C.gst_base_sink_set_throttle_time(g.Instance(), C.guint64(throttle))
} }
@@ -269,6 +331,8 @@ func (g *GstBaseSink) SetThrottleTime(throttle uint64) {
// SetTsOffset adjusts the synchronization of sink with offset. A negative value will render buffers earlier // SetTsOffset adjusts the synchronization of sink with offset. A negative value will render buffers earlier
// than their timestamp. A positive value will delay rendering. This function can be used to fix playback of // than their timestamp. A positive value will delay rendering. This function can be used to fix playback of
// badly timestamped buffers. // badly timestamped buffers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) SetTsOffset(offset gst.ClockTimeDiff) { func (g *GstBaseSink) SetTsOffset(offset gst.ClockTimeDiff) {
C.gst_base_sink_set_ts_offset(g.Instance(), C.GstClockTimeDiff(offset)) C.gst_base_sink_set_ts_offset(g.Instance(), C.GstClockTimeDiff(offset))
} }
@@ -282,6 +346,8 @@ func (g *GstBaseSink) SetTsOffset(offset gst.ClockTimeDiff) {
// //
// The timeout argument should be the running_time of when the timeout should happen and will be adjusted with any // The timeout argument should be the running_time of when the timeout should happen and will be adjusted with any
// latency and offset configured in the sink. // latency and offset configured in the sink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) Wait(timeout gst.ClockTime) (ret gst.FlowReturn, jitter gst.ClockTimeDiff) { func (g *GstBaseSink) Wait(timeout gst.ClockTime) (ret gst.FlowReturn, jitter gst.ClockTimeDiff) {
var jit C.GstClockTimeDiff var jit C.GstClockTimeDiff
gret := C.gst_base_sink_wait(g.Instance(), C.GstClockTime(timeout), &jit) gret := C.gst_base_sink_wait(g.Instance(), C.GstClockTime(timeout), &jit)
@@ -299,6 +365,8 @@ func (g *GstBaseSink) Wait(timeout gst.ClockTime) (ret gst.FlowReturn, jitter gs
// //
// The timeout argument should be the running_time of when this method should return and is not adjusted with any // The timeout argument should be the running_time of when this method should return and is not adjusted with any
// latency or offset configured in the sink. // latency or offset configured in the sink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) WaitClock(timeout gst.ClockTime) (ret gst.ClockReturn, jitter gst.ClockTimeDiff) { func (g *GstBaseSink) WaitClock(timeout gst.ClockTime) (ret gst.ClockReturn, jitter gst.ClockTimeDiff) {
var jit C.GstClockTimeDiff var jit C.GstClockTimeDiff
gret := C.gst_base_sink_wait_clock(g.Instance(), C.GstClockTime(timeout), &jit) gret := C.gst_base_sink_wait_clock(g.Instance(), C.GstClockTime(timeout), &jit)
@@ -319,6 +387,8 @@ func (g *GstBaseSink) WaitClock(timeout gst.ClockTime) (ret gst.ClockReturn, jit
// this function returns GST_FLOW_FLUSHING). // this function returns GST_FLOW_FLUSHING).
// //
// This function should only be called with the PREROLL_LOCK held, like in the render function. // This function should only be called with the PREROLL_LOCK held, like in the render function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSink) WaitPreroll() gst.FlowReturn { func (g *GstBaseSink) WaitPreroll() gst.FlowReturn {
return gst.FlowReturn(C.gst_base_sink_wait_preroll(g.Instance())) return gst.FlowReturn(C.gst_base_sink_wait_preroll(g.Instance()))
} }

View File

@@ -14,6 +14,8 @@ import (
) )
//export goGstBaseSinkActivatePull //export goGstBaseSinkActivatePull
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkActivatePull(sink *C.GstBaseSink, active C.gboolean) C.gboolean { func goGstBaseSinkActivatePull(sink *C.GstBaseSink, active C.gboolean) C.gboolean {
var ret C.gboolean var ret C.gboolean
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -28,6 +30,8 @@ func goGstBaseSinkActivatePull(sink *C.GstBaseSink, active C.gboolean) C.gboolea
} }
//export goGstBaseSinkEvent //export goGstBaseSinkEvent
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkEvent(sink *C.GstBaseSink, event *C.GstEvent) C.gboolean { func goGstBaseSinkEvent(sink *C.GstBaseSink, event *C.GstEvent) C.gboolean {
var ret C.gboolean var ret C.gboolean
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -42,6 +46,8 @@ func goGstBaseSinkEvent(sink *C.GstBaseSink, event *C.GstEvent) C.gboolean {
} }
//export goGstBaseSinkFixate //export goGstBaseSinkFixate
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkFixate(sink *C.GstBaseSink, caps *C.GstCaps) *C.GstCaps { func goGstBaseSinkFixate(sink *C.GstBaseSink, caps *C.GstCaps) *C.GstCaps {
var fixated *gst.Caps var fixated *gst.Caps
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -59,6 +65,8 @@ func goGstBaseSinkFixate(sink *C.GstBaseSink, caps *C.GstCaps) *C.GstCaps {
} }
//export goGstBaseSinkGetCaps //export goGstBaseSinkGetCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkGetCaps(sink *C.GstBaseSink, filter *C.GstCaps) *C.GstCaps { func goGstBaseSinkGetCaps(sink *C.GstBaseSink, filter *C.GstCaps) *C.GstCaps {
var filtered *gst.Caps var filtered *gst.Caps
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -76,6 +84,8 @@ func goGstBaseSinkGetCaps(sink *C.GstBaseSink, filter *C.GstCaps) *C.GstCaps {
} }
//export goGstBaseSinkGetTimes //export goGstBaseSinkGetTimes
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkGetTimes(sink *C.GstBaseSink, buf *C.GstBuffer, start, end *C.GstClockTime) { func goGstBaseSinkGetTimes(sink *C.GstBaseSink, buf *C.GstBuffer, start, end *C.GstClockTime) {
var retStart, retEnd time.Duration var retStart, retEnd time.Duration
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -91,6 +101,8 @@ func goGstBaseSinkGetTimes(sink *C.GstBaseSink, buf *C.GstBuffer, start, end *C.
} }
//export goGstBaseSinkPrepare //export goGstBaseSinkPrepare
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkPrepare(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn { func goGstBaseSinkPrepare(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -105,6 +117,8 @@ func goGstBaseSinkPrepare(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn
} }
//export goGstBaseSinkPrepareList //export goGstBaseSinkPrepareList
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkPrepareList(sink *C.GstBaseSink, list *C.GstBufferList) C.GstFlowReturn { func goGstBaseSinkPrepareList(sink *C.GstBaseSink, list *C.GstBufferList) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -119,6 +133,8 @@ func goGstBaseSinkPrepareList(sink *C.GstBaseSink, list *C.GstBufferList) C.GstF
} }
//export goGstBaseSinkPreroll //export goGstBaseSinkPreroll
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkPreroll(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn { func goGstBaseSinkPreroll(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -133,6 +149,8 @@ func goGstBaseSinkPreroll(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn
} }
//export goGstBaseSinkProposeAllocation //export goGstBaseSinkProposeAllocation
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkProposeAllocation(sink *C.GstBaseSink, query *C.GstQuery) C.gboolean { func goGstBaseSinkProposeAllocation(sink *C.GstBaseSink, query *C.GstQuery) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -147,6 +165,8 @@ func goGstBaseSinkProposeAllocation(sink *C.GstBaseSink, query *C.GstQuery) C.gb
} }
//export goGstBaseSinkQuery //export goGstBaseSinkQuery
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkQuery(sink *C.GstBaseSink, query *C.GstQuery) C.gboolean { func goGstBaseSinkQuery(sink *C.GstBaseSink, query *C.GstQuery) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -161,6 +181,8 @@ func goGstBaseSinkQuery(sink *C.GstBaseSink, query *C.GstQuery) C.gboolean {
} }
//export goGstBaseSinkRender //export goGstBaseSinkRender
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkRender(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn { func goGstBaseSinkRender(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -175,6 +197,8 @@ func goGstBaseSinkRender(sink *C.GstBaseSink, buf *C.GstBuffer) C.GstFlowReturn
} }
//export goGstBaseSinkRenderList //export goGstBaseSinkRenderList
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkRenderList(sink *C.GstBaseSink, buf *C.GstBufferList) C.GstFlowReturn { func goGstBaseSinkRenderList(sink *C.GstBaseSink, buf *C.GstBufferList) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -189,6 +213,8 @@ func goGstBaseSinkRenderList(sink *C.GstBaseSink, buf *C.GstBufferList) C.GstFlo
} }
//export goGstBaseSinkSetCaps //export goGstBaseSinkSetCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkSetCaps(sink *C.GstBaseSink, caps *C.GstCaps) C.gboolean { func goGstBaseSinkSetCaps(sink *C.GstBaseSink, caps *C.GstCaps) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -203,6 +229,8 @@ func goGstBaseSinkSetCaps(sink *C.GstBaseSink, caps *C.GstCaps) C.gboolean {
} }
//export goGstBaseSinkStart //export goGstBaseSinkStart
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkStart(sink *C.GstBaseSink) C.gboolean { func goGstBaseSinkStart(sink *C.GstBaseSink) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -217,6 +245,8 @@ func goGstBaseSinkStart(sink *C.GstBaseSink) C.gboolean {
} }
//export goGstBaseSinkStop //export goGstBaseSinkStop
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkStop(sink *C.GstBaseSink) C.gboolean { func goGstBaseSinkStop(sink *C.GstBaseSink) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -231,6 +261,8 @@ func goGstBaseSinkStop(sink *C.GstBaseSink) C.gboolean {
} }
//export goGstBaseSinkUnlock //export goGstBaseSinkUnlock
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkUnlock(sink *C.GstBaseSink) C.gboolean { func goGstBaseSinkUnlock(sink *C.GstBaseSink) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -245,6 +277,8 @@ func goGstBaseSinkUnlock(sink *C.GstBaseSink) C.gboolean {
} }
//export goGstBaseSinkUnlockStop //export goGstBaseSinkUnlockStop
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkUnlockStop(sink *C.GstBaseSink) C.gboolean { func goGstBaseSinkUnlockStop(sink *C.GstBaseSink) C.gboolean {
var ret bool var ret bool
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})
@@ -259,6 +293,8 @@ func goGstBaseSinkUnlockStop(sink *C.GstBaseSink) C.gboolean {
} }
//export goGstBaseSinkWaitEvent //export goGstBaseSinkWaitEvent
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSinkWaitEvent(sink *C.GstBaseSink, event *C.GstEvent) C.GstFlowReturn { func goGstBaseSinkWaitEvent(sink *C.GstBaseSink, event *C.GstEvent) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))})

View File

@@ -71,6 +71,8 @@ var (
// be implemented in it's entirety. Each of the methods it declares will be checked for their presence // be implemented in it's entirety. Each of the methods it declares will be checked for their presence
// in the initializing object, and if the object declares an override it will replace the default // in the initializing object, and if the object declares an override it will replace the default
// implementation in the virtual methods. // implementation in the virtual methods.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type GstBaseSinkImpl interface { type GstBaseSinkImpl interface {
// Subclasses should override this when they can provide an alternate method of spawning a thread to // Subclasses should override this when they can provide an alternate method of spawning a thread to
// drive the pipeline in pull mode. Should start or stop the pulling thread, depending on the value // drive the pipeline in pull mode. Should start or stop the pulling thread, depending on the value
@@ -122,10 +124,18 @@ type GstBaseSinkImpl interface {
type extendsBaseSink struct{ parent glib.Extendable } type extendsBaseSink struct{ parent glib.Extendable }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSink) Type() glib.Type { return glib.Type(C.gst_base_sink_get_type()) } func (e *extendsBaseSink) Type() glib.Type { return glib.Type(C.gst_base_sink_get_type()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSink) ClassSize() int64 { return int64(C.sizeof_GstBaseSinkClass) } func (e *extendsBaseSink) ClassSize() int64 { return int64(C.sizeof_GstBaseSinkClass) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSink) InstanceSize() int64 { return int64(C.sizeof_GstBaseSink) } func (e *extendsBaseSink) InstanceSize() int64 { return int64(C.sizeof_GstBaseSink) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSink) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) { func (e *extendsBaseSink) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) {
e.parent.InitClass(klass, elem) e.parent.InitClass(klass, elem)

View File

@@ -17,6 +17,8 @@ type GstBaseSrc struct{ *gst.Element }
// ToGstBaseSrc returns a GstBaseSrc object for the given object. It will work on either gst.Object // ToGstBaseSrc returns a GstBaseSrc object for the given object. It will work on either gst.Object
// or glib.Object interfaces. // or glib.Object interfaces.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstBaseSrc(obj interface{}) *GstBaseSrc { func ToGstBaseSrc(obj interface{}) *GstBaseSrc {
switch obj := obj.(type) { switch obj := obj.(type) {
case *gst.Object: case *gst.Object:
@@ -28,11 +30,15 @@ func ToGstBaseSrc(obj interface{}) *GstBaseSrc {
} }
// Instance returns the underlying C GstBaseSrc instance // Instance returns the underlying C GstBaseSrc instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) Instance() *C.GstBaseSrc { func (g *GstBaseSrc) Instance() *C.GstBaseSrc {
return C.toGstBaseSrc(g.Unsafe()) return C.toGstBaseSrc(g.Unsafe())
} }
// GetAllocator retrieves the memory allocator used by this base src. // GetAllocator retrieves the memory allocator used by this base src.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) GetAllocator() (*gst.Allocator, *gst.AllocationParams) { func (g *GstBaseSrc) GetAllocator() (*gst.Allocator, *gst.AllocationParams) {
var allocParams C.GstAllocationParams var allocParams C.GstAllocationParams
var allocator *C.GstAllocator var allocator *C.GstAllocator
@@ -44,9 +50,13 @@ func (g *GstBaseSrc) GetAllocator() (*gst.Allocator, *gst.AllocationParams) {
} }
// GetBlocksize returns the number of bytes that the source will push out with each buffer. // GetBlocksize returns the number of bytes that the source will push out with each buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) GetBlocksize() uint { return uint(C.gst_base_src_get_blocksize(g.Instance())) } func (g *GstBaseSrc) GetBlocksize() uint { return uint(C.gst_base_src_get_blocksize(g.Instance())) }
// GetBufferPool returns the BufferPool used by this source. // GetBufferPool returns the BufferPool used by this source.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) GetBufferPool() *gst.BufferPool { func (g *GstBaseSrc) GetBufferPool() *gst.BufferPool {
pool := C.gst_base_src_get_buffer_pool(g.Instance()) pool := C.gst_base_src_get_buffer_pool(g.Instance())
if pool == nil { if pool == nil {
@@ -57,14 +67,20 @@ func (g *GstBaseSrc) GetBufferPool() *gst.BufferPool {
// DoTimestamp will query if the timestamps outgoing on this source's buffers are based on the current // DoTimestamp will query if the timestamps outgoing on this source's buffers are based on the current
// running time. // running time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) DoTimestamp() bool { func (g *GstBaseSrc) DoTimestamp() bool {
return gobool(C.gst_base_src_get_do_timestamp(g.Instance())) return gobool(C.gst_base_src_get_do_timestamp(g.Instance()))
} }
// IsAsync retrieves the current async behavior of the source. // IsAsync retrieves the current async behavior of the source.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) IsAsync() bool { return gobool(C.gst_base_src_is_async(g.Instance())) } func (g *GstBaseSrc) IsAsync() bool { return gobool(C.gst_base_src_is_async(g.Instance())) }
// IsLive checks if this source is in live mode. // IsLive checks if this source is in live mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) IsLive() bool { return gobool(C.gst_base_src_is_live(g.Instance())) } func (g *GstBaseSrc) IsLive() bool { return gobool(C.gst_base_src_is_live(g.Instance())) }
// SINCE 1.18 // SINCE 1.18
@@ -89,6 +105,8 @@ func (g *GstBaseSrc) IsLive() bool { return gobool(C.gst_base_src_is_live(g.Inst
// of the first buffer. // of the first buffer.
// //
// This function is mostly used by subclasses. // This function is mostly used by subclasses.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) QueryLatency() (ok, live bool, minLatency, maxLatency gst.ClockTime) { func (g *GstBaseSrc) QueryLatency() (ok, live bool, minLatency, maxLatency gst.ClockTime) {
var glive C.gboolean var glive C.gboolean
var gmin C.GstClockTime var gmin C.GstClockTime
@@ -100,6 +118,8 @@ func (g *GstBaseSrc) QueryLatency() (ok, live bool, minLatency, maxLatency gst.C
// SetAsync configures async behavior in src, no state change will block. The open, close, start, stop, play and // SetAsync configures async behavior in src, no state change will block. The open, close, start, stop, play and
// pause virtual methods will be executed in a different thread and are thus allowed to perform blocking operations. // pause virtual methods will be executed in a different thread and are thus allowed to perform blocking operations.
// Any blocking operation should be unblocked with the unlock vmethod. // Any blocking operation should be unblocked with the unlock vmethod.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetAsync(async bool) { C.gst_base_src_set_async(g.Instance(), gboolean(async)) } func (g *GstBaseSrc) SetAsync(async bool) { C.gst_base_src_set_async(g.Instance(), gboolean(async)) }
// SetAutomaticEOS sets whether EOS should be automatically emitted. // SetAutomaticEOS sets whether EOS should be automatically emitted.
@@ -111,23 +131,31 @@ func (g *GstBaseSrc) SetAsync(async bool) { C.gst_base_src_set_async(g.Instance(
// When src operates in gst.FormatTime, GstBaseSrc will send an EOS when a buffer outside of the currently configured // When src operates in gst.FormatTime, GstBaseSrc will send an EOS when a buffer outside of the currently configured
// segment is pushed if automaticEOS is TRUE. Since 1.16, if automatic_eos is FALSE an EOS will be pushed only when // segment is pushed if automaticEOS is TRUE. Since 1.16, if automatic_eos is FALSE an EOS will be pushed only when
// the Create() implementation returns gst.FlowEOS. // the Create() implementation returns gst.FlowEOS.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetAutomaticEOS(automaticEOS bool) { func (g *GstBaseSrc) SetAutomaticEOS(automaticEOS bool) {
C.gst_base_src_set_automatic_eos(g.Instance(), gboolean(automaticEOS)) C.gst_base_src_set_automatic_eos(g.Instance(), gboolean(automaticEOS))
} }
// SetBlocksize sets the number of bytes that src will push out with each buffer. When blocksize is set to -1, a // SetBlocksize sets the number of bytes that src will push out with each buffer. When blocksize is set to -1, a
// default length will be used. // default length will be used.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetBlocksize(size uint) { func (g *GstBaseSrc) SetBlocksize(size uint) {
C.gst_base_src_set_blocksize(g.Instance(), C.guint(size)) C.gst_base_src_set_blocksize(g.Instance(), C.guint(size))
} }
// SetCaps sets new caps on the source pad. // SetCaps sets new caps on the source pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetCaps(caps *gst.Caps) bool { func (g *GstBaseSrc) SetCaps(caps *gst.Caps) bool {
return gobool(C.gst_base_src_set_caps(g.Instance(), (*C.GstCaps)(unsafe.Pointer(caps.Instance())))) return gobool(C.gst_base_src_set_caps(g.Instance(), (*C.GstCaps)(unsafe.Pointer(caps.Instance()))))
} }
// SetDoTimestamp configures src to automatically timestamp outgoing buffers based on the current running_time of the pipeline. // SetDoTimestamp configures src to automatically timestamp outgoing buffers based on the current running_time of the pipeline.
// This property is mostly useful for live sources. // This property is mostly useful for live sources.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetDoTimestamp(doTimestamp bool) { func (g *GstBaseSrc) SetDoTimestamp(doTimestamp bool) {
C.gst_base_src_set_do_timestamp(g.Instance(), gboolean(doTimestamp)) C.gst_base_src_set_do_timestamp(g.Instance(), gboolean(doTimestamp))
} }
@@ -136,6 +164,8 @@ func (g *GstBaseSrc) SetDoTimestamp(doTimestamp bool) {
// //
// If not dynamic, size is only updated when needed, such as when trying to read past current tracked size. Otherwise, size is // If not dynamic, size is only updated when needed, such as when trying to read past current tracked size. Otherwise, size is
// checked for upon each read. // checked for upon each read.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetDynamicSize(dynamic bool) { func (g *GstBaseSrc) SetDynamicSize(dynamic bool) {
C.gst_base_src_set_dynamic_size(g.Instance(), gboolean(dynamic)) C.gst_base_src_set_dynamic_size(g.Instance(), gboolean(dynamic))
} }
@@ -147,6 +177,8 @@ func (g *GstBaseSrc) SetDynamicSize(dynamic bool) {
// IsSeekable returns TRUE. // IsSeekable returns TRUE.
// //
// This function must only be called in when the element is paused. // This function must only be called in when the element is paused.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetFormat(format gst.Format) { func (g *GstBaseSrc) SetFormat(format gst.Format) {
C.gst_base_src_set_format(g.Instance(), C.GstFormat(format)) C.gst_base_src_set_format(g.Instance(), C.GstFormat(format))
} }
@@ -156,16 +188,22 @@ func (g *GstBaseSrc) SetFormat(format gst.Format) {
// A live source will not produce data in the PAUSED state and will therefore not be able to participate in the // A live source will not produce data in the PAUSED state and will therefore not be able to participate in the
// PREROLL phase of a pipeline. To signal this fact to the application and the pipeline, the state change return // PREROLL phase of a pipeline. To signal this fact to the application and the pipeline, the state change return
// value of the live source will be gst.StateChangeNoPreroll. // value of the live source will be gst.StateChangeNoPreroll.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SetLive(live bool) { C.gst_base_src_set_live(g.Instance(), gboolean(live)) } func (g *GstBaseSrc) SetLive(live bool) { C.gst_base_src_set_live(g.Instance(), gboolean(live)) }
// StartComplete completes an asynchronous start operation. When the subclass overrides the start method, // StartComplete completes an asynchronous start operation. When the subclass overrides the start method,
// it should call StartComplete when the start operation completes either from the same thread or from an // it should call StartComplete when the start operation completes either from the same thread or from an
// asynchronous helper thread. // asynchronous helper thread.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) StartComplete(ret gst.FlowReturn) { func (g *GstBaseSrc) StartComplete(ret gst.FlowReturn) {
C.gst_base_src_start_complete(g.Instance(), C.GstFlowReturn(ret)) C.gst_base_src_start_complete(g.Instance(), C.GstFlowReturn(ret))
} }
// StartWait waits until the start operation is complete. // StartWait waits until the start operation is complete.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) StartWait() gst.FlowReturn { func (g *GstBaseSrc) StartWait() gst.FlowReturn {
return gst.FlowReturn(C.gst_base_src_start_wait(g.Instance())) return gst.FlowReturn(C.gst_base_src_start_wait(g.Instance()))
} }
@@ -183,6 +221,8 @@ func (g *GstBaseSrc) StartWait() gst.FlowReturn {
// //
// Subclasses must only call this function once per create function call and subclasses must only call this function when // Subclasses must only call this function once per create function call and subclasses must only call this function when
// the source operates in push mode. // the source operates in push mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) SubmitBufferList(bufferList *gst.BufferList) { func (g *GstBaseSrc) SubmitBufferList(bufferList *gst.BufferList) {
C.gst_base_src_submit_buffer_list(g.Instance(), (*C.GstBufferList)(unsafe.Pointer(bufferList.Instance()))) C.gst_base_src_submit_buffer_list(g.Instance(), (*C.GstBufferList)(unsafe.Pointer(bufferList.Instance())))
} }
@@ -195,6 +235,8 @@ func (g *GstBaseSrc) SubmitBufferList(bufferList *gst.BufferList) {
// //
// gst.FlowOK will be returned if the source is PLAYING and processing can continue. Any other return value should be // gst.FlowOK will be returned if the source is PLAYING and processing can continue. Any other return value should be
// returned from the Create() vmethod. // returned from the Create() vmethod.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseSrc) WaitPlaying() gst.FlowReturn { func (g *GstBaseSrc) WaitPlaying() gst.FlowReturn {
return gst.FlowReturn(C.gst_base_src_wait_playing(g.Instance())) return gst.FlowReturn(C.gst_base_src_wait_playing(g.Instance()))
} }

View File

@@ -12,6 +12,8 @@ import (
) )
//export goGstBaseSrcGetCaps //export goGstBaseSrcGetCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcGetCaps(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps { func goGstBaseSrcGetCaps(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps {
var caps *gst.Caps var caps *gst.Caps
@@ -30,6 +32,8 @@ func goGstBaseSrcGetCaps(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps {
} }
//export goGstBaseSrcNegotiate //export goGstBaseSrcNegotiate
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcNegotiate(src *C.GstBaseSrc) C.gboolean { func goGstBaseSrcNegotiate(src *C.GstBaseSrc) C.gboolean {
var ret bool var ret bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -44,6 +48,8 @@ func goGstBaseSrcNegotiate(src *C.GstBaseSrc) C.gboolean {
} }
//export goGstBaseSrcFixate //export goGstBaseSrcFixate
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcFixate(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps { func goGstBaseSrcFixate(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps {
var caps *gst.Caps var caps *gst.Caps
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -61,6 +67,8 @@ func goGstBaseSrcFixate(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps {
} }
//export goGstBaseSrcSetCaps //export goGstBaseSrcSetCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcSetCaps(src *C.GstBaseSrc, caps *C.GstCaps) C.gboolean { func goGstBaseSrcSetCaps(src *C.GstBaseSrc, caps *C.GstCaps) C.gboolean {
var ret bool var ret bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -75,6 +83,8 @@ func goGstBaseSrcSetCaps(src *C.GstBaseSrc, caps *C.GstCaps) C.gboolean {
} }
//export goGstBaseSrcDecideAllocation //export goGstBaseSrcDecideAllocation
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcDecideAllocation(src *C.GstBaseSrc, query *C.GstQuery) C.gboolean { func goGstBaseSrcDecideAllocation(src *C.GstBaseSrc, query *C.GstQuery) C.gboolean {
var ret bool var ret bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -89,6 +99,8 @@ func goGstBaseSrcDecideAllocation(src *C.GstBaseSrc, query *C.GstQuery) C.gboole
} }
//export goGstBaseSrcStart //export goGstBaseSrcStart
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcStart(src *C.GstBaseSrc) C.gboolean { func goGstBaseSrcStart(src *C.GstBaseSrc) C.gboolean {
var ret bool var ret bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -103,6 +115,8 @@ func goGstBaseSrcStart(src *C.GstBaseSrc) C.gboolean {
} }
//export goGstBaseSrcStop //export goGstBaseSrcStop
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcStop(src *C.GstBaseSrc) C.gboolean { func goGstBaseSrcStop(src *C.GstBaseSrc) C.gboolean {
var ret bool var ret bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -117,6 +131,8 @@ func goGstBaseSrcStop(src *C.GstBaseSrc) C.gboolean {
} }
//export goGstBaseSrcGetTimes //export goGstBaseSrcGetTimes
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcGetTimes(src *C.GstBaseSrc, buf *C.GstBuffer, start *C.GstClockTime, end *C.GstClockTime) { func goGstBaseSrcGetTimes(src *C.GstBaseSrc, buf *C.GstBuffer, start *C.GstClockTime, end *C.GstClockTime) {
var gostart, goend time.Duration var gostart, goend time.Duration
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -132,6 +148,8 @@ func goGstBaseSrcGetTimes(src *C.GstBaseSrc, buf *C.GstBuffer, start *C.GstClock
} }
//export goGstBaseSrcGetSize //export goGstBaseSrcGetSize
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcGetSize(src *C.GstBaseSrc, size *C.guint64) C.gboolean { func goGstBaseSrcGetSize(src *C.GstBaseSrc, size *C.guint64) C.gboolean {
var gosize int64 var gosize int64
var ok bool var ok bool
@@ -150,6 +168,8 @@ func goGstBaseSrcGetSize(src *C.GstBaseSrc, size *C.guint64) C.gboolean {
} }
//export goGstBaseSrcIsSeekable //export goGstBaseSrcIsSeekable
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcIsSeekable(src *C.GstBaseSrc) C.gboolean { func goGstBaseSrcIsSeekable(src *C.GstBaseSrc) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -164,6 +184,8 @@ func goGstBaseSrcIsSeekable(src *C.GstBaseSrc) C.gboolean {
} }
//export goGstBaseSrcPrepareSeekSegment //export goGstBaseSrcPrepareSeekSegment
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcPrepareSeekSegment(src *C.GstBaseSrc, seek *C.GstEvent, segment *C.GstSegment) C.gboolean { func goGstBaseSrcPrepareSeekSegment(src *C.GstBaseSrc, seek *C.GstEvent, segment *C.GstSegment) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -178,6 +200,8 @@ func goGstBaseSrcPrepareSeekSegment(src *C.GstBaseSrc, seek *C.GstEvent, segment
} }
//export goGstBaseSrcDoSeek //export goGstBaseSrcDoSeek
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcDoSeek(src *C.GstBaseSrc, segment *C.GstSegment) C.gboolean { func goGstBaseSrcDoSeek(src *C.GstBaseSrc, segment *C.GstSegment) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -192,6 +216,8 @@ func goGstBaseSrcDoSeek(src *C.GstBaseSrc, segment *C.GstSegment) C.gboolean {
} }
//export goGstBaseSrcUnlock //export goGstBaseSrcUnlock
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcUnlock(src *C.GstBaseSrc) C.gboolean { func goGstBaseSrcUnlock(src *C.GstBaseSrc) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -206,6 +232,8 @@ func goGstBaseSrcUnlock(src *C.GstBaseSrc) C.gboolean {
} }
//export goGstBaseSrcUnlockStop //export goGstBaseSrcUnlockStop
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcUnlockStop(src *C.GstBaseSrc) C.gboolean { func goGstBaseSrcUnlockStop(src *C.GstBaseSrc) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -220,6 +248,8 @@ func goGstBaseSrcUnlockStop(src *C.GstBaseSrc) C.gboolean {
} }
//export goGstBaseSrcQuery //export goGstBaseSrcQuery
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcQuery(src *C.GstBaseSrc, query *C.GstQuery) C.gboolean { func goGstBaseSrcQuery(src *C.GstBaseSrc, query *C.GstQuery) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -234,6 +264,8 @@ func goGstBaseSrcQuery(src *C.GstBaseSrc, query *C.GstQuery) C.gboolean {
} }
//export goGstBaseSrcEvent //export goGstBaseSrcEvent
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcEvent(src *C.GstBaseSrc, event *C.GstEvent) C.gboolean { func goGstBaseSrcEvent(src *C.GstBaseSrc, event *C.GstEvent) C.gboolean {
var ok bool var ok bool
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})
@@ -248,6 +280,8 @@ func goGstBaseSrcEvent(src *C.GstBaseSrc, event *C.GstEvent) C.gboolean {
} }
//export goGstBaseSrcCreate //export goGstBaseSrcCreate
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcCreate(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf **C.GstBuffer) C.GstFlowReturn { func goGstBaseSrcCreate(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf **C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
var gobuf *gst.Buffer var gobuf *gst.Buffer
@@ -266,6 +300,8 @@ func goGstBaseSrcCreate(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf *
} }
//export goGstBaseSrcAlloc //export goGstBaseSrcAlloc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcAlloc(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf **C.GstBuffer) C.GstFlowReturn { func goGstBaseSrcAlloc(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf **C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
var gobuf *gst.Buffer var gobuf *gst.Buffer
@@ -284,6 +320,8 @@ func goGstBaseSrcAlloc(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf **
} }
//export goGstBaseSrcFill //export goGstBaseSrcFill
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseSrcFill(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf *C.GstBuffer) C.GstFlowReturn { func goGstBaseSrcFill(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})

View File

@@ -64,6 +64,8 @@ var (
// be implemented in it's entirety. Each of the methods it declares will be checked for their presence // be implemented in it's entirety. Each of the methods it declares will be checked for their presence
// in the initializing object, and if the object declares an override it will replace the default // in the initializing object, and if the object declares an override it will replace the default
// implementation in the virtual methods. // implementation in the virtual methods.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type GstBaseSrcImpl interface { type GstBaseSrcImpl interface {
// GetCaps retrieves the caps for this class. // GetCaps retrieves the caps for this class.
GetCaps(*GstBaseSrc, *gst.Caps) *gst.Caps GetCaps(*GstBaseSrc, *gst.Caps) *gst.Caps
@@ -112,12 +114,20 @@ type GstBaseSrcImpl interface {
type extendsBaseSrc struct{ parent glib.Extendable } type extendsBaseSrc struct{ parent glib.Extendable }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSrc) Type() glib.Type { return glib.Type(C.gst_base_src_get_type()) } func (e *extendsBaseSrc) Type() glib.Type { return glib.Type(C.gst_base_src_get_type()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSrc) ClassSize() int64 { return int64(C.sizeof_GstBaseSrcClass) } func (e *extendsBaseSrc) ClassSize() int64 { return int64(C.sizeof_GstBaseSrcClass) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSrc) InstanceSize() int64 { return int64(C.sizeof_GstBaseSrc) } func (e *extendsBaseSrc) InstanceSize() int64 { return int64(C.sizeof_GstBaseSrc) }
// InitClass iterates the methods provided by the element and overrides any provided // InitClass iterates the methods provided by the element and overrides any provided
// in the virtual methods. // in the virtual methods.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseSrc) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) { func (e *extendsBaseSrc) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) {
e.parent.InitClass(klass, elem) e.parent.InitClass(klass, elem)

View File

@@ -53,6 +53,8 @@ type GstBaseTransform struct{ *gst.Element }
// ToGstBaseTransform returns a GstBaseTransform object for the given object. It will work on either gst.Object // ToGstBaseTransform returns a GstBaseTransform object for the given object. It will work on either gst.Object
// or glib.Object interfaces. // or glib.Object interfaces.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstBaseTransform(obj interface{}) *GstBaseTransform { func ToGstBaseTransform(obj interface{}) *GstBaseTransform {
switch obj := obj.(type) { switch obj := obj.(type) {
case *gst.Object: case *gst.Object:
@@ -64,11 +66,15 @@ func ToGstBaseTransform(obj interface{}) *GstBaseTransform {
} }
// Instance returns the underlying C GstBaseTransform instance // Instance returns the underlying C GstBaseTransform instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) Instance() *C.GstBaseTransform { func (g *GstBaseTransform) Instance() *C.GstBaseTransform {
return C.toGstBaseTransform(g.Unsafe()) return C.toGstBaseTransform(g.Unsafe())
} }
// GetAllocator retrieves the memory allocator used by this base transform. // GetAllocator retrieves the memory allocator used by this base transform.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) GetAllocator() (*gst.Allocator, *gst.AllocationParams) { func (g *GstBaseTransform) GetAllocator() (*gst.Allocator, *gst.AllocationParams) {
var allocParams C.GstAllocationParams var allocParams C.GstAllocationParams
var allocator *C.GstAllocator var allocator *C.GstAllocator
@@ -80,6 +86,8 @@ func (g *GstBaseTransform) GetAllocator() (*gst.Allocator, *gst.AllocationParams
} }
// GetBufferPool returns the BufferPool used by this transform. // GetBufferPool returns the BufferPool used by this transform.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) GetBufferPool() *gst.BufferPool { func (g *GstBaseTransform) GetBufferPool() *gst.BufferPool {
pool := C.gst_base_transform_get_buffer_pool(g.Instance()) pool := C.gst_base_transform_get_buffer_pool(g.Instance())
if pool == nil { if pool == nil {
@@ -89,21 +97,29 @@ func (g *GstBaseTransform) GetBufferPool() *gst.BufferPool {
} }
// IsInPlace returns if the transform is configured to do in-place transform. // IsInPlace returns if the transform is configured to do in-place transform.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) IsInPlace() bool { func (g *GstBaseTransform) IsInPlace() bool {
return gobool(C.gst_base_transform_is_in_place(g.Instance())) return gobool(C.gst_base_transform_is_in_place(g.Instance()))
} }
// IsPassthrough returns if the transform is configured for passthrough. // IsPassthrough returns if the transform is configured for passthrough.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) IsPassthrough() bool { func (g *GstBaseTransform) IsPassthrough() bool {
return gobool(C.gst_base_transform_is_passthrough(g.Instance())) return gobool(C.gst_base_transform_is_passthrough(g.Instance()))
} }
// IsQoSEnabled queries if the transform will handle QoS. // IsQoSEnabled queries if the transform will handle QoS.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) IsQoSEnabled() bool { func (g *GstBaseTransform) IsQoSEnabled() bool {
return gobool(C.gst_base_transform_is_qos_enabled(g.Instance())) return gobool(C.gst_base_transform_is_qos_enabled(g.Instance()))
} }
// QueuedBuffer returns the currentl queued buffer. // QueuedBuffer returns the currentl queued buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) QueuedBuffer() *gst.Buffer { func (g *GstBaseTransform) QueuedBuffer() *gst.Buffer {
return gst.FromGstBufferUnsafeNone(unsafe.Pointer(g.Instance().queued_buf)) return gst.FromGstBufferUnsafeNone(unsafe.Pointer(g.Instance().queued_buf))
} }
@@ -123,10 +139,14 @@ func (g *GstBaseTransform) QueuedBuffer() *gst.Buffer {
// ReconfigureSink instructs transform to request renegotiation upstream. This function is typically called // ReconfigureSink instructs transform to request renegotiation upstream. This function is typically called
// after properties on the transform were set that influence the input format. // after properties on the transform were set that influence the input format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ReconfigureSink() { C.gst_base_transform_reconfigure_sink(g.Instance()) } func (g *GstBaseTransform) ReconfigureSink() { C.gst_base_transform_reconfigure_sink(g.Instance()) }
// ReconfigureSrc instructs trans to renegotiate a new downstream transform on the next buffer. This function // ReconfigureSrc instructs trans to renegotiate a new downstream transform on the next buffer. This function
// is typically called after properties on the transform were set that influence the output format. // is typically called after properties on the transform were set that influence the output format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ReconfigureSrc() { C.gst_base_transform_reconfigure_src(g.Instance()) } func (g *GstBaseTransform) ReconfigureSrc() { C.gst_base_transform_reconfigure_src(g.Instance()) }
// SetGapAware configures how buffers are handled. If gapAware is FALSE (the default), output buffers will // SetGapAware configures how buffers are handled. If gapAware is FALSE (the default), output buffers will
@@ -134,6 +154,8 @@ func (g *GstBaseTransform) ReconfigureSrc() { C.gst_base_transform_reconfigure_s
// //
// If set to TRUE, the element must handle output buffers with this flag set correctly, i.e. it can assume that // If set to TRUE, the element must handle output buffers with this flag set correctly, i.e. it can assume that
// the buffer contains neutral data but must unset the flag if the output is no neutral data. // the buffer contains neutral data but must unset the flag if the output is no neutral data.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetGapAware(gapAware bool) { func (g *GstBaseTransform) SetGapAware(gapAware bool) {
C.gst_base_transform_set_gap_aware(g.Instance(), gboolean(gapAware)) C.gst_base_transform_set_gap_aware(g.Instance(), gboolean(gapAware))
} }
@@ -141,6 +163,8 @@ func (g *GstBaseTransform) SetGapAware(gapAware bool) {
// SetInPlace determines whether a non-writable buffer will be copied before passing to the TransformIP function. // SetInPlace determines whether a non-writable buffer will be copied before passing to the TransformIP function.
// This is always true if no Transform() function is implemented, and always false if ONLY a Transform() function // This is always true if no Transform() function is implemented, and always false if ONLY a Transform() function
// is implemented. // is implemented.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetInPlace(inPlace bool) { func (g *GstBaseTransform) SetInPlace(inPlace bool) {
C.gst_base_transform_set_in_place(g.Instance(), gboolean(inPlace)) C.gst_base_transform_set_in_place(g.Instance(), gboolean(inPlace))
} }
@@ -148,11 +172,15 @@ func (g *GstBaseTransform) SetInPlace(inPlace bool) {
// SetPassthrough sets the default passthrough mode for this filter. The is mostly useful for filters that do not // SetPassthrough sets the default passthrough mode for this filter. The is mostly useful for filters that do not
// care about negotiation. This is always true for filters which don't implement either a Transform(), TransformIP(), // care about negotiation. This is always true for filters which don't implement either a Transform(), TransformIP(),
// or GenerateOutput() method. // or GenerateOutput() method.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetPassthrough(passthrough bool) { func (g *GstBaseTransform) SetPassthrough(passthrough bool) {
C.gst_base_transform_set_passthrough(g.Instance(), gboolean(passthrough)) C.gst_base_transform_set_passthrough(g.Instance(), gboolean(passthrough))
} }
// SetPassthroughOnSameCaps when set to true will automatically enable passthrough if caps are the same. // SetPassthroughOnSameCaps when set to true will automatically enable passthrough if caps are the same.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetPassthroughOnSameCaps(passthrough bool) { func (g *GstBaseTransform) SetPassthroughOnSameCaps(passthrough bool) {
C.setGstBaseTransformPassthroughOnSameCaps(g.Instance(), gboolean(passthrough)) C.setGstBaseTransformPassthroughOnSameCaps(g.Instance(), gboolean(passthrough))
} }
@@ -163,11 +191,15 @@ func (g *GstBaseTransform) SetPassthroughOnSameCaps(passthrough bool) {
// If set to FALSE, the element must order the caps returned from the TransformCaps() function in such a way that // If set to FALSE, the element must order the caps returned from the TransformCaps() function in such a way that
// the preferred format is first in the list. This can be interesting for transforms that can do passthrough // the preferred format is first in the list. This can be interesting for transforms that can do passthrough
// transforms but prefer to do something else, like a capsfilter. // transforms but prefer to do something else, like a capsfilter.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetPreferPassthrough(preferPassthrough bool) { func (g *GstBaseTransform) SetPreferPassthrough(preferPassthrough bool) {
C.gst_base_transform_set_prefer_passthrough(g.Instance(), gboolean(preferPassthrough)) C.gst_base_transform_set_prefer_passthrough(g.Instance(), gboolean(preferPassthrough))
} }
// SetQoSEnabled enables or disables QoS handling in the filter. // SetQoSEnabled enables or disables QoS handling in the filter.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetQoSEnabled(enabled bool) { func (g *GstBaseTransform) SetQoSEnabled(enabled bool) {
C.gst_base_transform_set_qos_enabled(g.Instance(), gboolean(enabled)) C.gst_base_transform_set_qos_enabled(g.Instance(), gboolean(enabled))
} }
@@ -175,16 +207,22 @@ func (g *GstBaseTransform) SetQoSEnabled(enabled bool) {
// SetTransformIPOnPassthrough If set to TRUE, TransformIP() will be called in passthrough mode. The passed // SetTransformIPOnPassthrough If set to TRUE, TransformIP() will be called in passthrough mode. The passed
// buffer might not be writable. When FALSE, neither Transform() nor TransformIP() will be called in passthrough // buffer might not be writable. When FALSE, neither Transform() nor TransformIP() will be called in passthrough
// mode. Set to TRUE by default. // mode. Set to TRUE by default.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SetTransformIPOnPassthrough(enabled bool) { func (g *GstBaseTransform) SetTransformIPOnPassthrough(enabled bool) {
C.setGstBaseTransformTransformIPOnPassthrough(g.Instance(), gboolean(enabled)) C.setGstBaseTransformTransformIPOnPassthrough(g.Instance(), gboolean(enabled))
} }
// SinkPad returns the sink pad object for this element. // SinkPad returns the sink pad object for this element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SinkPad() *gst.Pad { func (g *GstBaseTransform) SinkPad() *gst.Pad {
return gst.FromGstPadUnsafeNone(unsafe.Pointer(g.Instance().sinkpad)) return gst.FromGstPadUnsafeNone(unsafe.Pointer(g.Instance().sinkpad))
} }
// SrcPad returns the src pad object for this element. // SrcPad returns the src pad object for this element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) SrcPad() *gst.Pad { func (g *GstBaseTransform) SrcPad() *gst.Pad {
return gst.FromGstPadUnsafeNone(unsafe.Pointer(g.Instance().srcpad)) return gst.FromGstPadUnsafeNone(unsafe.Pointer(g.Instance().srcpad))
} }
@@ -194,6 +232,8 @@ func (g *GstBaseTransform) SrcPad() *gst.Pad {
// //
// proportion is the proportion, diff is the diff against the clock, and timestamp is the timestamp of the buffer // proportion is the proportion, diff is the diff against the clock, and timestamp is the timestamp of the buffer
// generating the QoS expressed in running_time. // generating the QoS expressed in running_time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) UpdateQoS(proportion float64, diff, timestamp gst.ClockTime) { func (g *GstBaseTransform) UpdateQoS(proportion float64, diff, timestamp gst.ClockTime) {
C.gst_base_transform_update_qos( C.gst_base_transform_update_qos(
g.Instance(), g.Instance(),
@@ -206,6 +246,8 @@ func (g *GstBaseTransform) UpdateQoS(proportion float64, diff, timestamp gst.Clo
// UpdateSrcCaps updates the srcpad caps and sends the caps downstream. This function can be used by subclasses // UpdateSrcCaps updates the srcpad caps and sends the caps downstream. This function can be used by subclasses
// when they have already negotiated their caps but found a change in them (or computed new information). This // when they have already negotiated their caps but found a change in them (or computed new information). This
// way, they can notify downstream about that change without losing any buffer. // way, they can notify downstream about that change without losing any buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) UpdateSrcCaps(caps *gst.Caps) { func (g *GstBaseTransform) UpdateSrcCaps(caps *gst.Caps) {
C.gst_base_transform_update_src_caps( C.gst_base_transform_update_src_caps(
g.Instance(), g.Instance(),
@@ -213,92 +255,136 @@ func (g *GstBaseTransform) UpdateSrcCaps(caps *gst.Caps) {
) )
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentAcceptCaps(direction gst.PadDirection, caps *gst.Caps) bool { func (g *GstBaseTransform) ParentAcceptCaps(direction gst.PadDirection, caps *gst.Caps) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentBeforeTransform(buffer *gst.Buffer) { func (g *GstBaseTransform) ParentBeforeTransform(buffer *gst.Buffer) {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentCopyMetadata(input, output *gst.Buffer) bool { func (g *GstBaseTransform) ParentCopyMetadata(input, output *gst.Buffer) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentDecideAllocation(query *gst.Query) bool { func (g *GstBaseTransform) ParentDecideAllocation(query *gst.Query) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentFilterMeta(query *gst.Query, api glib.Type, params *gst.Structure) bool { func (g *GstBaseTransform) ParentFilterMeta(query *gst.Query, api glib.Type, params *gst.Structure) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentFixateCaps(directon gst.PadDirection, caps *gst.Caps, othercaps *gst.Caps) *gst.Caps { func (g *GstBaseTransform) ParentFixateCaps(directon gst.PadDirection, caps *gst.Caps, othercaps *gst.Caps) *gst.Caps {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentGenerateOutput(gst.FlowReturn, *gst.Buffer) { func (g *GstBaseTransform) ParentGenerateOutput(gst.FlowReturn, *gst.Buffer) {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentGetUnitSize(caps *gst.Caps) (ok bool, size int64) { func (g *GstBaseTransform) ParentGetUnitSize(caps *gst.Caps) (ok bool, size int64) {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentPrepareOutputBuffer(input *gst.Buffer) (gst.FlowReturn, *gst.Buffer) { func (g *GstBaseTransform) ParentPrepareOutputBuffer(input *gst.Buffer) (gst.FlowReturn, *gst.Buffer) {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentProposeAllocation(decideQuery, query *gst.Query) bool { func (g *GstBaseTransform) ParentProposeAllocation(decideQuery, query *gst.Query) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentQuery(direction gst.PadDirection, query *gst.Query) bool { func (g *GstBaseTransform) ParentQuery(direction gst.PadDirection, query *gst.Query) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentSetCaps(incaps, outcaps *gst.Caps) bool { func (g *GstBaseTransform) ParentSetCaps(incaps, outcaps *gst.Caps) bool {
panic("not implemented") panic("not implemented")
} }
// ParentSrcEvent chains the event up to the parent class // ParentSrcEvent chains the event up to the parent class
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentSrcEvent(event *gst.Event) bool { func (g *GstBaseTransform) ParentSrcEvent(event *gst.Event) bool {
return gobool(C.gstBaseTransformParentSrcEvent(g.Instance(), (*C.GstEvent)(unsafe.Pointer(event.Instance())))) return gobool(C.gstBaseTransformParentSrcEvent(g.Instance(), (*C.GstEvent)(unsafe.Pointer(event.Instance()))))
} }
// ParentSinkEvent chains the event up to the parent class // ParentSinkEvent chains the event up to the parent class
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentSinkEvent(event *gst.Event) bool { func (g *GstBaseTransform) ParentSinkEvent(event *gst.Event) bool {
return gobool(C.gstBaseTransformParentSinkEvent(g.Instance(), (*C.GstEvent)(unsafe.Pointer(event.Instance())))) return gobool(C.gstBaseTransformParentSinkEvent(g.Instance(), (*C.GstEvent)(unsafe.Pointer(event.Instance()))))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentStart(bool) { func (g *GstBaseTransform) ParentStart(bool) {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentStop(bool) { func (g *GstBaseTransform) ParentStop(bool) {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentSubmitInputBuffer(isDiscont bool, input *gst.Buffer) gst.FlowReturn { func (g *GstBaseTransform) ParentSubmitInputBuffer(isDiscont bool, input *gst.Buffer) gst.FlowReturn {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentTransform(inbuf, outbuf *gst.Buffer) gst.FlowReturn { func (g *GstBaseTransform) ParentTransform(inbuf, outbuf *gst.Buffer) gst.FlowReturn {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentTransformCaps(direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps { func (g *GstBaseTransform) ParentTransformCaps(direction gst.PadDirection, caps, filter *gst.Caps) *gst.Caps {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentTransformIP(buf *gst.Buffer) gst.FlowReturn { func (g *GstBaseTransform) ParentTransformIP(buf *gst.Buffer) gst.FlowReturn {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentTransformMeta(outbuf *gst.Buffer, meta *gst.Meta, inbuf *gst.Buffer) bool { func (g *GstBaseTransform) ParentTransformMeta(outbuf *gst.Buffer, meta *gst.Meta, inbuf *gst.Buffer) bool {
panic("not implemented") panic("not implemented")
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstBaseTransform) ParentTransformSize(direction gst.PadDirection, caps *gst.Caps, size int64, othercaps *gst.Caps) (ok bool, othersize int64) { func (g *GstBaseTransform) ParentTransformSize(direction gst.PadDirection, caps *gst.Caps, size int64, othercaps *gst.Caps) (ok bool, othersize int64) {
panic("not implemented") panic("not implemented")
} }

View File

@@ -13,6 +13,8 @@ import (
) )
//export goGstBaseTransformAcceptCaps //export goGstBaseTransformAcceptCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformAcceptCaps(self *C.GstBaseTransform, direction C.GstPadDirection, caps *C.GstCaps) C.gboolean { func goGstBaseTransformAcceptCaps(self *C.GstBaseTransform, direction C.GstPadDirection, caps *C.GstCaps) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -27,6 +29,8 @@ func goGstBaseTransformAcceptCaps(self *C.GstBaseTransform, direction C.GstPadDi
} }
//export goGstBaseTransformBeforeTransform //export goGstBaseTransformBeforeTransform
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformBeforeTransform(self *C.GstBaseTransform, buffer *C.GstBuffer) { func goGstBaseTransformBeforeTransform(self *C.GstBaseTransform, buffer *C.GstBuffer) {
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(self)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(self))
@@ -38,6 +42,8 @@ func goGstBaseTransformBeforeTransform(self *C.GstBaseTransform, buffer *C.GstBu
} }
//export goGstBaseTransformCopyMetadata //export goGstBaseTransformCopyMetadata
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformCopyMetadata(self *C.GstBaseTransform, input, output *C.GstBuffer) C.gboolean { func goGstBaseTransformCopyMetadata(self *C.GstBaseTransform, input, output *C.GstBuffer) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -51,6 +57,8 @@ func goGstBaseTransformCopyMetadata(self *C.GstBaseTransform, input, output *C.G
} }
//export goGstBaseTransformDecideAllocation //export goGstBaseTransformDecideAllocation
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformDecideAllocation(self *C.GstBaseTransform, query *C.GstQuery) C.gboolean { func goGstBaseTransformDecideAllocation(self *C.GstBaseTransform, query *C.GstQuery) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -65,6 +73,8 @@ func goGstBaseTransformDecideAllocation(self *C.GstBaseTransform, query *C.GstQu
} }
//export goGstBaseTransformFilterMeta //export goGstBaseTransformFilterMeta
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformFilterMeta(self *C.GstBaseTransform, query *C.GstQuery, api C.GType, params *C.GstStructure) C.gboolean { func goGstBaseTransformFilterMeta(self *C.GstBaseTransform, query *C.GstQuery, api C.GType, params *C.GstStructure) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -79,6 +89,8 @@ func goGstBaseTransformFilterMeta(self *C.GstBaseTransform, query *C.GstQuery, a
} }
//export goGstBaseTransformFixateCaps //export goGstBaseTransformFixateCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformFixateCaps(self *C.GstBaseTransform, direction C.GstPadDirection, caps, othercaps *C.GstCaps) *C.GstCaps { func goGstBaseTransformFixateCaps(self *C.GstBaseTransform, direction C.GstPadDirection, caps, othercaps *C.GstCaps) *C.GstCaps {
var ret *gst.Caps var ret *gst.Caps
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -96,6 +108,8 @@ func goGstBaseTransformFixateCaps(self *C.GstBaseTransform, direction C.GstPadDi
} }
//export goGstBaseTransformGenerateOutput //export goGstBaseTransformGenerateOutput
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformGenerateOutput(self *C.GstBaseTransform, buf **C.GstBuffer) C.GstFlowReturn { func goGstBaseTransformGenerateOutput(self *C.GstBaseTransform, buf **C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
var out *gst.Buffer var out *gst.Buffer
@@ -114,6 +128,8 @@ func goGstBaseTransformGenerateOutput(self *C.GstBaseTransform, buf **C.GstBuffe
} }
//export goGstBaseTransformGetUnitSize //export goGstBaseTransformGetUnitSize
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformGetUnitSize(self *C.GstBaseTransform, caps *C.GstCaps, size *C.gsize) C.gboolean { func goGstBaseTransformGetUnitSize(self *C.GstBaseTransform, caps *C.GstCaps, size *C.gsize) C.gboolean {
var ret bool var ret bool
var out int64 var out int64
@@ -132,6 +148,8 @@ func goGstBaseTransformGetUnitSize(self *C.GstBaseTransform, caps *C.GstCaps, si
} }
//export goGstBaseTransformPrepareOutputBuffer //export goGstBaseTransformPrepareOutputBuffer
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformPrepareOutputBuffer(self *C.GstBaseTransform, input *C.GstBuffer, outbuf **C.GstBuffer) C.GstFlowReturn { func goGstBaseTransformPrepareOutputBuffer(self *C.GstBaseTransform, input *C.GstBuffer, outbuf **C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
var out *gst.Buffer var out *gst.Buffer
@@ -150,6 +168,8 @@ func goGstBaseTransformPrepareOutputBuffer(self *C.GstBaseTransform, input *C.Gs
} }
//export goGstBaseTransformProposeAllocation //export goGstBaseTransformProposeAllocation
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformProposeAllocation(self *C.GstBaseTransform, decide, query *C.GstQuery) C.gboolean { func goGstBaseTransformProposeAllocation(self *C.GstBaseTransform, decide, query *C.GstQuery) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -164,6 +184,8 @@ func goGstBaseTransformProposeAllocation(self *C.GstBaseTransform, decide, query
} }
//export goGstBaseTransformQuery //export goGstBaseTransformQuery
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformQuery(self *C.GstBaseTransform, direction C.GstPadDirection, query *C.GstQuery) C.gboolean { func goGstBaseTransformQuery(self *C.GstBaseTransform, direction C.GstPadDirection, query *C.GstQuery) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -178,6 +200,8 @@ func goGstBaseTransformQuery(self *C.GstBaseTransform, direction C.GstPadDirecti
} }
//export goGstBaseTransformSetCaps //export goGstBaseTransformSetCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformSetCaps(self *C.GstBaseTransform, incaps, outcaps *C.GstCaps) C.gboolean { func goGstBaseTransformSetCaps(self *C.GstBaseTransform, incaps, outcaps *C.GstCaps) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -192,6 +216,8 @@ func goGstBaseTransformSetCaps(self *C.GstBaseTransform, incaps, outcaps *C.GstC
} }
//export goGstBaseTransformSinkEvent //export goGstBaseTransformSinkEvent
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformSinkEvent(self *C.GstBaseTransform, event *C.GstEvent) C.gboolean { func goGstBaseTransformSinkEvent(self *C.GstBaseTransform, event *C.GstEvent) C.gboolean {
var ret bool var ret bool
@@ -208,6 +234,8 @@ func goGstBaseTransformSinkEvent(self *C.GstBaseTransform, event *C.GstEvent) C.
} }
//export goGstBaseTransformSrcEvent //export goGstBaseTransformSrcEvent
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformSrcEvent(self *C.GstBaseTransform, event *C.GstEvent) C.gboolean { func goGstBaseTransformSrcEvent(self *C.GstBaseTransform, event *C.GstEvent) C.gboolean {
var ret bool var ret bool
@@ -223,6 +251,8 @@ func goGstBaseTransformSrcEvent(self *C.GstBaseTransform, event *C.GstEvent) C.g
} }
//export goGstBaseTransformStart //export goGstBaseTransformStart
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformStart(self *C.GstBaseTransform) C.gboolean { func goGstBaseTransformStart(self *C.GstBaseTransform) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -237,6 +267,8 @@ func goGstBaseTransformStart(self *C.GstBaseTransform) C.gboolean {
} }
//export goGstBaseTransformStop //export goGstBaseTransformStop
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformStop(self *C.GstBaseTransform) C.gboolean { func goGstBaseTransformStop(self *C.GstBaseTransform) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -251,6 +283,8 @@ func goGstBaseTransformStop(self *C.GstBaseTransform) C.gboolean {
} }
//export goGstBaseTransformSubmitInputBuffer //export goGstBaseTransformSubmitInputBuffer
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformSubmitInputBuffer(self *C.GstBaseTransform, isDiscont C.gboolean, input *C.GstBuffer) C.GstFlowReturn { func goGstBaseTransformSubmitInputBuffer(self *C.GstBaseTransform, isDiscont C.gboolean, input *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -265,6 +299,8 @@ func goGstBaseTransformSubmitInputBuffer(self *C.GstBaseTransform, isDiscont C.g
} }
//export goGstBaseTransformTransform //export goGstBaseTransformTransform
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformTransform(self *C.GstBaseTransform, inbuf, outbuf *C.GstBuffer) C.GstFlowReturn { func goGstBaseTransformTransform(self *C.GstBaseTransform, inbuf, outbuf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -279,6 +315,8 @@ func goGstBaseTransformTransform(self *C.GstBaseTransform, inbuf, outbuf *C.GstB
} }
//export goGstBaseTransformTransformCaps //export goGstBaseTransformTransformCaps
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformTransformCaps(self *C.GstBaseTransform, direction C.GstPadDirection, caps, filter *C.GstCaps) *C.GstCaps { func goGstBaseTransformTransformCaps(self *C.GstBaseTransform, direction C.GstPadDirection, caps, filter *C.GstCaps) *C.GstCaps {
var ret *gst.Caps var ret *gst.Caps
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -296,6 +334,8 @@ func goGstBaseTransformTransformCaps(self *C.GstBaseTransform, direction C.GstPa
} }
//export goGstBaseTransformTransformIP //export goGstBaseTransformTransformIP
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformTransformIP(self *C.GstBaseTransform, buf *C.GstBuffer) C.GstFlowReturn { func goGstBaseTransformTransformIP(self *C.GstBaseTransform, buf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -310,6 +350,8 @@ func goGstBaseTransformTransformIP(self *C.GstBaseTransform, buf *C.GstBuffer) C
} }
//export goGstBaseTransformTransformMeta //export goGstBaseTransformTransformMeta
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformTransformMeta(self *C.GstBaseTransform, outbuf *C.GstBuffer, meta *C.GstMeta, inbuf *C.GstBuffer) C.gboolean { func goGstBaseTransformTransformMeta(self *C.GstBaseTransform, outbuf *C.GstBuffer, meta *C.GstMeta, inbuf *C.GstBuffer) C.gboolean {
var ret bool var ret bool
goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))})
@@ -324,6 +366,8 @@ func goGstBaseTransformTransformMeta(self *C.GstBaseTransform, outbuf *C.GstBuff
} }
//export goGstBaseTransformTransformSize //export goGstBaseTransformTransformSize
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBaseTransformTransformSize(self *C.GstBaseTransform, direction C.GstPadDirection, caps *C.GstCaps, size C.gsize, othercaps *C.GstCaps, outsize *C.gsize) C.gboolean { func goGstBaseTransformTransformSize(self *C.GstBaseTransform, direction C.GstPadDirection, caps *C.GstCaps, size C.gsize, othercaps *C.GstCaps, outsize *C.gsize) C.gboolean {
var ret bool var ret bool
var othersize int64 var othersize int64

View File

@@ -71,6 +71,8 @@ var (
// //
// For more information: // For more information:
// https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c // https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type GstBaseTransformImpl interface { type GstBaseTransformImpl interface {
// Optional. Subclasses can override this method to check if caps can be handled by the element. // Optional. Subclasses can override this method to check if caps can be handled by the element.
// The default implementation might not be the most optimal way to check this in all cases. // The default implementation might not be the most optimal way to check this in all cases.
@@ -153,10 +155,18 @@ type GstBaseTransformImpl interface {
type extendsBaseTransform struct{ parent glib.Extendable } type extendsBaseTransform struct{ parent glib.Extendable }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseTransform) Type() glib.Type { return glib.Type(C.gst_base_transform_get_type()) } func (e *extendsBaseTransform) Type() glib.Type { return glib.Type(C.gst_base_transform_get_type()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseTransform) ClassSize() int64 { return int64(C.sizeof_GstBaseTransformClass) } func (e *extendsBaseTransform) ClassSize() int64 { return int64(C.sizeof_GstBaseTransformClass) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseTransform) InstanceSize() int64 { return int64(C.sizeof_GstBaseTransform) } func (e *extendsBaseTransform) InstanceSize() int64 { return int64(C.sizeof_GstBaseTransform) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBaseTransform) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) { func (e *extendsBaseTransform) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) {
e.parent.InitClass(klass, elem) e.parent.InitClass(klass, elem)

View File

@@ -109,43 +109,63 @@ type CollectPadsQueryFunc func(self *CollectPads, data *CollectData, query *gst.
// CollectData is a structure used by CollectPads. // CollectData is a structure used by CollectPads.
type CollectData struct{ ptr *C.GstCollectData } type CollectData struct{ ptr *C.GstCollectData }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapCollectData(ptr *C.GstCollectData) *CollectData { return &CollectData{ptr} } func wrapCollectData(ptr *C.GstCollectData) *CollectData { return &CollectData{ptr} }
// Instance returns the underly C object // Instance returns the underly C object
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) Instance() *C.GstCollectData { return c.ptr } func (c *CollectData) Instance() *C.GstCollectData { return c.ptr }
// Collect returns the owner CollectPads // Collect returns the owner CollectPads
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) Collect() *CollectPads { return wrapCollectPadsNone(c.ptr.collect) } func (c *CollectData) Collect() *CollectPads { return wrapCollectPadsNone(c.ptr.collect) }
// Pad returns the pad managed by this data. // Pad returns the pad managed by this data.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) Pad() *gst.Pad { return gst.FromGstPadUnsafeNone(unsafe.Pointer(c.ptr.pad)) } func (c *CollectData) Pad() *gst.Pad { return gst.FromGstPadUnsafeNone(unsafe.Pointer(c.ptr.pad)) }
// Buffer returns the currently queued buffer. // Buffer returns the currently queued buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) Buffer() *gst.Buffer { func (c *CollectData) Buffer() *gst.Buffer {
return gst.FromGstBufferUnsafeNone(unsafe.Pointer(c.ptr.buffer)) return gst.FromGstBufferUnsafeNone(unsafe.Pointer(c.ptr.buffer))
} }
// Pos returns the position in the buffer. // Pos returns the position in the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) Pos() uint { return uint(c.ptr.pos) } func (c *CollectData) Pos() uint { return uint(c.ptr.pos) }
// Segment returns the last segment received. // Segment returns the last segment received.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) Segment() *gst.Segment { func (c *CollectData) Segment() *gst.Segment {
return gst.FromGstSegmentUnsafe(unsafe.Pointer(&c.ptr.segment)) return gst.FromGstSegmentUnsafe(unsafe.Pointer(&c.ptr.segment))
} }
// DTS returns the signed version of the DTS converted to running time. // DTS returns the signed version of the DTS converted to running time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectData) DTS() time.Duration { return time.Duration(C.gstCollectDataDTS(c.ptr)) } func (c *CollectData) DTS() time.Duration { return time.Duration(C.gstCollectDataDTS(c.ptr)) }
// CollectPads manages a set of pads that operate in collect mode. This means that control is given to the // CollectPads manages a set of pads that operate in collect mode. This means that control is given to the
// manager of this object when all pads have data. // manager of this object when all pads have data.
// For more information see: // For more information see:
// https://gstreamer.freedesktop.org/documentation/base/gstcollectpads.html?gi-language=c#gstcollectpads-page // https://gstreamer.freedesktop.org/documentation/base/gstcollectpads.html?gi-language=c#gstcollectpads-page
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type CollectPads struct { type CollectPads struct {
*gst.Object *gst.Object
funcMap *collectPadsFuncMap funcMap *collectPadsFuncMap
selfPtr unsafe.Pointer selfPtr unsafe.Pointer
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type collectPadsFuncMap struct { type collectPadsFuncMap struct {
bufferFunc CollectPadsBufferFunc bufferFunc CollectPadsBufferFunc
clipFunc CollectPadsClipFunc clipFunc CollectPadsClipFunc
@@ -157,10 +177,14 @@ type collectPadsFuncMap struct {
} }
// NewCollectPads creates a new CollectPads instance. // NewCollectPads creates a new CollectPads instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCollectPads() *CollectPads { func NewCollectPads() *CollectPads {
return wrapCollectPadsFull(C.gst_collect_pads_new()) return wrapCollectPadsFull(C.gst_collect_pads_new())
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapCollectPadsFull(ptr *C.GstCollectPads) *CollectPads { func wrapCollectPadsFull(ptr *C.GstCollectPads) *CollectPads {
collect := &CollectPads{ collect := &CollectPads{
Object: gst.FromGstObjectUnsafeFull(unsafe.Pointer(ptr)), Object: gst.FromGstObjectUnsafeFull(unsafe.Pointer(ptr)),
@@ -170,6 +194,8 @@ func wrapCollectPadsFull(ptr *C.GstCollectPads) *CollectPads {
return collect return collect
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapCollectPadsNone(ptr *C.GstCollectPads) *CollectPads { func wrapCollectPadsNone(ptr *C.GstCollectPads) *CollectPads {
collect := &CollectPads{ collect := &CollectPads{
Object: gst.FromGstObjectUnsafeNone(unsafe.Pointer(ptr)), Object: gst.FromGstObjectUnsafeNone(unsafe.Pointer(ptr)),
@@ -180,6 +206,8 @@ func wrapCollectPadsNone(ptr *C.GstCollectPads) *CollectPads {
} }
// Instance returns the underlying C object. // Instance returns the underlying C object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Instance() *C.GstCollectPads { return C.toGstCollectPads(c.Unsafe()) } func (c *CollectPads) Instance() *C.GstCollectPads { return C.toGstCollectPads(c.Unsafe()) }
// AddPad adds a pad to the collection of collect pads. The pad has to be a sinkpad. The refcount of the pad is // AddPad adds a pad to the collection of collect pads. The pad has to be a sinkpad. The refcount of the pad is
@@ -194,6 +222,8 @@ func (c *CollectPads) Instance() *C.GstCollectPads { return C.toGstCollectPads(c
// The pad will be automatically activated in push mode when pads is started. // The pad will be automatically activated in push mode when pads is started.
// //
// This function can return nil if supplied with invalid arguments. // This function can return nil if supplied with invalid arguments.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) AddPad(pad *gst.Pad, lock bool) *CollectData { func (c *CollectPads) AddPad(pad *gst.Pad, lock bool) *CollectData {
data := C.gst_collect_pads_add_pad( data := C.gst_collect_pads_add_pad(
c.Instance(), c.Instance(),
@@ -212,6 +242,8 @@ func (c *CollectPads) AddPad(pad *gst.Pad, lock bool) *CollectData {
// this call is the maximum number of bytes that can be read from each of the pads. // this call is the maximum number of bytes that can be read from each of the pads.
// //
// This function should be called with pads STREAM_LOCK held, such as in the callback. // This function should be called with pads STREAM_LOCK held, such as in the callback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Available() uint { return uint(C.gst_collect_pads_available(c.Instance())) } func (c *CollectPads) Available() uint { return uint(C.gst_collect_pads_available(c.Instance())) }
// InvalidRunningTime is a cast of C_MININT64 to signify a DTS that is invalid. // InvalidRunningTime is a cast of C_MININT64 to signify a DTS that is invalid.
@@ -224,6 +256,8 @@ var InvalidRunningTime = time.Duration(C.G_MININT64)
// of the running time DTS can be negative. InvalidRunningTime is used to indicate invalid value. // of the running time DTS can be negative. InvalidRunningTime is used to indicate invalid value.
// //
// data is the CollectData of the corresponding pad and buf is the buffer being clipped. // data is the CollectData of the corresponding pad and buf is the buffer being clipped.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) ClipRunningTime(data *CollectData, buf *gst.Buffer) (ret gst.FlowReturn, outbuf *gst.Buffer) { func (c *CollectPads) ClipRunningTime(data *CollectData, buf *gst.Buffer) (ret gst.FlowReturn, outbuf *gst.Buffer) {
var goutbuf *C.GstBuffer var goutbuf *C.GstBuffer
ret = gst.FlowReturn(C.gst_collect_pads_clip_running_time( ret = gst.FlowReturn(C.gst_collect_pads_clip_running_time(
@@ -241,6 +275,8 @@ func (c *CollectPads) ClipRunningTime(data *CollectData, buf *gst.Buffer) (ret g
// EventDefault is the default GstCollectPads event handling that elements should always chain up to to ensure // EventDefault is the default GstCollectPads event handling that elements should always chain up to to ensure
// proper operation. Element might however indicate event should not be forwarded downstream. // proper operation. Element might however indicate event should not be forwarded downstream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) EventDefault(data *CollectData, event *gst.Event, discard bool) bool { func (c *CollectPads) EventDefault(data *CollectData, event *gst.Event, discard bool) bool {
return gobool(C.gst_collect_pads_event_default( return gobool(C.gst_collect_pads_event_default(
c.Instance(), c.Instance(),
@@ -253,6 +289,8 @@ func (c *CollectPads) EventDefault(data *CollectData, event *gst.Event, discard
// Flush size bytes from the pad data. Returns the number of bytes actually flushed. // Flush size bytes from the pad data. Returns the number of bytes actually flushed.
// //
// This function should be called with pads STREAM_LOCK held, such as in the callback. // This function should be called with pads STREAM_LOCK held, such as in the callback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Flush(data *CollectData, size uint) uint { func (c *CollectPads) Flush(data *CollectData, size uint) uint {
return uint(C.gst_collect_pads_flush(c.Instance(), data.Instance(), C.guint(size))) return uint(C.gst_collect_pads_flush(c.Instance(), data.Instance(), C.guint(size)))
} }
@@ -262,10 +300,14 @@ func (c *CollectPads) Flush(data *CollectData, size uint) uint {
// data will be collected whenever a program exits, in the context of a plugin that might get reused in // data will be collected whenever a program exits, in the context of a plugin that might get reused in
// a single application, NOT calling this function between starts and stops of your element could lead to // a single application, NOT calling this function between starts and stops of your element could lead to
// memory leaks. // memory leaks.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Free() { gopointer.Unref(c.selfPtr) } func (c *CollectPads) Free() { gopointer.Unref(c.selfPtr) }
// Peek at the buffer currently queued in data. This function should be called with the pads STREAM_LOCK held, // Peek at the buffer currently queued in data. This function should be called with the pads STREAM_LOCK held,
// such as in the callback handler. // such as in the callback handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Peek(data *CollectData) *gst.Buffer { func (c *CollectPads) Peek(data *CollectData) *gst.Buffer {
buf := C.gst_collect_pads_peek(c.Instance(), data.Instance()) buf := C.gst_collect_pads_peek(c.Instance(), data.Instance())
if buf == nil { if buf == nil {
@@ -276,6 +318,8 @@ func (c *CollectPads) Peek(data *CollectData) *gst.Buffer {
// Pop the buffer currently queued in data. This function should be called with the pads STREAM_LOCK held, such // Pop the buffer currently queued in data. This function should be called with the pads STREAM_LOCK held, such
// as in the callback handler. // as in the callback handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Pop(data *CollectData) *gst.Buffer { func (c *CollectPads) Pop(data *CollectData) *gst.Buffer {
buf := C.gst_collect_pads_pop(c.Instance(), data.Instance()) buf := C.gst_collect_pads_pop(c.Instance(), data.Instance())
if buf == nil { if buf == nil {
@@ -286,6 +330,8 @@ func (c *CollectPads) Pop(data *CollectData) *gst.Buffer {
// QueryDefault is the Default GstCollectPads query handling that elements should always chain up to to ensure // QueryDefault is the Default GstCollectPads query handling that elements should always chain up to to ensure
// proper operation. Element might however indicate query should not be forwarded downstream. // proper operation. Element might however indicate query should not be forwarded downstream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) QueryDefault(data *CollectData, query *gst.Query, discard bool) bool { func (c *CollectPads) QueryDefault(data *CollectData, query *gst.Query, discard bool) bool {
return gobool(C.gst_collect_pads_query_default( return gobool(C.gst_collect_pads_query_default(
c.Instance(), data.Instance(), c.Instance(), data.Instance(),
@@ -297,6 +343,8 @@ func (c *CollectPads) QueryDefault(data *CollectData, query *gst.Query, discard
// ReadBuffer gets a subbuffer of size bytes from the given pad data. // ReadBuffer gets a subbuffer of size bytes from the given pad data.
// //
// This function should be called with pads STREAM_LOCK held, such as in the callback. // This function should be called with pads STREAM_LOCK held, such as in the callback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) ReadBuffer(data *CollectData, size uint) *gst.Buffer { func (c *CollectPads) ReadBuffer(data *CollectData, size uint) *gst.Buffer {
buf := C.gst_collect_pads_read_buffer(c.Instance(), data.Instance(), C.guint(size)) buf := C.gst_collect_pads_read_buffer(c.Instance(), data.Instance(), C.guint(size))
if buf == nil { if buf == nil {
@@ -309,12 +357,16 @@ func (c *CollectPads) ReadBuffer(data *CollectData, size uint) *gst.Buffer {
// and all the resources that were allocated with AddPad. // and all the resources that were allocated with AddPad.
// //
// The pad will be deactivated automatically when CollectPads is stopped. // The pad will be deactivated automatically when CollectPads is stopped.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) RemovePad(pad *gst.Pad) bool { func (c *CollectPads) RemovePad(pad *gst.Pad) bool {
return gobool(C.gst_collect_pads_remove_pad(c.Instance(), (*C.GstPad)(unsafe.Pointer(pad.Instance())))) return gobool(C.gst_collect_pads_remove_pad(c.Instance(), (*C.GstPad)(unsafe.Pointer(pad.Instance()))))
} }
// SetBufferFunction sets the callback that will be called with the oldest buffer when all pads have been collected, // SetBufferFunction sets the callback that will be called with the oldest buffer when all pads have been collected,
// or nil on EOS. // or nil on EOS.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetBufferFunction(f CollectPadsBufferFunc) { func (c *CollectPads) SetBufferFunction(f CollectPadsBufferFunc) {
c.funcMap.bufferFunc = f c.funcMap.bufferFunc = f
C.gst_collect_pads_set_buffer_function( C.gst_collect_pads_set_buffer_function(
@@ -326,6 +378,8 @@ func (c *CollectPads) SetBufferFunction(f CollectPadsBufferFunc) {
// SetClipFunction installs a clipping function that is called after buffers are received on managed pads. // SetClipFunction installs a clipping function that is called after buffers are received on managed pads.
// See CollectPadsClipFunc for more details. // See CollectPadsClipFunc for more details.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetClipFunction(f CollectPadsClipFunc) { func (c *CollectPads) SetClipFunction(f CollectPadsClipFunc) {
c.funcMap.clipFunc = f c.funcMap.clipFunc = f
C.gst_collect_pads_set_clip_function( C.gst_collect_pads_set_clip_function(
@@ -336,6 +390,8 @@ func (c *CollectPads) SetClipFunction(f CollectPadsClipFunc) {
} }
// SetCompareFunction sets the timestamp comparison function. // SetCompareFunction sets the timestamp comparison function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetCompareFunction(f CollectPadsCompareFunc) { func (c *CollectPads) SetCompareFunction(f CollectPadsCompareFunc) {
c.funcMap.compareFunc = f c.funcMap.compareFunc = f
C.gst_collect_pads_set_compare_function( C.gst_collect_pads_set_compare_function(
@@ -349,6 +405,8 @@ func (c *CollectPads) SetCompareFunction(f CollectPadsCompareFunc) {
// originating from one of the collected pads. If the event being processed is a serialized one, this callback // originating from one of the collected pads. If the event being processed is a serialized one, this callback
// is called with pads STREAM_LOCK held, otherwise not. As this lock should be held when calling a number of // is called with pads STREAM_LOCK held, otherwise not. As this lock should be held when calling a number of
// CollectPads functions, it should be acquired if so (unusually) needed. // CollectPads functions, it should be acquired if so (unusually) needed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetEventFunction(f CollectPadsEventFunc) { func (c *CollectPads) SetEventFunction(f CollectPadsEventFunc) {
c.funcMap.eventFunc = f c.funcMap.eventFunc = f
C.gst_collect_pads_set_event_function( C.gst_collect_pads_set_event_function(
@@ -360,6 +418,8 @@ func (c *CollectPads) SetEventFunction(f CollectPadsEventFunc) {
// SetFlushFunction installs a flush function that is called when the internal state of all pads should be // SetFlushFunction installs a flush function that is called when the internal state of all pads should be
// flushed as part of flushing seek handling. See CollectPadsFlushFunc for more info. // flushed as part of flushing seek handling. See CollectPadsFlushFunc for more info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetFlushFunction(f CollectPadsFlushFunc) { func (c *CollectPads) SetFlushFunction(f CollectPadsFlushFunc) {
c.funcMap.flushFunc = f c.funcMap.flushFunc = f
C.gst_collect_pads_set_flush_function( C.gst_collect_pads_set_flush_function(
@@ -372,6 +432,8 @@ func (c *CollectPads) SetFlushFunction(f CollectPadsFlushFunc) {
// SetFlushing changes the flushing state of all the pads in the collection. No pad is able to accept anymore // SetFlushing changes the flushing state of all the pads in the collection. No pad is able to accept anymore
// data when flushing is TRUE. Calling this function with flushing FALSE makes pads accept data again. Caller // data when flushing is TRUE. Calling this function with flushing FALSE makes pads accept data again. Caller
// must ensure that downstream streaming (thread) is not blocked, e.g. by sending a FLUSH_START downstream. // must ensure that downstream streaming (thread) is not blocked, e.g. by sending a FLUSH_START downstream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetFlushing(flushing bool) { func (c *CollectPads) SetFlushing(flushing bool) {
C.gst_collect_pads_set_flushing(c.Instance(), gboolean(flushing)) C.gst_collect_pads_set_flushing(c.Instance(), gboolean(flushing))
} }
@@ -383,6 +445,8 @@ func (c *CollectPads) SetFlushing(flushing bool) {
// and/or more control is desired, this sets a callback that will be invoked instead when all the pads added // and/or more control is desired, this sets a callback that will be invoked instead when all the pads added
// to the collection have buffers queued. Evidently, this callback is not compatible with SetBufferFunction // to the collection have buffers queued. Evidently, this callback is not compatible with SetBufferFunction
// callback. If this callback is set, the former will be unset. // callback. If this callback is set, the former will be unset.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetFunction(f CollectPadsFunc) { func (c *CollectPads) SetFunction(f CollectPadsFunc) {
c.funcMap.funcFunc = f c.funcMap.funcFunc = f
C.gst_collect_pads_set_function( C.gst_collect_pads_set_function(
@@ -396,6 +460,8 @@ func (c *CollectPads) SetFunction(f CollectPadsFunc) {
// received a query originating from one of the collected pads. If the query being processed is a serialized // received a query originating from one of the collected pads. If the query being processed is a serialized
// one, this callback is called with pads STREAM_LOCK held, otherwise not. As this lock should be held when // one, this callback is called with pads STREAM_LOCK held, otherwise not. As this lock should be held when
// calling a number of CollectPads functions, it should be acquired if so (unusually) needed. // calling a number of CollectPads functions, it should be acquired if so (unusually) needed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetQueryFunction(f CollectPadsQueryFunc) { func (c *CollectPads) SetQueryFunction(f CollectPadsQueryFunc) {
c.funcMap.queryFunc = f c.funcMap.queryFunc = f
C.gst_collect_pads_set_query_function( C.gst_collect_pads_set_query_function(
@@ -409,12 +475,16 @@ func (c *CollectPads) SetQueryFunction(f CollectPadsQueryFunc) {
// waiting state, in which case nothing happens. // waiting state, in which case nothing happens.
// //
// This function should be called with pads STREAM_LOCK held, such as in the callback. // This function should be called with pads STREAM_LOCK held, such as in the callback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SetWaiting(data *CollectData, waiting bool) { func (c *CollectPads) SetWaiting(data *CollectData, waiting bool) {
C.gst_collect_pads_set_waiting(c.Instance(), data.Instance(), gboolean(waiting)) C.gst_collect_pads_set_waiting(c.Instance(), data.Instance(), gboolean(waiting))
} }
// SrcEventDefault is the CollectPads event handling for the src pad of elements. Elements can chain up to this // SrcEventDefault is the CollectPads event handling for the src pad of elements. Elements can chain up to this
// to let flushing seek event handling be done by CollectPads. // to let flushing seek event handling be done by CollectPads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) SrcEventDefault(pad *gst.Pad, event *gst.Event) bool { func (c *CollectPads) SrcEventDefault(pad *gst.Pad, event *gst.Event) bool {
return gobool(C.gst_collect_pads_src_event_default( return gobool(C.gst_collect_pads_src_event_default(
c.Instance(), c.Instance(),
@@ -424,14 +494,20 @@ func (c *CollectPads) SrcEventDefault(pad *gst.Pad, event *gst.Event) bool {
} }
// Start starts the processing of data in the collectpads. // Start starts the processing of data in the collectpads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Start() { C.gst_collect_pads_start(c.Instance()) } func (c *CollectPads) Start() { C.gst_collect_pads_start(c.Instance()) }
// Stop stops the processing of data in the collectpads. It also u nblocks any blocking operations. // Stop stops the processing of data in the collectpads. It also u nblocks any blocking operations.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) Stop() { C.gst_collect_pads_stop(c.Instance()) } func (c *CollectPads) Stop() { C.gst_collect_pads_stop(c.Instance()) }
// TakeBuffer gets a subbuffer of size bytes from the given pad data. Flushes the amount of read bytes. // TakeBuffer gets a subbuffer of size bytes from the given pad data. Flushes the amount of read bytes.
// //
// This function should be called with pads STREAM_LOCK held, such as in the callback. // This function should be called with pads STREAM_LOCK held, such as in the callback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CollectPads) TakeBuffer(data *CollectData, size uint) *gst.Buffer { func (c *CollectPads) TakeBuffer(data *CollectData, size uint) *gst.Buffer {
buf := C.gst_collect_pads_take_buffer(c.Instance(), data.Instance(), C.guint(size)) buf := C.gst_collect_pads_take_buffer(c.Instance(), data.Instance(), C.guint(size))
if buf == nil { if buf == nil {

View File

@@ -14,6 +14,8 @@ import (
) )
//export goGstCollectPadsBufferFunc //export goGstCollectPadsBufferFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsBufferFunc(pads *C.GstCollectPads, data *C.GstCollectData, buf *C.GstBuffer, userData C.gpointer) C.GstFlowReturn { func goGstCollectPadsBufferFunc(pads *C.GstCollectPads, data *C.GstCollectData, buf *C.GstBuffer, userData C.gpointer) C.GstFlowReturn {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)
@@ -33,6 +35,8 @@ func goGstCollectPadsBufferFunc(pads *C.GstCollectPads, data *C.GstCollectData,
} }
//export goGstCollectPadsClipFunc //export goGstCollectPadsClipFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsClipFunc(pads *C.GstCollectPads, data *C.GstCollectData, inbuf *C.GstBuffer, outbuf **C.GstBuffer, userData C.gpointer) C.GstFlowReturn { func goGstCollectPadsClipFunc(pads *C.GstCollectPads, data *C.GstCollectData, inbuf *C.GstBuffer, outbuf **C.GstBuffer, userData C.gpointer) C.GstFlowReturn {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)
@@ -50,6 +54,8 @@ func goGstCollectPadsClipFunc(pads *C.GstCollectPads, data *C.GstCollectData, in
} }
//export goGstCollectPadsCompareFunc //export goGstCollectPadsCompareFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsCompareFunc(pads *C.GstCollectPads, data1 *C.GstCollectData, ts1 C.GstClockTime, data2 *C.GstCollectData, ts2 C.GstClockTime, userData C.gpointer) C.gint { func goGstCollectPadsCompareFunc(pads *C.GstCollectPads, data1 *C.GstCollectData, ts1 C.GstClockTime, data2 *C.GstCollectData, ts2 C.GstClockTime, userData C.gpointer) C.gint {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)
@@ -59,6 +65,8 @@ func goGstCollectPadsCompareFunc(pads *C.GstCollectPads, data1 *C.GstCollectData
} }
//export goGstCollectPadsEventFunc //export goGstCollectPadsEventFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsEventFunc(pads *C.GstCollectPads, data *C.GstCollectData, event *C.GstEvent, userData C.gpointer) C.gboolean { func goGstCollectPadsEventFunc(pads *C.GstCollectPads, data *C.GstCollectData, event *C.GstEvent, userData C.gpointer) C.gboolean {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)
@@ -68,6 +76,8 @@ func goGstCollectPadsEventFunc(pads *C.GstCollectPads, data *C.GstCollectData, e
} }
//export goGstCollectPadsFlushFunc //export goGstCollectPadsFlushFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsFlushFunc(pads *C.GstCollectPads, userData C.gpointer) { func goGstCollectPadsFlushFunc(pads *C.GstCollectPads, userData C.gpointer) {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)
@@ -77,6 +87,8 @@ func goGstCollectPadsFlushFunc(pads *C.GstCollectPads, userData C.gpointer) {
} }
//export goGstCollectPadsFunc //export goGstCollectPadsFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsFunc(pads *C.GstCollectPads, userData C.gpointer) C.GstFlowReturn { func goGstCollectPadsFunc(pads *C.GstCollectPads, userData C.gpointer) C.GstFlowReturn {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)
@@ -86,6 +98,8 @@ func goGstCollectPadsFunc(pads *C.GstCollectPads, userData C.gpointer) C.GstFlow
} }
//export goGstCollectPadsQueryFunc //export goGstCollectPadsQueryFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstCollectPadsQueryFunc(pads *C.GstCollectPads, data *C.GstCollectData, query *C.GstQuery, userData C.gpointer) C.gboolean { func goGstCollectPadsQueryFunc(pads *C.GstCollectPads, data *C.GstCollectData, query *C.GstQuery, userData C.gpointer) C.gboolean {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
collectPads := iface.(*CollectPads) collectPads := iface.(*CollectPads)

View File

@@ -16,43 +16,63 @@ import (
// For more information see https://gstreamer.freedesktop.org/documentation/base/gstflowcombiner.html?gi-language=c#GstFlowCombiner // For more information see https://gstreamer.freedesktop.org/documentation/base/gstflowcombiner.html?gi-language=c#GstFlowCombiner
type FlowCombiner struct{ ptr *C.GstFlowCombiner } type FlowCombiner struct{ ptr *C.GstFlowCombiner }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapFlowCombiner(ptr *C.GstFlowCombiner) *FlowCombiner { func wrapFlowCombiner(ptr *C.GstFlowCombiner) *FlowCombiner {
return &FlowCombiner{ptr} return &FlowCombiner{ptr}
} }
// NewFlowCombiner creates a new flow combiner. Use Free() to free it. // NewFlowCombiner creates a new flow combiner. Use Free() to free it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewFlowCombiner() *FlowCombiner { func NewFlowCombiner() *FlowCombiner {
return wrapFlowCombiner(C.gst_flow_combiner_new()) return wrapFlowCombiner(C.gst_flow_combiner_new())
} }
// Instance returns the underlying GstFlowCombiner instance. // Instance returns the underlying GstFlowCombiner instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) Instance() *C.GstFlowCombiner { return f.ptr } func (f *FlowCombiner) Instance() *C.GstFlowCombiner { return f.ptr }
// AddPad adds a new pad to the FlowCombiner. A reference is taken on the pad. // AddPad adds a new pad to the FlowCombiner. A reference is taken on the pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) AddPad(pad *gst.Pad) { func (f *FlowCombiner) AddPad(pad *gst.Pad) {
C.gst_flow_combiner_add_pad(f.Instance(), (*C.GstPad)(unsafe.Pointer(pad.Instance()))) C.gst_flow_combiner_add_pad(f.Instance(), (*C.GstPad)(unsafe.Pointer(pad.Instance())))
} }
// Clear will remove all pads and reset the combiner to its initial state. // Clear will remove all pads and reset the combiner to its initial state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) Clear() { C.gst_flow_combiner_clear(f.Instance()) } func (f *FlowCombiner) Clear() { C.gst_flow_combiner_clear(f.Instance()) }
// Free will free a FlowCombiner and all its internal data. // Free will free a FlowCombiner and all its internal data.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) Free() { C.gst_flow_combiner_free(f.Instance()) } func (f *FlowCombiner) Free() { C.gst_flow_combiner_free(f.Instance()) }
// Ref will increment the reference count on the FlowCombiner. // Ref will increment the reference count on the FlowCombiner.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) Ref() *FlowCombiner { func (f *FlowCombiner) Ref() *FlowCombiner {
return wrapFlowCombiner(C.gst_flow_combiner_ref(f.Instance())) return wrapFlowCombiner(C.gst_flow_combiner_ref(f.Instance()))
} }
// RemovePad will remove a pad from the FlowCombiner. // RemovePad will remove a pad from the FlowCombiner.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) RemovePad(pad *gst.Pad) { func (f *FlowCombiner) RemovePad(pad *gst.Pad) {
C.gst_flow_combiner_remove_pad(f.Instance(), (*C.GstPad)(unsafe.Pointer(pad.Instance()))) C.gst_flow_combiner_remove_pad(f.Instance(), (*C.GstPad)(unsafe.Pointer(pad.Instance())))
} }
// Reset flow combiner and all pads to their initial state without removing pads. // Reset flow combiner and all pads to their initial state without removing pads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) Reset() { C.gst_flow_combiner_reset(f.Instance()) } func (f *FlowCombiner) Reset() { C.gst_flow_combiner_reset(f.Instance()) }
// Unref decrements the reference count on the Flow Combiner. // Unref decrements the reference count on the Flow Combiner.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) Unref() { C.gst_flow_combiner_unref(f.Instance()) } func (f *FlowCombiner) Unref() { C.gst_flow_combiner_unref(f.Instance()) }
// UpdateFlow computes the combined flow return for the pads in it. // UpdateFlow computes the combined flow return for the pads in it.
@@ -60,6 +80,8 @@ func (f *FlowCombiner) Unref() { C.gst_flow_combiner_unref(f.Instance()) }
// The GstFlowReturn parameter should be the last flow return update for a pad in this GstFlowCombiner. // The GstFlowReturn parameter should be the last flow return update for a pad in this GstFlowCombiner.
// It will use this value to be able to shortcut some combinations and avoid looking over all pads again. // It will use this value to be able to shortcut some combinations and avoid looking over all pads again.
// e.g. The last combined return is the same as the latest obtained GstFlowReturn. // e.g. The last combined return is the same as the latest obtained GstFlowReturn.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) UpdateFlow(fret gst.FlowReturn) gst.FlowReturn { func (f *FlowCombiner) UpdateFlow(fret gst.FlowReturn) gst.FlowReturn {
return gst.FlowReturn(C.gst_flow_combiner_update_flow(f.Instance(), C.GstFlowReturn(fret))) return gst.FlowReturn(C.gst_flow_combiner_update_flow(f.Instance(), C.GstFlowReturn(fret)))
} }
@@ -70,6 +92,8 @@ func (f *FlowCombiner) UpdateFlow(fret gst.FlowReturn) gst.FlowReturn {
// The GstFlowReturn parameter should be the last flow return update for a pad in this GstFlowCombiner. It // The GstFlowReturn parameter should be the last flow return update for a pad in this GstFlowCombiner. It
// will use this value to be able to shortcut some combinations and avoid looking over all pads again. e.g. // will use this value to be able to shortcut some combinations and avoid looking over all pads again. e.g.
// The last combined return is the same as the latest obtained GstFlowReturn. // The last combined return is the same as the latest obtained GstFlowReturn.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f *FlowCombiner) UpdatePadFlow(pad *gst.Pad, fret gst.FlowReturn) gst.FlowReturn { func (f *FlowCombiner) UpdatePadFlow(pad *gst.Pad, fret gst.FlowReturn) gst.FlowReturn {
return gst.FlowReturn(C.gst_flow_combiner_update_pad_flow( return gst.FlowReturn(C.gst_flow_combiner_update_pad_flow(
f.Instance(), f.Instance(),

View File

@@ -14,6 +14,8 @@ import (
type GstPushSrc struct{ *GstBaseSrc } type GstPushSrc struct{ *GstBaseSrc }
// ToGstPushSrc returns a GstPushSrc object for the given object. // ToGstPushSrc returns a GstPushSrc object for the given object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstPushSrc(obj interface{}) *GstPushSrc { func ToGstPushSrc(obj interface{}) *GstPushSrc {
switch obj := obj.(type) { switch obj := obj.(type) {
case *gst.Object: case *gst.Object:
@@ -25,6 +27,8 @@ func ToGstPushSrc(obj interface{}) *GstPushSrc {
} }
// Instance returns the underlying C GstBaseSrc instance // Instance returns the underlying C GstBaseSrc instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GstPushSrc) Instance() *C.GstPushSrc { func (g *GstPushSrc) Instance() *C.GstPushSrc {
return C.toGstPushSrc(g.Unsafe()) return C.toGstPushSrc(g.Unsafe())
} }

View File

@@ -13,6 +13,8 @@ import (
) )
//export goGstPushSrcAlloc //export goGstPushSrcAlloc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPushSrcAlloc(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn { func goGstPushSrcAlloc(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
var outbuf *gst.Buffer var outbuf *gst.Buffer
@@ -31,6 +33,8 @@ func goGstPushSrcAlloc(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn {
} }
//export goGstPushSrcCreate //export goGstPushSrcCreate
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPushSrcCreate(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn { func goGstPushSrcCreate(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
var outbuf *gst.Buffer var outbuf *gst.Buffer
@@ -49,6 +53,8 @@ func goGstPushSrcCreate(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn {
} }
//export goGstPushSrcFill //export goGstPushSrcFill
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPushSrcFill(src *C.GstPushSrc, buf *C.GstBuffer) C.GstFlowReturn { func goGstPushSrcFill(src *C.GstPushSrc, buf *C.GstBuffer) C.GstFlowReturn {
var ret gst.FlowReturn var ret gst.FlowReturn
goPushSrc := ToGstPushSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) goPushSrc := ToGstPushSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))})

View File

@@ -30,6 +30,8 @@ var (
// be implemented in it's entirety. Each of the methods it declares will be checked for their presence // be implemented in it's entirety. Each of the methods it declares will be checked for their presence
// in the initializing object, and if the object declares an override it will replace the default // in the initializing object, and if the object declares an override it will replace the default
// implementation in the virtual methods. // implementation in the virtual methods.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type GstPushSrcImpl interface { type GstPushSrcImpl interface {
// Asks the subclass to allocate a buffer. The subclass decides which size this buffer should be. // Asks the subclass to allocate a buffer. The subclass decides which size this buffer should be.
// The default implementation will create a new buffer from the negotiated allocator. // The default implementation will create a new buffer from the negotiated allocator.
@@ -44,10 +46,18 @@ type GstPushSrcImpl interface {
type extendsPushSrc struct{ parent glib.Extendable } type extendsPushSrc struct{ parent glib.Extendable }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsPushSrc) Type() glib.Type { return glib.Type(C.gst_push_src_get_type()) } func (e *extendsPushSrc) Type() glib.Type { return glib.Type(C.gst_push_src_get_type()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsPushSrc) ClassSize() int64 { return int64(C.sizeof_GstPushSrcClass) } func (e *extendsPushSrc) ClassSize() int64 { return int64(C.sizeof_GstPushSrcClass) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsPushSrc) InstanceSize() int64 { return int64(C.sizeof_GstPushSrc) } func (e *extendsPushSrc) InstanceSize() int64 { return int64(C.sizeof_GstPushSrc) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsPushSrc) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) { func (e *extendsPushSrc) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) {
e.parent.InitClass(klass, elem) e.parent.InitClass(klass, elem)

View File

@@ -15,6 +15,8 @@ import (
// TypeFindHelper tries to find what type of data is flowing from the given source GstPad. // TypeFindHelper tries to find what type of data is flowing from the given source GstPad.
// Returns nil if no Caps matches the data stream. // Returns nil if no Caps matches the data stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TypeFindHelper(pad *gst.Pad, size uint64) *gst.Caps { func TypeFindHelper(pad *gst.Pad, size uint64) *gst.Caps {
caps := C.gst_type_find_helper((*C.GstPad)(unsafe.Pointer(pad.Instance())), C.guint64(size)) caps := C.gst_type_find_helper((*C.GstPad)(unsafe.Pointer(pad.Instance())), C.guint64(size))
if caps == nil { if caps == nil {
@@ -33,6 +35,8 @@ func TypeFindHelper(pad *gst.Pad, size uint64) *gst.Caps {
// not be identified. // not be identified.
// //
// Object can either be nil or the object doing the typefinding (used for logging). // Object can either be nil or the object doing the typefinding (used for logging).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TypeFindHelperForBuffer(obj *gst.Object, buffer *gst.Buffer) (*gst.Caps, gst.TypeFindProbability) { func TypeFindHelperForBuffer(obj *gst.Object, buffer *gst.Buffer) (*gst.Caps, gst.TypeFindProbability) {
var prob C.GstTypeFindProbability var prob C.GstTypeFindProbability
var cobj *C.GstObject var cobj *C.GstObject
@@ -56,6 +60,8 @@ func TypeFindHelperForBuffer(obj *gst.Object, buffer *gst.Buffer) (*gst.Caps, gs
// //
// When extension is not empty, this function will first try the typefind functions for the given extension, // When extension is not empty, this function will first try the typefind functions for the given extension,
// which might speed up the typefinding in many cases. // which might speed up the typefinding in many cases.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TypeFindHelperForBufferWithExtension(obj *gst.Object, buffer *gst.Buffer, extension string) (*gst.Caps, gst.TypeFindProbability) { func TypeFindHelperForBufferWithExtension(obj *gst.Object, buffer *gst.Buffer, extension string) (*gst.Caps, gst.TypeFindProbability) {
var prob C.GstTypeFindProbability var prob C.GstTypeFindProbability
var cobj *C.GstObject var cobj *C.GstObject
@@ -85,6 +91,8 @@ func TypeFindHelperForBufferWithExtension(obj *gst.Object, buffer *gst.Buffer, e
// not be identified. // not be identified.
// //
// Object can either be nil or the object doing the typefinding (used for logging). // Object can either be nil or the object doing the typefinding (used for logging).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TypeFindHelperForData(obj *gst.Object, data []byte) (*gst.Caps, gst.TypeFindProbability) { func TypeFindHelperForData(obj *gst.Object, data []byte) (*gst.Caps, gst.TypeFindProbability) {
var prob C.GstTypeFindProbability var prob C.GstTypeFindProbability
var cobj *C.GstObject var cobj *C.GstObject
@@ -110,6 +118,8 @@ func TypeFindHelperForData(obj *gst.Object, data []byte) (*gst.Caps, gst.TypeFin
// which might speed up the typefinding in many cases. // which might speed up the typefinding in many cases.
// //
// Object can either be nil or the object doing the typefinding (used for logging). // Object can either be nil or the object doing the typefinding (used for logging).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TypeFindHelperForDataWithExtension(obj *gst.Object, data []byte, extension string) (*gst.Caps, gst.TypeFindProbability) { func TypeFindHelperForDataWithExtension(obj *gst.Object, data []byte, extension string) (*gst.Caps, gst.TypeFindProbability) {
var prob C.GstTypeFindProbability var prob C.GstTypeFindProbability
var cobj *C.GstObject var cobj *C.GstObject
@@ -135,6 +145,8 @@ func TypeFindHelperForDataWithExtension(obj *gst.Object, data []byte, extension
// that can handle extension will be returned. // that can handle extension will be returned.
// //
// Object can either be nil or the object doing the typefinding (used for logging). // Object can either be nil or the object doing the typefinding (used for logging).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TypeFindHelperForExtension(obj *gst.Object, extension string) *gst.Caps { func TypeFindHelperForExtension(obj *gst.Object, extension string) *gst.Caps {
var cobj *C.GstObject var cobj *C.GstObject
if obj != nil { if obj != nil {

View File

@@ -4,6 +4,8 @@ package base
import "C" import "C"
// gboolean converts a go bool to a C.gboolean. // gboolean converts a go bool to a C.gboolean.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gboolean(b bool) C.gboolean { func gboolean(b bool) C.gboolean {
if b { if b {
return C.gboolean(1) return C.gboolean(1)
@@ -12,6 +14,8 @@ func gboolean(b bool) C.gboolean {
} }
// gobool provides an easy type conversion between C.gboolean and a go bool. // gobool provides an easy type conversion between C.gboolean and a go bool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gobool(b C.gboolean) bool { func gobool(b C.gboolean) bool {
return int(b) > 0 return int(b) > 0
} }

View File

@@ -12,16 +12,22 @@ import (
"github.com/go-gst/go-glib/glib" "github.com/go-gst/go-glib/glib"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func toGObject(data unsafe.Pointer) *glib.Object { func toGObject(data unsafe.Pointer) *glib.Object {
return &glib.Object{GObject: glib.ToGObject(data)} return &glib.Object{GObject: glib.ToGObject(data)}
} }
// gobool provides an easy type conversion between C.gboolean and a go bool. // gobool provides an easy type conversion between C.gboolean and a go bool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gobool(b C.gboolean) bool { func gobool(b C.gboolean) bool {
return int(b) > 0 return int(b) > 0
} }
// gboolean converts a go bool to a C.gboolean. // gboolean converts a go bool to a C.gboolean.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gboolean(b bool) C.gboolean { func gboolean(b bool) C.gboolean {
if b { if b {
return C.gboolean(1) return C.gboolean(1)
@@ -30,6 +36,8 @@ func gboolean(b bool) C.gboolean {
} }
// gdateToTime converts a GDate to a time object. // gdateToTime converts a GDate to a time object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gdateToTime(gdate *C.GDate) time.Time { func gdateToTime(gdate *C.GDate) time.Time {
// should this really be local time? // should this really be local time?
return time.Date(int(C.g_date_get_year(gdate)), time.Month(C.g_date_get_month(gdate)), int(C.g_date_get_day(gdate)), 0, 0, 0, 0, time.Local) return time.Date(int(C.g_date_get_year(gdate)), time.Month(C.g_date_get_month(gdate)), int(C.g_date_get_day(gdate)), 0, 0, 0, 0, time.Local)
@@ -37,6 +45,8 @@ func gdateToTime(gdate *C.GDate) time.Time {
// gstDateTimeToTime converts a GstDateTime to a time object. If the datetime object could not be parsed, // gstDateTimeToTime converts a GstDateTime to a time object. If the datetime object could not be parsed,
// an empty time object is returned. // an empty time object is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gstDateTimeToTime(gstdatetime *C.GstDateTime) time.Time { func gstDateTimeToTime(gstdatetime *C.GstDateTime) time.Time {
dateStr := fmt.Sprintf( dateStr := fmt.Sprintf(
"%s %s %d:%d:%d %s %d", "%s %s %d:%d:%d %s %d",
@@ -52,6 +62,8 @@ func gstDateTimeToTime(gstdatetime *C.GstDateTime) time.Time {
return tm return tm
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func formatOffset(offset C.gfloat) string { func formatOffset(offset C.gfloat) string {
if offset < 0 { if offset < 0 {
return fmt.Sprintf("-0%d00", int(offset)) return fmt.Sprintf("-0%d00", int(offset))
@@ -60,6 +72,8 @@ func formatOffset(offset C.gfloat) string {
} }
// goStrings returns a string slice for an array of size argc starting at the address argv. // goStrings returns a string slice for an array of size argc starting at the address argv.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goStrings(argc C.int, argv **C.gchar) []string { func goStrings(argc C.int, argv **C.gchar) []string {
length := int(argc) length := int(argc)
tmpslice := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.gchar)(nil))]*C.gchar)(unsafe.Pointer(argv))[:length:length] tmpslice := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.gchar)(nil))]*C.gchar)(unsafe.Pointer(argv))[:length:length]
@@ -70,6 +84,8 @@ func goStrings(argc C.int, argv **C.gchar) []string {
return gostrings return gostrings
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func gcharStrings(strs []string) **C.gchar { func gcharStrings(strs []string) **C.gchar {
gcharSlc := make([]*C.gchar, len(strs)) gcharSlc := make([]*C.gchar, len(strs))
for _, s := range strs { for _, s := range strs {
@@ -82,6 +98,8 @@ func gcharStrings(strs []string) **C.gchar {
// newQuarkFromString creates a new GQuark (or returns an existing one) for the given // newQuarkFromString creates a new GQuark (or returns an existing one) for the given
// string // string
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func newQuarkFromString(str string) C.uint { func newQuarkFromString(str string) C.uint {
cstr := C.CString(str) cstr := C.CString(str)
defer C.free(unsafe.Pointer(cstr)) defer C.free(unsafe.Pointer(cstr))
@@ -89,10 +107,14 @@ func newQuarkFromString(str string) C.uint {
return quark return quark
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func quarkToString(q C.GQuark) string { func quarkToString(q C.GQuark) string {
return C.GoString(C.g_quark_to_string(q)) return C.GoString(C.g_quark_to_string(q))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func streamSliceToGlist(streams []*Stream) *C.GList { func streamSliceToGlist(streams []*Stream) *C.GList {
var glist C.GList var glist C.GList
wrapped := glib.WrapList(unsafe.Pointer(&glist)) wrapped := glib.WrapList(unsafe.Pointer(&glist))
@@ -102,6 +124,8 @@ func streamSliceToGlist(streams []*Stream) *C.GList {
return &glist return &glist
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func glistToStreamSlice(glist *C.GList) []*Stream { func glistToStreamSlice(glist *C.GList) []*Stream {
l := glib.WrapList(unsafe.Pointer(&glist)) l := glib.WrapList(unsafe.Pointer(&glist))
out := make([]*Stream, 0) out := make([]*Stream, 0)
@@ -112,6 +136,8 @@ func glistToStreamSlice(glist *C.GList) []*Stream {
return out return out
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func glistToPadTemplateSlice(glist *C.GList) []*PadTemplate { func glistToPadTemplateSlice(glist *C.GList) []*PadTemplate {
l := glib.WrapList(unsafe.Pointer(&glist)) l := glib.WrapList(unsafe.Pointer(&glist))
out := make([]*PadTemplate, 0) out := make([]*PadTemplate, 0)

View File

@@ -17,6 +17,8 @@ import (
) )
//export goElementCallAsync //export goElementCallAsync
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goElementCallAsync(element *C.GstElement, userData C.gpointer) { func goElementCallAsync(element *C.GstElement, userData C.gpointer) {
iface := gopointer.Restore(unsafe.Pointer(userData)) iface := gopointer.Restore(unsafe.Pointer(userData))
f := iface.(func()) f := iface.(func())
@@ -24,6 +26,8 @@ func goElementCallAsync(element *C.GstElement, userData C.gpointer) {
} }
//export goPadStickyEventForEachFunc //export goPadStickyEventForEachFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goPadStickyEventForEachFunc(gpad *C.GstPad, event **C.GstEvent, userData C.gpointer) C.gboolean { func goPadStickyEventForEachFunc(gpad *C.GstPad, event **C.GstEvent, userData C.gpointer) C.gboolean {
cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbIface := gopointer.Restore(unsafe.Pointer(userData))
cbFunc := cbIface.(StickyEventsForEachFunc) cbFunc := cbIface.(StickyEventsForEachFunc)
@@ -33,6 +37,8 @@ func goPadStickyEventForEachFunc(gpad *C.GstPad, event **C.GstEvent, userData C.
} }
//export goPadProbeFunc //export goPadProbeFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goPadProbeFunc(gstPad *C.GstPad, info *C.GstPadProbeInfo, userData C.gpointer) C.GstPadProbeReturn { func goPadProbeFunc(gstPad *C.GstPad, info *C.GstPadProbeInfo, userData C.gpointer) C.GstPadProbeReturn {
cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbIface := gopointer.Restore(unsafe.Pointer(userData))
cbFunc := cbIface.(PadProbeCallback) cbFunc := cbIface.(PadProbeCallback)
@@ -41,6 +47,8 @@ func goPadProbeFunc(gstPad *C.GstPad, info *C.GstPadProbeInfo, userData C.gpoint
} }
//export goPadForwardFunc //export goPadForwardFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goPadForwardFunc(gstPad *C.GstPad, userData C.gpointer) C.gboolean { func goPadForwardFunc(gstPad *C.GstPad, userData C.gpointer) C.gboolean {
cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbIface := gopointer.Restore(unsafe.Pointer(userData))
cbFunc := cbIface.(PadForwardFunc) cbFunc := cbIface.(PadForwardFunc)
@@ -49,6 +57,8 @@ func goPadForwardFunc(gstPad *C.GstPad, userData C.gpointer) C.gboolean {
} }
//export goTagForEachFunc //export goTagForEachFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goTagForEachFunc(tagList *C.GstTagList, tag *C.gchar, userData C.gpointer) { func goTagForEachFunc(tagList *C.GstTagList, tag *C.gchar, userData C.gpointer) {
cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbIface := gopointer.Restore(unsafe.Pointer(userData))
cbFunc := cbIface.(TagListForEachFunc) cbFunc := cbIface.(TagListForEachFunc)
@@ -56,6 +66,8 @@ func goTagForEachFunc(tagList *C.GstTagList, tag *C.gchar, userData C.gpointer)
} }
//export goBufferListForEachCb //export goBufferListForEachCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goBufferListForEachCb(buf **C.GstBuffer, idx C.guint, userData C.gpointer) C.gboolean { func goBufferListForEachCb(buf **C.GstBuffer, idx C.guint, userData C.gpointer) C.gboolean {
cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbIface := gopointer.Restore(unsafe.Pointer(userData))
cbFunc := cbIface.(func(*Buffer, uint) bool) cbFunc := cbIface.(func(*Buffer, uint) bool)
@@ -63,6 +75,8 @@ func goBufferListForEachCb(buf **C.GstBuffer, idx C.guint, userData C.gpointer)
} }
//export goBufferMetaForEachCb //export goBufferMetaForEachCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goBufferMetaForEachCb(buf *C.GstBuffer, meta **C.GstMeta, userData C.gpointer) C.gboolean { func goBufferMetaForEachCb(buf *C.GstBuffer, meta **C.GstMeta, userData C.gpointer) C.gboolean {
cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbIface := gopointer.Restore(unsafe.Pointer(userData))
cbFunc := cbIface.(func(*Meta) bool) cbFunc := cbIface.(func(*Meta) bool)
@@ -70,6 +84,8 @@ func goBufferMetaForEachCb(buf *C.GstBuffer, meta **C.GstMeta, userData C.gpoint
} }
//export structForEachCb //export structForEachCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func structForEachCb(fieldID C.GQuark, val *C.GValue, chPtr C.gpointer) C.gboolean { func structForEachCb(fieldID C.GQuark, val *C.GValue, chPtr C.gpointer) C.gboolean {
ptr := gopointer.Restore(unsafe.Pointer(chPtr)) ptr := gopointer.Restore(unsafe.Pointer(chPtr))
resCh := ptr.(chan interface{}) resCh := ptr.(chan interface{})
@@ -91,6 +107,8 @@ func structForEachCb(fieldID C.GQuark, val *C.GValue, chPtr C.gpointer) C.gboole
} }
//export goBusSyncHandler //export goBusSyncHandler
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goBusSyncHandler(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.GstBusSyncReply { func goBusSyncHandler(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.GstBusSyncReply {
// wrap the message // wrap the message
msg := wrapMessage(cMsg) msg := wrapMessage(cMsg)
@@ -108,6 +126,8 @@ func goBusSyncHandler(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.
} }
//export goBusFunc //export goBusFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goBusFunc(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.gboolean { func goBusFunc(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.gboolean {
// wrap the message // wrap the message
msg := wrapMessage(cMsg) msg := wrapMessage(cMsg)
@@ -128,6 +148,8 @@ func goBusFunc(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.gboolea
return gboolean(true) return gboolean(true)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getMetaInfoCbFuncs(meta *C.GstMeta) *MetaInfoCallbackFuncs { func getMetaInfoCbFuncs(meta *C.GstMeta) *MetaInfoCallbackFuncs {
gapi := glib.Type(meta.info.api) gapi := glib.Type(meta.info.api)
gtype := glib.Type(meta.info._type) gtype := glib.Type(meta.info._type)
@@ -139,6 +161,8 @@ func getMetaInfoCbFuncs(meta *C.GstMeta) *MetaInfoCallbackFuncs {
} }
//export goMetaFreeFunc //export goMetaFreeFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goMetaFreeFunc(meta *C.GstMeta, buf *C.GstBuffer) { func goMetaFreeFunc(meta *C.GstMeta, buf *C.GstBuffer) {
cbFuncs := getMetaInfoCbFuncs(meta) cbFuncs := getMetaInfoCbFuncs(meta)
if cbFuncs != nil && cbFuncs.FreeFunc != nil { if cbFuncs != nil && cbFuncs.FreeFunc != nil {
@@ -147,6 +171,8 @@ func goMetaFreeFunc(meta *C.GstMeta, buf *C.GstBuffer) {
} }
//export goMetaInitFunc //export goMetaInitFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goMetaInitFunc(meta *C.GstMeta, params C.gpointer, buf *C.GstBuffer) C.gboolean { func goMetaInitFunc(meta *C.GstMeta, params C.gpointer, buf *C.GstBuffer) C.gboolean {
cbFuncs := getMetaInfoCbFuncs(meta) cbFuncs := getMetaInfoCbFuncs(meta)
if cbFuncs != nil && cbFuncs.InitFunc != nil { if cbFuncs != nil && cbFuncs.InitFunc != nil {
@@ -158,6 +184,8 @@ func goMetaInitFunc(meta *C.GstMeta, params C.gpointer, buf *C.GstBuffer) C.gboo
} }
//export goMetaTransformFunc //export goMetaTransformFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goMetaTransformFunc(transBuf *C.GstBuffer, meta *C.GstMeta, buffer *C.GstBuffer, mType C.GQuark, data C.gpointer) C.gboolean { func goMetaTransformFunc(transBuf *C.GstBuffer, meta *C.GstMeta, buffer *C.GstBuffer, mType C.GQuark, data C.gpointer) C.gboolean {
cbFuncs := getMetaInfoCbFuncs(meta) cbFuncs := getMetaInfoCbFuncs(meta)
if cbFuncs != nil && cbFuncs.TransformFunc != nil { if cbFuncs != nil && cbFuncs.TransformFunc != nil {
@@ -177,6 +205,8 @@ func goMetaTransformFunc(transBuf *C.GstBuffer, meta *C.GstMeta, buffer *C.GstBu
} }
//export goGDestroyNotifyFunc //export goGDestroyNotifyFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGDestroyNotifyFunc(ptr C.gpointer) { func goGDestroyNotifyFunc(ptr C.gpointer) {
funcIface := gopointer.Restore(unsafe.Pointer(ptr)) funcIface := gopointer.Restore(unsafe.Pointer(ptr))
defer gopointer.Unref(unsafe.Pointer(ptr)) defer gopointer.Unref(unsafe.Pointer(ptr))
@@ -187,6 +217,8 @@ func goGDestroyNotifyFunc(ptr C.gpointer) {
} }
//export goGDestroyNotifyFuncNoRun //export goGDestroyNotifyFuncNoRun
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGDestroyNotifyFuncNoRun(ptr C.gpointer) { func goGDestroyNotifyFuncNoRun(ptr C.gpointer) {
gopointer.Unref(unsafe.Pointer(ptr)) gopointer.Unref(unsafe.Pointer(ptr))
@@ -194,6 +226,8 @@ func goGDestroyNotifyFuncNoRun(ptr C.gpointer) {
} }
//export goCapsMapFunc //export goCapsMapFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goCapsMapFunc(features *C.GstCapsFeatures, structure *C.GstStructure, userData C.gpointer) C.gboolean { func goCapsMapFunc(features *C.GstCapsFeatures, structure *C.GstStructure, userData C.gpointer) C.gboolean {
// retrieve the ptr to the function // retrieve the ptr to the function
ptr := unsafe.Pointer(userData) ptr := unsafe.Pointer(userData)
@@ -208,6 +242,8 @@ func goCapsMapFunc(features *C.GstCapsFeatures, structure *C.GstStructure, userD
} }
//export goClockCb //export goClockCb
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goClockCb(gclock *C.GstClock, clockTime C.GstClockTime, clockID C.GstClockID, userData C.gpointer) C.gboolean { func goClockCb(gclock *C.GstClock, clockTime C.GstClockTime, clockID C.GstClockID, userData C.gpointer) C.gboolean {
// retrieve the ptr to the function // retrieve the ptr to the function
ptr := unsafe.Pointer(userData) ptr := unsafe.Pointer(userData)
@@ -223,6 +259,8 @@ func goClockCb(gclock *C.GstClock, clockTime C.GstClockTime, clockID C.GstClockI
} }
//export goPluginInit //export goPluginInit
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goPluginInit(plugin *C.GstPlugin, userData C.gpointer) C.gboolean { func goPluginInit(plugin *C.GstPlugin, userData C.gpointer) C.gboolean {
ptr := unsafe.Pointer(userData) ptr := unsafe.Pointer(userData)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -235,11 +273,15 @@ func goPluginInit(plugin *C.GstPlugin, userData C.gpointer) C.gboolean {
} }
//export goGlobalPluginInit //export goGlobalPluginInit
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGlobalPluginInit(plugin *C.GstPlugin) C.gboolean { func goGlobalPluginInit(plugin *C.GstPlugin) C.gboolean {
return gboolean(globalPluginInit(wrapPlugin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(plugin))}))) return gboolean(globalPluginInit(wrapPlugin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(plugin))})))
} }
//export goLogFunction //export goLogFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goLogFunction( func goLogFunction(
category *C.GstDebugCategory, category *C.GstDebugCategory,
level C.GstDebugLevel, level C.GstDebugLevel,
@@ -274,6 +316,8 @@ func goLogFunction(
// goUnrefGopointerUserData is a GDestroyNotify used to unref the gopointer from the userdata, used for callback functions // goUnrefGopointerUserData is a GDestroyNotify used to unref the gopointer from the userdata, used for callback functions
// //
//export goUnrefGopointerUserData //export goUnrefGopointerUserData
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goUnrefGopointerUserData(fPtr C.gpointer) { func goUnrefGopointerUserData(fPtr C.gpointer) {
gopointer.Unref(unsafe.Pointer(fPtr)) gopointer.Unref(unsafe.Pointer(fPtr))
} }
@@ -281,6 +325,8 @@ func goUnrefGopointerUserData(fPtr C.gpointer) {
// goPromiseChangeFunc is the function the GstPromise calls when it changes state // goPromiseChangeFunc is the function the GstPromise calls when it changes state
// //
//export goPromiseChangeFunc //export goPromiseChangeFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goPromiseChangeFunc(_ *C.GstPromise, fPtr C.gpointer) { func goPromiseChangeFunc(_ *C.GstPromise, fPtr C.gpointer) {
f := gopointer.Restore(unsafe.Pointer(fPtr)).(func()) f := gopointer.Restore(unsafe.Pointer(fPtr)).(func())

View File

@@ -39,6 +39,8 @@ const (
type ClockTimeDiff int64 type ClockTimeDiff int64
// convinience function to convert the diff to a time.Duration // convinience function to convert the diff to a time.Duration
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (ctd ClockTimeDiff) AsDuration() time.Duration { func (ctd ClockTimeDiff) AsDuration() time.Duration {
return time.Duration(ctd) return time.Duration(ctd)
} }
@@ -153,6 +155,8 @@ const (
) )
// String implements a stringer on a BufferingMode. // String implements a stringer on a BufferingMode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b BufferingMode) String() string { func (b BufferingMode) String() string {
switch b { switch b {
case BufferingStream: case BufferingStream:
@@ -222,6 +226,8 @@ const (
) )
// String implements a stringer on event types // String implements a stringer on event types
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e EventType) String() string { return C.GoString(C.gst_event_type_get_name(C.GstEventType(e))) } func (e EventType) String() string { return C.GoString(C.gst_event_type_get_name(C.GstEventType(e))) }
// EventTypeFlags casts GstEventTypeFlags // EventTypeFlags casts GstEventTypeFlags
@@ -266,6 +272,8 @@ const (
) )
// String implements a stringer on GstFormat types // String implements a stringer on GstFormat types
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f Format) String() string { func (f Format) String() string {
switch f { switch f {
case FormatUndefined: case FormatUndefined:
@@ -333,6 +341,8 @@ const (
) )
// String implements a stringer on MessageTypes // String implements a stringer on MessageTypes
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m MessageType) String() string { func (m MessageType) String() string {
return C.GoString(C.gst_message_type_get_name((C.GstMessageType)(m))) return C.GoString(C.gst_message_type_get_name((C.GstMessageType)(m)))
} }
@@ -382,6 +392,8 @@ const (
) )
// String implements a stringer on PadMode // String implements a stringer on PadMode
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p PadMode) String() string { func (p PadMode) String() string {
return C.GoString(C.gst_pad_mode_get_name(C.GstPadMode(p))) return C.GoString(C.gst_pad_mode_get_name(C.GstPadMode(p)))
} }
@@ -397,6 +409,8 @@ const (
) )
// String implements a Stringer on PadDirection. // String implements a Stringer on PadDirection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p PadDirection) String() string { func (p PadDirection) String() string {
switch p { switch p {
case PadDirectionUnknown: case PadDirectionUnknown:
@@ -424,6 +438,8 @@ const (
) )
// String implemeents a stringer on PadLinkReturn // String implemeents a stringer on PadLinkReturn
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p PadLinkReturn) String() string { func (p PadLinkReturn) String() string {
return C.GoString(C.gst_pad_link_get_name(C.GstPadLinkReturn(p))) return C.GoString(C.gst_pad_link_get_name(C.GstPadLinkReturn(p)))
} }
@@ -439,6 +455,8 @@ const (
) )
// String implements a stringer on PadPresence. // String implements a stringer on PadPresence.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p PadPresence) String() string { func (p PadPresence) String() string {
switch p { switch p {
case PadPresenceAlways: case PadPresenceAlways:
@@ -525,6 +543,8 @@ const (
) )
// String returns the string representation of this state. // String returns the string representation of this state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s State) String() string { func (s State) String() string {
return C.GoString(C.gst_element_state_get_name((C.GstState)(s))) return C.GoString(C.gst_element_state_get_name((C.GstState)(s)))
} }
@@ -577,6 +597,8 @@ const (
) )
// String returns the string representation of a StateChange // String returns the string representation of a StateChange
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s StateChange) String() string { func (s StateChange) String() string {
return C.GoString(C.gst_state_change_get_name(C.GstStateChange(s))) return C.GoString(C.gst_state_change_get_name(C.GstStateChange(s)))
} }
@@ -592,6 +614,8 @@ const (
StateChangeNoPreroll StateChangeReturn = C.GST_STATE_CHANGE_NO_PREROLL StateChangeNoPreroll StateChangeReturn = C.GST_STATE_CHANGE_NO_PREROLL
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s StateChangeReturn) String() string { func (s StateChangeReturn) String() string {
return C.GoString(C.gst_element_state_change_return_get_name(C.GstStateChangeReturn(s))) return C.GoString(C.gst_element_state_change_return_get_name(C.GstStateChangeReturn(s)))
} }
@@ -636,6 +660,8 @@ const (
) )
// String impelements a stringer on FlowReturn // String impelements a stringer on FlowReturn
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (f FlowReturn) String() string { func (f FlowReturn) String() string {
return C.GoString(C.gst_flow_get_name(C.GstFlowReturn(f))) return C.GoString(C.gst_flow_get_name(C.GstFlowReturn(f)))
} }
@@ -664,6 +690,8 @@ const (
StreamStatusStop StreamStatusType = C.GST_STREAM_STATUS_TYPE_STOP // (10) a thread is stopped StreamStatusStop StreamStatusType = C.GST_STREAM_STATUS_TYPE_STOP // (10) a thread is stopped
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s StreamStatusType) String() string { func (s StreamStatusType) String() string {
switch s { switch s {
case StreamStatusCreate: case StreamStatusCreate:
@@ -694,6 +722,8 @@ const (
) )
// String implements a stringer on StructureChangeTypes. // String implements a stringer on StructureChangeTypes.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s StructureChangeType) String() string { func (s StructureChangeType) String() string {
switch s { switch s {
case StructureChangePadLink: case StructureChangePadLink:
@@ -717,6 +747,8 @@ const (
) )
// String implements a stringer on ProgressTypes // String implements a stringer on ProgressTypes
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p ProgressType) String() string { func (p ProgressType) String() string {
switch p { switch p {
case ProgressTypeStart: case ProgressTypeStart:
@@ -746,6 +778,8 @@ const (
) )
// String implements a stringer on StreamTypes. // String implements a stringer on StreamTypes.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s StreamType) String() string { func (s StreamType) String() string {
name := C.gst_stream_type_get_name((C.GstStreamType)(s)) name := C.gst_stream_type_get_name((C.GstStreamType)(s))
defer C.free(unsafe.Pointer(name)) defer C.free(unsafe.Pointer(name))
@@ -787,6 +821,8 @@ const (
URISource URIType = C.GST_URI_SRC // (2) - The URI is a producer. URISource URIType = C.GST_URI_SRC // (2) - The URI is a producer.
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (u URIType) String() string { func (u URIType) String() string {
switch u { switch u {
case URIUnknown: case URIUnknown:
@@ -838,6 +874,8 @@ const (
QueryBitrate QueryType = C.GST_QUERY_BITRATE // (51202) the bitrate query (since 1.16) QueryBitrate QueryType = C.GST_QUERY_BITRATE // (51202) the bitrate query (since 1.16)
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q QueryType) String() string { return C.GoString(C.gst_query_type_get_name(C.GstQueryType(q))) } func (q QueryType) String() string { return C.GoString(C.gst_query_type_get_name(C.GstQueryType(q))) }
// QueryTypeFlags casts GstQueryTypeFlags // QueryTypeFlags casts GstQueryTypeFlags
@@ -874,6 +912,8 @@ const (
) )
// String implements a stringer on a TOCScope // String implements a stringer on a TOCScope
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t TOCScope) String() string { func (t TOCScope) String() string {
switch t { switch t {
case TOCScopeGlobal: case TOCScopeGlobal:

View File

@@ -10,12 +10,16 @@ import (
type ControlBinding struct{ *Object } type ControlBinding struct{ *Object }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (cb *ControlBinding) Instance() *C.GstControlBinding { func (cb *ControlBinding) Instance() *C.GstControlBinding {
return C.toGstControlBinding(cb.Unsafe()) return C.toGstControlBinding(cb.Unsafe())
} }
type DirectControlBinding struct{ *ControlBinding } type DirectControlBinding struct{ *ControlBinding }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDirectControlBinding(obj *Object, prop string, csource *InterpolationControlSource) *DirectControlBinding { func NewDirectControlBinding(obj *Object, prop string, csource *InterpolationControlSource) *DirectControlBinding {
cprop := C.CString(prop) cprop := C.CString(prop)
defer C.free(unsafe.Pointer(cprop)) defer C.free(unsafe.Pointer(cprop))

View File

@@ -24,10 +24,14 @@ const (
InterpolationModeCubicMonotonic InterpolationMode = 3 // GST_INTERPOLATION_MODE_CUBIC_MONOTONIC InterpolationModeCubicMonotonic InterpolationMode = 3 // GST_INTERPOLATION_MODE_CUBIC_MONOTONIC
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (cs *InterpolationControlSource) Instance() *C.GstControlSource { func (cs *InterpolationControlSource) Instance() *C.GstControlSource {
return C.toGstControlSource(cs.Unsafe()) return C.toGstControlSource(cs.Unsafe())
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewInterpolationControlSource() *InterpolationControlSource { func NewInterpolationControlSource() *InterpolationControlSource {
cCs := C.gst_interpolation_control_source_new() cCs := C.gst_interpolation_control_source_new()
@@ -36,14 +40,20 @@ func NewInterpolationControlSource() *InterpolationControlSource {
} }
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (cs *InterpolationControlSource) SetInterpolationMode(mode InterpolationMode) { func (cs *InterpolationControlSource) SetInterpolationMode(mode InterpolationMode) {
cs.SetArg("mode", strconv.Itoa(int(mode))) cs.SetArg("mode", strconv.Itoa(int(mode)))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (cs *InterpolationControlSource) SetTimedValue(time ClockTime, value float64) bool { func (cs *InterpolationControlSource) SetTimedValue(time ClockTime, value float64) bool {
return gobool(C.gst_timed_value_control_source_set(C.toGstTimedValueControlSource(cs.Unsafe()), C.GstClockTime(time), C.double(value))) return gobool(C.gst_timed_value_control_source_set(C.toGstTimedValueControlSource(cs.Unsafe()), C.GstClockTime(time), C.double(value)))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (cs *InterpolationControlSource) UnsetAll() { func (cs *InterpolationControlSource) UnsetAll() {
C.gst_timed_value_control_source_unset_all(C.toGstTimedValueControlSource(cs.Unsafe())) C.gst_timed_value_control_source_unset_all(C.toGstTimedValueControlSource(cs.Unsafe()))
} }

12
gst/deprecate.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
find . -type f -name "*.go" ! -name "*_deprecation.go" | while read file; do
awk '
/^[^ \t]/ { # Only consider global (non-indented) lines
if ($1 == "func" || ($1 == "type" && ($3 == "struct" || $3 == "interface"))) {
print "//\n// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead."
}
}
{ print }
' "$file" >"$file.tmp" && mv "$file.tmp" "$file"
done

2
gst/deprecated.go Normal file
View File

@@ -0,0 +1,2 @@
// Description: This package is superseeded by the autogenerated bindings.
package gst

View File

@@ -1,10 +0,0 @@
module github.com/go-gst/go-gst/gst
go 1.23.4
require (
github.com/go-gst/go-glib v1.4.1-0.20241218143927-ca07c1459298
github.com/go-gst/go-pointer v0.0.0-20241127163939-ba766f075b4c
)
require golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect

View File

@@ -1,6 +0,0 @@
github.com/go-gst/go-glib v1.4.1-0.20241218143927-ca07c1459298 h1:TFtT/wzJA0BQ2/LblfbPLl1GVzZ1h0sJ77AvGFHvZ+c=
github.com/go-gst/go-glib v1.4.1-0.20241218143927-ca07c1459298/go.mod h1:ZWT4LXOO2PH8lSNu/dR5O2yoNQJKEgmijNa2d7nByK8=
github.com/go-gst/go-pointer v0.0.0-20241127163939-ba766f075b4c h1:x8kKRVDmz5BRlolmDZGcsuZ1l+js6TRL3QWBJjGVctM=
github.com/go-gst/go-pointer v0.0.0-20241127163939-ba766f075b4c/go.mod h1:qKw5ZZ0U58W6PU/7F/Lopv+14nKYmdXlOd7VnAZ17Mk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=

View File

@@ -11,17 +11,23 @@ import (
) )
// AllocationParams wraps the GstAllocationParams. // AllocationParams wraps the GstAllocationParams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type AllocationParams struct { type AllocationParams struct {
ptr *C.GstAllocationParams ptr *C.GstAllocationParams
} }
// FromGstAllocationParamsUnsafe wraps the given unsafe.Pointer in an AllocationParams instance. // FromGstAllocationParamsUnsafe wraps the given unsafe.Pointer in an AllocationParams instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstAllocationParamsUnsafe(alloc unsafe.Pointer) *AllocationParams { func FromGstAllocationParamsUnsafe(alloc unsafe.Pointer) *AllocationParams {
return &AllocationParams{ptr: (*C.GstAllocationParams)(alloc)} return &AllocationParams{ptr: (*C.GstAllocationParams)(alloc)}
} }
// NewAllocationParams initializes a set of allocation params with the default // NewAllocationParams initializes a set of allocation params with the default
// values. // values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAllocationParams() *AllocationParams { func NewAllocationParams() *AllocationParams {
params := &AllocationParams{ params := &AllocationParams{
ptr: &C.GstAllocationParams{}, ptr: &C.GstAllocationParams{},
@@ -32,65 +38,99 @@ func NewAllocationParams() *AllocationParams {
} }
// Instance returns the underlying GstAllocationParams. // Instance returns the underlying GstAllocationParams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) Instance() *C.GstAllocationParams { return a.ptr } func (a *AllocationParams) Instance() *C.GstAllocationParams { return a.ptr }
// Init initializes these AllocationParams to their original values. // Init initializes these AllocationParams to their original values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) Init() { C.gst_allocation_params_init(a.ptr) } func (a *AllocationParams) Init() { C.gst_allocation_params_init(a.ptr) }
// Copy copies these AllocationParams. // Copy copies these AllocationParams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) Copy() *AllocationParams { func (a *AllocationParams) Copy() *AllocationParams {
return wrapAllocationParams(C.gst_allocation_params_copy(a.ptr)) return wrapAllocationParams(C.gst_allocation_params_copy(a.ptr))
} }
// Free frees the underlying AllocationParams // Free frees the underlying AllocationParams
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) Free() { C.gst_allocation_params_free(a.ptr) } func (a *AllocationParams) Free() { C.gst_allocation_params_free(a.ptr) }
// GetFlags returns the flags on these AllocationParams. // GetFlags returns the flags on these AllocationParams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) GetFlags() MemoryFlags { return MemoryFlags(a.ptr.flags) } func (a *AllocationParams) GetFlags() MemoryFlags { return MemoryFlags(a.ptr.flags) }
// SetFlags changes the flags on these AllocationParams. this must be used // SetFlags changes the flags on these AllocationParams. this must be used
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) SetFlags(flags MemoryFlags) { a.ptr.flags = C.GstMemoryFlags(flags) } func (a *AllocationParams) SetFlags(flags MemoryFlags) { a.ptr.flags = C.GstMemoryFlags(flags) }
// GetAlignment returns the desired alignment of the memory. // GetAlignment returns the desired alignment of the memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) GetAlignment() int64 { return int64(a.ptr.align) } func (a *AllocationParams) GetAlignment() int64 { return int64(a.ptr.align) }
// SetAlignment sets the desired alignment of the memory. // SetAlignment sets the desired alignment of the memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) SetAlignment(align int64) { a.ptr.align = C.gsize(align) } func (a *AllocationParams) SetAlignment(align int64) { a.ptr.align = C.gsize(align) }
// GetPrefix returns the desired prefix size. // GetPrefix returns the desired prefix size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) GetPrefix() int64 { return int64(a.ptr.prefix) } func (a *AllocationParams) GetPrefix() int64 { return int64(a.ptr.prefix) }
// SetPrefix sets the desired prefix size. // SetPrefix sets the desired prefix size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) SetPrefix(prefix int64) { a.ptr.prefix = C.gsize(prefix) } func (a *AllocationParams) SetPrefix(prefix int64) { a.ptr.prefix = C.gsize(prefix) }
// GetPadding returns the desired padding size. // GetPadding returns the desired padding size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) GetPadding() int64 { return int64(a.ptr.padding) } func (a *AllocationParams) GetPadding() int64 { return int64(a.ptr.padding) }
// SetPadding sets the desired padding size. // SetPadding sets the desired padding size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *AllocationParams) SetPadding(padding int64) { a.ptr.padding = C.gsize(padding) } func (a *AllocationParams) SetPadding(padding int64) { a.ptr.padding = C.gsize(padding) }
// Allocator is a go representation of a GstAllocator // Allocator is a go representation of a GstAllocator
type Allocator struct{ *Object } type Allocator struct{ *Object }
// FromGstAllocatorUnsafeNone wraps the given unsafe.Pointer in an Allocator instance. // FromGstAllocatorUnsafeNone wraps the given unsafe.Pointer in an Allocator instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstAllocatorUnsafeNone(alloc unsafe.Pointer) *Allocator { func FromGstAllocatorUnsafeNone(alloc unsafe.Pointer) *Allocator {
return wrapAllocator(glib.TransferNone(alloc)) return wrapAllocator(glib.TransferNone(alloc))
} }
// FromGstAllocatorUnsafeFull wraps the given unsafe.Pointer in an Allocator instance. // FromGstAllocatorUnsafeFull wraps the given unsafe.Pointer in an Allocator instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstAllocatorUnsafeFull(alloc unsafe.Pointer) *Allocator { func FromGstAllocatorUnsafeFull(alloc unsafe.Pointer) *Allocator {
return wrapAllocator(glib.TransferFull(alloc)) return wrapAllocator(glib.TransferFull(alloc))
} }
// DefaultAllocator returns the default GstAllocator. // DefaultAllocator returns the default GstAllocator.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func DefaultAllocator() *Allocator { func DefaultAllocator() *Allocator {
return wrapAllocator(glib.TransferFull(unsafe.Pointer(C.gst_allocator_find(nil)))) return wrapAllocator(glib.TransferFull(unsafe.Pointer(C.gst_allocator_find(nil))))
} }
// Instance returns the underlying GstAllocator instance. // Instance returns the underlying GstAllocator instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Allocator) Instance() *C.GstAllocator { return C.toGstAllocator(a.Unsafe()) } func (a *Allocator) Instance() *C.GstAllocator { return C.toGstAllocator(a.Unsafe()) }
// MemType returns the memory type for this allocator. // MemType returns the memory type for this allocator.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Allocator) MemType() string { return C.GoString(a.Instance().mem_type) } func (a *Allocator) MemType() string { return C.GoString(a.Instance().mem_type) }
// Alloc is used to allocate a new memory block with memory that is at least size big. // Alloc is used to allocate a new memory block with memory that is at least size big.
@@ -102,12 +142,16 @@ func (a *Allocator) MemType() string { return C.GoString(a.Instance().mem_type)
// //
// The alignment in params is given as a bitmask so that align + 1 equals the amount of bytes to // The alignment in params is given as a bitmask so that align + 1 equals the amount of bytes to
// align to. For example, to align to 8 bytes, use an alignment of 7. // align to. For example, to align to 8 bytes, use an alignment of 7.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Allocator) Alloc(size int64, params *AllocationParams) *Memory { func (a *Allocator) Alloc(size int64, params *AllocationParams) *Memory {
mem := C.gst_allocator_alloc(a.Instance(), C.gsize(size), params.ptr) mem := C.gst_allocator_alloc(a.Instance(), C.gsize(size), params.ptr)
return FromGstMemoryUnsafeFull(unsafe.Pointer(mem)) return FromGstMemoryUnsafeFull(unsafe.Pointer(mem))
} }
// Free memory that was originally allocated with this allocator. // Free memory that was originally allocated with this allocator.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (a *Allocator) Free(mem *Memory) { func (a *Allocator) Free(mem *Memory) {
C.gst_allocator_free(a.Instance(), mem.Instance()) C.gst_allocator_free(a.Instance(), mem.Instance())
} }

View File

@@ -82,6 +82,8 @@ import (
type Bin struct{ *Element } type Bin struct{ *Element }
// NewBin returns a new Bin with the given name. // NewBin returns a new Bin with the given name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBin(name string) *Bin { func NewBin(name string) *Bin {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -92,6 +94,8 @@ func NewBin(name string) *Bin {
// NewBinFromString constructs a bin from a string description. // NewBinFromString constructs a bin from a string description.
// description - command line describing the bin // description - command line describing the bin
// ghostUnlinkedPads - whether to automatically create ghost pads for unlinked source or sink pads within the bin // ghostUnlinkedPads - whether to automatically create ghost pads for unlinked source or sink pads within the bin
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBinFromString(description string, ghostUnlinkedPads bool) (*Bin, error) { func NewBinFromString(description string, ghostUnlinkedPads bool) (*Bin, error) {
cDescription := C.CString(description) cDescription := C.CString(description)
defer C.free(unsafe.Pointer(cDescription)) defer C.free(unsafe.Pointer(cDescription))
@@ -107,6 +111,8 @@ func NewBinFromString(description string, ghostUnlinkedPads bool) (*Bin, error)
// ToGstBin wraps the given glib.Object, gst.Object, or gst.Element in a Bin instance. Only // ToGstBin wraps the given glib.Object, gst.Object, or gst.Element in a Bin instance. Only
// works for objects that implement their own Bin. // works for objects that implement their own Bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstBin(obj interface{}) *Bin { func ToGstBin(obj interface{}) *Bin {
switch obj := obj.(type) { switch obj := obj.(type) {
case *Object: case *Object:
@@ -120,9 +126,13 @@ func ToGstBin(obj interface{}) *Bin {
} }
// Instance returns the underlying GstBin instance. // Instance returns the underlying GstBin instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) Instance() *C.GstBin { return C.toGstBin(b.Unsafe()) } func (b *Bin) Instance() *C.GstBin { return C.toGstBin(b.Unsafe()) }
// GetElementByName returns the element with the given name. // GetElementByName returns the element with the given name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetElementByName(name string) (*Element, error) { func (b *Bin) GetElementByName(name string) (*Element, error) {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -135,6 +145,8 @@ func (b *Bin) GetElementByName(name string) (*Element, error) {
// GetElementByNameRecursive returns the element with the given name. If it is not // GetElementByNameRecursive returns the element with the given name. If it is not
// found in this Bin, parent Bins are searched recursively. // found in this Bin, parent Bins are searched recursively.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetElementByNameRecursive(name string) (*Element, error) { func (b *Bin) GetElementByNameRecursive(name string) (*Element, error) {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -146,6 +158,8 @@ func (b *Bin) GetElementByNameRecursive(name string) (*Element, error) {
} }
// GetElements returns a list of the elements added to this pipeline. // GetElements returns a list of the elements added to this pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetElements() ([]*Element, error) { func (b *Bin) GetElements() ([]*Element, error) {
iterator := C.gst_bin_iterate_elements((*C.GstBin)(b.Instance())) iterator := C.gst_bin_iterate_elements((*C.GstBin)(b.Instance()))
return iteratorToElementSlice(iterator) return iteratorToElementSlice(iterator)
@@ -153,18 +167,24 @@ func (b *Bin) GetElements() ([]*Element, error) {
// GetElementsRecursive returns a list of the elements added to this Bin. It recurses // GetElementsRecursive returns a list of the elements added to this Bin. It recurses
// children Bins. // children Bins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetElementsRecursive() ([]*Element, error) { func (b *Bin) GetElementsRecursive() ([]*Element, error) {
iterator := C.gst_bin_iterate_recurse((*C.GstBin)(b.Instance())) iterator := C.gst_bin_iterate_recurse((*C.GstBin)(b.Instance()))
return iteratorToElementSlice(iterator) return iteratorToElementSlice(iterator)
} }
// GetSourceElements returns a list of all the source elements in this Bin. // GetSourceElements returns a list of all the source elements in this Bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetSourceElements() ([]*Element, error) { func (b *Bin) GetSourceElements() ([]*Element, error) {
iterator := C.gst_bin_iterate_sources((*C.GstBin)(b.Instance())) iterator := C.gst_bin_iterate_sources((*C.GstBin)(b.Instance()))
return iteratorToElementSlice(iterator) return iteratorToElementSlice(iterator)
} }
// GetSinkElements returns a list of all the sink elements in this Bin. // GetSinkElements returns a list of all the sink elements in this Bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetSinkElements() ([]*Element, error) { func (b *Bin) GetSinkElements() ([]*Element, error) {
iterator := C.gst_bin_iterate_sinks((*C.GstBin)(b.Instance())) iterator := C.gst_bin_iterate_sinks((*C.GstBin)(b.Instance()))
return iteratorToElementSlice(iterator) return iteratorToElementSlice(iterator)
@@ -172,6 +192,8 @@ func (b *Bin) GetSinkElements() ([]*Element, error) {
// GetElementsSorted returns a list of the elements in this bin in topologically sorted order. // GetElementsSorted returns a list of the elements in this bin in topologically sorted order.
// This means that the elements are returned from the most downstream elements (sinks) to the sources. // This means that the elements are returned from the most downstream elements (sinks) to the sources.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetElementsSorted() ([]*Element, error) { func (b *Bin) GetElementsSorted() ([]*Element, error) {
iterator := C.gst_bin_iterate_sorted((*C.GstBin)(b.Instance())) iterator := C.gst_bin_iterate_sorted((*C.GstBin)(b.Instance()))
return iteratorToElementSlice(iterator) return iteratorToElementSlice(iterator)
@@ -181,6 +203,8 @@ func (b *Bin) GetElementsSorted() ([]*Element, error) {
// element is found, it returns the element. You can cast this element to the given interface afterwards. // element is found, it returns the element. You can cast this element to the given interface afterwards.
// If you want all elements that implement the interface, use GetAllByInterface. This function recurses // If you want all elements that implement the interface, use GetAllByInterface. This function recurses
// into child bins. // into child bins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetByInterface(iface glib.Interface) (*Element, error) { func (b *Bin) GetByInterface(iface glib.Interface) (*Element, error) {
elem := C.gst_bin_get_by_interface(b.Instance(), C.GType(iface.Type())) elem := C.gst_bin_get_by_interface(b.Instance(), C.GType(iface.Type()))
if elem == nil { if elem == nil {
@@ -191,6 +215,8 @@ func (b *Bin) GetByInterface(iface glib.Interface) (*Element, error) {
// GetAllByInterface looks for all elements inside the bin that implements the given interface. You can // GetAllByInterface looks for all elements inside the bin that implements the given interface. You can
// safely cast all returned elements to the given interface. The function recurses inside child bins. // safely cast all returned elements to the given interface. The function recurses inside child bins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetAllByInterface(iface glib.Interface) ([]*Element, error) { func (b *Bin) GetAllByInterface(iface glib.Interface) ([]*Element, error) {
iterator := C.gst_bin_iterate_all_by_interface(b.Instance(), C.GType(iface.Type())) iterator := C.gst_bin_iterate_all_by_interface(b.Instance(), C.GType(iface.Type()))
return iteratorToElementSlice(iterator) return iteratorToElementSlice(iterator)
@@ -206,6 +232,8 @@ func (b *Bin) GetAllByInterface(iface glib.Interface) ([]*Element, error) {
// } // }
// Add adds an element to the bin. // Add adds an element to the bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) Add(elem *Element) error { func (b *Bin) Add(elem *Element) error {
if ok := C.gst_bin_add((*C.GstBin)(b.Instance()), (*C.GstElement)(elem.Instance())); !gobool(ok) { if ok := C.gst_bin_add((*C.GstBin)(b.Instance()), (*C.GstElement)(elem.Instance())); !gobool(ok) {
return fmt.Errorf("failed to add element to pipeline: %s", elem.GetName()) return fmt.Errorf("failed to add element to pipeline: %s", elem.GetName())
@@ -214,6 +242,8 @@ func (b *Bin) Add(elem *Element) error {
} }
// AddMany is a go implementation of `gst_bin_add_many`. // AddMany is a go implementation of `gst_bin_add_many`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) AddMany(elems ...*Element) error { func (b *Bin) AddMany(elems ...*Element) error {
for _, elem := range elems { for _, elem := range elems {
if err := b.Add(elem); err != nil { if err := b.Add(elem); err != nil {
@@ -224,6 +254,8 @@ func (b *Bin) AddMany(elems ...*Element) error {
} }
// Remove removes an element from the Bin. // Remove removes an element from the Bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) Remove(elem *Element) error { func (b *Bin) Remove(elem *Element) error {
if ok := C.gst_bin_remove((*C.GstBin)(b.Instance()), (*C.GstElement)(elem.Instance())); !gobool(ok) { if ok := C.gst_bin_remove((*C.GstBin)(b.Instance()), (*C.GstElement)(elem.Instance())); !gobool(ok) {
return fmt.Errorf("failed to remove element from pipeline: %s", elem.GetName()) return fmt.Errorf("failed to remove element from pipeline: %s", elem.GetName())
@@ -232,6 +264,8 @@ func (b *Bin) Remove(elem *Element) error {
} }
// RemoveMany is a go implementation of `gst_bin_remove_many`. // RemoveMany is a go implementation of `gst_bin_remove_many`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) RemoveMany(elems ...*Element) error { func (b *Bin) RemoveMany(elems ...*Element) error {
for _, elem := range elems { for _, elem := range elems {
if err := b.Remove(elem); err != nil { if err := b.Remove(elem); err != nil {
@@ -243,6 +277,8 @@ func (b *Bin) RemoveMany(elems ...*Element) error {
// FindUnlinkedPad recursively looks for elements with an unlinked pad of the given direction // FindUnlinkedPad recursively looks for elements with an unlinked pad of the given direction
// within this bin and returns an unlinked pad if one is found, or NULL otherwise. // within this bin and returns an unlinked pad if one is found, or NULL otherwise.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) FindUnlinkedPad(direction PadDirection) *Pad { func (b *Bin) FindUnlinkedPad(direction PadDirection) *Pad {
pad := C.gst_bin_find_unlinked_pad(b.Instance(), C.GstPadDirection(direction)) pad := C.gst_bin_find_unlinked_pad(b.Instance(), C.GstPadDirection(direction))
if pad == nil { if pad == nil {
@@ -252,6 +288,8 @@ func (b *Bin) FindUnlinkedPad(direction PadDirection) *Pad {
} }
// GetSuppressedFlags returns the suppressed flags of the bin. // GetSuppressedFlags returns the suppressed flags of the bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) GetSuppressedFlags() ElementFlags { func (b *Bin) GetSuppressedFlags() ElementFlags {
return ElementFlags(C.gst_bin_get_suppressed_flags(b.Instance())) return ElementFlags(C.gst_bin_get_suppressed_flags(b.Instance()))
} }
@@ -259,6 +297,8 @@ func (b *Bin) GetSuppressedFlags() ElementFlags {
// SetSuppressedFlags suppresses the given flags on the bin. ElementFlags of a child element are // SetSuppressedFlags suppresses the given flags on the bin. ElementFlags of a child element are
// propagated when it is added to the bin. When suppressed flags are set, those specified flags // propagated when it is added to the bin. When suppressed flags are set, those specified flags
// will not be propagated to the bin. // will not be propagated to the bin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) SetSuppressedFlags(flags ElementFlags) { func (b *Bin) SetSuppressedFlags(flags ElementFlags) {
C.gst_bin_set_suppressed_flags(b.Instance(), C.GstElementFlags(flags)) C.gst_bin_set_suppressed_flags(b.Instance(), C.GstElementFlags(flags))
} }
@@ -270,12 +310,16 @@ func (b *Bin) SetSuppressedFlags(flags ElementFlags) {
// //
// This function simply emits the 'do-latency' signal so any custom latency calculations will be performed. // This function simply emits the 'do-latency' signal so any custom latency calculations will be performed.
// It returns true if the latency could be queried and reconfigured. // It returns true if the latency could be queried and reconfigured.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) RecalculateLatency() bool { func (b *Bin) RecalculateLatency() bool {
return gobool(C.gst_bin_recalculate_latency(b.Instance())) return gobool(C.gst_bin_recalculate_latency(b.Instance()))
} }
// SyncChildrenStates synchronizes the state of every child with the state of this Bin. // SyncChildrenStates synchronizes the state of every child with the state of this Bin.
// This function returns true if the operation was successful. // This function returns true if the operation was successful.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) SyncChildrenStates() bool { func (b *Bin) SyncChildrenStates() bool {
return gobool(C.gst_bin_sync_children_states(b.Instance())) return gobool(C.gst_bin_sync_children_states(b.Instance()))
} }
@@ -301,6 +345,8 @@ const (
// DebugBinToDotData will obtain the whole network of gstreamer elements that form the pipeline into a dot file. // DebugBinToDotData will obtain the whole network of gstreamer elements that form the pipeline into a dot file.
// This data can be processed with graphviz to get an image. // This data can be processed with graphviz to get an image.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) DebugBinToDotData(details DebugGraphDetails) string { func (b *Bin) DebugBinToDotData(details DebugGraphDetails) string {
ret := C.gst_debug_bin_to_dot_data(b.Instance(), C.GstDebugGraphDetails(details)) ret := C.gst_debug_bin_to_dot_data(b.Instance(), C.GstDebugGraphDetails(details))
defer C.g_free((C.gpointer)(unsafe.Pointer(ret))) defer C.g_free((C.gpointer)(unsafe.Pointer(ret)))
@@ -309,6 +355,8 @@ func (b *Bin) DebugBinToDotData(details DebugGraphDetails) string {
// DebugBinToDotFile is like DebugBinToDotData except it will write the dot data to the filename // DebugBinToDotFile is like DebugBinToDotData except it will write the dot data to the filename
// specified. // specified.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) DebugBinToDotFile(details DebugGraphDetails, filename string) { func (b *Bin) DebugBinToDotFile(details DebugGraphDetails, filename string) {
cname := C.CString(filename) cname := C.CString(filename)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -317,12 +365,16 @@ func (b *Bin) DebugBinToDotFile(details DebugGraphDetails, filename string) {
// DebugBinToDotFileWithTs is like DebugBinToDotFile except it will write the dot data to the filename // DebugBinToDotFileWithTs is like DebugBinToDotFile except it will write the dot data to the filename
// specified, except it will append the current timestamp to the filename. // specified, except it will append the current timestamp to the filename.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) DebugBinToDotFileWithTs(details DebugGraphDetails, filename string) { func (b *Bin) DebugBinToDotFileWithTs(details DebugGraphDetails, filename string) {
cname := C.CString(filename) cname := C.CString(filename)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
C.gst_debug_bin_to_dot_file_with_ts(b.Instance(), C.GstDebugGraphDetails(details), (*C.gchar)(unsafe.Pointer(cname))) C.gst_debug_bin_to_dot_file_with_ts(b.Instance(), C.GstDebugGraphDetails(details), (*C.gchar)(unsafe.Pointer(cname)))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func iteratorToElementSlice(iterator *C.GstIterator) ([]*Element, error) { func iteratorToElementSlice(iterator *C.GstIterator) ([]*Element, error) {
elems := make([]*Element, 0) elems := make([]*Element, 0)
gval := new(C.GValue) gval := new(C.GValue)
@@ -346,41 +398,57 @@ func iteratorToElementSlice(iterator *C.GstIterator) ([]*Element, error) {
} }
// ParentAddElement chains up to the parent AddElement handler. // ParentAddElement chains up to the parent AddElement handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentAddElement(element *Element) bool { func (b *Bin) ParentAddElement(element *Element) bool {
return gobool(C.binParentAddElement(b.Instance(), element.Instance())) return gobool(C.binParentAddElement(b.Instance(), element.Instance()))
} }
// ParentDeepElementAdded chains up to the parent DeepElementAdded handler. // ParentDeepElementAdded chains up to the parent DeepElementAdded handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentDeepElementAdded(subbin *Bin, element *Element) { func (b *Bin) ParentDeepElementAdded(subbin *Bin, element *Element) {
C.binParentDeepElementAdded(b.Instance(), subbin.Instance(), element.Instance()) C.binParentDeepElementAdded(b.Instance(), subbin.Instance(), element.Instance())
} }
// ParentDeepElementRemoved chains up to the parent DeepElementRemoved handler. // ParentDeepElementRemoved chains up to the parent DeepElementRemoved handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentDeepElementRemoved(subbin *Bin, element *Element) { func (b *Bin) ParentDeepElementRemoved(subbin *Bin, element *Element) {
C.binParentDeepElementRemoved(b.Instance(), subbin.Instance(), element.Instance()) C.binParentDeepElementRemoved(b.Instance(), subbin.Instance(), element.Instance())
} }
// ParentDoLatency chains up to the parent DoLatency handler. // ParentDoLatency chains up to the parent DoLatency handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentDoLatency() bool { func (b *Bin) ParentDoLatency() bool {
return gobool(C.binParentDoLatency(b.Instance())) return gobool(C.binParentDoLatency(b.Instance()))
} }
// ParentElementAdded chains up to the parent ElementAdded handler. // ParentElementAdded chains up to the parent ElementAdded handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentElementAdded(element *Element) { func (b *Bin) ParentElementAdded(element *Element) {
C.binParentElementAdded(b.Instance(), element.Instance()) C.binParentElementAdded(b.Instance(), element.Instance())
} }
// ParentElementRemoved chains up to the parent ElementRemoved handler. // ParentElementRemoved chains up to the parent ElementRemoved handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentElementRemoved(element *Element) { func (b *Bin) ParentElementRemoved(element *Element) {
C.binParentElementRemoved(b.Instance(), element.Instance()) C.binParentElementRemoved(b.Instance(), element.Instance())
} }
// ParentHandleMessage chains up to the parent HandleMessage handler. // ParentHandleMessage chains up to the parent HandleMessage handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentHandleMessage(message *Message) { func (b *Bin) ParentHandleMessage(message *Message) {
C.binParentHandleMessage(b.Instance(), message.Instance()) C.binParentHandleMessage(b.Instance(), message.Instance())
} }
// ParentRemoveElement chains up to the parent RemoveElement handler. // ParentRemoveElement chains up to the parent RemoveElement handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bin) ParentRemoveElement(element *Element) bool { func (b *Bin) ParentRemoveElement(element *Element) bool {
return gobool(C.binParentRemoveElement(b.Instance(), element.Instance())) return gobool(C.binParentRemoveElement(b.Instance(), element.Instance()))
} }

View File

@@ -11,6 +11,8 @@ import (
) )
//export goGstBinAddElement //export goGstBinAddElement
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinAddElement(bin *C.GstBin, child *C.GstElement) C.gboolean { func goGstBinAddElement(bin *C.GstBin, child *C.GstElement) C.gboolean {
var ret bool var ret bool
@@ -28,6 +30,8 @@ func goGstBinAddElement(bin *C.GstBin, child *C.GstElement) C.gboolean {
} }
//export goGstBinDeepElementAdded //export goGstBinDeepElementAdded
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinDeepElementAdded(bin *C.GstBin, subbin *C.GstBin, child *C.GstElement) { func goGstBinDeepElementAdded(bin *C.GstBin, subbin *C.GstBin, child *C.GstElement) {
goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))})
@@ -43,6 +47,8 @@ func goGstBinDeepElementAdded(bin *C.GstBin, subbin *C.GstBin, child *C.GstEleme
} }
//export goGstBinDeepElementRemoved //export goGstBinDeepElementRemoved
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinDeepElementRemoved(bin *C.GstBin, subbin *C.GstBin, child *C.GstElement) { func goGstBinDeepElementRemoved(bin *C.GstBin, subbin *C.GstBin, child *C.GstElement) {
goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(bin)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(bin))
@@ -57,6 +63,8 @@ func goGstBinDeepElementRemoved(bin *C.GstBin, subbin *C.GstBin, child *C.GstEle
} }
//export goGstBinDoLatency //export goGstBinDoLatency
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinDoLatency(bin *C.GstBin) C.gboolean { func goGstBinDoLatency(bin *C.GstBin) C.gboolean {
var ret bool var ret bool
@@ -72,6 +80,8 @@ func goGstBinDoLatency(bin *C.GstBin) C.gboolean {
} }
//export goGstBinElementAdded //export goGstBinElementAdded
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinElementAdded(bin *C.GstBin, child *C.GstElement) { func goGstBinElementAdded(bin *C.GstBin, child *C.GstElement) {
goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))})
@@ -86,6 +96,8 @@ func goGstBinElementAdded(bin *C.GstBin, child *C.GstElement) {
} }
//export goGstBinElementRemoved //export goGstBinElementRemoved
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinElementRemoved(bin *C.GstBin, child *C.GstElement) { func goGstBinElementRemoved(bin *C.GstBin, child *C.GstElement) {
goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))})
@@ -100,6 +112,8 @@ func goGstBinElementRemoved(bin *C.GstBin, child *C.GstElement) {
} }
//export goGstBinHandleMessage //export goGstBinHandleMessage
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinHandleMessage(bin *C.GstBin, message *C.GstMessage) { func goGstBinHandleMessage(bin *C.GstBin, message *C.GstMessage) {
goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(bin)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(bin))
@@ -111,6 +125,8 @@ func goGstBinHandleMessage(bin *C.GstBin, message *C.GstMessage) {
} }
//export goGstBinRemoveElement //export goGstBinRemoveElement
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstBinRemoveElement(bin *C.GstBin, child *C.GstElement) C.gboolean { func goGstBinRemoveElement(bin *C.GstBin, child *C.GstElement) C.gboolean {
var ret bool var ret bool

View File

@@ -34,6 +34,8 @@ var ExtendsBin glib.Extendable = &extendsBin{parent: ExtendsElement}
// BinImpl is the reference interface for Go elements extending a Bin. You only need to // BinImpl is the reference interface for Go elements extending a Bin. You only need to
// implement the methods that interest you. // implement the methods that interest you.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type BinImpl interface { type BinImpl interface {
AddElement(self *Bin, element *Element) bool AddElement(self *Bin, element *Element) bool
DeepElementAdded(self *Bin, subbin *Bin, child *Element) DeepElementAdded(self *Bin, subbin *Bin, child *Element)
@@ -47,10 +49,18 @@ type BinImpl interface {
type extendsBin struct{ parent glib.Extendable } type extendsBin struct{ parent glib.Extendable }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBin) Type() glib.Type { return glib.Type(C.gst_bin_get_type()) } func (e *extendsBin) Type() glib.Type { return glib.Type(C.gst_bin_get_type()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBin) ClassSize() int64 { return int64(C.sizeof_GstBinClass) } func (e *extendsBin) ClassSize() int64 { return int64(C.sizeof_GstBinClass) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBin) InstanceSize() int64 { return int64(C.sizeof_GstBin) } func (e *extendsBin) InstanceSize() int64 { return int64(C.sizeof_GstBin) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendsBin) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) { func (e *extendsBin) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) {
e.parent.InitClass(klass, elem) e.parent.InitClass(klass, elem)

View File

@@ -30,9 +30,13 @@ import (
) )
// GetMaxBufferMemory returns the maximum amount of memory a buffer can hold. // GetMaxBufferMemory returns the maximum amount of memory a buffer can hold.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func GetMaxBufferMemory() uint64 { return uint64(C.gst_buffer_get_max_memory()) } func GetMaxBufferMemory() uint64 { return uint64(C.gst_buffer_get_max_memory()) }
// Buffer is a go representation of a GstBuffer. // Buffer is a go representation of a GstBuffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Buffer struct { type Buffer struct {
ptr *C.GstBuffer ptr *C.GstBuffer
mapInfo *MapInfo mapInfo *MapInfo
@@ -40,6 +44,8 @@ type Buffer struct {
// FromGstBufferUnsafeNone wraps the given buffer, sinking any floating references, and places // FromGstBufferUnsafeNone wraps the given buffer, sinking any floating references, and places
// a finalizer on the wrapped Buffer. // a finalizer on the wrapped Buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBufferUnsafeNone(buf unsafe.Pointer) *Buffer { func FromGstBufferUnsafeNone(buf unsafe.Pointer) *Buffer {
if buf == nil { if buf == nil {
return nil return nil
@@ -52,6 +58,8 @@ func FromGstBufferUnsafeNone(buf unsafe.Pointer) *Buffer {
} }
// FromGstBufferUnsafeFull wraps the given buffer without taking an additional reference. // FromGstBufferUnsafeFull wraps the given buffer without taking an additional reference.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBufferUnsafeFull(buf unsafe.Pointer) *Buffer { func FromGstBufferUnsafeFull(buf unsafe.Pointer) *Buffer {
if buf == nil { if buf == nil {
return nil return nil
@@ -64,17 +72,23 @@ func FromGstBufferUnsafeFull(buf unsafe.Pointer) *Buffer {
// ToGstBuffer converts the given pointer into a Buffer without affecting the ref count or // ToGstBuffer converts the given pointer into a Buffer without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstBuffer(buf unsafe.Pointer) *Buffer { func ToGstBuffer(buf unsafe.Pointer) *Buffer {
return wrapBuffer((*C.GstBuffer)(buf)) return wrapBuffer((*C.GstBuffer)(buf))
} }
// NewEmptyBuffer returns a new empty buffer. // NewEmptyBuffer returns a new empty buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewEmptyBuffer() *Buffer { func NewEmptyBuffer() *Buffer {
return FromGstBufferUnsafeFull(unsafe.Pointer(C.gst_buffer_new())) return FromGstBufferUnsafeFull(unsafe.Pointer(C.gst_buffer_new()))
} }
// NewBufferWithSize is a convenience wrapped for NewBufferrAllocate with the default allocator // NewBufferWithSize is a convenience wrapped for NewBufferrAllocate with the default allocator
// and parameters. // and parameters.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferWithSize(size int64) *Buffer { func NewBufferWithSize(size int64) *Buffer {
return NewBufferAllocate(nil, nil, size) return NewBufferAllocate(nil, nil, size)
} }
@@ -86,6 +100,8 @@ func NewBufferWithSize(size int64) *Buffer {
// When allocator is nil, the default memory allocator will be used. // When allocator is nil, the default memory allocator will be used.
// //
// Note that when size == 0, the buffer will not have memory associated with it. // Note that when size == 0, the buffer will not have memory associated with it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferAllocate(alloc *Allocator, params *AllocationParams, size int64) *Buffer { func NewBufferAllocate(alloc *Allocator, params *AllocationParams, size int64) *Buffer {
var gstalloc *C.GstAllocator var gstalloc *C.GstAllocator
if alloc != nil { if alloc != nil {
@@ -103,6 +119,8 @@ func NewBufferAllocate(alloc *Allocator, params *AllocationParams, size int64) *
} }
// NewBufferFromBytes returns a new buffer from the given byte slice. // NewBufferFromBytes returns a new buffer from the given byte slice.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferFromBytes(b []byte) *Buffer { func NewBufferFromBytes(b []byte) *Buffer {
gbytes := C.g_bytes_new((C.gconstpointer)(unsafe.Pointer(&b[0])), C.gsize(len(b))) gbytes := C.g_bytes_new((C.gconstpointer)(unsafe.Pointer(&b[0])), C.gsize(len(b)))
defer C.g_bytes_unref(gbytes) defer C.g_bytes_unref(gbytes)
@@ -110,6 +128,8 @@ func NewBufferFromBytes(b []byte) *Buffer {
} }
// NewBufferFromReader returns a new buffer from the given io.Reader. // NewBufferFromReader returns a new buffer from the given io.Reader.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferFromReader(rdr io.Reader) (*Buffer, error) { func NewBufferFromReader(rdr io.Reader) (*Buffer, error) {
out, err := io.ReadAll(rdr) out, err := io.ReadAll(rdr)
if err != nil { if err != nil {
@@ -131,6 +151,8 @@ func NewBufferFromReader(rdr io.Reader) (*Buffer, error) {
// buf := gst.NewBufferFull(0, []byte("hello-world"), 1024, 0, 1024, func() { // buf := gst.NewBufferFull(0, []byte("hello-world"), 1024, 0, 1024, func() {
// fmt.Println("buffer was destroyed") // fmt.Println("buffer was destroyed")
// }) // })
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferFull(flags MemoryFlags, data []byte, maxSize, offset, size int64, notifyFunc func()) *Buffer { func NewBufferFull(flags MemoryFlags, data []byte, maxSize, offset, size int64, notifyFunc func()) *Buffer {
var notifyData unsafe.Pointer var notifyData unsafe.Pointer
var gnotifyFunc C.GDestroyNotify var gnotifyFunc C.GDestroyNotify
@@ -153,18 +175,28 @@ func NewBufferFull(flags MemoryFlags, data []byte, maxSize, offset, size int64,
} }
// Instance returns the underlying GstBuffer instance. // Instance returns the underlying GstBuffer instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Instance() *C.GstBuffer { return C.toGstBuffer(unsafe.Pointer(b.ptr)) } func (b *Buffer) Instance() *C.GstBuffer { return C.toGstBuffer(unsafe.Pointer(b.ptr)) }
// Ref increases the ref count on the buffer by one. // Ref increases the ref count on the buffer by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Ref() *Buffer { return wrapBuffer(C.gst_buffer_ref(b.Instance())) } func (b *Buffer) Ref() *Buffer { return wrapBuffer(C.gst_buffer_ref(b.Instance())) }
// Unref decreaes the ref count on the buffer by one. When the refcount reaches zero, the memory is freed. // Unref decreaes the ref count on the buffer by one. When the refcount reaches zero, the memory is freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Unref() { C.gst_buffer_unref(b.Instance()) } func (b *Buffer) Unref() { C.gst_buffer_unref(b.Instance()) }
// Reader returns an io.Reader for this buffer. // Reader returns an io.Reader for this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Reader() io.Reader { return bytes.NewBuffer(b.Bytes()) } func (b *Buffer) Reader() io.Reader { return bytes.NewBuffer(b.Bytes()) }
// Bytes returns a byte slice of the data inside this buffer. // Bytes returns a byte slice of the data inside this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Bytes() []byte { func (b *Buffer) Bytes() []byte {
mapInfo := b.Map(MapRead) mapInfo := b.Map(MapRead)
if mapInfo == nil { if mapInfo == nil {
@@ -177,6 +209,8 @@ func (b *Buffer) Bytes() []byte {
// PresentationTimestamp returns the presentation timestamp of the buffer, or a negative duration // PresentationTimestamp returns the presentation timestamp of the buffer, or a negative duration
// if not known or relevant. This value contains the timestamp when the media should be // if not known or relevant. This value contains the timestamp when the media should be
// presented to the user. // presented to the user.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) PresentationTimestamp() ClockTime { func (b *Buffer) PresentationTimestamp() ClockTime {
pts := b.Instance().pts pts := b.Instance().pts
@@ -184,6 +218,8 @@ func (b *Buffer) PresentationTimestamp() ClockTime {
} }
// SetPresentationTimestamp sets the presentation timestamp on the buffer. // SetPresentationTimestamp sets the presentation timestamp on the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) SetPresentationTimestamp(dur ClockTime) { func (b *Buffer) SetPresentationTimestamp(dur ClockTime) {
ins := b.Instance() ins := b.Instance()
ins.pts = C.GstClockTime(dur) ins.pts = C.GstClockTime(dur)
@@ -191,6 +227,8 @@ func (b *Buffer) SetPresentationTimestamp(dur ClockTime) {
// DecodingTimestamp returns the decoding timestamp of the buffer, or a negative duration if not known // DecodingTimestamp returns the decoding timestamp of the buffer, or a negative duration if not known
// or relevant. This value contains the timestamp when the media should be processed. // or relevant. This value contains the timestamp when the media should be processed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) DecodingTimestamp() ClockTime { func (b *Buffer) DecodingTimestamp() ClockTime {
dts := b.Instance().dts dts := b.Instance().dts
@@ -199,6 +237,8 @@ func (b *Buffer) DecodingTimestamp() ClockTime {
// Duration returns the length of the data inside this buffer, or a negative duration if not known // Duration returns the length of the data inside this buffer, or a negative duration if not known
// or relevant. // or relevant.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Duration() ClockTime { func (b *Buffer) Duration() ClockTime {
dur := b.Instance().duration dur := b.Instance().duration
@@ -206,6 +246,8 @@ func (b *Buffer) Duration() ClockTime {
} }
// SetDuration sets the duration on the buffer. // SetDuration sets the duration on the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) SetDuration(dur ClockTime) { func (b *Buffer) SetDuration(dur ClockTime) {
ins := b.Instance() ins := b.Instance()
ins.duration = C.GstClockTime(dur) ins.duration = C.GstClockTime(dur)
@@ -214,9 +256,13 @@ func (b *Buffer) SetDuration(dur ClockTime) {
// Offset returns a media specific offset for the buffer data. For video frames, this is the frame // Offset returns a media specific offset for the buffer data. For video frames, this is the frame
// number of this buffer. For audio samples, this is the offset of the first sample in this buffer. // number of this buffer. For audio samples, this is the offset of the first sample in this buffer.
// For file data or compressed data this is the byte offset of the first byte in this buffer. // For file data or compressed data this is the byte offset of the first byte in this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Offset() int64 { return int64(b.Instance().offset) } func (b *Buffer) Offset() int64 { return int64(b.Instance().offset) }
// OffsetEnd returns the last offset contained in this buffer. It has the same format as Offset. // OffsetEnd returns the last offset contained in this buffer. It has the same format as Offset.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) OffsetEnd() int64 { return int64(b.Instance().offset_end) } func (b *Buffer) OffsetEnd() int64 { return int64(b.Instance().offset_end) }
// AddMeta adds metadata for info to the buffer using the parameters in params. The given // AddMeta adds metadata for info to the buffer using the parameters in params. The given
@@ -241,6 +287,8 @@ func (b *Buffer) OffsetEnd() int64 { return int64(b.Instance().offset_end) }
// //
// // > Buffer initialized with params: hello world // // > Buffer initialized with params: hello world
// // > Buffer was destroyed // // > Buffer was destroyed
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) AddMeta(info *MetaInfo, params interface{}) *Meta { func (b *Buffer) AddMeta(info *MetaInfo, params interface{}) *Meta {
meta := C.gst_buffer_add_meta(b.Instance(), info.Instance(), (C.gpointer)(gopointer.Save(params))) meta := C.gst_buffer_add_meta(b.Instance(), info.Instance(), (C.gpointer)(gopointer.Save(params)))
if meta == nil { if meta == nil {
@@ -250,6 +298,8 @@ func (b *Buffer) AddMeta(info *MetaInfo, params interface{}) *Meta {
} }
// ParentBufferMeta is a go representation of a GstParentBufferMeta // ParentBufferMeta is a go representation of a GstParentBufferMeta
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type ParentBufferMeta struct { type ParentBufferMeta struct {
Parent *Meta Parent *Meta
Buffer *Buffer Buffer *Buffer
@@ -257,6 +307,8 @@ type ParentBufferMeta struct {
// AddParentMeta adds a ParentBufferMeta to this buffer that holds a parent reference // AddParentMeta adds a ParentBufferMeta to this buffer that holds a parent reference
// on the given buffer until the it is freed. // on the given buffer until the it is freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) AddParentMeta(buf *Buffer) *ParentBufferMeta { func (b *Buffer) AddParentMeta(buf *Buffer) *ParentBufferMeta {
meta := C.gst_buffer_add_parent_buffer_meta(b.Instance(), buf.Instance()) meta := C.gst_buffer_add_parent_buffer_meta(b.Instance(), buf.Instance())
return &ParentBufferMeta{ return &ParentBufferMeta{
@@ -268,6 +320,8 @@ func (b *Buffer) AddParentMeta(buf *Buffer) *ParentBufferMeta {
// AddProtectionMeta attaches ProtectionMeta to this buffer. The structure contains // AddProtectionMeta attaches ProtectionMeta to this buffer. The structure contains
// cryptographic information relating to the sample contained in the buffer. This // cryptographic information relating to the sample contained in the buffer. This
// function takes ownership of the structure. // function takes ownership of the structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) AddProtectionMeta(info *Structure) *ProtectionMeta { func (b *Buffer) AddProtectionMeta(info *Structure) *ProtectionMeta {
meta := C.gst_buffer_add_protection_meta(b.Instance(), info.Instance()) meta := C.gst_buffer_add_protection_meta(b.Instance(), info.Instance())
return &ProtectionMeta{ return &ProtectionMeta{
@@ -277,6 +331,8 @@ func (b *Buffer) AddProtectionMeta(info *Structure) *ProtectionMeta {
} }
// ReferenceTimestampMeta is a go representation of a GstReferenceTimestampMeta. // ReferenceTimestampMeta is a go representation of a GstReferenceTimestampMeta.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type ReferenceTimestampMeta struct { type ReferenceTimestampMeta struct {
Parent *Meta Parent *Meta
Reference *Caps Reference *Caps
@@ -288,6 +344,8 @@ type ReferenceTimestampMeta struct {
// //
// See the documentation of GstReferenceTimestampMeta for details. // See the documentation of GstReferenceTimestampMeta for details.
// https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html?gi-language=c#GstReferenceTimestampMeta // https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html?gi-language=c#GstReferenceTimestampMeta
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) AddReferenceTimestampMeta(ref *Caps, timestamp, duration ClockTime) *ReferenceTimestampMeta { func (b *Buffer) AddReferenceTimestampMeta(ref *Caps, timestamp, duration ClockTime) *ReferenceTimestampMeta {
meta := C.gst_buffer_add_reference_timestamp_meta(b.Instance(), ref.Instance(), C.GstClockTime(timestamp), C.GstClockTime(duration)) meta := C.gst_buffer_add_reference_timestamp_meta(b.Instance(), ref.Instance(), C.GstClockTime(timestamp), C.GstClockTime(duration))
if meta == nil { if meta == nil {
@@ -303,6 +361,8 @@ func (b *Buffer) AddReferenceTimestampMeta(ref *Caps, timestamp, duration ClockT
// Append will append all the memory from the given buffer to this one. The result buffer will // Append will append all the memory from the given buffer to this one. The result buffer will
// contain a concatenation of the memory of the two buffers. // contain a concatenation of the memory of the two buffers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Append(buf *Buffer) *Buffer { func (b *Buffer) Append(buf *Buffer) *Buffer {
return FromGstBufferUnsafeFull(unsafe.Pointer(C.gst_buffer_append(b.Ref().Instance(), buf.Ref().Instance()))) return FromGstBufferUnsafeFull(unsafe.Pointer(C.gst_buffer_append(b.Ref().Instance(), buf.Ref().Instance())))
} }
@@ -311,6 +371,8 @@ func (b *Buffer) Append(buf *Buffer) *Buffer {
// the memory and thus doesn't increase its refcount. // the memory and thus doesn't increase its refcount.
// //
// This function is identical to InsertMemory with an index of -1. // This function is identical to InsertMemory with an index of -1.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) AppendMemory(mem *Memory) { func (b *Buffer) AppendMemory(mem *Memory) {
C.gst_buffer_append_memory(b.Instance(), mem.Ref().Instance()) C.gst_buffer_append_memory(b.Instance(), mem.Ref().Instance())
} }
@@ -318,6 +380,8 @@ func (b *Buffer) AppendMemory(mem *Memory) {
// AppendRegion will append size bytes at offset from the given buffer to this one. The result // AppendRegion will append size bytes at offset from the given buffer to this one. The result
// buffer will contain a concatenation of the memory of this buffer and the requested region of // buffer will contain a concatenation of the memory of this buffer and the requested region of
// the one provided. // the one provided.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) AppendRegion(buf *Buffer, offset, size int64) *Buffer { func (b *Buffer) AppendRegion(buf *Buffer, offset, size int64) *Buffer {
newbuf := C.gst_buffer_append_region(b.Ref().Instance(), buf.Ref().Instance(), C.gssize(offset), C.gssize(size)) newbuf := C.gst_buffer_append_region(b.Ref().Instance(), buf.Ref().Instance(), C.gssize(offset), C.gssize(size))
return FromGstBufferUnsafeFull(unsafe.Pointer(newbuf)) return FromGstBufferUnsafeFull(unsafe.Pointer(newbuf))
@@ -326,6 +390,8 @@ func (b *Buffer) AppendRegion(buf *Buffer, offset, size int64) *Buffer {
// Copy creates a copy of this buffer. This will only copy the buffer's data to a newly allocated // Copy creates a copy of this buffer. This will only copy the buffer's data to a newly allocated
// Memory if needed (if the type of memory requires it), otherwise the underlying data is just referenced. // Memory if needed (if the type of memory requires it), otherwise the underlying data is just referenced.
// Check DeepCopy if you want to force the data to be copied to newly allocated Memory. // Check DeepCopy if you want to force the data to be copied to newly allocated Memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Copy() *Buffer { func (b *Buffer) Copy() *Buffer {
buf := C.gst_buffer_copy(b.Instance()) buf := C.gst_buffer_copy(b.Instance())
return FromGstBufferUnsafeFull(unsafe.Pointer(buf)) return FromGstBufferUnsafeFull(unsafe.Pointer(buf))
@@ -333,6 +399,8 @@ func (b *Buffer) Copy() *Buffer {
// DeepCopy creates a copy of the given buffer. This will make a newly allocated copy of the data // DeepCopy creates a copy of the given buffer. This will make a newly allocated copy of the data
// the source buffer contains. // the source buffer contains.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) DeepCopy() *Buffer { func (b *Buffer) DeepCopy() *Buffer {
buf := C.gst_buffer_copy_deep(b.Instance()) buf := C.gst_buffer_copy_deep(b.Instance())
return FromGstBufferUnsafeFull(unsafe.Pointer(buf)) return FromGstBufferUnsafeFull(unsafe.Pointer(buf))
@@ -344,6 +412,8 @@ func (b *Buffer) DeepCopy() *Buffer {
// //
// Flags indicate which fields will be copied. Offset and size dictate from where and how much memory // Flags indicate which fields will be copied. Offset and size dictate from where and how much memory
// is copied. If size is -1 then all data is copied. The function returns true if the copy was successful. // is copied. If size is -1 then all data is copied. The function returns true if the copy was successful.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) CopyInto(dest *Buffer, flags BufferCopyFlags, offset, size int64) bool { func (b *Buffer) CopyInto(dest *Buffer, flags BufferCopyFlags, offset, size int64) bool {
ok := C.gst_buffer_copy_into( ok := C.gst_buffer_copy_into(
dest.Instance(), dest.Instance(),
@@ -361,6 +431,8 @@ func (b *Buffer) CopyInto(dest *Buffer, flags BufferCopyFlags, offset, size int6
// //
// If offset equals 0 and size equals the total size of buffer, the duration and offset end fields are also // If offset equals 0 and size equals the total size of buffer, the duration and offset end fields are also
// copied. If not they will be set to ClockTimeNone. // copied. If not they will be set to ClockTimeNone.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) CopyRegion(flags BufferCopyFlags, offset, size int64) *Buffer { func (b *Buffer) CopyRegion(flags BufferCopyFlags, offset, size int64) *Buffer {
newbuf := C.gst_buffer_copy_region( newbuf := C.gst_buffer_copy_region(
b.Instance(), b.Instance(),
@@ -373,6 +445,8 @@ func (b *Buffer) CopyRegion(flags BufferCopyFlags, offset, size int64) *Buffer {
// Extract extracts size bytes starting from offset in this buffer. The data extracted may be lower // Extract extracts size bytes starting from offset in this buffer. The data extracted may be lower
// than the actual size if the buffer did not contain enough data. // than the actual size if the buffer did not contain enough data.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Extract(offset, size int64) []byte { func (b *Buffer) Extract(offset, size int64) []byte {
dest := C.malloc(C.sizeof_char * C.gsize(size)) dest := C.malloc(C.sizeof_char * C.gsize(size))
defer C.free(dest) defer C.free(dest)
@@ -382,6 +456,8 @@ func (b *Buffer) Extract(offset, size int64) []byte {
// FillBytes adds the given byte slice to the buffer at the given offset. The return value reflects the amount // FillBytes adds the given byte slice to the buffer at the given offset. The return value reflects the amount
// of data added to the buffer. // of data added to the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) FillBytes(offset int64, data []byte) int64 { func (b *Buffer) FillBytes(offset int64, data []byte) int64 {
gbytes := C.g_bytes_new((C.gconstpointer)(unsafe.Pointer(&data[0])), C.gsize(len(data))) gbytes := C.g_bytes_new((C.gconstpointer)(unsafe.Pointer(&data[0])), C.gsize(len(data)))
defer C.g_bytes_unref(gbytes) defer C.g_bytes_unref(gbytes)
@@ -400,6 +476,8 @@ func (b *Buffer) FillBytes(offset int64, data []byte) int64 {
// contains the number of memory blocks containing the size remaining bytes. Skip contains the number of bytes // contains the number of memory blocks containing the size remaining bytes. Skip contains the number of bytes
// to skip in the memory block at index to get to the byte for offset. All values will be 0 if the memory blocks // to skip in the memory block at index to get to the byte for offset. All values will be 0 if the memory blocks
// could not be read. // could not be read.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) FindMemory(offset, size int64) (index, length uint, skip int64) { func (b *Buffer) FindMemory(offset, size int64) (index, length uint, skip int64) {
var gindex, glength C.uint var gindex, glength C.uint
var gskip C.gsize var gskip C.gsize
@@ -414,6 +492,8 @@ func (b *Buffer) FindMemory(offset, size int64) (index, length uint, skip int64)
// //
// The function can modify the passed meta pointer or its contents. The return value defines if this function continues // The function can modify the passed meta pointer or its contents. The return value defines if this function continues
// or if the remaining metadata items in the buffer should be skipped. // or if the remaining metadata items in the buffer should be skipped.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) ForEachMeta(f func(meta *Meta) bool) bool { func (b *Buffer) ForEachMeta(f func(meta *Meta) bool) bool {
fPtr := gopointer.Save(f) fPtr := gopointer.Save(f)
defer gopointer.Unref(fPtr) defer gopointer.Unref(fPtr)
@@ -425,6 +505,8 @@ func (b *Buffer) ForEachMeta(f func(meta *Meta) bool) bool {
} }
// GetAllMemory retrieves all the memory inside this buffer. // GetAllMemory retrieves all the memory inside this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetAllMemory() *Memory { func (b *Buffer) GetAllMemory() *Memory {
mem := C.gst_buffer_get_all_memory(b.Instance()) mem := C.gst_buffer_get_all_memory(b.Instance())
if mem == nil { if mem == nil {
@@ -434,11 +516,15 @@ func (b *Buffer) GetAllMemory() *Memory {
} }
// GetFlags returns the flags on this buffer. // GetFlags returns the flags on this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetFlags() BufferFlags { func (b *Buffer) GetFlags() BufferFlags {
return BufferFlags(C.gst_buffer_get_flags(b.Instance())) return BufferFlags(C.gst_buffer_get_flags(b.Instance()))
} }
// GetMemory retrieves the memory block at the given index in the buffer. // GetMemory retrieves the memory block at the given index in the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetMemory(idx uint) *Memory { func (b *Buffer) GetMemory(idx uint) *Memory {
mem := C.gst_buffer_get_memory(b.Instance(), C.guint(idx)) mem := C.gst_buffer_get_memory(b.Instance(), C.guint(idx))
if mem == nil { if mem == nil {
@@ -449,6 +535,8 @@ func (b *Buffer) GetMemory(idx uint) *Memory {
// GetMemoryRange retrieves length memory blocks in buffer starting at idx. The memory blocks // GetMemoryRange retrieves length memory blocks in buffer starting at idx. The memory blocks
// will be merged into one large Memory. If length is -1, all memory starting from idx is merged. // will be merged into one large Memory. If length is -1, all memory starting from idx is merged.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetMemoryRange(idx uint, length int) *Memory { func (b *Buffer) GetMemoryRange(idx uint, length int) *Memory {
mem := C.gst_buffer_get_memory_range(b.Instance(), C.guint(idx), C.gint(length)) mem := C.gst_buffer_get_memory_range(b.Instance(), C.guint(idx), C.gint(length))
if mem == nil { if mem == nil {
@@ -461,6 +549,8 @@ func (b *Buffer) GetMemoryRange(idx uint, length int) *Memory {
// nil is returned. If multiple metadata with the given api are attached to this buffer only the // nil is returned. If multiple metadata with the given api are attached to this buffer only the
// first one is returned. To handle multiple metadata with a given API use ForEachMeta instead // first one is returned. To handle multiple metadata with a given API use ForEachMeta instead
// and check the type. // and check the type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetMeta(api glib.Type) *Meta { func (b *Buffer) GetMeta(api glib.Type) *Meta {
meta := C.gst_buffer_get_meta(b.Instance(), C.GType(api)) meta := C.gst_buffer_get_meta(b.Instance(), C.GType(api))
if meta == nil { if meta == nil {
@@ -470,6 +560,8 @@ func (b *Buffer) GetMeta(api glib.Type) *Meta {
} }
// GetNumMetas returns the number of metas for the given api type on the buffer. // GetNumMetas returns the number of metas for the given api type on the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetNumMetas(api glib.Type) uint { func (b *Buffer) GetNumMetas(api glib.Type) uint {
return uint(C.gst_buffer_get_n_meta(b.Instance(), C.GType(api))) return uint(C.gst_buffer_get_n_meta(b.Instance(), C.GType(api)))
} }
@@ -478,6 +570,8 @@ func (b *Buffer) GetNumMetas(api glib.Type) uint {
// reference. Conformance is tested by checking if the meta's reference is a subset of reference. // reference. Conformance is tested by checking if the meta's reference is a subset of reference.
// //
// Buffers can contain multiple ReferenceTimestampMeta metadata items. // Buffers can contain multiple ReferenceTimestampMeta metadata items.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetReferenceTimestampMeta(caps *Caps) *ReferenceTimestampMeta { func (b *Buffer) GetReferenceTimestampMeta(caps *Caps) *ReferenceTimestampMeta {
var meta *C.GstReferenceTimestampMeta var meta *C.GstReferenceTimestampMeta
if caps == nil { if caps == nil {
@@ -500,6 +594,8 @@ func (b *Buffer) GetReferenceTimestampMeta(caps *Caps) *ReferenceTimestampMeta {
} }
// GetSize retrieves the number of Memory blocks in the bffer. // GetSize retrieves the number of Memory blocks in the bffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetSize() int64 { func (b *Buffer) GetSize() int64 {
return int64(C.gst_buffer_get_size(b.Instance())) return int64(C.gst_buffer_get_size(b.Instance()))
} }
@@ -507,6 +603,8 @@ func (b *Buffer) GetSize() int64 {
// GetSizes will retrieve the size of the buffer, the offset of the first memory block in the buffer, // GetSizes will retrieve the size of the buffer, the offset of the first memory block in the buffer,
// and the sum of the size of the buffer, the offset, and any padding. These values can be used to // and the sum of the size of the buffer, the offset, and any padding. These values can be used to
// resize the buffer with Resize. // resize the buffer with Resize.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetSizes() (size, offset, maxsize int64) { func (b *Buffer) GetSizes() (size, offset, maxsize int64) {
var goffset, gmaxsize C.gsize var goffset, gmaxsize C.gsize
gsize := C.gst_buffer_get_sizes(b.Instance(), &goffset, &gmaxsize) gsize := C.gst_buffer_get_sizes(b.Instance(), &goffset, &gmaxsize)
@@ -518,6 +616,8 @@ func (b *Buffer) GetSizes() (size, offset, maxsize int64) {
// Offset will contain the offset of the data in the memory block in buffer at idx and maxsize will // Offset will contain the offset of the data in the memory block in buffer at idx and maxsize will
// contain the sum of the size and offset and the amount of extra padding on the memory block at // contain the sum of the size and offset and the amount of extra padding on the memory block at
// idx + length -1. Offset and maxsize can be used to resize the buffer memory blocks with ResizeRange. // idx + length -1. Offset and maxsize can be used to resize the buffer memory blocks with ResizeRange.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) GetSizesRange(idx uint, length int) (offset, maxsize int64) { func (b *Buffer) GetSizesRange(idx uint, length int) (offset, maxsize int64) {
var goffset, gmaxsize C.gsize var goffset, gmaxsize C.gsize
C.gst_buffer_get_sizes_range(b.Instance(), C.guint(idx), C.gint(length), &goffset, &gmaxsize) C.gst_buffer_get_sizes_range(b.Instance(), C.guint(idx), C.gint(length), &goffset, &gmaxsize)
@@ -525,6 +625,8 @@ func (b *Buffer) GetSizesRange(idx uint, length int) (offset, maxsize int64) {
} }
// HasFlags returns true if this Buffer has the given BufferFlags. // HasFlags returns true if this Buffer has the given BufferFlags.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) HasFlags(flags BufferFlags) bool { func (b *Buffer) HasFlags(flags BufferFlags) bool {
return gobool(C.gst_buffer_has_flags(b.Instance(), C.GstBufferFlags(flags))) return gobool(C.gst_buffer_has_flags(b.Instance(), C.GstBufferFlags(flags)))
} }
@@ -534,6 +636,8 @@ func (b *Buffer) HasFlags(flags BufferFlags) bool {
// //
// Only the value from GetMaxBufferMemory can be added to a buffer. If more memory is added, existing memory // Only the value from GetMaxBufferMemory can be added to a buffer. If more memory is added, existing memory
// blocks will automatically be merged to make room for the new memory. // blocks will automatically be merged to make room for the new memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) InsertMemory(mem *Memory, idx int) { func (b *Buffer) InsertMemory(mem *Memory, idx int) {
C.gst_buffer_insert_memory(b.Instance(), C.gint(idx), mem.Ref().Instance()) C.gst_buffer_insert_memory(b.Instance(), C.gint(idx), mem.Ref().Instance())
} }
@@ -541,6 +645,8 @@ func (b *Buffer) InsertMemory(mem *Memory, idx int) {
// IsAllMemoryWritable checks if all memory blocks in buffer are writable. // IsAllMemoryWritable checks if all memory blocks in buffer are writable.
// //
// Note that this function does not check if buffer is writable, use IsWritable to check that if needed. // Note that this function does not check if buffer is writable, use IsWritable to check that if needed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) IsAllMemoryWritable() bool { func (b *Buffer) IsAllMemoryWritable() bool {
return gobool(C.gst_buffer_is_all_memory_writable(b.Instance())) return gobool(C.gst_buffer_is_all_memory_writable(b.Instance()))
} }
@@ -550,11 +656,15 @@ func (b *Buffer) IsAllMemoryWritable() bool {
// Length can be -1 to check all the memory blocks after idx. // Length can be -1 to check all the memory blocks after idx.
// //
// Note that this function does not check if buffer is writable, use IsWritable to check that if needed. // Note that this function does not check if buffer is writable, use IsWritable to check that if needed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) IsMemoryRangeWritable(idx uint, length int) bool { func (b *Buffer) IsMemoryRangeWritable(idx uint, length int) bool {
return gobool(C.gst_buffer_is_memory_range_writable(b.Instance(), C.guint(idx), C.gint(length))) return gobool(C.gst_buffer_is_memory_range_writable(b.Instance(), C.guint(idx), C.gint(length)))
} }
// IsWritable returns true if this buffer is writable. // IsWritable returns true if this buffer is writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) IsWritable() bool { func (b *Buffer) IsWritable() bool {
return gobool(C.bufferIsWritable(b.Instance())) return gobool(C.bufferIsWritable(b.Instance()))
} }
@@ -575,17 +685,23 @@ func (b *Buffer) IsWritable() bool {
// //
// In short, this function unrefs the buf in the argument and refs the buffer that it returns. Don't access the argument // In short, this function unrefs the buf in the argument and refs the buffer that it returns. Don't access the argument
// after calling this function unless you have an additional reference to it. // after calling this function unless you have an additional reference to it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) MakeWritable() *Buffer { func (b *Buffer) MakeWritable() *Buffer {
return wrapBuffer(C.makeBufferWritable(b.Instance())) return wrapBuffer(C.makeBufferWritable(b.Instance()))
} }
// IterateMeta retrieves the next Meta after the given one. If state points to nil, the first Meta is returned. // IterateMeta retrieves the next Meta after the given one. If state points to nil, the first Meta is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) IterateMeta(meta *Meta) *Meta { func (b *Buffer) IterateMeta(meta *Meta) *Meta {
ptr := unsafe.Pointer(meta.Instance()) ptr := unsafe.Pointer(meta.Instance())
return wrapMeta(C.gst_buffer_iterate_meta(b.Instance(), (*C.gpointer)(&ptr))) return wrapMeta(C.gst_buffer_iterate_meta(b.Instance(), (*C.gpointer)(&ptr)))
} }
// IterateMetaFiltered is similar to IterateMeta except it will filter on the api type. // IterateMetaFiltered is similar to IterateMeta except it will filter on the api type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) IterateMetaFiltered(meta *Meta, apiType glib.Type) *Meta { func (b *Buffer) IterateMetaFiltered(meta *Meta, apiType glib.Type) *Meta {
ptr := unsafe.Pointer(meta.Instance()) ptr := unsafe.Pointer(meta.Instance())
return wrapMeta(C.gst_buffer_iterate_meta_filtered(b.Instance(), (*C.gpointer)(&ptr), C.GType(apiType))) return wrapMeta(C.gst_buffer_iterate_meta_filtered(b.Instance(), (*C.gpointer)(&ptr), C.GType(apiType)))
@@ -597,6 +713,8 @@ func (b *Buffer) IterateMetaFiltered(meta *Meta, apiType glib.Type) *Meta {
// buffer with the appropriate flags, or map initially with both read/write access. // buffer with the appropriate flags, or map initially with both read/write access.
// //
// Unmap the Buffer after usage. // Unmap the Buffer after usage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Map(flags MapFlags) *MapInfo { func (b *Buffer) Map(flags MapFlags) *MapInfo {
if b.mapInfo != nil { if b.mapInfo != nil {
return b.mapInfo return b.mapInfo
@@ -612,6 +730,8 @@ func (b *Buffer) Map(flags MapFlags) *MapInfo {
} }
// Unmap will unmap the data inside this memory. Use this after calling Map on the buffer. // Unmap will unmap the data inside this memory. Use this after calling Map on the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Unmap() { func (b *Buffer) Unmap() {
if b.mapInfo == nil { if b.mapInfo == nil {
return return
@@ -629,6 +749,8 @@ func (b *Buffer) Unmap() {
// created and returned. The readonly copy of the buffer memory will then also be replaced with this writable copy. // created and returned. The readonly copy of the buffer memory will then also be replaced with this writable copy.
// //
// Unmap the Buffer after usage. // Unmap the Buffer after usage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) MapRange(idx uint, length int, flags MapFlags) *MapInfo { func (b *Buffer) MapRange(idx uint, length int, flags MapFlags) *MapInfo {
if b.mapInfo != nil { if b.mapInfo != nil {
return b.mapInfo return b.mapInfo
@@ -646,15 +768,21 @@ func (b *Buffer) MapRange(idx uint, length int, flags MapFlags) *MapInfo {
// Memset fills buf with size bytes with val starting from offset. It returns the // Memset fills buf with size bytes with val starting from offset. It returns the
// size written to the buffer. // size written to the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Memset(offset int64, val uint8, size int64) int64 { func (b *Buffer) Memset(offset int64, val uint8, size int64) int64 {
return int64(C.gst_buffer_memset(b.Instance(), C.gsize(offset), C.guint8(val), C.gsize(size))) return int64(C.gst_buffer_memset(b.Instance(), C.gsize(offset), C.guint8(val), C.gsize(size)))
} }
// NumMemoryBlocks returns the number of memory blocks this buffer has. // NumMemoryBlocks returns the number of memory blocks this buffer has.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) NumMemoryBlocks() uint { return uint(C.gst_buffer_n_memory(b.Instance())) } func (b *Buffer) NumMemoryBlocks() uint { return uint(C.gst_buffer_n_memory(b.Instance())) }
// PeekMemory gets the memory block at idx in buffer. The memory block stays valid until the // PeekMemory gets the memory block at idx in buffer. The memory block stays valid until the
// memory block is removed, replaced, or merged. Typically with any call that modifies the memory in buffer. // memory block is removed, replaced, or merged. Typically with any call that modifies the memory in buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) PeekMemory(idx uint) *Memory { func (b *Buffer) PeekMemory(idx uint) *Memory {
mem := C.gst_buffer_peek_memory(b.Instance(), C.guint(idx)) mem := C.gst_buffer_peek_memory(b.Instance(), C.guint(idx))
if mem == nil { if mem == nil {
@@ -667,34 +795,48 @@ func (b *Buffer) PeekMemory(idx uint) *Memory {
// mem and thus doesn't increase its refcount. // mem and thus doesn't increase its refcount.
// //
// This function is identical to InsertMemory with an index of 0. // This function is identical to InsertMemory with an index of 0.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) PrependMemory(mem *Memory) { func (b *Buffer) PrependMemory(mem *Memory) {
C.gst_buffer_prepend_memory(b.Instance(), mem.Ref().Instance()) C.gst_buffer_prepend_memory(b.Instance(), mem.Ref().Instance())
} }
// RemoveAllMemory removes all memory blocks in the buffer. // RemoveAllMemory removes all memory blocks in the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) RemoveAllMemory() { C.gst_buffer_remove_all_memory(b.Instance()) } func (b *Buffer) RemoveAllMemory() { C.gst_buffer_remove_all_memory(b.Instance()) }
// RemoveMemoryAt removes the memory block at the given index. // RemoveMemoryAt removes the memory block at the given index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) RemoveMemoryAt(idx uint) { C.gst_buffer_remove_memory(b.Instance(), C.guint(idx)) } func (b *Buffer) RemoveMemoryAt(idx uint) { C.gst_buffer_remove_memory(b.Instance(), C.guint(idx)) }
// RemoveMemoryRange removes length memory blocks in buffer starting from idx. // RemoveMemoryRange removes length memory blocks in buffer starting from idx.
// //
// Length can be -1, in which case all memory starting from idx is removed. // Length can be -1, in which case all memory starting from idx is removed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) RemoveMemoryRange(idx uint, length int) { func (b *Buffer) RemoveMemoryRange(idx uint, length int) {
C.gst_buffer_remove_memory_range(b.Instance(), C.guint(idx), C.gint(length)) C.gst_buffer_remove_memory_range(b.Instance(), C.guint(idx), C.gint(length))
} }
// RemoveMeta removes the given metadata from the buffer. // RemoveMeta removes the given metadata from the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) RemoveMeta(meta *Meta) bool { func (b *Buffer) RemoveMeta(meta *Meta) bool {
return gobool(C.gst_buffer_remove_meta(b.Instance(), meta.Instance())) return gobool(C.gst_buffer_remove_meta(b.Instance(), meta.Instance()))
} }
// ReplaceAllMemory replaces all the memory in this buffer with that provided. // ReplaceAllMemory replaces all the memory in this buffer with that provided.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) ReplaceAllMemory(mem *Memory) { func (b *Buffer) ReplaceAllMemory(mem *Memory) {
C.gst_buffer_replace_all_memory(b.Instance(), mem.Ref().Instance()) C.gst_buffer_replace_all_memory(b.Instance(), mem.Ref().Instance())
} }
// ReplaceMemory replaces the memory at the given index with the given memory. // ReplaceMemory replaces the memory at the given index with the given memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) ReplaceMemory(mem *Memory, idx uint) { func (b *Buffer) ReplaceMemory(mem *Memory, idx uint) {
C.gst_buffer_replace_memory(b.Instance(), C.guint(idx), mem.Ref().Instance()) C.gst_buffer_replace_memory(b.Instance(), C.guint(idx), mem.Ref().Instance())
} }
@@ -705,16 +847,22 @@ func (b *Buffer) ReplaceMemory(mem *Memory, idx uint) {
// If length is -1, all memory starting from idx will be removed and replaced. // If length is -1, all memory starting from idx will be removed and replaced.
// //
// The buffer should be writable. // The buffer should be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) ReplaceMemoryRange(idx uint, length int, mem *Memory) { func (b *Buffer) ReplaceMemoryRange(idx uint, length int, mem *Memory) {
C.gst_buffer_replace_memory_range(b.Instance(), C.guint(idx), C.gint(length), mem.Ref().Instance()) C.gst_buffer_replace_memory_range(b.Instance(), C.guint(idx), C.gint(length), mem.Ref().Instance())
} }
// Resize sets the offset and total size of the memory blocks in this buffer. // Resize sets the offset and total size of the memory blocks in this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) Resize(offset, size int64) { func (b *Buffer) Resize(offset, size int64) {
C.gst_buffer_resize(b.Instance(), C.gssize(offset), C.gssize(size)) C.gst_buffer_resize(b.Instance(), C.gssize(offset), C.gssize(size))
} }
// ResizeRange sets the total size of the length memory blocks starting at idx in this buffer. // ResizeRange sets the total size of the length memory blocks starting at idx in this buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) ResizeRange(idx uint, length int, offset, size int64) bool { func (b *Buffer) ResizeRange(idx uint, length int, offset, size int64) bool {
return gobool(C.gst_buffer_resize_range( return gobool(C.gst_buffer_resize_range(
b.Instance(), b.Instance(),
@@ -726,16 +874,22 @@ func (b *Buffer) ResizeRange(idx uint, length int, offset, size int64) bool {
} }
// SetFlags sets one or more buffer flags on the buffer. // SetFlags sets one or more buffer flags on the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) SetFlags(flags BufferFlags) bool { func (b *Buffer) SetFlags(flags BufferFlags) bool {
return gobool(C.gst_buffer_set_flags(b.Instance(), C.GstBufferFlags(flags))) return gobool(C.gst_buffer_set_flags(b.Instance(), C.GstBufferFlags(flags)))
} }
// SetSize sets the total size of the memory blocks in buffer. // SetSize sets the total size of the memory blocks in buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) SetSize(size int64) { func (b *Buffer) SetSize(size int64) {
C.gst_buffer_set_size(b.Instance(), C.gssize(size)) C.gst_buffer_set_size(b.Instance(), C.gssize(size))
} }
// UnsetFlags removes one or more flags from the buffer. // UnsetFlags removes one or more flags from the buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Buffer) UnsetFlags(flags BufferFlags) bool { func (b *Buffer) UnsetFlags(flags BufferFlags) bool {
return gobool(C.gst_buffer_unset_flags(b.Instance(), C.GstBufferFlags(flags))) return gobool(C.gst_buffer_unset_flags(b.Instance(), C.GstBufferFlags(flags)))
} }

View File

@@ -19,12 +19,16 @@ import (
) )
// BufferList is a go wrapper around a GstBufferList for grouping Buffers // BufferList is a go wrapper around a GstBufferList for grouping Buffers
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type BufferList struct { type BufferList struct {
ptr *C.GstBufferList ptr *C.GstBufferList
} }
// NewBufferList returns a new BufferList. The given slice can be nil and the returned // NewBufferList returns a new BufferList. The given slice can be nil and the returned
// buffer list will be empty. // buffer list will be empty.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferList(buffers []*Buffer) *BufferList { func NewBufferList(buffers []*Buffer) *BufferList {
bufList := FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_new())) bufList := FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_new()))
if buffers == nil { if buffers == nil {
@@ -37,11 +41,15 @@ func NewBufferList(buffers []*Buffer) *BufferList {
} }
// NewBufferListSized creates a new BufferList with the given size. // NewBufferListSized creates a new BufferList with the given size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferListSized(size uint) *BufferList { func NewBufferListSized(size uint) *BufferList {
return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_new_sized(C.guint(size)))) return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_new_sized(C.guint(size))))
} }
// FromGstBufferListUnsafeNone is used for returns from transfer-none methods. // FromGstBufferListUnsafeNone is used for returns from transfer-none methods.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBufferListUnsafeNone(buf unsafe.Pointer) *BufferList { func FromGstBufferListUnsafeNone(buf unsafe.Pointer) *BufferList {
wrapped := wrapBufferList((*C.GstBufferList)(buf)) wrapped := wrapBufferList((*C.GstBufferList)(buf))
wrapped.Ref() wrapped.Ref()
@@ -50,6 +58,8 @@ func FromGstBufferListUnsafeNone(buf unsafe.Pointer) *BufferList {
} }
// FromGstBufferListUnsafeFull wraps the given buffer without taking an additional reference. // FromGstBufferListUnsafeFull wraps the given buffer without taking an additional reference.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBufferListUnsafeFull(buf unsafe.Pointer) *BufferList { func FromGstBufferListUnsafeFull(buf unsafe.Pointer) *BufferList {
wrapped := wrapBufferList((*C.GstBufferList)(buf)) wrapped := wrapBufferList((*C.GstBufferList)(buf))
runtime.SetFinalizer(wrapped, (*BufferList).Unref) runtime.SetFinalizer(wrapped, (*BufferList).Unref)
@@ -58,37 +68,51 @@ func FromGstBufferListUnsafeFull(buf unsafe.Pointer) *BufferList {
// ToGstBufferList converts the given pointer into a BufferList without affecting the ref count or // ToGstBufferList converts the given pointer into a BufferList without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstBufferList(buf unsafe.Pointer) *BufferList { func ToGstBufferList(buf unsafe.Pointer) *BufferList {
return wrapBufferList((*C.GstBufferList)(buf)) return wrapBufferList((*C.GstBufferList)(buf))
} }
// Instance returns the underlying GstBufferList. // Instance returns the underlying GstBufferList.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Instance() *C.GstBufferList { return C.toGstBufferList(unsafe.Pointer(b.ptr)) } func (b *BufferList) Instance() *C.GstBufferList { return C.toGstBufferList(unsafe.Pointer(b.ptr)) }
// CalculateSize calculates the size of the data contained in this buffer list by adding the size of all buffers. // CalculateSize calculates the size of the data contained in this buffer list by adding the size of all buffers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) CalculateSize() int64 { func (b *BufferList) CalculateSize() int64 {
return int64(C.gst_buffer_list_calculate_size(b.Instance())) return int64(C.gst_buffer_list_calculate_size(b.Instance()))
} }
// Copy creates a shallow copy of the given buffer list. This will make a newly allocated copy of the // Copy creates a shallow copy of the given buffer list. This will make a newly allocated copy of the
// source list with copies of buffer pointers. The refcount of buffers pointed to will be increased by one. // source list with copies of buffer pointers. The refcount of buffers pointed to will be increased by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Copy() *BufferList { func (b *BufferList) Copy() *BufferList {
return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_copy(b.Instance()))) return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_copy(b.Instance())))
} }
// DeepCopy creates a copy of the given buffer list. This will make a newly allocated copy of each buffer // DeepCopy creates a copy of the given buffer list. This will make a newly allocated copy of each buffer
// that the source buffer list contains. // that the source buffer list contains.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) DeepCopy() *BufferList { func (b *BufferList) DeepCopy() *BufferList {
return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_copy_deep(b.Instance()))) return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_copy_deep(b.Instance())))
} }
// IsWritable returns true if this BufferList is writable. // IsWritable returns true if this BufferList is writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) IsWritable() bool { func (b *BufferList) IsWritable() bool {
return gobool(C.bufferListIsWritable(b.Instance())) return gobool(C.bufferListIsWritable(b.Instance()))
} }
// MakeWritable makes a writable buffer list from this one. If the source buffer list is already writable, // MakeWritable makes a writable buffer list from this one. If the source buffer list is already writable,
// this will simply return the same buffer list. A copy will otherwise be made using Copy. // this will simply return the same buffer list. A copy will otherwise be made using Copy.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) MakeWritable() *BufferList { func (b *BufferList) MakeWritable() *BufferList {
return FromGstBufferListUnsafeFull(unsafe.Pointer(C.makeBufferListWritable(b.Instance()))) return FromGstBufferListUnsafeFull(unsafe.Pointer(C.makeBufferListWritable(b.Instance())))
} }
@@ -97,6 +121,8 @@ func (b *BufferList) MakeWritable() *BufferList {
// //
// The function can modify the passed buffer pointer or its contents. The return value defines if this // The function can modify the passed buffer pointer or its contents. The return value defines if this
// function returns or if the remaining buffers in the list should be skipped. // function returns or if the remaining buffers in the list should be skipped.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) ForEach(f func(buf *Buffer, idx uint) bool) { func (b *BufferList) ForEach(f func(buf *Buffer, idx uint) bool) {
fPtr := gopointer.Save(f) fPtr := gopointer.Save(f)
defer gopointer.Unref(fPtr) defer gopointer.Unref(fPtr)
@@ -110,6 +136,8 @@ func (b *BufferList) ForEach(f func(buf *Buffer, idx uint) bool) {
// GetBufferAt gets the buffer at idx. // GetBufferAt gets the buffer at idx.
// //
// You must make sure that idx does not exceed the number of buffers available. // You must make sure that idx does not exceed the number of buffers available.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) GetBufferAt(idx uint) *Buffer { func (b *BufferList) GetBufferAt(idx uint) *Buffer {
return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_buffer_list_get(b.Instance(), C.guint(idx)))) return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_buffer_list_get(b.Instance(), C.guint(idx))))
} }
@@ -117,6 +145,8 @@ func (b *BufferList) GetBufferAt(idx uint) *Buffer {
// GetWritableBufferAt gets the buffer at idx, ensuring it is a writable buffer. // GetWritableBufferAt gets the buffer at idx, ensuring it is a writable buffer.
// //
// You must make sure that idx does not exceed the number of buffers available. // You must make sure that idx does not exceed the number of buffers available.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) GetWritableBufferAt(idx uint) *Buffer { func (b *BufferList) GetWritableBufferAt(idx uint) *Buffer {
return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_buffer_list_get_writable(b.Instance(), C.guint(idx)))) return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_buffer_list_get_writable(b.Instance(), C.guint(idx))))
} }
@@ -124,11 +154,15 @@ func (b *BufferList) GetWritableBufferAt(idx uint) *Buffer {
// Insert inserts a buffer at idx in the list. Other buffers are moved to make room for this new buffer. // Insert inserts a buffer at idx in the list. Other buffers are moved to make room for this new buffer.
// //
// A -1 value for idx will append the buffer at the end. // A -1 value for idx will append the buffer at the end.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Insert(idx int, buf *Buffer) { func (b *BufferList) Insert(idx int, buf *Buffer) {
C.gst_buffer_list_insert(b.Instance(), C.gint(idx), buf.Ref().Instance()) C.gst_buffer_list_insert(b.Instance(), C.gint(idx), buf.Ref().Instance())
} }
// Length returns the number of buffers in the list. // Length returns the number of buffers in the list.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Length() uint { func (b *BufferList) Length() uint {
return uint(C.gst_buffer_list_length(b.Instance())) return uint(C.gst_buffer_list_length(b.Instance()))
} }
@@ -138,6 +172,8 @@ func (b *BufferList) Length() uint {
// Note that the refcount affects the writability of list and its data, see MakeWritable. // Note that the refcount affects the writability of list and its data, see MakeWritable.
// It is important to note that keeping additional references to GstBufferList instances // It is important to note that keeping additional references to GstBufferList instances
// can potentially increase the number of memcpy operations in a pipeline. // can potentially increase the number of memcpy operations in a pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Ref() *BufferList { func (b *BufferList) Ref() *BufferList {
C.gst_buffer_list_ref(b.Instance()) C.gst_buffer_list_ref(b.Instance())
return b return b
@@ -145,12 +181,16 @@ func (b *BufferList) Ref() *BufferList {
// Remove removes length buffers from the list starting at index. All following buffers // Remove removes length buffers from the list starting at index. All following buffers
// are moved to close the gap. // are moved to close the gap.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Remove(idx, length uint) { func (b *BufferList) Remove(idx, length uint) {
C.gst_buffer_list_remove(b.Instance(), C.guint(idx), C.guint(length)) C.gst_buffer_list_remove(b.Instance(), C.guint(idx), C.guint(length))
} }
// Unref decreases the refcount of the buffer list. If the refcount reaches 0, the buffer // Unref decreases the refcount of the buffer list. If the refcount reaches 0, the buffer
// list will be freed. // list will be freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferList) Unref() { func (b *BufferList) Unref() {
C.gst_buffer_list_unref(b.Instance()) C.gst_buffer_list_unref(b.Instance())
} }

View File

@@ -17,6 +17,8 @@ import (
type BufferPool struct{ *Object } type BufferPool struct{ *Object }
// NewBufferPool returns a new BufferPool instance. // NewBufferPool returns a new BufferPool instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferPool() *BufferPool { func NewBufferPool() *BufferPool {
pool := C.gst_buffer_pool_new() pool := C.gst_buffer_pool_new()
return FromGstBufferPoolUnsafeFull(unsafe.Pointer(pool)) return FromGstBufferPoolUnsafeFull(unsafe.Pointer(pool))
@@ -24,6 +26,8 @@ func NewBufferPool() *BufferPool {
// FromGstBufferPoolUnsafeNone wraps the given unsafe.Pointer in a BufferPool instance. It takes a // FromGstBufferPoolUnsafeNone wraps the given unsafe.Pointer in a BufferPool instance. It takes a
// ref and places a runtime finalizer on the resulting object. // ref and places a runtime finalizer on the resulting object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBufferPoolUnsafeNone(bufferPool unsafe.Pointer) *BufferPool { func FromGstBufferPoolUnsafeNone(bufferPool unsafe.Pointer) *BufferPool {
pool := wrapBufferPool(glib.TransferNone(bufferPool)) pool := wrapBufferPool(glib.TransferNone(bufferPool))
return pool return pool
@@ -36,18 +40,26 @@ func FromGstBufferPoolUnsafeNone(bufferPool unsafe.Pointer) *BufferPool {
// FromGstBufferPoolUnsafeFull wraps the given unsafe.Pointer in a BufferPool instance. It just // FromGstBufferPoolUnsafeFull wraps the given unsafe.Pointer in a BufferPool instance. It just
// places a runtime finalizer on the resulting object. // places a runtime finalizer on the resulting object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBufferPoolUnsafeFull(bufferPool unsafe.Pointer) *BufferPool { func FromGstBufferPoolUnsafeFull(bufferPool unsafe.Pointer) *BufferPool {
pool := wrapBufferPool(glib.TransferFull(bufferPool)) pool := wrapBufferPool(glib.TransferFull(bufferPool))
return pool return pool
} }
// Instance returns the underlying GstBufferPool instance. // Instance returns the underlying GstBufferPool instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) Instance() *C.GstBufferPool { return C.toGstBufferPool(b.Unsafe()) } func (b *BufferPool) Instance() *C.GstBufferPool { return C.toGstBufferPool(b.Unsafe()) }
// IsFlushing returns true if this BufferPool is currently flushing. // IsFlushing returns true if this BufferPool is currently flushing.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) IsFlushing() bool { return gobool(C.bufferPoolIsFlushing(b.Instance())) } func (b *BufferPool) IsFlushing() bool { return gobool(C.bufferPoolIsFlushing(b.Instance())) }
// BufferPoolAcquireParams represents parameters to an AcquireBuffer call. // BufferPoolAcquireParams represents parameters to an AcquireBuffer call.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type BufferPoolAcquireParams struct { type BufferPoolAcquireParams struct {
Format Format // format (GstFormat) the format of start and stop Format Format // format (GstFormat) the format of start and stop
Start int64 // start (gint64) the start position Start int64 // start (gint64) the start position
@@ -56,6 +68,8 @@ type BufferPoolAcquireParams struct {
} }
// AcquireBuffer acquires a buffer from this pool. // AcquireBuffer acquires a buffer from this pool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) AcquireBuffer(params *BufferPoolAcquireParams) (*Buffer, FlowReturn) { func (b *BufferPool) AcquireBuffer(params *BufferPoolAcquireParams) (*Buffer, FlowReturn) {
var buf *C.GstBuffer var buf *C.GstBuffer
if params != nil { if params != nil {
@@ -80,6 +94,8 @@ func (b *BufferPool) AcquireBuffer(params *BufferPoolAcquireParams) (*Buffer, Fl
// GetConfig retrieves a copy of the current configuration of the pool. This configuration can either // GetConfig retrieves a copy of the current configuration of the pool. This configuration can either
// be modified and used for the SetConfig call or it must be freed after usage with Free. // be modified and used for the SetConfig call or it must be freed after usage with Free.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) GetConfig() *BufferPoolConfig { func (b *BufferPool) GetConfig() *BufferPoolConfig {
st := C.gst_buffer_pool_get_config(b.Instance()) st := C.gst_buffer_pool_get_config(b.Instance())
if st == nil { if st == nil {
@@ -90,6 +106,8 @@ func (b *BufferPool) GetConfig() *BufferPoolConfig {
// GetOptions retrieves a list of supported bufferpool options for the pool. An option would typically // GetOptions retrieves a list of supported bufferpool options for the pool. An option would typically
// be enabled with AddOption. // be enabled with AddOption.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) GetOptions() []string { func (b *BufferPool) GetOptions() []string {
opts := C.gst_buffer_pool_get_options(b.Instance()) opts := C.gst_buffer_pool_get_options(b.Instance())
defer C.g_free((C.gpointer)(unsafe.Pointer(opts))) defer C.g_free((C.gpointer)(unsafe.Pointer(opts)))
@@ -97,6 +115,8 @@ func (b *BufferPool) GetOptions() []string {
} }
// HasOption returns true if this BufferPool supports the given option. // HasOption returns true if this BufferPool supports the given option.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) HasOption(opt string) bool { func (b *BufferPool) HasOption(opt string) bool {
gOpt := C.CString(opt) gOpt := C.CString(opt)
defer C.free(unsafe.Pointer(gOpt)) defer C.free(unsafe.Pointer(gOpt))
@@ -104,12 +124,16 @@ func (b *BufferPool) HasOption(opt string) bool {
} }
// IsActive returns true if this BufferPool is active. A pool can be activated with SetActive. // IsActive returns true if this BufferPool is active. A pool can be activated with SetActive.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) IsActive() bool { return gobool(C.gst_buffer_pool_is_active(b.Instance())) } func (b *BufferPool) IsActive() bool { return gobool(C.gst_buffer_pool_is_active(b.Instance())) }
// ReleaseBuffer releases the given buffer from the pool. The buffer should have previously been // ReleaseBuffer releases the given buffer from the pool. The buffer should have previously been
// allocated from pool with AcquireBiffer. // allocated from pool with AcquireBiffer.
// //
// This function is usually called automatically when the last ref on buffer disappears. // This function is usually called automatically when the last ref on buffer disappears.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) ReleaseBuffer(buf *Buffer) { func (b *BufferPool) ReleaseBuffer(buf *Buffer) {
C.gst_buffer_pool_release_buffer(b.Instance(), buf.Ref().Instance()) C.gst_buffer_pool_release_buffer(b.Instance(), buf.Ref().Instance())
} }
@@ -120,6 +144,8 @@ func (b *BufferPool) ReleaseBuffer(buf *Buffer) {
// Activating the bufferpool will preallocate all resources in the pool based on the configuration of the pool. // Activating the bufferpool will preallocate all resources in the pool based on the configuration of the pool.
// //
// Deactivating will free the resources again when there are no outstanding buffers. When there are outstanding buffers, they will be freed as soon as they are all returned to the pool. // Deactivating will free the resources again when there are no outstanding buffers. When there are outstanding buffers, they will be freed as soon as they are all returned to the pool.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) SetActive(active bool) (ok bool) { func (b *BufferPool) SetActive(active bool) (ok bool) {
return gobool(C.gst_buffer_pool_set_active(b.Instance(), gboolean(active))) return gobool(C.gst_buffer_pool_set_active(b.Instance(), gboolean(active)))
} }
@@ -137,11 +163,15 @@ func (b *BufferPool) SetActive(active bool) (ok bool) {
// state as possible. The new state can then be retrieved and refined with GetConfig. // state as possible. The new state can then be retrieved and refined with GetConfig.
// //
// This function takes ownership of the given structure. // This function takes ownership of the given structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) SetConfig(cfg *BufferPoolConfig) bool { func (b *BufferPool) SetConfig(cfg *BufferPoolConfig) bool {
return gobool(C.gst_buffer_pool_set_config(b.Instance(), cfg.Instance())) return gobool(C.gst_buffer_pool_set_config(b.Instance(), cfg.Instance()))
} }
// SetFlushing enables or disable the flushing state of a pool without freeing or allocating buffers. // SetFlushing enables or disable the flushing state of a pool without freeing or allocating buffers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPool) SetFlushing(flushing bool) { func (b *BufferPool) SetFlushing(flushing bool) {
C.gst_buffer_pool_set_flushing(b.Instance(), gboolean(flushing)) C.gst_buffer_pool_set_flushing(b.Instance(), gboolean(flushing))
} }
@@ -154,6 +184,8 @@ type BufferPoolConfig struct{ *Structure }
// on the buffers that it allocates. // on the buffers that it allocates.
// //
// The supported options by pool can be retrieved with GetOptions. // The supported options by pool can be retrieved with GetOptions.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) AddOption(opt string) { func (b *BufferPoolConfig) AddOption(opt string) {
cOpt := C.CString(opt) cOpt := C.CString(opt)
defer C.free(unsafe.Pointer(cOpt)) defer C.free(unsafe.Pointer(cOpt))
@@ -161,6 +193,8 @@ func (b *BufferPoolConfig) AddOption(opt string) {
} }
// GetAllocator retrieves the allocator and params from config. // GetAllocator retrieves the allocator and params from config.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) GetAllocator() (*Allocator, *AllocationParams) { func (b *BufferPoolConfig) GetAllocator() (*Allocator, *AllocationParams) {
var allocator *C.GstAllocator var allocator *C.GstAllocator
var params C.GstAllocationParams var params C.GstAllocationParams
@@ -173,11 +207,15 @@ func (b *BufferPoolConfig) GetAllocator() (*Allocator, *AllocationParams) {
} }
// GetOption retrieves the option at index of the options API array. // GetOption retrieves the option at index of the options API array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) GetOption(index uint) string { func (b *BufferPoolConfig) GetOption(index uint) string {
return C.GoString(C.gst_buffer_pool_config_get_option(b.Instance(), C.guint(index))) return C.GoString(C.gst_buffer_pool_config_get_option(b.Instance(), C.guint(index)))
} }
// GetParams retrieves the values from this config. All params return 0 or nil if they could not be fetched. // GetParams retrieves the values from this config. All params return 0 or nil if they could not be fetched.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) GetParams() (caps *Caps, size, minBuffers, maxBuffers uint) { func (b *BufferPoolConfig) GetParams() (caps *Caps, size, minBuffers, maxBuffers uint) {
var gcaps *C.GstCaps var gcaps *C.GstCaps
var gsize, gminBuffers, gmaxBuffers C.guint var gsize, gminBuffers, gmaxBuffers C.guint
@@ -195,6 +233,8 @@ func (b *BufferPoolConfig) GetParams() (caps *Caps, size, minBuffers, maxBuffers
} }
// HasOption returns true if this config has the given option. // HasOption returns true if this config has the given option.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) HasOption(opt string) bool { func (b *BufferPoolConfig) HasOption(opt string) bool {
cOpt := C.CString(opt) cOpt := C.CString(opt)
defer C.free(unsafe.Pointer(cOpt)) defer C.free(unsafe.Pointer(cOpt))
@@ -202,6 +242,8 @@ func (b *BufferPoolConfig) HasOption(opt string) bool {
} }
// NumOptions retrieves the number of values currently stored in the options array of the config structure. // NumOptions retrieves the number of values currently stored in the options array of the config structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) NumOptions() uint { func (b *BufferPoolConfig) NumOptions() uint {
return uint(C.gst_buffer_pool_config_n_options(b.Instance())) return uint(C.gst_buffer_pool_config_n_options(b.Instance()))
} }
@@ -215,6 +257,8 @@ func (b *BufferPoolConfig) NumOptions() uint {
// A call to SetConfig on the BufferPool can update the allocator and params with the values that it is able to do. // A call to SetConfig on the BufferPool can update the allocator and params with the values that it is able to do.
// Some pools are, for example, not able to operate with different allocators or cannot allocate with the values // Some pools are, for example, not able to operate with different allocators or cannot allocate with the values
// specified in params. Use GetConfig on the pool to get the currently used values. // specified in params. Use GetConfig on the pool to get the currently used values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) SetAllocator(allocator *Allocator, params *AllocationParams) { func (b *BufferPoolConfig) SetAllocator(allocator *Allocator, params *AllocationParams) {
if allocator == nil && params != nil { if allocator == nil && params != nil {
C.gst_buffer_pool_config_set_allocator(b.Instance(), nil, params.Instance()) C.gst_buffer_pool_config_set_allocator(b.Instance(), nil, params.Instance())
@@ -230,6 +274,8 @@ func (b *BufferPoolConfig) SetAllocator(allocator *Allocator, params *Allocation
} }
// SetParams configures the config with the given parameters. // SetParams configures the config with the given parameters.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) SetParams(caps *Caps, size, minBuffers, maxBuffers uint) { func (b *BufferPoolConfig) SetParams(caps *Caps, size, minBuffers, maxBuffers uint) {
if caps == nil { if caps == nil {
C.gst_buffer_pool_config_set_params( C.gst_buffer_pool_config_set_params(
@@ -251,6 +297,8 @@ func (b *BufferPoolConfig) SetParams(caps *Caps, size, minBuffers, maxBuffers ui
// that caps haven't changed and that min_buffers aren't lower then what we initially expected. This does not check if // that caps haven't changed and that min_buffers aren't lower then what we initially expected. This does not check if
// options or allocator parameters are still valid, and won't check if size have changed, since changing the size is valid // options or allocator parameters are still valid, and won't check if size have changed, since changing the size is valid
// to adapt padding. // to adapt padding.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *BufferPoolConfig) Validate(caps *Caps, size, minBuffers, maxBuffers uint) bool { func (b *BufferPoolConfig) Validate(caps *Caps, size, minBuffers, maxBuffers uint) bool {
return gobool(C.gst_buffer_pool_config_validate_params( return gobool(C.gst_buffer_pool_config_validate_params(
b.Instance(), b.Instance(),

View File

@@ -35,6 +35,8 @@ import (
// Bus is a Go wrapper around a GstBus. It provides convenience methods for // Bus is a Go wrapper around a GstBus. It provides convenience methods for
// popping messages from the queue. // popping messages from the queue.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Bus struct { type Bus struct {
*Object *Object
} }
@@ -69,19 +71,27 @@ type Bus struct {
// } // }
// //
// // > [fakesrc0] ASYNC-START - Async task started // // > [fakesrc0] ASYNC-START - Async task started
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBus() *Bus { func NewBus() *Bus {
return FromGstBusUnsafeFull(unsafe.Pointer(C.gst_bus_new())) return FromGstBusUnsafeFull(unsafe.Pointer(C.gst_bus_new()))
} }
// FromGstBusUnsafeNone wraps the given unsafe.Pointer in a bus. It takes a ref on the bus and sets // FromGstBusUnsafeNone wraps the given unsafe.Pointer in a bus. It takes a ref on the bus and sets
// a runtime finalizer on it. // a runtime finalizer on it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBusUnsafeNone(bus unsafe.Pointer) *Bus { return wrapBus(glib.TransferNone(bus)) } func FromGstBusUnsafeNone(bus unsafe.Pointer) *Bus { return wrapBus(glib.TransferNone(bus)) }
// FromGstBusUnsafeFull wraps the given unsafe.Pointer in a bus. It does not increase the ref count // FromGstBusUnsafeFull wraps the given unsafe.Pointer in a bus. It does not increase the ref count
// and places a runtime finalizer on the instance. // and places a runtime finalizer on the instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstBusUnsafeFull(bus unsafe.Pointer) *Bus { return wrapBus(glib.TransferFull(bus)) } func FromGstBusUnsafeFull(bus unsafe.Pointer) *Bus { return wrapBus(glib.TransferFull(bus)) }
// Instance returns the underlying GstBus instance. // Instance returns the underlying GstBus instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) Instance() *C.GstBus { return C.toGstBus(b.Unsafe()) } func (b *Bus) Instance() *C.GstBus { return C.toGstBus(b.Unsafe()) }
// AddSignalWatch adds a bus signal watch to the default main context with the default priority (%G_PRIORITY_DEFAULT). // AddSignalWatch adds a bus signal watch to the default main context with the default priority (%G_PRIORITY_DEFAULT).
@@ -92,12 +102,16 @@ func (b *Bus) Instance() *C.GstBus { return C.toGstBus(b.Unsafe()) }
// //
// This function may be called multiple times. To clean up, the caller is responsible for calling RemoveSignalWatch // This function may be called multiple times. To clean up, the caller is responsible for calling RemoveSignalWatch
// as many times as this function is called. // as many times as this function is called.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) AddSignalWatch() { C.gst_bus_add_signal_watch(b.Instance()) } func (b *Bus) AddSignalWatch() { C.gst_bus_add_signal_watch(b.Instance()) }
// PopMessage attempts to pop a message from the bus. It returns nil if none are available. // PopMessage attempts to pop a message from the bus. It returns nil if none are available.
// //
// It is much safer and easier to use the AddWatch or other polling functions. Only use this method if you // It is much safer and easier to use the AddWatch or other polling functions. Only use this method if you
// are unable to also run a MainLoop, or for convenience sake. // are unable to also run a MainLoop, or for convenience sake.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) PopMessage(timeout ClockTime) *Message { func (b *Bus) PopMessage(timeout ClockTime) *Message {
return b.TimedPop(timeout) return b.TimedPop(timeout)
} }
@@ -107,6 +121,8 @@ func (b *Bus) PopMessage(timeout ClockTime) *Message {
// //
// It is much safer and easier to use the AddWatch or other polling functions. Only use this method if you // It is much safer and easier to use the AddWatch or other polling functions. Only use this method if you
// are unable to also run a MainLoop, or for convenience sake. // are unable to also run a MainLoop, or for convenience sake.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) BlockPopMessage() *Message { func (b *Bus) BlockPopMessage() *Message {
for { for {
if b.Instance() == nil { if b.Instance() == nil {
@@ -133,6 +149,8 @@ type BusWatchFunc func(msg *Message) bool
// //
// The return value reflects whether the watch was successfully added. False is returned if there // The return value reflects whether the watch was successfully added. False is returned if there
// is already a function registered. // is already a function registered.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) AddWatch(busFunc BusWatchFunc) bool { func (b *Bus) AddWatch(busFunc BusWatchFunc) bool {
fPtr := gopointer.Save(busFunc) fPtr := gopointer.Save(busFunc)
return gobool( return gobool(
@@ -157,11 +175,15 @@ func (b *Bus) AddWatch(busFunc BusWatchFunc) bool {
// by returning false from a previously installed function. // by returning false from a previously installed function.
// //
// The function returns false if there was no watch on the bus. // The function returns false if there was no watch on the bus.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) RemoveWatch() bool { func (b *Bus) RemoveWatch() bool {
return gobool(C.gst_bus_remove_watch(b.Instance())) return gobool(C.gst_bus_remove_watch(b.Instance()))
} }
// RemoveSignalWatch removes a signal watch previously added with AddSignalWatch. // RemoveSignalWatch removes a signal watch previously added with AddSignalWatch.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) RemoveSignalWatch() { C.gst_bus_remove_signal_watch(b.Instance()) } func (b *Bus) RemoveSignalWatch() { C.gst_bus_remove_signal_watch(b.Instance()) }
// DisableSyncMessageEmission instructs GStreamer to stop emitting the "sync-message" signal for this bus. // DisableSyncMessageEmission instructs GStreamer to stop emitting the "sync-message" signal for this bus.
@@ -170,6 +192,8 @@ func (b *Bus) RemoveSignalWatch() { C.gst_bus_remove_signal_watch(b.Instance())
// In the event that multiple pieces of code have called EnableSyncMessageEmission, the sync-message emissions // In the event that multiple pieces of code have called EnableSyncMessageEmission, the sync-message emissions
// will only be stopped after all calls to EnableSyncMessageEmission were "canceled" by calling this function. // will only be stopped after all calls to EnableSyncMessageEmission were "canceled" by calling this function.
// In this way the semantics are exactly the same as Ref that which calls enable should also call disable. // In this way the semantics are exactly the same as Ref that which calls enable should also call disable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) DisableSyncMessageEmission() { C.gst_bus_disable_sync_message_emission(b.Instance()) } func (b *Bus) DisableSyncMessageEmission() { C.gst_bus_disable_sync_message_emission(b.Instance()) }
// EnableSyncMessageEmission instructs GStreamer to emit the "sync-message" signal after running the bus's sync handler. // EnableSyncMessageEmission instructs GStreamer to emit the "sync-message" signal after running the bus's sync handler.
@@ -183,10 +207,14 @@ func (b *Bus) DisableSyncMessageEmission() { C.gst_bus_disable_sync_message_emis
// emission of signals when messages arrive; AddSignalWatch adds an idle callback to pop messages off the bus asynchronously. // emission of signals when messages arrive; AddSignalWatch adds an idle callback to pop messages off the bus asynchronously.
// The sync-message signal comes from the thread of whatever object posted the message; the "message" signal is marshaled // The sync-message signal comes from the thread of whatever object posted the message; the "message" signal is marshaled
// to the main thread via the main loop. // to the main thread via the main loop.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) EnableSyncMessageEmission() { C.gst_bus_enable_sync_message_emission(b.Instance()) } func (b *Bus) EnableSyncMessageEmission() { C.gst_bus_enable_sync_message_emission(b.Instance()) }
// PollFd represents the possible values returned from a GetPollFd. On Windows, there will not be // PollFd represents the possible values returned from a GetPollFd. On Windows, there will not be
// a Fd. // a Fd.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type PollFd struct { type PollFd struct {
Fd int Fd int
Events, REvents uint Events, REvents uint
@@ -198,6 +226,8 @@ type PollFd struct {
// //
// Warning: NEVER read or write anything to the returned fd but only use it for getting notifications via g_poll or similar // Warning: NEVER read or write anything to the returned fd but only use it for getting notifications via g_poll or similar
// and then use the normal GstBus API, e.g. PopMessage. // and then use the normal GstBus API, e.g. PopMessage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) GetPollFd() *PollFd { func (b *Bus) GetPollFd() *PollFd {
var gpollFD C.GPollFD var gpollFD C.GPollFD
C.gst_bus_get_pollfd(b.Instance(), &gpollFD) C.gst_bus_get_pollfd(b.Instance(), &gpollFD)
@@ -212,12 +242,16 @@ func (b *Bus) GetPollFd() *PollFd {
} }
// HavePending checks if there are pending messages on the bus that should be handled. // HavePending checks if there are pending messages on the bus that should be handled.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) HavePending() bool { func (b *Bus) HavePending() bool {
return gobool(C.gst_bus_have_pending(b.Instance())) return gobool(C.gst_bus_have_pending(b.Instance()))
} }
// Peek peeks the message on the top of the bus' queue. The message will remain on the bus' // Peek peeks the message on the top of the bus' queue. The message will remain on the bus'
// message queue. // message queue.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) Peek() *Message { func (b *Bus) Peek() *Message {
msg := C.gst_bus_peek(b.Instance()) msg := C.gst_bus_peek(b.Instance())
if msg == nil { if msg == nil {
@@ -251,6 +285,8 @@ func (b *Bus) Peek() *Message {
// //
// For 0 timeouts use gst_bus_pop_filtered instead of this function; for other short timeouts use TimedPopFiltered; // For 0 timeouts use gst_bus_pop_filtered instead of this function; for other short timeouts use TimedPopFiltered;
// everything else is better handled by setting up an asynchronous bus watch and doing things from there. // everything else is better handled by setting up an asynchronous bus watch and doing things from there.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) Poll(msgTypes MessageType, timeout ClockTime) *Message { func (b *Bus) Poll(msgTypes MessageType, timeout ClockTime) *Message {
cTime := C.GstClockTime(timeout) cTime := C.GstClockTime(timeout)
mType := C.GstMessageType(msgTypes) mType := C.GstMessageType(msgTypes)
@@ -262,6 +298,8 @@ func (b *Bus) Poll(msgTypes MessageType, timeout ClockTime) *Message {
} }
// Pop pops a message from the bus, or returns nil if none are available. // Pop pops a message from the bus, or returns nil if none are available.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) Pop() *Message { func (b *Bus) Pop() *Message {
msg := C.gst_bus_pop(b.Instance()) msg := C.gst_bus_pop(b.Instance())
if msg == nil { if msg == nil {
@@ -273,6 +311,8 @@ func (b *Bus) Pop() *Message {
// PopFiltered gets a message matching type from the bus. Will discard all messages on the bus that do not match type // PopFiltered gets a message matching type from the bus. Will discard all messages on the bus that do not match type
// and that have been posted before the first message that does match type. If there is no message matching type on the // and that have been posted before the first message that does match type. If there is no message matching type on the
// bus, all messages will be discarded. It is not possible to use message enums beyond MessageExtended in the events mask. // bus, all messages will be discarded. It is not possible to use message enums beyond MessageExtended in the events mask.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) PopFiltered(msgTypes MessageType) *Message { func (b *Bus) PopFiltered(msgTypes MessageType) *Message {
mType := C.GstMessageType(msgTypes) mType := C.GstMessageType(msgTypes)
msg := C.gst_bus_pop_filtered(b.Instance(), mType) msg := C.gst_bus_pop_filtered(b.Instance(), mType)
@@ -283,12 +323,16 @@ func (b *Bus) PopFiltered(msgTypes MessageType) *Message {
} }
// Post a new message on the bus. The bus takes ownership of the message. // Post a new message on the bus. The bus takes ownership of the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) Post(msg *Message) bool { func (b *Bus) Post(msg *Message) bool {
return gobool(C.gst_bus_post(b.Instance(), msg.Ref().Instance())) return gobool(C.gst_bus_post(b.Instance(), msg.Ref().Instance()))
} }
// SetFlushing sets whether to flush out and unref any messages queued in the bus. Releases references to the message origin // SetFlushing sets whether to flush out and unref any messages queued in the bus. Releases references to the message origin
// objects. Will flush future messages until SetFlushing sets flushing to FALSE. // objects. Will flush future messages until SetFlushing sets flushing to FALSE.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) SetFlushing(flushing bool) { C.gst_bus_set_flushing(b.Instance(), gboolean(flushing)) } func (b *Bus) SetFlushing(flushing bool) { C.gst_bus_set_flushing(b.Instance(), gboolean(flushing)) }
// BusSyncHandler will be invoked synchronously, when a new message has been injected into the bus. This function is mostly // BusSyncHandler will be invoked synchronously, when a new message has been injected into the bus. This function is mostly
@@ -302,6 +346,8 @@ type BusSyncHandler func(msg *Message) BusSyncReply
// creator of the bus. Applications should handle messages asynchronously using the watch and poll functions. // creator of the bus. Applications should handle messages asynchronously using the watch and poll functions.
// //
// Currently, destroyNotify funcs are not supported. // Currently, destroyNotify funcs are not supported.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) SetSyncHandler(f BusSyncHandler) { func (b *Bus) SetSyncHandler(f BusSyncHandler) {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
C.gst_bus_set_sync_handler( C.gst_bus_set_sync_handler(
@@ -315,6 +361,8 @@ func (b *Bus) SetSyncHandler(f BusSyncHandler) {
// TimedPop gets a message from the bus, waiting up to the specified timeout. // TimedPop gets a message from the bus, waiting up to the specified timeout.
// //
// If timeout is 0, this function behaves like Pop. If timeout is ClockTimeNone, this function will block forever until a message was posted on the bus. // If timeout is 0, this function behaves like Pop. If timeout is ClockTimeNone, this function will block forever until a message was posted on the bus.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) TimedPop(dur ClockTime) *Message { func (b *Bus) TimedPop(dur ClockTime) *Message {
msg := C.gst_bus_timed_pop(b.Instance(), C.GstClockTime(dur)) msg := C.gst_bus_timed_pop(b.Instance(), C.GstClockTime(dur))
if msg == nil { if msg == nil {
@@ -328,6 +376,8 @@ func (b *Bus) TimedPop(dur ClockTime) *Message {
// //
// If timeout is 0, this function behaves like PopFiltered. If timeout is ClockTimeNone, this function will block forever until a matching message // If timeout is 0, this function behaves like PopFiltered. If timeout is ClockTimeNone, this function will block forever until a matching message
// was posted on the bus. // was posted on the bus.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (b *Bus) TimedPopFiltered(dur ClockTime, msgTypes MessageType) *Message { func (b *Bus) TimedPopFiltered(dur ClockTime, msgTypes MessageType) *Message {
msg := C.gst_bus_timed_pop_filtered(b.Instance(), C.GstClockTime(dur), C.GstMessageType(msgTypes)) msg := C.gst_bus_timed_pop_filtered(b.Instance(), C.GstClockTime(dur), C.GstMessageType(msgTypes))
if msg == nil { if msg == nil {

View File

@@ -27,6 +27,8 @@ var TypeCaps = glib.Type(C.gst_caps_get_type())
var _ glib.ValueTransformer = &Caps{} var _ glib.ValueTransformer = &Caps{}
// Caps is a go wrapper around GstCaps. // Caps is a go wrapper around GstCaps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Caps struct { type Caps struct {
native *C.GstCaps native *C.GstCaps
} }
@@ -34,6 +36,8 @@ type Caps struct {
// FromGstCapsUnsafeNone wraps the pointer to the given C GstCaps with the go type. // FromGstCapsUnsafeNone wraps the pointer to the given C GstCaps with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
// A ref is taken on the caps and finalizer placed on the object. // A ref is taken on the caps and finalizer placed on the object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstCapsUnsafeNone(caps unsafe.Pointer) *Caps { func FromGstCapsUnsafeNone(caps unsafe.Pointer) *Caps {
if caps == nil { if caps == nil {
return nil return nil
@@ -47,6 +51,8 @@ func FromGstCapsUnsafeNone(caps unsafe.Pointer) *Caps {
// FromGstCapsUnsafeFull wraps the pointer to the given C GstCaps with the go type. // FromGstCapsUnsafeFull wraps the pointer to the given C GstCaps with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
// A finalizer is placed on the object to Unref after leaving scope. // A finalizer is placed on the object to Unref after leaving scope.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstCapsUnsafeFull(caps unsafe.Pointer) *Caps { func FromGstCapsUnsafeFull(caps unsafe.Pointer) *Caps {
if caps == nil { if caps == nil {
return nil return nil
@@ -58,6 +64,8 @@ func FromGstCapsUnsafeFull(caps unsafe.Pointer) *Caps {
// ToGstCaps converts the given pointer into a Caps without affecting the ref count or // ToGstCaps converts the given pointer into a Caps without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstCaps(caps unsafe.Pointer) *Caps { func ToGstCaps(caps unsafe.Pointer) *Caps {
return wrapCaps(C.toGstCaps(caps)) return wrapCaps(C.toGstCaps(caps))
} }
@@ -70,6 +78,8 @@ type CapsMapFunc func(features *CapsFeatures, structure *Structure) bool
// caps := gst.NewAnyCaps() // caps := gst.NewAnyCaps()
// fmt.Println(caps.IsAny()) // fmt.Println(caps.IsAny())
// // true // // true
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAnyCaps() *Caps { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_new_any())) } func NewAnyCaps() *Caps { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_new_any())) }
// NewEmptyCaps creates a new empty caps object. This is essentially the opposite of // NewEmptyCaps creates a new empty caps object. This is essentially the opposite of
@@ -78,6 +88,8 @@ func NewAnyCaps() *Caps { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps
// caps := gst.NewEmptyCaps() // caps := gst.NewEmptyCaps()
// fmt.Println(caps.IsEmpty()) // fmt.Println(caps.IsEmpty())
// // true // // true
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewEmptyCaps() *Caps { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_new_empty())) } func NewEmptyCaps() *Caps { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_new_empty())) }
// NewEmptySimpleCaps returns a new empty caps object with the given media format. // NewEmptySimpleCaps returns a new empty caps object with the given media format.
@@ -85,6 +97,8 @@ func NewEmptyCaps() *Caps { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_ca
// caps := gst.NewEmptySimpleCaps("audio/x-raw") // caps := gst.NewEmptySimpleCaps("audio/x-raw")
// fmt.Println(caps.String()) // fmt.Println(caps.String())
// // audio/x-raw // // audio/x-raw
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewEmptySimpleCaps(mediaFormat string) *Caps { func NewEmptySimpleCaps(mediaFormat string) *Caps {
cFormat := C.CString(mediaFormat) cFormat := C.CString(mediaFormat)
defer C.free(unsafe.Pointer(cFormat)) defer C.free(unsafe.Pointer(cFormat))
@@ -93,6 +107,8 @@ func NewEmptySimpleCaps(mediaFormat string) *Caps {
} }
// NewFullCaps creates a new caps from the given structures. // NewFullCaps creates a new caps from the given structures.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewFullCaps(structures ...*Structure) *Caps { func NewFullCaps(structures ...*Structure) *Caps {
caps := NewEmptyCaps() caps := NewEmptyCaps()
for _, st := range structures { for _, st := range structures {
@@ -106,6 +122,8 @@ func NewFullCaps(structures ...*Structure) *Caps {
// caps := gst.NewCapsFromString("audio/x-raw, channels=2") // caps := gst.NewCapsFromString("audio/x-raw, channels=2")
// fmt.Println(caps.String()) // fmt.Println(caps.String())
// // audio/x-raw, channels=(int)2 // // audio/x-raw, channels=(int)2
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCapsFromString(capsStr string) *Caps { func NewCapsFromString(capsStr string) *Caps {
cStr := C.CString(capsStr) cStr := C.CString(capsStr)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -117,9 +135,13 @@ func NewCapsFromString(capsStr string) *Caps {
} }
// Unsafe returns an unsafe.Pointer to the underlying GstCaps. // Unsafe returns an unsafe.Pointer to the underlying GstCaps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Unsafe() unsafe.Pointer { return unsafe.Pointer(c.native) } func (c *Caps) Unsafe() unsafe.Pointer { return unsafe.Pointer(c.native) }
// ToGValue returns a GValue containing the given caps. // ToGValue returns a GValue containing the given caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) ToGValue() (*glib.Value, error) { func (c *Caps) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(glib.Type(C.gst_caps_get_type())) val, err := glib.ValueInit(glib.Type(C.gst_caps_get_type()))
if err != nil { if err != nil {
@@ -137,23 +159,33 @@ func (c *Caps) ToGValue() (*glib.Value, error) {
// this function. Note that when a function provided by these bindings returns caps, or they are converted // this function. Note that when a function provided by these bindings returns caps, or they are converted
// through the FromGstCapsUnsafe methods, a ref is automatically taken if necessary and a runtime Finalizer // through the FromGstCapsUnsafe methods, a ref is automatically taken if necessary and a runtime Finalizer
// is used to remove it. // is used to remove it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Ref() *Caps { func (c *Caps) Ref() *Caps {
C.gst_caps_ref(c.Instance()) C.gst_caps_ref(c.Instance())
return c return c
} }
// Unref decreases the ref count on these caps by one. // Unref decreases the ref count on these caps by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Unref() { C.gst_caps_unref(c.Instance()) } func (c *Caps) Unref() { C.gst_caps_unref(c.Instance()) }
// Instance returns the native GstCaps instance // Instance returns the native GstCaps instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Instance() *C.GstCaps { return C.toGstCaps(c.Unsafe()) } func (c *Caps) Instance() *C.GstCaps { return C.toGstCaps(c.Unsafe()) }
// MakeWritable returns a writable copy of caps. // MakeWritable returns a writable copy of caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) MakeWritable() *Caps { func (c *Caps) MakeWritable() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.makeCapsWritable(c.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.makeCapsWritable(c.Instance())))
} }
// String implements a stringer on a caps instance. This same string can be used for NewCapsFromString. // String implements a stringer on a caps instance. This same string can be used for NewCapsFromString.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) String() string { func (c *Caps) String() string {
cStr := C.gst_caps_to_string(c.Instance()) cStr := C.gst_caps_to_string(c.Instance())
defer C.g_free((C.gpointer)(unsafe.Pointer(cStr))) defer C.g_free((C.gpointer)(unsafe.Pointer(cStr)))
@@ -161,23 +193,31 @@ func (c *Caps) String() string {
} }
// AppendStructure appends the given structure to this caps instance. // AppendStructure appends the given structure to this caps instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) AppendStructure(st *Structure) { func (c *Caps) AppendStructure(st *Structure) {
C.gst_caps_append_structure(c.Instance(), st.Instance()) C.gst_caps_append_structure(c.Instance(), st.Instance())
} }
// AppendStructureFull appends structure with features to caps. The structure is not copied; // AppendStructureFull appends structure with features to caps. The structure is not copied;
// caps becomes the owner of structure. // caps becomes the owner of structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) AppendStructureFull(st *Structure, features *CapsFeatures) { func (c *Caps) AppendStructureFull(st *Structure, features *CapsFeatures) {
C.gst_caps_append_structure_full(c.Instance(), st.Instance(), features.Instance()) C.gst_caps_append_structure_full(c.Instance(), st.Instance(), features.Instance())
} }
// Append appends the given caps element to these caps. These caps take ownership // Append appends the given caps element to these caps. These caps take ownership
// over the given object. If either caps are ANY, the resulting caps will be ANY. // over the given object. If either caps are ANY, the resulting caps will be ANY.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Append(caps *Caps) { func (c *Caps) Append(caps *Caps) {
C.gst_caps_append(c.Instance(), caps.Ref().Instance()) C.gst_caps_append(c.Instance(), caps.Ref().Instance())
} }
// CanIntersect tries intersecting these caps with those given and reports whether the result would not be empty. // CanIntersect tries intersecting these caps with those given and reports whether the result would not be empty.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) CanIntersect(caps *Caps) bool { func (c *Caps) CanIntersect(caps *Caps) bool {
return gobool(C.gst_caps_can_intersect(c.Instance(), caps.Instance())) return gobool(C.gst_caps_can_intersect(c.Instance(), caps.Instance()))
} }
@@ -186,11 +226,15 @@ func (c *Caps) CanIntersect(caps *Caps) bool {
// The structures are copied as well. // The structures are copied as well.
// //
// Note that this function is the semantic equivalent of a Ref followed by a MakeWritable. // Note that this function is the semantic equivalent of a Ref followed by a MakeWritable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Copy() *Caps { func (c *Caps) Copy() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_copy(c.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_copy(c.Instance())))
} }
// CopyNth creates a new GstCaps and appends a copy of the nth structure contained in caps. // CopyNth creates a new GstCaps and appends a copy of the nth structure contained in caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) CopyNth(n uint) *Caps { func (c *Caps) CopyNth(n uint) *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_copy_nth(c.Instance(), C.guint(n)))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_copy_nth(c.Instance(), C.guint(n))))
} }
@@ -213,6 +257,8 @@ func (c *Caps) CopyNth(n uint) *Caps {
// //
// // Removing system memory feature // // Removing system memory feature
// // true // // true
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) FilterAndMapInPlace(f CapsMapFunc) { func (c *Caps) FilterAndMapInPlace(f CapsMapFunc) {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -233,6 +279,8 @@ func (c *Caps) FilterAndMapInPlace(f CapsMapFunc) {
// returned caps will be the empty too and contain no structure at all. // returned caps will be the empty too and contain no structure at all.
// //
// Calling this function with any caps is not allowed. // Calling this function with any caps is not allowed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Fixate() *Caps { func (c *Caps) Fixate() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_fixate(c.Ref().Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_fixate(c.Ref().Instance())))
} }
@@ -248,6 +296,8 @@ func (c *Caps) Fixate() *Caps {
// }) // })
// //
// // audio/x-raw; // // audio/x-raw;
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) ForEach(f CapsMapFunc) bool { func (c *Caps) ForEach(f CapsMapFunc) bool {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -259,9 +309,13 @@ func (c *Caps) ForEach(f CapsMapFunc) bool {
} }
// GetSize returns the number of structures inside this caps instance. // GetSize returns the number of structures inside this caps instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) GetSize() int { return int(C.gst_caps_get_size(c.Instance())) } func (c *Caps) GetSize() int { return int(C.gst_caps_get_size(c.Instance())) }
// GetStructureAt returns the structure at the given index, or nil if none exists. // GetStructureAt returns the structure at the given index, or nil if none exists.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) GetStructureAt(idx int) *Structure { func (c *Caps) GetStructureAt(idx int) *Structure {
st := C.gst_caps_get_structure(c.Instance(), C.guint(idx)) st := C.gst_caps_get_structure(c.Instance(), C.guint(idx))
if st == nil { if st == nil {
@@ -279,6 +333,8 @@ func (c *Caps) GetStructureAt(idx int) *Structure {
} }
// GetFeaturesAt returns the feature at the given index, or nil if none exists. // GetFeaturesAt returns the feature at the given index, or nil if none exists.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) GetFeaturesAt(idx int) *CapsFeatures { func (c *Caps) GetFeaturesAt(idx int) *CapsFeatures {
feats := C.gst_caps_get_features(c.Instance(), C.guint(idx)) feats := C.gst_caps_get_features(c.Instance(), C.guint(idx))
if feats == nil { if feats == nil {
@@ -300,57 +356,81 @@ const (
// Intersect creates a new Caps that contains all the formats that are common to both these caps and those given. // Intersect creates a new Caps that contains all the formats that are common to both these caps and those given.
// Defaults to CapsIntersectZigZag mode. // Defaults to CapsIntersectZigZag mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Intersect(caps *Caps) *Caps { func (c *Caps) Intersect(caps *Caps) *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_intersect(c.Instance(), caps.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_intersect(c.Instance(), caps.Instance())))
} }
// IntersectFull creates a new Caps that contains all the formats that are common to both these caps those given. // IntersectFull creates a new Caps that contains all the formats that are common to both these caps those given.
// The order is defined by the CapsIntersectMode used. // The order is defined by the CapsIntersectMode used.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IntersectFull(caps *Caps, mode CapsIntersectMode) *Caps { func (c *Caps) IntersectFull(caps *Caps, mode CapsIntersectMode) *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_intersect_full(c.Instance(), caps.Instance(), C.GstCapsIntersectMode(mode)))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_intersect_full(c.Instance(), caps.Instance(), C.GstCapsIntersectMode(mode))))
} }
// IsAlwaysCompatible returns if this structure is always compatible with another if every media format that is in // IsAlwaysCompatible returns if this structure is always compatible with another if every media format that is in
// the first is also contained in the second. That is, these caps are a subset of those given. // the first is also contained in the second. That is, these caps are a subset of those given.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsAlwaysCompatible(caps *Caps) bool { func (c *Caps) IsAlwaysCompatible(caps *Caps) bool {
return gobool(C.gst_caps_is_always_compatible(c.Instance(), caps.Instance())) return gobool(C.gst_caps_is_always_compatible(c.Instance(), caps.Instance()))
} }
// IsAny returns true if these caps match any media format. // IsAny returns true if these caps match any media format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsAny() bool { return gobool(C.gst_caps_is_any(c.Instance())) } func (c *Caps) IsAny() bool { return gobool(C.gst_caps_is_any(c.Instance())) }
// IsEmpty returns true if these caps are empty. // IsEmpty returns true if these caps are empty.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsEmpty() bool { return gobool(C.gst_caps_is_empty(c.Instance())) } func (c *Caps) IsEmpty() bool { return gobool(C.gst_caps_is_empty(c.Instance())) }
// IsEqual returns true if the caps given represent the same set as these. // IsEqual returns true if the caps given represent the same set as these.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsEqual(caps *Caps) bool { func (c *Caps) IsEqual(caps *Caps) bool {
return gobool(C.gst_caps_is_equal(c.Instance(), caps.Instance())) return gobool(C.gst_caps_is_equal(c.Instance(), caps.Instance()))
} }
// IsEqualFixed tests if the Caps are equal. This function only works on fixed Caps. // IsEqualFixed tests if the Caps are equal. This function only works on fixed Caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsEqualFixed(caps *Caps) bool { func (c *Caps) IsEqualFixed(caps *Caps) bool {
return gobool(C.gst_caps_is_equal_fixed(c.Instance(), caps.Instance())) return gobool(C.gst_caps_is_equal_fixed(c.Instance(), caps.Instance()))
} }
// IsFixed returns true if these caps are fixed, that is, they describe exactly one format. // IsFixed returns true if these caps are fixed, that is, they describe exactly one format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsFixed() bool { return gobool(C.gst_caps_is_fixed(c.Instance())) } func (c *Caps) IsFixed() bool { return gobool(C.gst_caps_is_fixed(c.Instance())) }
// IsStrictlyEqual checks if the given caps are exactly the same set of caps. // IsStrictlyEqual checks if the given caps are exactly the same set of caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsStrictlyEqual(caps *Caps) bool { func (c *Caps) IsStrictlyEqual(caps *Caps) bool {
return gobool(C.gst_caps_is_strictly_equal(c.Instance(), caps.Instance())) return gobool(C.gst_caps_is_strictly_equal(c.Instance(), caps.Instance()))
} }
// IsSubset checks if all caps represented by these are also represented by those given. // IsSubset checks if all caps represented by these are also represented by those given.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsSubset(caps *Caps) bool { func (c *Caps) IsSubset(caps *Caps) bool {
return gobool(C.gst_caps_is_subset(c.Instance(), caps.Instance())) return gobool(C.gst_caps_is_subset(c.Instance(), caps.Instance()))
} }
// IsSubsetStructure checks if the given structure is a subset of these caps. // IsSubsetStructure checks if the given structure is a subset of these caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsSubsetStructure(structure *Structure) bool { func (c *Caps) IsSubsetStructure(structure *Structure) bool {
return gobool(C.gst_caps_is_subset_structure(c.Instance(), structure.Instance())) return gobool(C.gst_caps_is_subset_structure(c.Instance(), structure.Instance()))
} }
// IsSubsetStructureFull checks if the given structure is a subset of these caps with features. // IsSubsetStructureFull checks if the given structure is a subset of these caps with features.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsSubsetStructureFull(structure *Structure, features *CapsFeatures) bool { func (c *Caps) IsSubsetStructureFull(structure *Structure, features *CapsFeatures) bool {
if features == nil { if features == nil {
return gobool(C.gst_caps_is_subset_structure_full( return gobool(C.gst_caps_is_subset_structure_full(
@@ -363,6 +443,8 @@ func (c *Caps) IsSubsetStructureFull(structure *Structure, features *CapsFeature
} }
// IsWritable returns true if these caps are writable. // IsWritable returns true if these caps are writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) IsWritable() bool { func (c *Caps) IsWritable() bool {
return gobool(C.capsIsWritable(c.Instance())) return gobool(C.capsIsWritable(c.Instance()))
} }
@@ -370,6 +452,8 @@ func (c *Caps) IsWritable() bool {
// MapInPlace calls the provided function once for each structure and caps feature in the Caps. // MapInPlace calls the provided function once for each structure and caps feature in the Caps.
// In contrast to ForEach, the function may modify, but not delete, the structures and features. // In contrast to ForEach, the function may modify, but not delete, the structures and features.
// The caps must be mutable. // The caps must be mutable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) MapInPlace(f CapsMapFunc) bool { func (c *Caps) MapInPlace(f CapsMapFunc) bool {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -383,16 +467,22 @@ func (c *Caps) MapInPlace(f CapsMapFunc) bool {
// Merge appends the structures contained in the given caps if they are not yet expressed by these. // Merge appends the structures contained in the given caps if they are not yet expressed by these.
// The structures in the given caps are not copied -- they are transferred to a writable copy of these ones, // The structures in the given caps are not copied -- they are transferred to a writable copy of these ones,
// and then those given are freed. If either caps are ANY, the resulting caps will be ANY. // and then those given are freed. If either caps are ANY, the resulting caps will be ANY.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Merge(caps *Caps) *Caps { func (c *Caps) Merge(caps *Caps) *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_merge(c.Ref().Instance(), caps.Ref().Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_merge(c.Ref().Instance(), caps.Ref().Instance())))
} }
// MergeStructure appends structure to caps if its not already expressed by caps. // MergeStructure appends structure to caps if its not already expressed by caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) MergeStructure(structure *Structure) *Caps { func (c *Caps) MergeStructure(structure *Structure) *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_merge_structure(c.Ref().Instance(), structure.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_merge_structure(c.Ref().Instance(), structure.Instance())))
} }
// MergeStructureFull appends structure with features to the caps if its not already expressed. // MergeStructureFull appends structure with features to the caps if its not already expressed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) MergeStructureFull(structure *Structure, features *CapsFeatures) *Caps { func (c *Caps) MergeStructureFull(structure *Structure, features *CapsFeatures) *Caps {
if features == nil { if features == nil {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_merge_structure_full( return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_merge_structure_full(
@@ -409,16 +499,22 @@ func (c *Caps) MergeStructureFull(structure *Structure, features *CapsFeatures)
// //
// This function takes ownership of caps and will call MakeWritable on it so you must not // This function takes ownership of caps and will call MakeWritable on it so you must not
// use caps afterwards unless you keep an additional reference to it with Ref. // use caps afterwards unless you keep an additional reference to it with Ref.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Normalize() *Caps { func (c *Caps) Normalize() *Caps {
return wrapCaps(C.gst_caps_normalize(c.Instance())) return wrapCaps(C.gst_caps_normalize(c.Instance()))
} }
// RemoveStructureAt removes the structure with the given index from the list of structures. // RemoveStructureAt removes the structure with the given index from the list of structures.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) RemoveStructureAt(idx uint) { func (c *Caps) RemoveStructureAt(idx uint) {
C.gst_caps_remove_structure(c.Instance(), C.guint(idx)) C.gst_caps_remove_structure(c.Instance(), C.guint(idx))
} }
// SetFeaturesAt sets the CapsFeatures features for the structure at index. // SetFeaturesAt sets the CapsFeatures features for the structure at index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) SetFeaturesAt(idx uint, features *CapsFeatures) { func (c *Caps) SetFeaturesAt(idx uint, features *CapsFeatures) {
if features == nil { if features == nil {
C.gst_caps_set_features(c.Instance(), C.guint(idx), nil) C.gst_caps_set_features(c.Instance(), C.guint(idx), nil)
@@ -428,6 +524,8 @@ func (c *Caps) SetFeaturesAt(idx uint, features *CapsFeatures) {
} }
// SetFeaturesSimple sets the CapsFeatures for all the structures of these caps. // SetFeaturesSimple sets the CapsFeatures for all the structures of these caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) SetFeaturesSimple(features *CapsFeatures) { func (c *Caps) SetFeaturesSimple(features *CapsFeatures) {
if features == nil { if features == nil {
C.gst_caps_set_features_simple(c.Instance(), nil) C.gst_caps_set_features_simple(c.Instance(), nil)
@@ -439,6 +537,8 @@ func (c *Caps) SetFeaturesSimple(features *CapsFeatures) {
// SetValue sets the given field on all structures of caps to the given value. This is a convenience // SetValue sets the given field on all structures of caps to the given value. This is a convenience
// function for calling SetValue on all structures of caps. If the value cannot be coerced to a C type, // function for calling SetValue on all structures of caps. If the value cannot be coerced to a C type,
// then nothing will happen. // then nothing will happen.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) SetValue(field string, val interface{}) { func (c *Caps) SetValue(field string, val interface{}) {
gVal, err := glib.GValue(val) gVal, err := glib.GValue(val)
if err != nil { if err != nil {
@@ -459,17 +559,23 @@ func (c *Caps) SetValue(field string, val interface{}) {
// caps afterwards unless you keep an additional reference to it with Ref. // caps afterwards unless you keep an additional reference to it with Ref.
// //
// This method does not preserve the original order of caps. // This method does not preserve the original order of caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Simplify() *Caps { func (c *Caps) Simplify() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_simplify(c.Ref().Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_simplify(c.Ref().Instance())))
} }
// StealStructureAt retrieves the structure with the given index from the list of structures contained in caps. // StealStructureAt retrieves the structure with the given index from the list of structures contained in caps.
// The caller becomes the owner of the returned structure. // The caller becomes the owner of the returned structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) StealStructureAt(idx uint) *Structure { func (c *Caps) StealStructureAt(idx uint) *Structure {
return wrapStructure(C.gst_caps_steal_structure(c.Instance(), C.guint(idx))) return wrapStructure(C.gst_caps_steal_structure(c.Instance(), C.guint(idx)))
} }
// Subtract subtracts the given caps from these. // Subtract subtracts the given caps from these.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Subtract(caps *Caps) *Caps { func (c *Caps) Subtract(caps *Caps) *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_subtract(c.Instance(), caps.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_subtract(c.Instance(), caps.Instance())))
} }
@@ -481,6 +587,8 @@ func (c *Caps) Subtract(caps *Caps) *Caps {
// //
// Note that it is not guaranteed that the returned caps have exactly one structure. If caps is any or empty caps // Note that it is not guaranteed that the returned caps have exactly one structure. If caps is any or empty caps
// then then returned caps will be the same and contain no structure at all. // then then returned caps will be the same and contain no structure at all.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Caps) Truncate() *Caps { func (c *Caps) Truncate() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_truncate(c.Ref().Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_truncate(c.Ref().Instance())))
} }

View File

@@ -15,6 +15,8 @@ var (
) )
// CapsFeatures is a go representation of GstCapsFeatures. // CapsFeatures is a go representation of GstCapsFeatures.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type CapsFeatures struct { type CapsFeatures struct {
native *C.GstCapsFeatures native *C.GstCapsFeatures
} }
@@ -24,6 +26,8 @@ type CapsFeatures struct {
// feats := gst.NewCapsFeaturesEmpty() // feats := gst.NewCapsFeaturesEmpty()
// fmt.Println(feats.GetSize()) // fmt.Println(feats.GetSize())
// // 0 // // 0
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCapsFeaturesEmpty() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_features_new_empty()) } func NewCapsFeaturesEmpty() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_features_new_empty()) }
// NewCapsFeaturesAny returns a new ANY CapsFeatures. // NewCapsFeaturesAny returns a new ANY CapsFeatures.
@@ -31,9 +35,13 @@ func NewCapsFeaturesEmpty() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_f
// feats := gst.NewCapsFeaturesAny() // feats := gst.NewCapsFeaturesAny()
// fmt.Println(feats.IsAny()) // fmt.Println(feats.IsAny())
// // true // // true
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCapsFeaturesAny() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_features_new_any()) } func NewCapsFeaturesAny() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_features_new_any()) }
// NewCapsFeaturesFromString creates new CapsFeatures from the given string. // NewCapsFeaturesFromString creates new CapsFeatures from the given string.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCapsFeaturesFromString(features string) *CapsFeatures { func NewCapsFeaturesFromString(features string) *CapsFeatures {
cStr := C.CString(features) cStr := C.CString(features)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -50,6 +58,8 @@ var TypeCapsFeatures = glib.Type(C.gst_caps_features_get_type())
var _ glib.ValueTransformer = &CapsFeatures{} var _ glib.ValueTransformer = &CapsFeatures{}
// ToGValue implements a glib.ValueTransformer // ToGValue implements a glib.ValueTransformer
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) ToGValue() (*glib.Value, error) { func (c *CapsFeatures) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(TypeCapsFeatures) val, err := glib.ValueInit(TypeCapsFeatures)
if err != nil { if err != nil {
@@ -63,6 +73,8 @@ func (c *CapsFeatures) ToGValue() (*glib.Value, error) {
} }
// Instance returns the native underlying GstCapsFeatures instance. // Instance returns the native underlying GstCapsFeatures instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) Instance() *C.GstCapsFeatures { func (c *CapsFeatures) Instance() *C.GstCapsFeatures {
return C.toGstCapsFeatures(unsafe.Pointer(c.native)) return C.toGstCapsFeatures(unsafe.Pointer(c.native))
} }
@@ -72,6 +84,8 @@ func (c *CapsFeatures) Instance() *C.GstCapsFeatures {
// feats := gst.NewCapsFeaturesAny() // feats := gst.NewCapsFeaturesAny()
// fmt.Println(feats.String()) // fmt.Println(feats.String())
// // ANY // // ANY
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) String() string { func (c *CapsFeatures) String() string {
return C.GoString(C.gst_caps_features_to_string(c.Instance())) return C.GoString(C.gst_caps_features_to_string(c.Instance()))
} }
@@ -92,6 +106,8 @@ func (c *CapsFeatures) String() string {
// // 1 // // 1
// // true // // true
// // memory:SystemMemory // // memory:SystemMemory
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) Add(feature string) { func (c *CapsFeatures) Add(feature string) {
cStr := C.CString(feature) cStr := C.CString(feature)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -102,6 +118,8 @@ func (c *CapsFeatures) Add(feature string) {
} }
// Contains returns true if the given feature is included in these. // Contains returns true if the given feature is included in these.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) Contains(feature string) bool { func (c *CapsFeatures) Contains(feature string) bool {
cStr := C.CString(feature) cStr := C.CString(feature)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -112,30 +130,42 @@ func (c *CapsFeatures) Contains(feature string) bool {
} }
// Copy duplicates these features and all of it's values. // Copy duplicates these features and all of it's values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) Copy() *CapsFeatures { func (c *CapsFeatures) Copy() *CapsFeatures {
return wrapCapsFeatures(C.gst_caps_features_copy(c.Instance())) return wrapCapsFeatures(C.gst_caps_features_copy(c.Instance()))
} }
// Free frees the memory containing these features. Only call this if you // Free frees the memory containing these features. Only call this if you
// do not intend to pass these features to other methods. // do not intend to pass these features to other methods.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) Free() { C.gst_caps_features_free(c.Instance()) } func (c *CapsFeatures) Free() { C.gst_caps_features_free(c.Instance()) }
// GetNth returns the feature at index. // GetNth returns the feature at index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) GetNth(idx uint) string { func (c *CapsFeatures) GetNth(idx uint) string {
feat := C.gst_caps_features_get_nth(c.Instance(), C.guint(idx)) feat := C.gst_caps_features_get_nth(c.Instance(), C.guint(idx))
return C.GoString(feat) return C.GoString(feat)
} }
// GetSize returns the number of features. // GetSize returns the number of features.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) GetSize() uint { func (c *CapsFeatures) GetSize() uint {
return uint(C.gst_caps_features_get_size(c.Instance())) return uint(C.gst_caps_features_get_size(c.Instance()))
} }
// IsAny returns true if these features match any. // IsAny returns true if these features match any.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) IsAny() bool { return gobool(C.gst_caps_features_is_any(c.Instance())) } func (c *CapsFeatures) IsAny() bool { return gobool(C.gst_caps_features_is_any(c.Instance())) }
// IsEqual returns true if the given CapsFeatures are equal to the provided ones. // IsEqual returns true if the given CapsFeatures are equal to the provided ones.
// If the provided structure is nil, this function immediately returns false. // If the provided structure is nil, this function immediately returns false.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) IsEqual(feats *CapsFeatures) bool { func (c *CapsFeatures) IsEqual(feats *CapsFeatures) bool {
if feats == nil { if feats == nil {
return false return false
@@ -144,6 +174,8 @@ func (c *CapsFeatures) IsEqual(feats *CapsFeatures) bool {
} }
// Remove removes the given feature. // Remove removes the given feature.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) Remove(feature string) { func (c *CapsFeatures) Remove(feature string) {
cStr := C.CString(feature) cStr := C.CString(feature)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -156,6 +188,8 @@ func (c *CapsFeatures) Remove(feature string) {
// SetParentRefCount sets the parent_refcount field of CapsFeatures. This field is used to determine // SetParentRefCount sets the parent_refcount field of CapsFeatures. This field is used to determine
// whether a caps features is mutable or not. This function should only be called by code implementing // whether a caps features is mutable or not. This function should only be called by code implementing
// parent objects of CapsFeatures, as described in the MT Refcounting section of the design documents. // parent objects of CapsFeatures, as described in the MT Refcounting section of the design documents.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *CapsFeatures) SetParentRefCount(refCount int) bool { func (c *CapsFeatures) SetParentRefCount(refCount int) bool {
gcount := C.gint(refCount) gcount := C.gint(refCount)
return gobool(C.gst_caps_features_set_parent_refcount(c.Instance(), &gcount)) return gobool(C.gst_caps_features_set_parent_refcount(c.Instance(), &gcount))

View File

@@ -31,7 +31,11 @@ var InterfaceChildProxy glib.Interface = &interfaceChildProxy{}
type interfaceChildProxy struct{ glib.Interface } type interfaceChildProxy struct{ glib.Interface }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *interfaceChildProxy) Type() glib.Type { return glib.Type(C.GST_TYPE_CHILD_PROXY) } func (i *interfaceChildProxy) Type() glib.Type { return glib.Type(C.GST_TYPE_CHILD_PROXY) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *interfaceChildProxy) Init(instance *glib.TypeInstance) { func (i *interfaceChildProxy) Init(instance *glib.TypeInstance) {
goobj := instance.GoType goobj := instance.GoType
@@ -67,6 +71,8 @@ func (i *interfaceChildProxy) Init(instance *glib.TypeInstance) {
} }
// ChildProxyImpl is the reference implementation for a ChildProxy implemented by a Go object. // ChildProxyImpl is the reference implementation for a ChildProxy implemented by a Go object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type ChildProxyImpl interface { type ChildProxyImpl interface {
ChildAdded(self *ChildProxy, child *glib.Object, name string) ChildAdded(self *ChildProxy, child *glib.Object, name string)
ChildRemoved(self *ChildProxy, child *glib.Object, name string) ChildRemoved(self *ChildProxy, child *glib.Object, name string)
@@ -87,6 +93,8 @@ type ChildProxy struct{ ptr *C.GstChildProxy }
// ToChildProxy returns a ChildProxy for the given element. If the element does not implement // ToChildProxy returns a ChildProxy for the given element. If the element does not implement
// a ChildProxy it returns nil. // a ChildProxy it returns nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToChildProxy(elem *Element) *ChildProxy { func ToChildProxy(elem *Element) *ChildProxy {
if proxy := C.toGstChildProxy(elem.Unsafe()); proxy != nil { if proxy := C.toGstChildProxy(elem.Unsafe()); proxy != nil {
return &ChildProxy{proxy} return &ChildProxy{proxy}
@@ -95,11 +103,15 @@ func ToChildProxy(elem *Element) *ChildProxy {
} }
// Instance returns the underlying GstChildProxy instance. // Instance returns the underlying GstChildProxy instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) Instance() *C.GstChildProxy { func (c *ChildProxy) Instance() *C.GstChildProxy {
return C.toGstChildProxy(unsafe.Pointer(c.ptr)) return C.toGstChildProxy(unsafe.Pointer(c.ptr))
} }
// ChildAdded emits the "child-added" signal. // ChildAdded emits the "child-added" signal.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) ChildAdded(child *glib.Object, name string) { func (c *ChildProxy) ChildAdded(child *glib.Object, name string) {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -111,6 +123,8 @@ func (c *ChildProxy) ChildAdded(child *glib.Object, name string) {
} }
// ChildRemoved emits the "child-removed" signal. // ChildRemoved emits the "child-removed" signal.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) ChildRemoved(child *glib.Object, name string) { func (c *ChildProxy) ChildRemoved(child *glib.Object, name string) {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -124,6 +138,8 @@ func (c *ChildProxy) ChildRemoved(child *glib.Object, name string) {
// Get gets properties of the parent object and its children. This is a direct alias to looping // Get gets properties of the parent object and its children. This is a direct alias to looping
// over GetProperty and returning the results in the order of the arguments. If any of the results // over GetProperty and returning the results in the order of the arguments. If any of the results
// returns nil from an allocation error, nil is returned for the entire slice. // returns nil from an allocation error, nil is returned for the entire slice.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) Get(names ...string) []*glib.Value { func (c *ChildProxy) Get(names ...string) []*glib.Value {
out := make([]*glib.Value, len(names)) out := make([]*glib.Value, len(names))
for i, name := range names { for i, name := range names {
@@ -138,6 +154,8 @@ func (c *ChildProxy) Get(names ...string) []*glib.Value {
// GetChildByIndex fetches a child by its number. This function can return nil if the object is not // GetChildByIndex fetches a child by its number. This function can return nil if the object is not
// found. // found.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) GetChildByIndex(idx uint) *glib.Object { func (c *ChildProxy) GetChildByIndex(idx uint) *glib.Object {
gobj := C.gst_child_proxy_get_child_by_index(c.Instance(), C.guint(idx)) gobj := C.gst_child_proxy_get_child_by_index(c.Instance(), C.guint(idx))
if gobj == nil { if gobj == nil {
@@ -151,6 +169,8 @@ func (c *ChildProxy) GetChildByIndex(idx uint) *glib.Object {
// to be overridden. // to be overridden.
// //
// This function can return nil if the object is not found. // This function can return nil if the object is not found.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) GetChildByName(name string) *glib.Object { func (c *ChildProxy) GetChildByName(name string) *glib.Object {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -162,6 +182,8 @@ func (c *ChildProxy) GetChildByName(name string) *glib.Object {
} }
// GetChildrenCount returns the number of child objects the parent contains. // GetChildrenCount returns the number of child objects the parent contains.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) GetChildrenCount() uint { func (c *ChildProxy) GetChildrenCount() uint {
return uint(C.gst_child_proxy_get_children_count(c.Instance())) return uint(C.gst_child_proxy_get_children_count(c.Instance()))
} }
@@ -169,6 +191,8 @@ func (c *ChildProxy) GetChildrenCount() uint {
// GetProperty gets a single property using the ChildProxy mechanism. The bindings // GetProperty gets a single property using the ChildProxy mechanism. The bindings
// take care of freeing the value when it leaves the user's scope. This function // take care of freeing the value when it leaves the user's scope. This function
// can return nil if a failure happens trying to allocate GValues. // can return nil if a failure happens trying to allocate GValues.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) GetProperty(name string) *glib.Value { func (c *ChildProxy) GetProperty(name string) *glib.Value {
value, err := glib.ValueAlloc() value, err := glib.ValueAlloc()
if err != nil { if err != nil {
@@ -182,6 +206,8 @@ func (c *ChildProxy) GetProperty(name string) *glib.Value {
// Lookup looks up which object and and parameter would be affected by the given name. // Lookup looks up which object and and parameter would be affected by the given name.
// If ok is false, the targets could not be found and this function returned nil. // If ok is false, the targets could not be found and this function returned nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) Lookup(name string) (ok bool, target *glib.Object, param *glib.ParamSpec) { func (c *ChildProxy) Lookup(name string) (ok bool, target *glib.Object, param *glib.ParamSpec) {
var gtarget *C.GObject var gtarget *C.GObject
var gspec *C.GParamSpec var gspec *C.GParamSpec
@@ -201,6 +227,8 @@ func (c *ChildProxy) Lookup(name string) (ok bool, target *glib.Object, param *g
} }
// Set takes a map of names to values and applies them using the ChildProxy mechanism. // Set takes a map of names to values and applies them using the ChildProxy mechanism.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) Set(values map[string]*glib.Value) { func (c *ChildProxy) Set(values map[string]*glib.Value) {
for name, value := range values { for name, value := range values {
c.SetProperty(name, value) c.SetProperty(name, value)
@@ -208,6 +236,8 @@ func (c *ChildProxy) Set(values map[string]*glib.Value) {
} }
// SetProperty sets a single property using the ChildProxy mechanism. // SetProperty sets a single property using the ChildProxy mechanism.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ChildProxy) SetProperty(name string, value *glib.Value) { func (c *ChildProxy) SetProperty(name string, value *glib.Value) {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))

View File

@@ -10,9 +10,13 @@ import (
"github.com/go-gst/go-glib/glib" "github.com/go-gst/go-glib/glib"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapParent(parent *C.GstChildProxy) *ChildProxy { return &ChildProxy{ptr: parent} } func wrapParent(parent *C.GstChildProxy) *ChildProxy { return &ChildProxy{ptr: parent} }
//export goGstChildProxyChildAdded //export goGstChildProxyChildAdded
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstChildProxyChildAdded(parent *C.GstChildProxy, child *C.GObject, name *C.gchar) { func goGstChildProxyChildAdded(parent *C.GstChildProxy, child *C.GObject, name *C.gchar) {
iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent))
caller := iface.(interface { caller := iface.(interface {
@@ -26,6 +30,8 @@ func goGstChildProxyChildAdded(parent *C.GstChildProxy, child *C.GObject, name *
} }
//export goGstChildProxyChildRemoved //export goGstChildProxyChildRemoved
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstChildProxyChildRemoved(parent *C.GstChildProxy, child *C.GObject, name *C.gchar) { func goGstChildProxyChildRemoved(parent *C.GstChildProxy, child *C.GObject, name *C.gchar) {
iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent))
caller := iface.(interface { caller := iface.(interface {
@@ -39,6 +45,8 @@ func goGstChildProxyChildRemoved(parent *C.GstChildProxy, child *C.GObject, name
} }
//export goGstChildProxyGetChildByIndex //export goGstChildProxyGetChildByIndex
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstChildProxyGetChildByIndex(parent *C.GstChildProxy, idx C.guint) *C.GObject { func goGstChildProxyGetChildByIndex(parent *C.GstChildProxy, idx C.guint) *C.GObject {
iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent))
caller := iface.(interface { caller := iface.(interface {
@@ -52,6 +60,8 @@ func goGstChildProxyGetChildByIndex(parent *C.GstChildProxy, idx C.guint) *C.GOb
} }
//export goGstChildProxyGetChildByName //export goGstChildProxyGetChildByName
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstChildProxyGetChildByName(parent *C.GstChildProxy, name *C.gchar) *C.GObject { func goGstChildProxyGetChildByName(parent *C.GstChildProxy, name *C.gchar) *C.GObject {
iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent))
caller := iface.(interface { caller := iface.(interface {
@@ -65,6 +75,8 @@ func goGstChildProxyGetChildByName(parent *C.GstChildProxy, name *C.gchar) *C.GO
} }
//export goGstChildProxyGetChildrenCount //export goGstChildProxyGetChildrenCount
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstChildProxyGetChildrenCount(parent *C.GstChildProxy) C.guint { func goGstChildProxyGetChildrenCount(parent *C.GstChildProxy) C.guint {
iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent))
caller := iface.(interface { caller := iface.(interface {

View File

@@ -31,6 +31,8 @@ import (
type ClockTime C.GstClockTime type ClockTime C.GstClockTime
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (ct ClockTime) String() string { func (ct ClockTime) String() string {
if ct == ClockTimeNone { if ct == ClockTimeNone {
return "ClockTimeNone" return "ClockTimeNone"
@@ -40,6 +42,8 @@ func (ct ClockTime) String() string {
} }
// interpret the clocktime as a duration, returns nil on ClockTimeNone // interpret the clocktime as a duration, returns nil on ClockTimeNone
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (ct ClockTime) AsDuration() *time.Duration { func (ct ClockTime) AsDuration() *time.Duration {
if ct == ClockTimeNone { if ct == ClockTimeNone {
return nil return nil
@@ -51,6 +55,8 @@ func (ct ClockTime) AsDuration() *time.Duration {
} }
// interpret the clocktime as a timestamp, returns nil on ClockTimeNone // interpret the clocktime as a timestamp, returns nil on ClockTimeNone
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (ct ClockTime) AsTimestamp() *time.Time { func (ct ClockTime) AsTimestamp() *time.Time {
if ct == ClockTimeNone { if ct == ClockTimeNone {
return nil return nil
@@ -65,32 +71,44 @@ func (ct ClockTime) AsTimestamp() *time.Time {
type ClockCallback func(clock *Clock, clockTime ClockTime) bool type ClockCallback func(clock *Clock, clockTime ClockTime) bool
// ClockID is a go wrapper around a GstClockID. // ClockID is a go wrapper around a GstClockID.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type ClockID struct { type ClockID struct {
ptr C.GstClockID // which is actually just a casted pointer ptr C.GstClockID // which is actually just a casted pointer
} }
// Instance returns the underlying pointer. // Instance returns the underlying pointer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) Instance() C.GstClockID { return c.ptr } func (c *ClockID) Instance() C.GstClockID { return c.ptr }
// GetClock returns the clock for this ClockID. // GetClock returns the clock for this ClockID.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) GetClock() *Clock { func (c *ClockID) GetClock() *Clock {
clk := C.gst_clock_id_get_clock(c.Instance()) clk := C.gst_clock_id_get_clock(c.Instance())
return FromGstClockUnsafeFull(unsafe.Pointer(clk)) return FromGstClockUnsafeFull(unsafe.Pointer(clk))
} }
// GetTime returns the time for this ClockID // GetTime returns the time for this ClockID
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) GetTime() ClockTime { func (c *ClockID) GetTime() ClockTime {
return ClockTime(C.gst_clock_id_get_time(c.Instance())) return ClockTime(C.gst_clock_id_get_time(c.Instance()))
} }
// Unschedule cancels an outstanding request with id. This can either be an outstanding async notification or a pending sync notification. // Unschedule cancels an outstanding request with id. This can either be an outstanding async notification or a pending sync notification.
// After this call, id cannot be used anymore to receive sync or async notifications, you need to create a new GstClockID. // After this call, id cannot be used anymore to receive sync or async notifications, you need to create a new GstClockID.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) Unschedule() { func (c *ClockID) Unschedule() {
C.gst_clock_id_unschedule(c.Instance()) C.gst_clock_id_unschedule(c.Instance())
} }
// UsesClock returns whether id uses clock as the underlying clock. clock can be nil, in which case the return value indicates whether the // UsesClock returns whether id uses clock as the underlying clock. clock can be nil, in which case the return value indicates whether the
// underlying clock has been freed. If this is the case, the id is no longer usable and should be freed. // underlying clock has been freed. If this is the case, the id is no longer usable and should be freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) UsesClock(clock *Clock) bool { func (c *ClockID) UsesClock(clock *Clock) bool {
return gobool(C.gst_clock_id_uses_clock(c.Instance(), clock.Instance())) return gobool(C.gst_clock_id_uses_clock(c.Instance(), clock.Instance()))
} }
@@ -101,6 +119,8 @@ func (c *ClockID) UsesClock(clock *Clock) bool {
// If the jitter argument is not 0 and this function returns ClockOK or ClockEarly, it will contain the difference against the clock and the // If the jitter argument is not 0 and this function returns ClockOK or ClockEarly, it will contain the difference against the clock and the
// time of id when this method was called. Positive values indicate how late id was relative to the clock (in which case this function will // time of id when this method was called. Positive values indicate how late id was relative to the clock (in which case this function will
// return ClockEarly). Negative values indicate how much time was spent waiting on the clock before this function returned. // return ClockEarly). Negative values indicate how much time was spent waiting on the clock before this function returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) Wait() (ret ClockReturn, jitter ClockTimeDiff) { func (c *ClockID) Wait() (ret ClockReturn, jitter ClockTimeDiff) {
var gjitter C.GstClockTimeDiff var gjitter C.GstClockTimeDiff
ret = ClockReturn(C.gst_clock_id_wait(c.Instance(), &gjitter)) ret = ClockReturn(C.gst_clock_id_wait(c.Instance(), &gjitter))
@@ -131,6 +151,8 @@ func (c *ClockID) Wait() (ret ClockReturn, jitter ClockTimeDiff) {
// gst.Wait(pipeline) // gst.Wait(pipeline)
// //
// // Single shot triggered at 1000000000 // // Single shot triggered at 1000000000
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) WaitAsync(f ClockCallback) ClockReturn { func (c *ClockID) WaitAsync(f ClockCallback) ClockReturn {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
return ClockReturn(C.gst_clock_id_wait_async( return ClockReturn(C.gst_clock_id_wait_async(
@@ -142,12 +164,16 @@ func (c *ClockID) WaitAsync(f ClockCallback) ClockReturn {
} }
// Ref increaes the ref count on ClockID. // Ref increaes the ref count on ClockID.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) Ref() *ClockID { func (c *ClockID) Ref() *ClockID {
C.gst_clock_id_ref(c.Instance()) C.gst_clock_id_ref(c.Instance())
return c return c
} }
// Unref unrefs a ClockID. // Unref unrefs a ClockID.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *ClockID) Unref() { func (c *ClockID) Unref() {
C.gst_clock_id_unref(c.Instance()) C.gst_clock_id_unref(c.Instance())
} }
@@ -157,17 +183,23 @@ type Clock struct{ *Object }
// FromGstClockUnsafeNone takes a pointer to a GstClock and wraps it in a Clock instance. // FromGstClockUnsafeNone takes a pointer to a GstClock and wraps it in a Clock instance.
// A ref is taken on the clock and a finalizer applied. // A ref is taken on the clock and a finalizer applied.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstClockUnsafeNone(clock unsafe.Pointer) *Clock { func FromGstClockUnsafeNone(clock unsafe.Pointer) *Clock {
return wrapClock(glib.TransferNone(clock)) return wrapClock(glib.TransferNone(clock))
} }
// FromGstClockUnsafeFull takes a pointer to a GstClock and wraps it in a Clock instance. // FromGstClockUnsafeFull takes a pointer to a GstClock and wraps it in a Clock instance.
// A finalizer is set on the returned object. // A finalizer is set on the returned object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstClockUnsafeFull(clock unsafe.Pointer) *Clock { func FromGstClockUnsafeFull(clock unsafe.Pointer) *Clock {
return wrapClock(glib.TransferFull(clock)) return wrapClock(glib.TransferFull(clock))
} }
// ToGstClock wraps the given glib.Object or gst.Object in a Clock instance. // ToGstClock wraps the given glib.Object or gst.Object in a Clock instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstClock(obj interface{}) *Clock { func ToGstClock(obj interface{}) *Clock {
switch obj := obj.(type) { switch obj := obj.(type) {
case *Object: case *Object:
@@ -179,6 +211,8 @@ func ToGstClock(obj interface{}) *Clock {
} }
// Instance returns the underlying GstClock instance. // Instance returns the underlying GstClock instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) Instance() *C.GstClock { return C.toGstClock(c.Unsafe()) } func (c *Clock) Instance() *C.GstClock { return C.toGstClock(c.Unsafe()) }
// AddObservation adds the time master of the master clock and the time slave of the slave clock to the list of observations. // AddObservation adds the time master of the master clock and the time slave of the slave clock to the list of observations.
@@ -186,6 +220,8 @@ func (c *Clock) Instance() *C.GstClock { return C.toGstClock(c.Unsafe()) }
// //
// If this functions returns TRUE, the float will contain the correlation coefficient of the interpolation. A value of 1.0 means // If this functions returns TRUE, the float will contain the correlation coefficient of the interpolation. A value of 1.0 means
// a perfect regression was performed. This value can be used to control the sampling frequency of the master and slave clocks. // a perfect regression was performed. This value can be used to control the sampling frequency of the master and slave clocks.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) AddObservation(slaveTime, masterTime ClockTime) (bool, float64) { func (c *Clock) AddObservation(slaveTime, masterTime ClockTime) (bool, float64) {
var out C.gdouble var out C.gdouble
ok := gobool(C.gst_clock_add_observation( ok := gobool(C.gst_clock_add_observation(
@@ -201,6 +237,8 @@ func (c *Clock) AddObservation(slaveTime, masterTime ClockTime) (bool, float64)
// result of the master clock estimation, without updating the internal calibration. // result of the master clock estimation, without updating the internal calibration.
// //
// The caller can then take the results and call SetCalibration with the values, or some modified version of them. // The caller can then take the results and call SetCalibration with the values, or some modified version of them.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) AddObservationUnapplied(slaveTime, masterTime ClockTime) (ok bool, rSquared float64, internalTime, externalTime, rateNum, rateDenom ClockTime) { func (c *Clock) AddObservationUnapplied(slaveTime, masterTime ClockTime) (ok bool, rSquared float64, internalTime, externalTime, rateNum, rateDenom ClockTime) {
var ginternal, gexternal, grateNum, grateDenom C.GstClockTime var ginternal, gexternal, grateNum, grateDenom C.GstClockTime
var grSquared C.gdouble var grSquared C.gdouble
@@ -218,6 +256,8 @@ func (c *Clock) AddObservationUnapplied(slaveTime, masterTime ClockTime) (ok boo
// held and is mainly used by clock subclasses. // held and is mainly used by clock subclasses.
// //
// This function is the reverse of UnadjustUnlocked. // This function is the reverse of UnadjustUnlocked.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) AdjustUnlocked(internal ClockTime) ClockTime { func (c *Clock) AdjustUnlocked(internal ClockTime) ClockTime {
return ClockTime(C.gst_clock_adjust_unlocked(c.Instance(), C.GstClockTime(internal))) return ClockTime(C.gst_clock_adjust_unlocked(c.Instance(), C.GstClockTime(internal)))
} }
@@ -227,6 +267,8 @@ func (c *Clock) AdjustUnlocked(internal ClockTime) ClockTime {
// doesn't ensure a monotonically increasing result as AdjustUnlocked does. // doesn't ensure a monotonically increasing result as AdjustUnlocked does.
// //
// See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstclock.html#gst_clock_adjust_with_calibration // See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstclock.html#gst_clock_adjust_with_calibration
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) AdjustWithCalibration(internalTarget, cinternal, cexternal, cnum, cdenom ClockTime) ClockTime { func (c *Clock) AdjustWithCalibration(internalTarget, cinternal, cexternal, cnum, cdenom ClockTime) ClockTime {
return ClockTime(C.gst_clock_adjust_with_calibration( return ClockTime(C.gst_clock_adjust_with_calibration(
c.Instance(), c.Instance(),
@@ -239,6 +281,8 @@ func (c *Clock) AdjustWithCalibration(internalTarget, cinternal, cexternal, cnum
} }
// GetCalibration gets the internal rate and reference time of clock. See gst_clock_set_calibration for more information. // GetCalibration gets the internal rate and reference time of clock. See gst_clock_set_calibration for more information.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) GetCalibration() (internal, external, rateNum, rateDenom ClockTime) { func (c *Clock) GetCalibration() (internal, external, rateNum, rateDenom ClockTime) {
var ginternal, gexternal, grateNum, grateDenom C.GstClockTime var ginternal, gexternal, grateNum, grateDenom C.GstClockTime
C.gst_clock_get_calibration(c.Instance(), &ginternal, &gexternal, &grateNum, &grateDenom) C.gst_clock_get_calibration(c.Instance(), &ginternal, &gexternal, &grateNum, &grateDenom)
@@ -247,6 +291,8 @@ func (c *Clock) GetCalibration() (internal, external, rateNum, rateDenom ClockTi
// GetTime gets the current time of the given clock in nanoseconds or -1 if invalid. // GetTime gets the current time of the given clock in nanoseconds or -1 if invalid.
// The time is always monotonically increasing and adjusted according to the current offset and rate. // The time is always monotonically increasing and adjusted according to the current offset and rate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) GetTime() ClockTime { func (c *Clock) GetTime() ClockTime {
res := C.gst_clock_get_time(c.Instance()) res := C.gst_clock_get_time(c.Instance())
@@ -255,6 +301,8 @@ func (c *Clock) GetTime() ClockTime {
// GetInternalTime gets the current internal time of the given clock in nanoseconds // GetInternalTime gets the current internal time of the given clock in nanoseconds
// or ClockTimeNone if invalid. The time is returned unadjusted for the offset and the rate. // or ClockTimeNone if invalid. The time is returned unadjusted for the offset and the rate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) GetInternalTime() ClockTime { func (c *Clock) GetInternalTime() ClockTime {
res := C.gst_clock_get_internal_time(c.Instance()) res := C.gst_clock_get_internal_time(c.Instance())
@@ -263,6 +311,8 @@ func (c *Clock) GetInternalTime() ClockTime {
// GetMaster returns the master clock that this clock is slaved to or nil when the clock // GetMaster returns the master clock that this clock is slaved to or nil when the clock
// is not slaved to any master clock. // is not slaved to any master clock.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) GetMaster() *Clock { func (c *Clock) GetMaster() *Clock {
clock := C.gst_clock_get_master(c.Instance()) clock := C.gst_clock_get_master(c.Instance())
if clock == nil { if clock == nil {
@@ -273,20 +323,28 @@ func (c *Clock) GetMaster() *Clock {
// GetResolution gets the accuracy of the clock. The accuracy of the clock is the granularity // GetResolution gets the accuracy of the clock. The accuracy of the clock is the granularity
// of the values returned by GetTime. // of the values returned by GetTime.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) GetResolution() ClockTime { func (c *Clock) GetResolution() ClockTime {
return ClockTime(C.gst_clock_get_resolution(c.Instance())) return ClockTime(C.gst_clock_get_resolution(c.Instance()))
} }
// GetTimeout gets the amount of time that master and slave clocks are sampled. // GetTimeout gets the amount of time that master and slave clocks are sampled.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) GetTimeout() ClockTime { func (c *Clock) GetTimeout() ClockTime {
return ClockTime(C.gst_clock_get_timeout(c.Instance())) return ClockTime(C.gst_clock_get_timeout(c.Instance()))
} }
// IsSynced returns true if the clock is synced. // IsSynced returns true if the clock is synced.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) IsSynced() bool { return gobool(C.gst_clock_is_synced(c.Instance())) } func (c *Clock) IsSynced() bool { return gobool(C.gst_clock_is_synced(c.Instance())) }
// NewPeriodicID gets an ID from clock to trigger a periodic notification. The periodic notifications // NewPeriodicID gets an ID from clock to trigger a periodic notification. The periodic notifications
// will start at time start_time and will then be fired with the given interval. // will start at time start_time and will then be fired with the given interval.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) NewPeriodicID(startTime, interval ClockTime) *ClockID { func (c *Clock) NewPeriodicID(startTime, interval ClockTime) *ClockID {
id := C.gst_clock_new_periodic_id( id := C.gst_clock_new_periodic_id(
c.Instance(), c.Instance(),
@@ -299,6 +357,8 @@ func (c *Clock) NewPeriodicID(startTime, interval ClockTime) *ClockID {
} }
// NewSingleShotID gets a ClockID from the clock to trigger a single shot notification at the requested time. // NewSingleShotID gets a ClockID from the clock to trigger a single shot notification at the requested time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) NewSingleShotID(at ClockTime) *ClockID { func (c *Clock) NewSingleShotID(at ClockTime) *ClockID {
id := C.gst_clock_new_single_shot_id( id := C.gst_clock_new_single_shot_id(
c.Instance(), c.Instance(),
@@ -311,6 +371,8 @@ func (c *Clock) NewSingleShotID(at ClockTime) *ClockID {
// PeriodicIDReinit reinitializes the provided periodic id to the provided start time and interval. Does not // PeriodicIDReinit reinitializes the provided periodic id to the provided start time and interval. Does not
// / modify the reference count. // / modify the reference count.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) PeriodicIDReinit(clockID *ClockID, startTime, interval ClockTime) bool { func (c *Clock) PeriodicIDReinit(clockID *ClockID, startTime, interval ClockTime) bool {
return gobool(C.gst_clock_periodic_id_reinit( return gobool(C.gst_clock_periodic_id_reinit(
c.Instance(), c.Instance(),
@@ -322,6 +384,8 @@ func (c *Clock) PeriodicIDReinit(clockID *ClockID, startTime, interval ClockTime
// SetCalibration adjusts the rate and time of clock. // SetCalibration adjusts the rate and time of clock.
// See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstclock.html#gst_clock_set_calibration. // See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstclock.html#gst_clock_set_calibration.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) SetCalibration(internal, external, rateNum, rateDenom ClockTime) { func (c *Clock) SetCalibration(internal, external, rateNum, rateDenom ClockTime) {
C.gst_clock_set_calibration( C.gst_clock_set_calibration(
c.Instance(), c.Instance(),
@@ -339,6 +403,8 @@ func (c *Clock) SetCalibration(internal, external, rateNum, rateDenom ClockTime)
// //
// Master can be nil in which case clock will not be slaved anymore. It will however keep reporting its time // Master can be nil in which case clock will not be slaved anymore. It will however keep reporting its time
// adjusted with the last configured rate and time offsets. // adjusted with the last configured rate and time offsets.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) SetMaster(master *Clock) bool { func (c *Clock) SetMaster(master *Clock) bool {
if master == nil { if master == nil {
return gobool(C.gst_clock_set_master(c.Instance(), nil)) return gobool(C.gst_clock_set_master(c.Instance(), nil))
@@ -349,6 +415,8 @@ func (c *Clock) SetMaster(master *Clock) bool {
// SetResolution sets the accuracy of the clock. Some clocks have the possibility to operate with different accuracy // SetResolution sets the accuracy of the clock. Some clocks have the possibility to operate with different accuracy
// at the expense of more resource usage. There is normally no need to change the default resolution of a clock. // at the expense of more resource usage. There is normally no need to change the default resolution of a clock.
// The resolution of a clock can only be changed if the clock has the ClockFlagCanSetResolution flag set. // The resolution of a clock can only be changed if the clock has the ClockFlagCanSetResolution flag set.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) SetResolution(resolution ClockTime) ClockTime { func (c *Clock) SetResolution(resolution ClockTime) ClockTime {
return ClockTime(C.gst_clock_set_resolution(c.Instance(), C.GstClockTime(resolution))) return ClockTime(C.gst_clock_set_resolution(c.Instance(), C.GstClockTime(resolution)))
} }
@@ -357,14 +425,20 @@ func (c *Clock) SetResolution(resolution ClockTime) ClockTime {
// //
// This function must only be called if ClockFlagNeedsStartupSync is set on the clock, and is intended to be called by // This function must only be called if ClockFlagNeedsStartupSync is set on the clock, and is intended to be called by
// subclasses only. // subclasses only.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) SetSynced(synced bool) { C.gst_clock_set_synced(c.Instance(), gboolean(synced)) } func (c *Clock) SetSynced(synced bool) { C.gst_clock_set_synced(c.Instance(), gboolean(synced)) }
// SetTimeout sets the amount of time, in nanoseconds, to sample master and slave clocks // SetTimeout sets the amount of time, in nanoseconds, to sample master and slave clocks
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) SetTimeout(timeout ClockTime) { func (c *Clock) SetTimeout(timeout ClockTime) {
C.gst_clock_set_timeout(c.Instance(), C.GstClockTime(timeout)) C.gst_clock_set_timeout(c.Instance(), C.GstClockTime(timeout))
} }
// SingleShotIDReinit reinitializes the provided single shot id to the provided time. Does not modify the reference count. // SingleShotIDReinit reinitializes the provided single shot id to the provided time. Does not modify the reference count.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) SingleShotIDReinit(clockID *ClockID, at ClockTime) bool { func (c *Clock) SingleShotIDReinit(clockID *ClockID, at ClockTime) bool {
return gobool(C.gst_clock_single_shot_id_reinit(c.Instance(), clockID.Instance(), C.GstClockTime(at))) return gobool(C.gst_clock_single_shot_id_reinit(c.Instance(), clockID.Instance(), C.GstClockTime(at)))
} }
@@ -373,12 +447,16 @@ func (c *Clock) SingleShotIDReinit(clockID *ClockID, at ClockTime) bool {
// set with SetCalibration. This function should be called with the clock's OBJECT_LOCK held and is mainly used by clock subclasses. // set with SetCalibration. This function should be called with the clock's OBJECT_LOCK held and is mainly used by clock subclasses.
// //
// This function is the reverse of AdjustUnlocked. // This function is the reverse of AdjustUnlocked.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) UnadjustUnlocked(external ClockTime) ClockTime { func (c *Clock) UnadjustUnlocked(external ClockTime) ClockTime {
return ClockTime(C.gst_clock_unadjust_unlocked(c.Instance(), C.GstClockTime(external))) return ClockTime(C.gst_clock_unadjust_unlocked(c.Instance(), C.GstClockTime(external)))
} }
// UnadjustWithCalibration converts the given external_target clock time to the internal time, using the passed calibration parameters. // UnadjustWithCalibration converts the given external_target clock time to the internal time, using the passed calibration parameters.
// This function performs the same calculation as UnadjustUnlocked when called using the current calibration parameters. // This function performs the same calculation as UnadjustUnlocked when called using the current calibration parameters.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) UnadjustWithCalibration(externalTarget, cinternal, cexternal, cnum, cdenom ClockTime) ClockTime { func (c *Clock) UnadjustWithCalibration(externalTarget, cinternal, cexternal, cnum, cdenom ClockTime) ClockTime {
return ClockTime(C.gst_clock_unadjust_with_calibration( return ClockTime(C.gst_clock_unadjust_with_calibration(
c.Instance(), c.Instance(),
@@ -396,12 +474,18 @@ func (c *Clock) UnadjustWithCalibration(externalTarget, cinternal, cexternal, cn
// For asynchronous waiting, the GstClock::synced signal can be used. // For asynchronous waiting, the GstClock::synced signal can be used.
// //
// This returns immediately with TRUE if ClockFlagNeedsStartupSync is not set on the clock, or if the clock is already synced. // This returns immediately with TRUE if ClockFlagNeedsStartupSync is not set on the clock, or if the clock is already synced.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) WaitForSync(timeout ClockTime) bool { func (c *Clock) WaitForSync(timeout ClockTime) bool {
return gobool(C.gst_clock_wait_for_sync(c.Instance(), C.GstClockTime(timeout))) return gobool(C.gst_clock_wait_for_sync(c.Instance(), C.GstClockTime(timeout)))
} }
// String returns the string representation of this clock value. // String returns the string representation of this clock value.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) String() string { return fmt.Sprintf("%d", c.GetTime()) } func (c *Clock) String() string { return fmt.Sprintf("%d", c.GetTime()) }
// InternalString returns the string representation of this clock's internal value. // InternalString returns the string representation of this clock's internal value.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Clock) InternalString() string { return fmt.Sprintf("%d", c.GetInternalTime()) } func (c *Clock) InternalString() string { return fmt.Sprintf("%d", c.GetInternalTime()) }

View File

@@ -8,11 +8,15 @@ import (
) )
// Context wraps a GstContext object. // Context wraps a GstContext object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Context struct { type Context struct {
ptr *C.GstContext ptr *C.GstContext
} }
// FromGstContextUnsafeFull wraps the given context and places a runtime finalizer on it. // FromGstContextUnsafeFull wraps the given context and places a runtime finalizer on it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstContextUnsafeFull(ctx unsafe.Pointer) *Context { func FromGstContextUnsafeFull(ctx unsafe.Pointer) *Context {
wrapped := wrapContext((*C.GstContext)(ctx)) wrapped := wrapContext((*C.GstContext)(ctx))
runtime.SetFinalizer(wrapped, (*Context).Unref) runtime.SetFinalizer(wrapped, (*Context).Unref)
@@ -20,6 +24,8 @@ func FromGstContextUnsafeFull(ctx unsafe.Pointer) *Context {
} }
// FromGstContextUnsafeNone refs and wraps the given context and places a runtime finalizer on it. // FromGstContextUnsafeNone refs and wraps the given context and places a runtime finalizer on it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstContextUnsafeNone(ctx unsafe.Pointer) *Context { func FromGstContextUnsafeNone(ctx unsafe.Pointer) *Context {
wrapped := wrapContext((*C.GstContext)(ctx)) wrapped := wrapContext((*C.GstContext)(ctx))
wrapped.Ref() wrapped.Ref()
@@ -39,6 +45,8 @@ func FromGstContextUnsafeNone(ctx unsafe.Pointer) *Context {
// //
// // false // // false
// // true // // true
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewContext(ctxType string, persistent bool) *Context { func NewContext(ctxType string, persistent bool) *Context {
cStr := C.CString(ctxType) cStr := C.CString(ctxType)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -50,6 +58,8 @@ func NewContext(ctxType string, persistent bool) *Context {
} }
// Instance returns the underlying GstContext instance. // Instance returns the underlying GstContext instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) Instance() *C.GstContext { return C.toGstContext(unsafe.Pointer(c.ptr)) } func (c *Context) Instance() *C.GstContext { return C.toGstContext(unsafe.Pointer(c.ptr)) }
// GetType returns the type of the context. // GetType returns the type of the context.
@@ -60,11 +70,15 @@ func (c *Context) Instance() *C.GstContext { return C.toGstContext(unsafe.Pointe
// fmt.Println(ctx.GetType()) // fmt.Println(ctx.GetType())
// //
// // test-context // // test-context
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) GetType() string { func (c *Context) GetType() string {
return C.GoString(C.gst_context_get_context_type(c.Instance())) return C.GoString(C.gst_context_get_context_type(c.Instance()))
} }
// GetStructure returns the structure of the context. You should not modify or unref it. // GetStructure returns the structure of the context. You should not modify or unref it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) GetStructure() *Structure { func (c *Context) GetStructure() *Structure {
st := C.gst_context_get_structure(c.Instance()) st := C.gst_context_get_structure(c.Instance())
if st == nil { if st == nil {
@@ -83,6 +97,8 @@ func (c *Context) GetStructure() *Structure {
// //
// // true // // true
// // false // // false
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) HasContextType(ctxType string) bool { func (c *Context) HasContextType(ctxType string) bool {
cStr := C.CString(ctxType) cStr := C.CString(ctxType)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -93,21 +109,29 @@ func (c *Context) HasContextType(ctxType string) bool {
} }
// IsPersistent checks if the context is persistent. // IsPersistent checks if the context is persistent.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) IsPersistent() bool { func (c *Context) IsPersistent() bool {
return gobool(C.gst_context_is_persistent(c.Instance())) return gobool(C.gst_context_is_persistent(c.Instance()))
} }
// IsWritable returns true if the context is writable. // IsWritable returns true if the context is writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) IsWritable() bool { func (c *Context) IsWritable() bool {
return gobool(C.contextIsWritable(c.Instance())) return gobool(C.contextIsWritable(c.Instance()))
} }
// MakeWritable returns a writable version of the context. // MakeWritable returns a writable version of the context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) MakeWritable() *Context { func (c *Context) MakeWritable() *Context {
return FromGstContextUnsafeFull(unsafe.Pointer(C.makeContextWritable(c.Instance()))) return FromGstContextUnsafeFull(unsafe.Pointer(C.makeContextWritable(c.Instance())))
} }
// WritableStructure returns a writable version of the structure. You should still not unref it. // WritableStructure returns a writable version of the structure. You should still not unref it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) WritableStructure() *Structure { func (c *Context) WritableStructure() *Structure {
st := C.gst_context_writable_structure(c.Instance()) st := C.gst_context_writable_structure(c.Instance())
if st == nil { if st == nil {
@@ -117,10 +141,14 @@ func (c *Context) WritableStructure() *Structure {
} }
// Ref increases the ref count on the Context. // Ref increases the ref count on the Context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) Ref() *Context { func (c *Context) Ref() *Context {
ctx := C.gst_context_ref(c.Instance()) ctx := C.gst_context_ref(c.Instance())
return &Context{ptr: ctx} return &Context{ptr: ctx}
} }
// Unref decreases the ref count on the Context. // Unref decreases the ref count on the Context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (c *Context) Unref() { C.gst_context_unref(c.Instance()) } func (c *Context) Unref() { C.gst_context_unref(c.Instance()) }

View File

@@ -111,17 +111,23 @@ const (
) )
// DebugCategory is a struct that describes a category of log messages. // DebugCategory is a struct that describes a category of log messages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type DebugCategory struct { type DebugCategory struct {
ptr *C.GstDebugCategory ptr *C.GstDebugCategory
} }
// NewDebugCategory initializes a new DebugCategory with the given properties and set // NewDebugCategory initializes a new DebugCategory with the given properties and set
// to the default threshold. // to the default threshold.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDebugCategory(name string, color DebugColorFlags, description string) *DebugCategory { func NewDebugCategory(name string, color DebugColorFlags, description string) *DebugCategory {
cat := C._gst_debug_category_new(C.CString(name), C.guint(color), C.CString(description)) cat := C._gst_debug_category_new(C.CString(name), C.guint(color), C.CString(description))
return &DebugCategory{ptr: cat} return &DebugCategory{ptr: cat}
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) logDepth(level DebugLevel, message string, depth int, obj *C.GObject) { func (d *DebugCategory) logDepth(level DebugLevel, message string, depth int, obj *C.GObject) {
function, file, line, _ := runtime.Caller(depth) function, file, line, _ := runtime.Caller(depth)
cFile := C.CString(path.Base(file)) cFile := C.CString(path.Base(file))
@@ -141,6 +147,8 @@ func (d *DebugCategory) logDepth(level DebugLevel, message string, depth int, ob
) )
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getLogObj(obj ...*Object) *C.GObject { func getLogObj(obj ...*Object) *C.GObject {
if len(obj) > 0 { if len(obj) > 0 {
return (*C.GObject)(obj[0].Unsafe()) return (*C.GObject)(obj[0].Unsafe())
@@ -151,46 +159,64 @@ func getLogObj(obj ...*Object) *C.GObject {
// Log logs the given message using the currently registered debugging handlers. You can optionally // Log logs the given message using the currently registered debugging handlers. You can optionally
// provide a single object to log the message for. GStreamer will automatically add a newline to the // provide a single object to log the message for. GStreamer will automatically add a newline to the
// end of the message. // end of the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) Log(level DebugLevel, message string, obj ...*Object) { func (d *DebugCategory) Log(level DebugLevel, message string, obj ...*Object) {
d.logDepth(level, message, 2, getLogObj(obj...)) d.logDepth(level, message, 2, getLogObj(obj...))
} }
// LogError is a convenience wrapper for logging an ERROR level message. // LogError is a convenience wrapper for logging an ERROR level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogError(message string, obj ...*Object) { func (d *DebugCategory) LogError(message string, obj ...*Object) {
d.logDepth(LevelError, message, 2, getLogObj(obj...)) d.logDepth(LevelError, message, 2, getLogObj(obj...))
} }
// LogWarning is a convenience wrapper for logging a WARNING level message. // LogWarning is a convenience wrapper for logging a WARNING level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogWarning(message string, obj ...*Object) { func (d *DebugCategory) LogWarning(message string, obj ...*Object) {
d.logDepth(LevelWarning, message, 2, getLogObj(obj...)) d.logDepth(LevelWarning, message, 2, getLogObj(obj...))
} }
// LogInfo is a convenience wrapper for logging an INFO level message. // LogInfo is a convenience wrapper for logging an INFO level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogInfo(message string, obj ...*Object) { func (d *DebugCategory) LogInfo(message string, obj ...*Object) {
d.logDepth(LevelInfo, message, 2, getLogObj(obj...)) d.logDepth(LevelInfo, message, 2, getLogObj(obj...))
} }
// LogDebug is a convenience wrapper for logging a DEBUG level message. // LogDebug is a convenience wrapper for logging a DEBUG level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogDebug(message string, obj ...*Object) { func (d *DebugCategory) LogDebug(message string, obj ...*Object) {
d.logDepth(LevelDebug, message, 2, getLogObj(obj...)) d.logDepth(LevelDebug, message, 2, getLogObj(obj...))
} }
// LogLog is a convenience wrapper for logging a LOG level message. // LogLog is a convenience wrapper for logging a LOG level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogLog(message string, obj ...*Object) { func (d *DebugCategory) LogLog(message string, obj ...*Object) {
d.logDepth(LevelLog, message, 2, getLogObj(obj...)) d.logDepth(LevelLog, message, 2, getLogObj(obj...))
} }
// LogTrace is a convenience wrapper for logging a TRACE level message. // LogTrace is a convenience wrapper for logging a TRACE level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogTrace(message string, obj ...*Object) { func (d *DebugCategory) LogTrace(message string, obj ...*Object) {
d.logDepth(LevelTrace, message, 2, getLogObj(obj...)) d.logDepth(LevelTrace, message, 2, getLogObj(obj...))
} }
// LogMemDump is a convenience wrapper for logging a MEMDUMP level message. // LogMemDump is a convenience wrapper for logging a MEMDUMP level message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) LogMemDump(message string, obj ...*Object) { func (d *DebugCategory) LogMemDump(message string, obj ...*Object) {
d.logDepth(LevelMemDump, message, 2, getLogObj(obj...)) d.logDepth(LevelMemDump, message, 2, getLogObj(obj...))
} }
// GetName returns the name of a debug category. // GetName returns the name of a debug category.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugCategory) GetName() string { func (d *DebugCategory) GetName() string {
return C.GoString(C.gst_debug_category_get_name(d.ptr)) return C.GoString(C.gst_debug_category_get_name(d.ptr))
} }
@@ -199,24 +225,34 @@ func (d *DebugCategory) GetName() string {
// or they might have a refcount of 0 (logging in finalize), or they might be partially destructed (dispose). // or they might have a refcount of 0 (logging in finalize), or they might be partially destructed (dispose).
// //
// It is not safe for general use. For most needs, use DebugMessage.GetId() instead // It is not safe for general use. For most needs, use DebugMessage.GetId() instead
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type LoggedObject struct { type LoggedObject struct {
ptr *C.GObject ptr *C.GObject
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (l *LoggedObject) Get() unsafe.Pointer { func (l *LoggedObject) Get() unsafe.Pointer {
return unsafe.Pointer(l.ptr) return unsafe.Pointer(l.ptr)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type DebugMessage struct { type DebugMessage struct {
ptr *C.GstDebugMessage ptr *C.GstDebugMessage
} }
// Get returns the string representation of a GstDebugMessage. // Get returns the string representation of a GstDebugMessage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugMessage) Get() string { func (d *DebugMessage) Get() string {
return C.GoString(C.gst_debug_message_get(d.ptr)) return C.GoString(C.gst_debug_message_get(d.ptr))
} }
// GetId returns the id of the object that emitted this message. Can be empty. // GetId returns the id of the object that emitted this message. Can be empty.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DebugMessage) GetId() string { func (d *DebugMessage) GetId() string {
return C.GoString(C.gst_debug_message_get_id(d.ptr)) return C.GoString(C.gst_debug_message_get_id(d.ptr))
} }
@@ -238,6 +274,8 @@ var (
// SetLogFunction is used to replace gstreamer's default logging function. // SetLogFunction is used to replace gstreamer's default logging function.
// Setting to nil will revert to the default logging function. // Setting to nil will revert to the default logging function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func SetLogFunction(f LogFunction) { func SetLogFunction(f LogFunction) {
logFnMu.Lock() logFnMu.Lock()
defer logFnMu.Unlock() defer logFnMu.Unlock()

View File

@@ -15,20 +15,28 @@ import (
type Device struct{ *Object } type Device struct{ *Object }
// FromGstDeviceUnsafeNone wraps the given device with a ref and finalizer. // FromGstDeviceUnsafeNone wraps the given device with a ref and finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstDeviceUnsafeNone(device unsafe.Pointer) *Device { func FromGstDeviceUnsafeNone(device unsafe.Pointer) *Device {
return &Device{wrapObject(glib.TransferNone(device))} return &Device{wrapObject(glib.TransferNone(device))}
} }
// FromGstDeviceUnsafeFull wraps the given device with a finalizer. // FromGstDeviceUnsafeFull wraps the given device with a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstDeviceUnsafeFull(device unsafe.Pointer) *Device { func FromGstDeviceUnsafeFull(device unsafe.Pointer) *Device {
return &Device{wrapObject(glib.TransferFull(device))} return &Device{wrapObject(glib.TransferFull(device))}
} }
// Instance returns the underlying GstDevice object. // Instance returns the underlying GstDevice object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) Instance() *C.GstDevice { return C.toGstDevice(d.Unsafe()) } func (d *Device) Instance() *C.GstDevice { return C.toGstDevice(d.Unsafe()) }
// CreateElement creates a new element with all the required parameters set to use this device. // CreateElement creates a new element with all the required parameters set to use this device.
// If name is empty, one is automatically generated. // If name is empty, one is automatically generated.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) CreateElement(name string) *Element { func (d *Device) CreateElement(name string) *Element {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -43,6 +51,8 @@ func (d *Device) CreateElement(name string) *Element {
} }
// GetCaps returns the caps that this device supports. // GetCaps returns the caps that this device supports.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) GetCaps() *Caps { func (d *Device) GetCaps() *Caps {
caps := C.gst_device_get_caps(d.Instance()) caps := C.gst_device_get_caps(d.Instance())
if caps == nil { if caps == nil {
@@ -54,6 +64,8 @@ func (d *Device) GetCaps() *Caps {
// GetDeviceClass gets the "class" of a device. This is a "/" separated list of classes that // GetDeviceClass gets the "class" of a device. This is a "/" separated list of classes that
// represent this device. They are a subset of the classes of the GstDeviceProvider that produced // represent this device. They are a subset of the classes of the GstDeviceProvider that produced
// this device. // this device.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) GetDeviceClass() string { func (d *Device) GetDeviceClass() string {
class := C.gst_device_get_device_class(d.Instance()) class := C.gst_device_get_device_class(d.Instance())
defer C.g_free((C.gpointer)(unsafe.Pointer(class))) defer C.g_free((C.gpointer)(unsafe.Pointer(class)))
@@ -61,6 +73,8 @@ func (d *Device) GetDeviceClass() string {
} }
// GetDisplayName gets the user-friendly name of the device. // GetDisplayName gets the user-friendly name of the device.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) GetDisplayName() string { func (d *Device) GetDisplayName() string {
name := C.gst_device_get_display_name(d.Instance()) name := C.gst_device_get_display_name(d.Instance())
defer C.g_free((C.gpointer)(unsafe.Pointer(name))) defer C.g_free((C.gpointer)(unsafe.Pointer(name)))
@@ -68,6 +82,8 @@ func (d *Device) GetDisplayName() string {
} }
// GetProperties gets the extra properties of the device. // GetProperties gets the extra properties of the device.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) GetProperties() *Structure { func (d *Device) GetProperties() *Structure {
st := C.gst_device_get_properties(d.Instance()) st := C.gst_device_get_properties(d.Instance())
if st == nil { if st == nil {
@@ -77,6 +93,8 @@ func (d *Device) GetProperties() *Structure {
} }
// HasClasses checks if device matches all of the given classes. // HasClasses checks if device matches all of the given classes.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) HasClasses(classes []string) bool { func (d *Device) HasClasses(classes []string) bool {
cClasses := C.CString(strings.Join(classes, "/")) cClasses := C.CString(strings.Join(classes, "/"))
defer C.free(unsafe.Pointer(cClasses)) defer C.free(unsafe.Pointer(cClasses))
@@ -89,6 +107,8 @@ func (d *Device) HasClasses(classes []string) bool {
// //
// Note: This should only be implemented for elements that can change their device // Note: This should only be implemented for elements that can change their device
// while in the PLAYING state. // while in the PLAYING state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *Device) ReconfigureElement(elem *Element) error { func (d *Device) ReconfigureElement(elem *Element) error {
if ok := gobool(C.gst_device_reconfigure_element(d.Instance(), elem.Instance())); !ok { if ok := gobool(C.gst_device_reconfigure_element(d.Instance(), elem.Instance())); !ok {
return fmt.Errorf("failed to reconfigure element %s", elem.GetName()) return fmt.Errorf("failed to reconfigure element %s", elem.GetName())

View File

@@ -10,11 +10,15 @@ import (
) )
// DeviceMonitor is a Go representation of a GstDeviceMonitor. // DeviceMonitor is a Go representation of a GstDeviceMonitor.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type DeviceMonitor struct { type DeviceMonitor struct {
ptr *C.GstDeviceMonitor ptr *C.GstDeviceMonitor
bus *Bus bus *Bus
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDeviceMonitor() *DeviceMonitor { func NewDeviceMonitor() *DeviceMonitor {
monitor := C.gst_device_monitor_new() monitor := C.gst_device_monitor_new()
if monitor == nil { if monitor == nil {
@@ -23,6 +27,8 @@ func NewDeviceMonitor() *DeviceMonitor {
return &DeviceMonitor{ptr: monitor} return &DeviceMonitor{ptr: monitor}
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) AddFilter(classes string, caps *Caps) uint { func (d *DeviceMonitor) AddFilter(classes string, caps *Caps) uint {
var cClasses *C.gchar var cClasses *C.gchar
if classes != "" { if classes != "" {
@@ -34,11 +40,15 @@ func (d *DeviceMonitor) AddFilter(classes string, caps *Caps) uint {
return uint(filterId) return uint(filterId)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) RemoveFilter(filterId uint) bool { func (d *DeviceMonitor) RemoveFilter(filterId uint) bool {
return gobool(C.gst_device_monitor_remove_filter(d.ptr, C.guint(filterId))) return gobool(C.gst_device_monitor_remove_filter(d.ptr, C.guint(filterId)))
} }
// GetBus returns the message bus for this pipeline. // GetBus returns the message bus for this pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) GetBus() *Bus { func (d *DeviceMonitor) GetBus() *Bus {
if d.bus == nil { if d.bus == nil {
cBus := C.gst_device_monitor_get_bus(d.ptr) cBus := C.gst_device_monitor_get_bus(d.ptr)
@@ -47,16 +57,22 @@ func (d *DeviceMonitor) GetBus() *Bus {
return d.bus return d.bus
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) Start() bool { func (d *DeviceMonitor) Start() bool {
return gobool(C.gst_device_monitor_start(d.ptr)) return gobool(C.gst_device_monitor_start(d.ptr))
//should return if we were able to add the filter //should return if we were able to add the filter
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) Stop() { func (d *DeviceMonitor) Stop() {
C.gst_device_monitor_stop(d.ptr) C.gst_device_monitor_stop(d.ptr)
//should return if we were able to add the filter //should return if we were able to add the filter
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) GetDevices() []*Device { func (d *DeviceMonitor) GetDevices() []*Device {
glist := C.gst_device_monitor_get_devices(d.ptr) glist := C.gst_device_monitor_get_devices(d.ptr)
if glist == nil { if glist == nil {
@@ -71,10 +87,14 @@ func (d *DeviceMonitor) GetDevices() []*Device {
return out return out
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) SetShowAllDevices(show bool) { func (d *DeviceMonitor) SetShowAllDevices(show bool) {
C.gst_device_monitor_set_show_all_devices(d.ptr, gboolean(show)) C.gst_device_monitor_set_show_all_devices(d.ptr, gboolean(show))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceMonitor) GetShowAllDevices() bool { func (d *DeviceMonitor) GetShowAllDevices() bool {
return gobool(C.gst_device_monitor_get_show_all_devices(d.ptr)) return gobool(C.gst_device_monitor_get_show_all_devices(d.ptr))
} }

View File

@@ -13,18 +13,26 @@ import (
type DeviceProvider struct{ *Object } type DeviceProvider struct{ *Object }
// FromGstDeviceProviderUnsafeNone wraps the given device with a ref and finalizer. // FromGstDeviceProviderUnsafeNone wraps the given device with a ref and finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstDeviceProviderUnsafeNone(deviceProvider unsafe.Pointer) *DeviceProvider { func FromGstDeviceProviderUnsafeNone(deviceProvider unsafe.Pointer) *DeviceProvider {
return &DeviceProvider{wrapObject(glib.TransferNone(deviceProvider))} return &DeviceProvider{wrapObject(glib.TransferNone(deviceProvider))}
} }
// FromGstDeviceProviderUnsafeFull wraps the given device with a finalizer. // FromGstDeviceProviderUnsafeFull wraps the given device with a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstDeviceProviderUnsafeFull(deviceProvider unsafe.Pointer) *DeviceProvider { func FromGstDeviceProviderUnsafeFull(deviceProvider unsafe.Pointer) *DeviceProvider {
return &DeviceProvider{wrapObject(glib.TransferFull(deviceProvider))} return &DeviceProvider{wrapObject(glib.TransferFull(deviceProvider))}
} }
// Instance returns the underlying GstDevice object. // Instance returns the underlying GstDevice object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceProvider) Instance() *C.GstDeviceProvider { return C.toGstDeviceProvider(d.Unsafe()) } func (d *DeviceProvider) Instance() *C.GstDeviceProvider { return C.toGstDeviceProvider(d.Unsafe()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceProvider) GetDevices() []*Device { func (d *DeviceProvider) GetDevices() []*Device {
glist := C.gst_device_provider_get_devices((*C.GstDeviceProvider)(d.Instance())) glist := C.gst_device_provider_get_devices((*C.GstDeviceProvider)(d.Instance()))
if glist == nil { if glist == nil {
@@ -40,16 +48,22 @@ func (d *DeviceProvider) GetDevices() []*Device {
} }
// GetBus returns the message bus for this pipeline. // GetBus returns the message bus for this pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceProvider) GetBus() *Bus { func (d *DeviceProvider) GetBus() *Bus {
cBus := C.gst_device_provider_get_bus((*C.GstDeviceProvider)(d.Instance())) cBus := C.gst_device_provider_get_bus((*C.GstDeviceProvider)(d.Instance()))
bus := FromGstBusUnsafeFull(unsafe.Pointer(cBus)) bus := FromGstBusUnsafeFull(unsafe.Pointer(cBus))
return bus return bus
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceProvider) Start() bool { func (d *DeviceProvider) Start() bool {
return gobool(C.gst_device_provider_start((*C.GstDeviceProvider)(d.Instance()))) return gobool(C.gst_device_provider_start((*C.GstDeviceProvider)(d.Instance())))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d *DeviceProvider) Stop() { func (d *DeviceProvider) Stop() {
C.gst_device_provider_stop((*C.GstDeviceProvider)(d.Instance())) C.gst_device_provider_stop((*C.GstDeviceProvider)(d.Instance()))
} }

View File

@@ -7,6 +7,8 @@ import (
"unsafe" "unsafe"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FindDeviceProviderByName(factoryName string) *DeviceProvider { func FindDeviceProviderByName(factoryName string) *DeviceProvider {
cFactoryName := C.CString(factoryName) cFactoryName := C.CString(factoryName)
defer C.free(unsafe.Pointer(cFactoryName)) defer C.free(unsafe.Pointer(cFactoryName))

View File

@@ -54,6 +54,8 @@ import (
type Element struct{ *Object } type Element struct{ *Object }
// FromGstElementUnsafeNone wraps the given element with a ref and a finalizer. // FromGstElementUnsafeNone wraps the given element with a ref and a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstElementUnsafeNone(elem unsafe.Pointer) *Element { func FromGstElementUnsafeNone(elem unsafe.Pointer) *Element {
if elem == nil { if elem == nil {
return nil return nil
@@ -62,6 +64,8 @@ func FromGstElementUnsafeNone(elem unsafe.Pointer) *Element {
} }
// FromGstElementUnsafeFull wraps the given element with a finalizer. // FromGstElementUnsafeFull wraps the given element with a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstElementUnsafeFull(elem unsafe.Pointer) *Element { func FromGstElementUnsafeFull(elem unsafe.Pointer) *Element {
if elem == nil { if elem == nil {
return nil return nil
@@ -71,6 +75,8 @@ func FromGstElementUnsafeFull(elem unsafe.Pointer) *Element {
// ToElement returns an Element object for the given Object. It will work // ToElement returns an Element object for the given Object. It will work
// on either gst.Object or glib.Object interfaces. // on either gst.Object or glib.Object interfaces.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToElement(obj interface{}) *Element { func ToElement(obj interface{}) *Element {
switch obj := obj.(type) { switch obj := obj.(type) {
case *Object: case *Object:
@@ -83,6 +89,8 @@ func ToElement(obj interface{}) *Element {
// ElementLinkMany is a go implementation of `gst_element_link_many` to compensate for // ElementLinkMany is a go implementation of `gst_element_link_many` to compensate for
// no variadic functions in cgo. // no variadic functions in cgo.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ElementLinkMany(elems ...*Element) error { func ElementLinkMany(elems ...*Element) error {
for idx, elem := range elems { for idx, elem := range elems {
if idx == 0 { if idx == 0 {
@@ -98,6 +106,8 @@ func ElementLinkMany(elems ...*Element) error {
// ElementUnlinkMany is a go implementation of `gst_element_unlink_many` to compensate for // ElementUnlinkMany is a go implementation of `gst_element_unlink_many` to compensate for
// no variadic functions in cgo. // no variadic functions in cgo.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ElementUnlinkMany(elems ...*Element) { func ElementUnlinkMany(elems ...*Element) {
for idx, elem := range elems { for idx, elem := range elems {
if idx == 0 { if idx == 0 {
@@ -112,6 +122,8 @@ func ElementUnlinkMany(elems ...*Element) {
// and adds the factory to the plugin. A higher rank means more importance when autoplugging. // and adds the factory to the plugin. A higher rank means more importance when autoplugging.
// //
// plugin can also be nil to register a static element // plugin can also be nil to register a static element
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func RegisterElement(plugin *Plugin, name string, rank Rank, elem glib.GoObjectSubclass, extends glib.Extendable, interfaces ...glib.Interface) bool { func RegisterElement(plugin *Plugin, name string, rank Rank, elem glib.GoObjectSubclass, extends glib.Extendable, interfaces ...glib.Interface) bool {
var pluginref *C.GstPlugin var pluginref *C.GstPlugin
@@ -128,10 +140,14 @@ func RegisterElement(plugin *Plugin, name string, rank Rank, elem glib.GoObjectS
} }
// Instance returns the underlying GstElement instance. // Instance returns the underlying GstElement instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Instance() *C.GstElement { return C.toGstElement(e.Unsafe()) } func (e *Element) Instance() *C.GstElement { return C.toGstElement(e.Unsafe()) }
// AbortState aborts the state change of the element. This function is used by elements that do asynchronous state changes // AbortState aborts the state change of the element. This function is used by elements that do asynchronous state changes
// and find out something is wrong. // and find out something is wrong.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) AbortState() { C.gst_element_abort_state(e.Instance()) } func (e *Element) AbortState() { C.gst_element_abort_state(e.Instance()) }
// AddPad adds a pad (link point) to element. pad's parent will be set to element // AddPad adds a pad (link point) to element. pad's parent will be set to element
@@ -141,11 +157,15 @@ func (e *Element) AbortState() { C.gst_element_abort_state(e.Instance()) }
// The pad and the element should be unlocked when calling this function. // The pad and the element should be unlocked when calling this function.
// //
// This function will emit the pad-added signal on the element. // This function will emit the pad-added signal on the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) AddPad(pad *Pad) bool { func (e *Element) AddPad(pad *Pad) bool {
return gobool(C.gst_element_add_pad(e.Instance(), pad.Instance())) return gobool(C.gst_element_add_pad(e.Instance(), pad.Instance()))
} }
// BlockSetState is a convinience wrapper function for calling SetState and an infinitely blocking GetState // BlockSetState is a convinience wrapper function for calling SetState and an infinitely blocking GetState
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) BlockSetState(state State) error { func (e *Element) BlockSetState(state State) error {
if err := e.SetState(state); err != nil { if err := e.SetState(state); err != nil {
return err return err
@@ -165,6 +185,8 @@ func (e *Element) BlockSetState(state State) error {
// //
// Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting // Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting
// for the streaming thread to shut down from this very streaming thread. // for the streaming thread to shut down from this very streaming thread.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) CallAsync(f func()) { func (e *Element) CallAsync(f func()) {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
C.gst_element_call_async( C.gst_element_call_async(
@@ -176,12 +198,16 @@ func (e *Element) CallAsync(f func()) {
} }
// PostMessage posts a message on the element's bus // PostMessage posts a message on the element's bus
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) PostMessage(message *Message) bool { func (e *Element) PostMessage(message *Message) bool {
// gst_element_post_message takes ownership of the message so need to ref it before feeding it forward // gst_element_post_message takes ownership of the message so need to ref it before feeding it forward
return gobool(C.gst_element_post_message(e.Instance(), message.Ref().Instance())) return gobool(C.gst_element_post_message(e.Instance(), message.Ref().Instance()))
} }
// ChangeState performs the given transition on this element. // ChangeState performs the given transition on this element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ChangeState(transition StateChange) StateChangeReturn { func (e *Element) ChangeState(transition StateChange) StateChangeReturn {
return StateChangeReturn(C.gst_element_change_state(e.Instance(), C.GstStateChange(transition))) return StateChangeReturn(C.gst_element_change_state(e.Instance(), C.GstStateChange(transition)))
} }
@@ -191,6 +217,8 @@ func (e *Element) ChangeState(transition StateChange) StateChangeReturn {
// for arguments specify the go-gst equivalent (e.g. *gst.Element for almost all GstElement derivatives). // for arguments specify the go-gst equivalent (e.g. *gst.Element for almost all GstElement derivatives).
// //
// This and the Emit() method may get moved down the hierarchy to the Object level at some point, since // This and the Emit() method may get moved down the hierarchy to the Object level at some point, since
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Connect(signal string, f interface{}) (glib.SignalHandle, error) { func (e *Element) Connect(signal string, f interface{}) (glib.SignalHandle, error) {
// Elements are sometimes their own type unique from TYPE_ELEMENT. So make sure a type marshaler // Elements are sometimes their own type unique from TYPE_ELEMENT. So make sure a type marshaler
// is registered for whatever this type is. Use the built-in element marshaler. // is registered for whatever this type is. Use the built-in element marshaler.
@@ -209,6 +237,8 @@ func (e *Element) Connect(signal string, f interface{}) (glib.SignalHandle, erro
// This method is used internally and should normally not be called by plugins or applications. // This method is used internally and should normally not be called by plugins or applications.
// //
// This function must be called with STATE_LOCK held. // This function must be called with STATE_LOCK held.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ContinueState(ret StateChangeReturn) StateChangeReturn { func (e *Element) ContinueState(ret StateChangeReturn) StateChangeReturn {
return StateChangeReturn(C.gst_element_continue_state(e.Instance(), C.GstStateChangeReturn(ret))) return StateChangeReturn(C.gst_element_continue_state(e.Instance(), C.GstStateChangeReturn(ret)))
} }
@@ -221,6 +251,8 @@ func (e *Element) ContinueState(ret StateChangeReturn) StateChangeReturn {
// Make sure that the Types are known to go-glib. Special types need to be registered with // Make sure that the Types are known to go-glib. Special types need to be registered with
// RegisterGValueMarshalers before calling Emit. Sub libraries of go-gst (sdp, rtp, webrtc, base, etc.) // RegisterGValueMarshalers before calling Emit. Sub libraries of go-gst (sdp, rtp, webrtc, base, etc.)
// register their types when they are imported via init() functions. // register their types when they are imported via init() functions.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Emit(signal string, args ...interface{}) (interface{}, error) { func (e *Element) Emit(signal string, args ...interface{}) (interface{}, error) {
// We are wrapping this for the same reason as Connect. // We are wrapping this for the same reason as Connect.
if e.TypeFromInstance() != glib.Type(C.GST_TYPE_ELEMENT) { if e.TypeFromInstance() != glib.Type(C.GST_TYPE_ELEMENT) {
@@ -231,6 +263,8 @@ func (e *Element) Emit(signal string, args ...interface{}) (interface{}, error)
// InfoMessage is a convenience wrapper for posting an info message from inside an element. Only to be used from // InfoMessage is a convenience wrapper for posting an info message from inside an element. Only to be used from
// plugins. // plugins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) InfoMessage(domain Domain, text string) { func (e *Element) InfoMessage(domain Domain, text string) {
function, file, line, _ := runtime.Caller(1) function, file, line, _ := runtime.Caller(1)
e.MessageFull(MessageInfo, domain, ErrorCode(0), "", text, path.Base(file), runtime.FuncForPC(function).Name(), line) e.MessageFull(MessageInfo, domain, ErrorCode(0), "", text, path.Base(file), runtime.FuncForPC(function).Name(), line)
@@ -238,6 +272,8 @@ func (e *Element) InfoMessage(domain Domain, text string) {
// WarningMessage is a convenience wrapper for posting a warning message from inside an element. Only to be used from // WarningMessage is a convenience wrapper for posting a warning message from inside an element. Only to be used from
// plugins. // plugins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) WarningMessage(domain Domain, text string) { func (e *Element) WarningMessage(domain Domain, text string) {
function, file, line, _ := runtime.Caller(1) function, file, line, _ := runtime.Caller(1)
e.MessageFull(MessageWarning, domain, ErrorCode(0), "", text, path.Base(file), runtime.FuncForPC(function).Name(), line) e.MessageFull(MessageWarning, domain, ErrorCode(0), "", text, path.Base(file), runtime.FuncForPC(function).Name(), line)
@@ -245,6 +281,8 @@ func (e *Element) WarningMessage(domain Domain, text string) {
// Error is a convenience wrapper around ErrorMessage to simply post the provided go error on the bus. // Error is a convenience wrapper around ErrorMessage to simply post the provided go error on the bus.
// The domain is assumed to be DomainLibrary and the code is assumed to be LibraryErrorFailed. // The domain is assumed to be DomainLibrary and the code is assumed to be LibraryErrorFailed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Error(msg string, err error) { func (e *Element) Error(msg string, err error) {
function, file, line, _ := runtime.Caller(1) function, file, line, _ := runtime.Caller(1)
debugMsg := fmt.Sprintf("%s: %s", msg, err.Error()) debugMsg := fmt.Sprintf("%s: %s", msg, err.Error())
@@ -253,6 +291,8 @@ func (e *Element) Error(msg string, err error) {
// ErrorMessage is a convenience wrapper for posting an error message from inside an element. Only to be used from // ErrorMessage is a convenience wrapper for posting an error message from inside an element. Only to be used from
// plugins. // plugins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ErrorMessage(domain Domain, code ErrorCode, text, debug string) { func (e *Element) ErrorMessage(domain Domain, code ErrorCode, text, debug string) {
function, file, line, _ := runtime.Caller(1) function, file, line, _ := runtime.Caller(1)
e.MessageFull(MessageError, domain, code, text, debug, path.Base(file), runtime.FuncForPC(function).Name(), line) e.MessageFull(MessageError, domain, code, text, debug, path.Base(file), runtime.FuncForPC(function).Name(), line)
@@ -260,6 +300,8 @@ func (e *Element) ErrorMessage(domain Domain, code ErrorCode, text, debug string
// MessageFull will post an error, warning, or info message on the bus from inside an element. Only to be used // MessageFull will post an error, warning, or info message on the bus from inside an element. Only to be used
// from plugins. // from plugins.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) MessageFull(msgType MessageType, domain Domain, code ErrorCode, text, debug, file, function string, line int) { func (e *Element) MessageFull(msgType MessageType, domain Domain, code ErrorCode, text, debug, file, function string, line int) {
var cTxt, cDbg unsafe.Pointer = nil, nil var cTxt, cDbg unsafe.Pointer = nil, nil
if text != "" { if text != "" {
@@ -287,6 +329,8 @@ func (e *Element) MessageFull(msgType MessageType, domain Domain, code ErrorCode
// GetBus returns the GstBus for retrieving messages from this element. This function returns // GetBus returns the GstBus for retrieving messages from this element. This function returns
// nil unless the element is a Pipeline. // nil unless the element is a Pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetBus() *Bus { func (e *Element) GetBus() *Bus {
bus := C.gst_element_get_bus((*C.GstElement)(e.Instance())) bus := C.gst_element_get_bus((*C.GstElement)(e.Instance()))
if bus == nil { if bus == nil {
@@ -297,6 +341,8 @@ func (e *Element) GetBus() *Bus {
// GetClock returns the Clock for this element. This is the clock as was last set with gst_element_set_clock. // GetClock returns the Clock for this element. This is the clock as was last set with gst_element_set_clock.
// Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state. // Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetClock() *Clock { func (e *Element) GetClock() *Clock {
cClock := C.gst_element_get_clock((*C.GstElement)(e.Instance())) cClock := C.gst_element_get_clock((*C.GstElement)(e.Instance()))
if cClock == nil { if cClock == nil {
@@ -306,6 +352,8 @@ func (e *Element) GetClock() *Clock {
} }
// GetFactory returns the factory that created this element. No refcounting is needed. // GetFactory returns the factory that created this element. No refcounting is needed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetFactory() *ElementFactory { func (e *Element) GetFactory() *ElementFactory {
factory := C.gst_element_get_factory((*C.GstElement)(e.Instance())) factory := C.gst_element_get_factory((*C.GstElement)(e.Instance()))
if factory == nil { if factory == nil {
@@ -315,6 +363,8 @@ func (e *Element) GetFactory() *ElementFactory {
} }
// GetPads retrieves a list of pads associated with the element. // GetPads retrieves a list of pads associated with the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetPads() ([]*Pad, error) { func (e *Element) GetPads() ([]*Pad, error) {
iter := C.gst_element_iterate_pads(e.Instance()) iter := C.gst_element_iterate_pads(e.Instance())
if iter == nil { if iter == nil {
@@ -324,6 +374,8 @@ func (e *Element) GetPads() ([]*Pad, error) {
} }
// GetSinkPads retrieves a list of sink pads associated with the element. // GetSinkPads retrieves a list of sink pads associated with the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetSinkPads() ([]*Pad, error) { func (e *Element) GetSinkPads() ([]*Pad, error) {
iter := C.gst_element_iterate_sink_pads(e.Instance()) iter := C.gst_element_iterate_sink_pads(e.Instance())
if iter == nil { if iter == nil {
@@ -333,6 +385,8 @@ func (e *Element) GetSinkPads() ([]*Pad, error) {
} }
// GetSrcPads retrieves a list of src pads associated with the element. // GetSrcPads retrieves a list of src pads associated with the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetSrcPads() ([]*Pad, error) { func (e *Element) GetSrcPads() ([]*Pad, error) {
iter := C.gst_element_iterate_src_pads(e.Instance()) iter := C.gst_element_iterate_src_pads(e.Instance())
if iter == nil { if iter == nil {
@@ -343,6 +397,8 @@ func (e *Element) GetSrcPads() ([]*Pad, error) {
// GetPadTemplates retrieves a list of the pad templates associated with this element. // GetPadTemplates retrieves a list of the pad templates associated with this element.
// The list must not be modified by the calling code. // The list must not be modified by the calling code.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetPadTemplates() []*PadTemplate { func (e *Element) GetPadTemplates() []*PadTemplate {
glist := C.gst_element_get_pad_template_list((*C.GstElement)(e.Instance())) glist := C.gst_element_get_pad_template_list((*C.GstElement)(e.Instance()))
if glist == nil { if glist == nil {
@@ -370,6 +426,8 @@ func (e *Element) GetPadTemplates() []*PadTemplate {
// equivalent to GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able // equivalent to GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able
// to complete their state change because an element is not producing data to complete the preroll. When setting the element to // to complete their state change because an element is not producing data to complete the preroll. When setting the element to
// playing, the preroll will complete and playback will start. // playing, the preroll will complete and playback will start.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetState(state State, timeout ClockTime) (StateChangeReturn, State) { func (e *Element) GetState(state State, timeout ClockTime) (StateChangeReturn, State) {
pending := C.GstState(state) pending := C.GstState(state)
var curState C.GstState var curState C.GstState
@@ -388,12 +446,16 @@ func (e *Element) GetState(state State, timeout ClockTime) (StateChangeReturn, S
// the current state of an element // the current state of an element
// //
// see https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c#members // see https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c#members
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetCurrentState() State { func (e *Element) GetCurrentState() State {
return State(e.Instance().current_state) return State(e.Instance().current_state)
} }
// GetStaticPad retrieves a pad from element by name. This version only retrieves // GetStaticPad retrieves a pad from element by name. This version only retrieves
// already-existing (i.e. 'static') pads. // already-existing (i.e. 'static') pads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetStaticPad(name string) *Pad { func (e *Element) GetStaticPad(name string) *Pad {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -406,28 +468,38 @@ func (e *Element) GetStaticPad(name string) *Pad {
// Has returns true if this element has the given flags. // Has returns true if this element has the given flags.
// Non MT safe // Non MT safe
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Has(flags ElementFlags) bool { func (e *Element) Has(flags ElementFlags) bool {
return e.hasFlags(uint32(flags)) return e.hasFlags(uint32(flags))
} }
// Set element flags // Set element flags
// Non MT safe // Non MT safe
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SetFlags(flags ElementFlags) { func (e *Element) SetFlags(flags ElementFlags) {
e.setFlags(uint32(flags)) e.setFlags(uint32(flags))
} }
// Unset element flags // Unset element flags
// Non MT safe // Non MT safe
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) UnsetFlags(flags ElementFlags) { func (e *Element) UnsetFlags(flags ElementFlags) {
e.unsetFlags(uint32(flags)) e.unsetFlags(uint32(flags))
} }
// IsURIHandler returns true if this element can handle URIs. // IsURIHandler returns true if this element can handle URIs.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) IsURIHandler() bool { func (e *Element) IsURIHandler() bool {
return gobool(C.gstElementIsURIHandler(e.Instance())) return gobool(C.gstElementIsURIHandler(e.Instance()))
} }
// Link wraps gst_element_link and links this element to the given one. // Link wraps gst_element_link and links this element to the given one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Link(elem *Element) error { func (e *Element) Link(elem *Element) error {
if ok := C.gst_element_link((*C.GstElement)(e.Instance()), (*C.GstElement)(elem.Instance())); !gobool(ok) { if ok := C.gst_element_link((*C.GstElement)(e.Instance()), (*C.GstElement)(elem.Instance())); !gobool(ok) {
return fmt.Errorf("failed to link %s to %s", e.GetName(), elem.GetName()) return fmt.Errorf("failed to link %s to %s", e.GetName(), elem.GetName())
@@ -435,12 +507,16 @@ func (e *Element) Link(elem *Element) error {
return nil return nil
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Unlink(elem *Element) { func (e *Element) Unlink(elem *Element) {
C.gst_element_unlink((*C.GstElement)(e.Instance()), (*C.GstElement)(elem.Instance())) C.gst_element_unlink((*C.GstElement)(e.Instance()), (*C.GstElement)(elem.Instance()))
} }
// LinkFiltered wraps gst_element_link_filtered and link this element to the given one // LinkFiltered wraps gst_element_link_filtered and link this element to the given one
// using the provided sink caps. // using the provided sink caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) LinkFiltered(elem *Element, filter *Caps) error { func (e *Element) LinkFiltered(elem *Element, filter *Caps) error {
if filter == nil { if filter == nil {
if ok := C.gst_element_link_filtered(e.Instance(), elem.Instance(), nil); !gobool(ok) { if ok := C.gst_element_link_filtered(e.Instance(), elem.Instance(), nil); !gobool(ok) {
@@ -456,6 +532,8 @@ func (e *Element) LinkFiltered(elem *Element, filter *Caps) error {
// ParentChangeState can be used when extending an element to chain up to the parents ChangeState // ParentChangeState can be used when extending an element to chain up to the parents ChangeState
// handler. // handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ParentChangeState(transition StateChange) StateChangeReturn { func (e *Element) ParentChangeState(transition StateChange) StateChangeReturn {
return StateChangeReturn(C.elementParentChangeState(e.Instance(), C.GstStateChange(transition))) return StateChangeReturn(C.elementParentChangeState(e.Instance(), C.GstStateChange(transition)))
} }
@@ -463,12 +541,16 @@ func (e *Element) ParentChangeState(transition StateChange) StateChangeReturn {
// ParentSendEvent chains up to the parent SendEvent handler. // ParentSendEvent chains up to the parent SendEvent handler.
// send_event takes ownership of the incoming event pointer so we have to ref it beforehand // send_event takes ownership of the incoming event pointer so we have to ref it beforehand
// in order not to mess up go's gc // in order not to mess up go's gc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ParentSendEvent(event *Event) bool { func (e *Element) ParentSendEvent(event *Event) bool {
return gobool(C.elementParentSendEvent(e.Instance(), event.Ref().Instance())) return gobool(C.elementParentSendEvent(e.Instance(), event.Ref().Instance()))
} }
// ParentPostMessage can be used when extending an element. During a PostMessage, use this method // ParentPostMessage can be used when extending an element. During a PostMessage, use this method
// to have the message posted on the bus after processing. // to have the message posted on the bus after processing.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ParentPostMessage(msg *Message) bool { func (e *Element) ParentPostMessage(msg *Message) bool {
return gobool(C.elementParentPostMessage(e.Instance(), msg.Instance())) return gobool(C.elementParentPostMessage(e.Instance(), msg.Instance()))
} }
@@ -479,11 +561,15 @@ func (e *Element) ParentPostMessage(msg *Message) bool {
// to the peer of a random linked sinkpad of this element. // to the peer of a random linked sinkpad of this element.
// //
// Please note that some queries might need a running pipeline to work. // Please note that some queries might need a running pipeline to work.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) Query(q *Query) bool { func (e *Element) Query(q *Query) bool {
return gobool(C.gst_element_query(e.Instance(), q.Instance())) return gobool(C.gst_element_query(e.Instance(), q.Instance()))
} }
// QueryConvert queries an element to convert src_val in src_format to dest_format. // QueryConvert queries an element to convert src_val in src_format to dest_format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) QueryConvert(srcFormat Format, srcValue int64, destFormat Format) (bool, int64) { func (e *Element) QueryConvert(srcFormat Format, srcValue int64, destFormat Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_element_query_convert(e.Instance(), C.GstFormat(srcFormat), C.gint64(srcValue), C.GstFormat(destFormat), &out) gok := C.gst_element_query_convert(e.Instance(), C.GstFormat(srcFormat), C.gint64(srcValue), C.GstFormat(destFormat), &out)
@@ -497,6 +583,8 @@ func (e *Element) QueryConvert(srcFormat Format, srcValue int64, destFormat Form
// //
// If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, // If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus,
// in which case you should re-query the duration using this function. // in which case you should re-query the duration using this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) QueryDuration(format Format) (bool, int64) { func (e *Element) QueryDuration(format Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_element_query_duration(e.Instance(), C.GstFormat(format), &out) gok := C.gst_element_query_duration(e.Instance(), C.GstFormat(format), &out)
@@ -507,6 +595,8 @@ func (e *Element) QueryDuration(format Format) (bool, int64) {
// in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). // in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known).
// This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). // This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state).
// The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. // The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) QueryPosition(format Format) (bool, int64) { func (e *Element) QueryPosition(format Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_element_query_position(e.Instance(), C.GstFormat(format), &out) gok := C.gst_element_query_position(e.Instance(), C.GstFormat(format), &out)
@@ -518,11 +608,15 @@ func (e *Element) QueryPosition(format Format) (bool, int64) {
// //
// This function takes ownership of the provided event so you should gst_event_ref it if you want to reuse the event // This function takes ownership of the provided event so you should gst_event_ref it if you want to reuse the event
// after this call. // after this call.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SendEvent(ev *Event) bool { func (e *Element) SendEvent(ev *Event) bool {
return gobool(C.gst_element_send_event(e.Instance(), ev.Ref().Instance())) return gobool(C.gst_element_send_event(e.Instance(), ev.Ref().Instance()))
} }
// SetState sets the target state for this element. // SetState sets the target state for this element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SetState(state State) error { func (e *Element) SetState(state State) error {
stateRet := C.gst_element_set_state((*C.GstElement)(e.Instance()), C.GstState(state)) stateRet := C.gst_element_set_state((*C.GstElement)(e.Instance()), C.GstState(state))
if stateRet == C.GST_STATE_CHANGE_FAILURE { if stateRet == C.GST_STATE_CHANGE_FAILURE {
@@ -532,6 +626,8 @@ func (e *Element) SetState(state State) error {
} }
// SetLockedState sets the locked state flag for this element. // SetLockedState sets the locked state flag for this element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SetLockedState(lockedState bool) error { func (e *Element) SetLockedState(lockedState bool) error {
ret := C.gst_element_set_locked_state((*C.GstElement)(e.Instance()), gboolean(lockedState)) ret := C.gst_element_set_locked_state((*C.GstElement)(e.Instance()), gboolean(lockedState))
if !gobool(ret) { if !gobool(ret) {
@@ -542,6 +638,8 @@ func (e *Element) SetLockedState(lockedState bool) error {
// SyncStateWithParent tries to change the state of the element to the same as its parent. If this function returns // SyncStateWithParent tries to change the state of the element to the same as its parent. If this function returns
// FALSE, the state of element is undefined. // FALSE, the state of element is undefined.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SyncStateWithParent() bool { func (e *Element) SyncStateWithParent() bool {
return gobool(C.gst_element_sync_state_with_parent(e.Instance())) return gobool(C.gst_element_sync_state_with_parent(e.Instance()))
} }
@@ -549,6 +647,8 @@ func (e *Element) SyncStateWithParent() bool {
// TOCSetter returns a TOCSetter interface if implemented by this element. Otherwise it // TOCSetter returns a TOCSetter interface if implemented by this element. Otherwise it
// returns nil. Currently this only supports elements built through this package, however, // returns nil. Currently this only supports elements built through this package, however,
// inner application elements could still use the interface as a reference implementation. // inner application elements could still use the interface as a reference implementation.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) TOCSetter() TOCSetter { func (e *Element) TOCSetter() TOCSetter {
if C.toTocSetter(e.Instance()) == nil { if C.toTocSetter(e.Instance()) == nil {
return nil return nil
@@ -559,6 +659,8 @@ func (e *Element) TOCSetter() TOCSetter {
// TagSetter returns a TagSetter interface if implemented by this element. Otherwise it returns nil. // TagSetter returns a TagSetter interface if implemented by this element. Otherwise it returns nil.
// This currently only supports elements built through this package's bindings, however, inner application // This currently only supports elements built through this package's bindings, however, inner application
// elements can still implement the interface themselves if they want. // elements can still implement the interface themselves if they want.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) TagSetter() TagSetter { func (e *Element) TagSetter() TagSetter {
if C.toTagSetter(e.Instance()) == nil { if C.toTagSetter(e.Instance()) == nil {
return nil return nil
@@ -569,6 +671,8 @@ func (e *Element) TagSetter() TagSetter {
// URIHandler returns a URIHandler interface if implemented by this element. Otherwise it // URIHandler returns a URIHandler interface if implemented by this element. Otherwise it
// returns nil. Currently this only supports elements built through this package, however, // returns nil. Currently this only supports elements built through this package, however,
// inner application elements could still use the interface as a reference implementation. // inner application elements could still use the interface as a reference implementation.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) URIHandler() URIHandler { func (e *Element) URIHandler() URIHandler {
if C.toGstURIHandler(e.Unsafe()) == nil { if C.toGstURIHandler(e.Unsafe()) == nil {
return nil return nil
@@ -587,6 +691,8 @@ func (e *Element) URIHandler() URIHandler {
// The pad and the element should be unlocked when calling this function. // The pad and the element should be unlocked when calling this function.
// //
// This function will emit the pad-removed signal on the element. // This function will emit the pad-removed signal on the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) RemovePad(pad *Pad) bool { func (e *Element) RemovePad(pad *Pad) bool {
return gobool(C.gst_element_remove_pad(e.Instance(), pad.Instance())) return gobool(C.gst_element_remove_pad(e.Instance(), pad.Instance()))
} }
@@ -595,6 +701,8 @@ func (e *Element) RemovePad(pad *Pad) bool {
// Unlike static pads, request pads are not created automatically but are only created on demand // Unlike static pads, request pads are not created automatically but are only created on demand
// For example, audiomixer has sink template, 'sink_%u', which is used for creating multiple sink pads on demand so that it performs mixing of audio streams by linking multiple upstream elements on it's sink pads created on demand. // For example, audiomixer has sink template, 'sink_%u', which is used for creating multiple sink pads on demand so that it performs mixing of audio streams by linking multiple upstream elements on it's sink pads created on demand.
// This returns the request pad created on demand. Otherwise, it returns null if failed to create. // This returns the request pad created on demand. Otherwise, it returns null if failed to create.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetRequestPad(name string) *Pad { func (e *Element) GetRequestPad(name string) *Pad {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -606,6 +714,8 @@ func (e *Element) GetRequestPad(name string) *Pad {
} }
// ReleaseRequestPad releases request pad // ReleaseRequestPad releases request pad
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ReleaseRequestPad(pad *Pad) { func (e *Element) ReleaseRequestPad(pad *Pad) {
C.gst_element_release_request_pad(e.Instance(), pad.Instance()) C.gst_element_release_request_pad(e.Instance(), pad.Instance())
} }
@@ -619,6 +729,8 @@ func (e *Element) ReleaseRequestPad(pad *Pad) {
// capture from multiple pipelines, and you can also ensure that the pipelines have the same clock. // capture from multiple pipelines, and you can also ensure that the pipelines have the same clock.
// //
// MT safe. // MT safe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SetStartTime(startTime ClockTime) { func (e *Element) SetStartTime(startTime ClockTime) {
C.gst_element_set_start_time(e.Instance(), C.GstClockTime(startTime)) C.gst_element_set_start_time(e.Instance(), C.GstClockTime(startTime))
} }
@@ -626,6 +738,8 @@ func (e *Element) SetStartTime(startTime ClockTime) {
// Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED. // Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED.
// Usually the start_time is managed by a toplevel element such as GstPipeline. // Usually the start_time is managed by a toplevel element such as GstPipeline.
// MT safe. // MT safe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetStartTime() ClockTime { func (e *Element) GetStartTime() ClockTime {
ctime := C.gst_element_get_start_time(e.Instance()) ctime := C.gst_element_get_start_time(e.Instance())
@@ -634,12 +748,16 @@ func (e *Element) GetStartTime() ClockTime {
// Set the base time of an element. The base time is the absolute time of the clock // Set the base time of an element. The base time is the absolute time of the clock
// when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element. // when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SetBaseTime(startTime ClockTime) { func (e *Element) SetBaseTime(startTime ClockTime) {
C.gst_element_set_base_time(e.Instance(), C.GstClockTime(startTime)) C.gst_element_set_base_time(e.Instance(), C.GstClockTime(startTime))
} }
// Returns the base time of the element. The base time is the absolute time of the clock // Returns the base time of the element. The base time is the absolute time of the clock
// when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element. // when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) GetBaseTime() ClockTime { func (e *Element) GetBaseTime() ClockTime {
ctime := C.gst_element_get_base_time(e.Instance()) ctime := C.gst_element_get_base_time(e.Instance())
@@ -647,6 +765,8 @@ func (e *Element) GetBaseTime() ClockTime {
} }
// SeekSimple seeks to the given position in the stream. The element / pipeline should be in the PAUSED or PLAYING state and must be a seekable. // SeekSimple seeks to the given position in the stream. The element / pipeline should be in the PAUSED or PLAYING state and must be a seekable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SeekSimple(position int64, format Format, flag SeekFlags) bool { func (e *Element) SeekSimple(position int64, format Format, flag SeekFlags) bool {
result := C.gst_element_seek_simple(e.Instance(), C.GstFormat(format), C.GstSeekFlags(flag), C.gint64(position)) result := C.gst_element_seek_simple(e.Instance(), C.GstFormat(format), C.GstSeekFlags(flag), C.gint64(position))
return gobool(result) return gobool(result)
@@ -660,12 +780,16 @@ func (e *Element) SeekSimple(position int64, format Format, flag SeekFlags) bool
// element.SeekTime(pos, gst.FormatTime, gst.SeekFlagFlush) // element.SeekTime(pos, gst.FormatTime, gst.SeekFlagFlush)
// //
// to perform a flush seek to the nearest keyframe before the given position. // to perform a flush seek to the nearest keyframe before the given position.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SeekTime(position time.Duration, flag SeekFlags) bool { func (e *Element) SeekTime(position time.Duration, flag SeekFlags) bool {
return e.SeekSimple(position.Nanoseconds(), FormatTime, flag) return e.SeekSimple(position.Nanoseconds(), FormatTime, flag)
} }
// SeekDefault seeks to the given position in the stream. The position is the frame number for video, or sample for audio. // SeekDefault seeks to the given position in the stream. The position is the frame number for video, or sample for audio.
// The element should be in the PAUSED or PLAYING state and must be a seekable. // The element should be in the PAUSED or PLAYING state and must be a seekable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) SeekDefault(position int64, flag SeekFlags) bool { func (e *Element) SeekDefault(position int64, flag SeekFlags) bool {
return e.SeekSimple(position, FormatDefault, flag) return e.SeekSimple(position, FormatDefault, flag)
} }
@@ -673,6 +797,8 @@ func (e *Element) SeekDefault(position int64, flag SeekFlags) bool {
// this prevents go pointers in cgo when setting a gst.Element to a property // this prevents go pointers in cgo when setting a gst.Element to a property
// see (https://github.com/go-gst/go-gst/issues/65) // see (https://github.com/go-gst/go-gst/issues/65)
// ToGValue implements glib.ValueTransformer. // ToGValue implements glib.ValueTransformer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Element) ToGValue() (*glib.Value, error) { func (e *Element) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(glib.Type(C.GST_TYPE_ELEMENT)) val, err := glib.ValueInit(glib.Type(C.GST_TYPE_ELEMENT))
if err != nil { if err != nil {

View File

@@ -14,16 +14,22 @@ import (
type ElementClass struct{ *glib.ObjectClass } type ElementClass struct{ *glib.ObjectClass }
// ToElementClass wraps the given ObjectClass in an ElementClass instance. // ToElementClass wraps the given ObjectClass in an ElementClass instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToElementClass(klass *glib.ObjectClass) *ElementClass { func ToElementClass(klass *glib.ObjectClass) *ElementClass {
return &ElementClass{klass} return &ElementClass{klass}
} }
// Instance returns the underlying GstElementClass instance. // Instance returns the underlying GstElementClass instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) Instance() *C.GstElementClass { func (e *ElementClass) Instance() *C.GstElementClass {
return C.toGstElementClass(e.Unsafe()) return C.toGstElementClass(e.Unsafe())
} }
// AddMetadata sets key with the given value in the metadata of the class. // AddMetadata sets key with the given value in the metadata of the class.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) AddMetadata(key, value string) { func (e *ElementClass) AddMetadata(key, value string) {
C.gst_element_class_add_static_metadata( C.gst_element_class_add_static_metadata(
e.Instance(), e.Instance(),
@@ -37,6 +43,8 @@ func (e *ElementClass) AddMetadata(key, value string) {
// already existing one is added the old one is replaced by the new one. // already existing one is added the old one is replaced by the new one.
// //
// templ's reference count will be incremented, and any floating reference will be removed // templ's reference count will be incremented, and any floating reference will be removed
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) AddPadTemplate(templ *PadTemplate) { func (e *ElementClass) AddPadTemplate(templ *PadTemplate) {
C.gst_element_class_add_pad_template( C.gst_element_class_add_pad_template(
e.Instance(), e.Instance(),
@@ -49,6 +57,8 @@ func (e *ElementClass) AddPadTemplate(templ *PadTemplate) {
// //
// This is mainly used in the ClassInit functions of element implementations. If a pad template with the // This is mainly used in the ClassInit functions of element implementations. If a pad template with the
// same name already exists, the old one is replaced by the new one. // same name already exists, the old one is replaced by the new one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) AddStaticPadTemplate(templ *PadTemplate) { func (e *ElementClass) AddStaticPadTemplate(templ *PadTemplate) {
staticTmpl := C.GstStaticPadTemplate{ staticTmpl := C.GstStaticPadTemplate{
name_template: templ.Instance().name_template, name_template: templ.Instance().name_template,
@@ -66,6 +76,8 @@ func (e *ElementClass) AddStaticPadTemplate(templ *PadTemplate) {
} }
// GetMetadata retrieves the metadata associated with key in the class. // GetMetadata retrieves the metadata associated with key in the class.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) GetMetadata(key string) string { func (e *ElementClass) GetMetadata(key string) string {
ckey := C.CString(key) ckey := C.CString(key)
defer C.free(unsafe.Pointer(ckey)) defer C.free(unsafe.Pointer(ckey))
@@ -74,6 +86,8 @@ func (e *ElementClass) GetMetadata(key string) string {
// GetPadTemplate retrieves the padtemplate with the given name. // GetPadTemplate retrieves the padtemplate with the given name.
// If no pad template exists with the given name, nil is returned. // If no pad template exists with the given name, nil is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) GetPadTemplate(name string) *PadTemplate { func (e *ElementClass) GetPadTemplate(name string) *PadTemplate {
cname := C.CString(name) cname := C.CString(name)
defer C.free(unsafe.Pointer(cname)) defer C.free(unsafe.Pointer(cname))
@@ -86,6 +100,8 @@ func (e *ElementClass) GetPadTemplate(name string) *PadTemplate {
// GetAllPadTemplates retrieves a slice of all the pad templates associated with this class. // GetAllPadTemplates retrieves a slice of all the pad templates associated with this class.
// The list must not be modified. // The list must not be modified.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) GetAllPadTemplates() []*PadTemplate { func (e *ElementClass) GetAllPadTemplates() []*PadTemplate {
glist := C.gst_element_class_get_pad_template_list(e.Instance()) glist := C.gst_element_class_get_pad_template_list(e.Instance())
return glistToPadTemplateSlice(glist) return glistToPadTemplateSlice(glist)
@@ -100,6 +116,8 @@ func (e *ElementClass) GetAllPadTemplates() []*PadTemplate {
// `description` - Sentence describing the purpose of the element. E.g: "Write stream to a file" // `description` - Sentence describing the purpose of the element. E.g: "Write stream to a file"
// //
// `author` - Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>" // `author` - Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) SetMetadata(longname, classification, description, author string) { func (e *ElementClass) SetMetadata(longname, classification, description, author string) {
C.gst_element_class_set_static_metadata( C.gst_element_class_set_static_metadata(
e.Instance(), e.Instance(),

View File

@@ -9,6 +9,8 @@ import (
"github.com/go-gst/go-gst/gst" "github.com/go-gst/go-gst/gst"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TestSignalEmitSimpleReturnValue(t *testing.T) { func TestSignalEmitSimpleReturnValue(t *testing.T) {
gst.Init(nil) gst.Init(nil)
webrtcbin, err := gst.NewElement("webrtcbin") webrtcbin, err := gst.NewElement("webrtcbin")
@@ -30,6 +32,8 @@ func TestSignalEmitSimpleReturnValue(t *testing.T) {
} }
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TestSignalEmitVoidReturnValue(t *testing.T) { func TestSignalEmitVoidReturnValue(t *testing.T) {
gst.Init(nil) gst.Init(nil)
@@ -48,6 +52,8 @@ func TestSignalEmitVoidReturnValue(t *testing.T) {
} }
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TestSignalEmitGObjectReturnValue(t *testing.T) { func TestSignalEmitGObjectReturnValue(t *testing.T) {
gst.Init(nil) gst.Init(nil)

View File

@@ -13,6 +13,8 @@ import (
) )
//export goGstElementClassChangeState //export goGstElementClassChangeState
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassChangeState(elem *C.GstElement, change C.GstStateChange) C.GstStateChangeReturn { func goGstElementClassChangeState(elem *C.GstElement, change C.GstStateChange) C.GstStateChangeReturn {
var ret StateChangeReturn var ret StateChangeReturn
@@ -28,6 +30,8 @@ func goGstElementClassChangeState(elem *C.GstElement, change C.GstStateChange) C
} }
//export goGstElementClassGetState //export goGstElementClassGetState
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassGetState(elem *C.GstElement, state, pending *C.GstState, timeout C.GstClockTime) C.GstStateChangeReturn { func goGstElementClassGetState(elem *C.GstElement, state, pending *C.GstState, timeout C.GstClockTime) C.GstStateChangeReturn {
var ret StateChangeReturn var ret StateChangeReturn
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
@@ -47,6 +51,8 @@ func goGstElementClassGetState(elem *C.GstElement, state, pending *C.GstState, t
} }
//export goGstElementClassNoMorePads //export goGstElementClassNoMorePads
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassNoMorePads(elem *C.GstElement) { func goGstElementClassNoMorePads(elem *C.GstElement) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))
@@ -56,6 +62,8 @@ func goGstElementClassNoMorePads(elem *C.GstElement) {
} }
//export goGstElementClassPadAdded //export goGstElementClassPadAdded
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassPadAdded(elem *C.GstElement, pad *C.GstPad) { func goGstElementClassPadAdded(elem *C.GstElement, pad *C.GstPad) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))
@@ -65,6 +73,8 @@ func goGstElementClassPadAdded(elem *C.GstElement, pad *C.GstPad) {
} }
//export goGstElementClassPadRemoved //export goGstElementClassPadRemoved
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassPadRemoved(elem *C.GstElement, pad *C.GstPad) { func goGstElementClassPadRemoved(elem *C.GstElement, pad *C.GstPad) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))
@@ -74,6 +84,8 @@ func goGstElementClassPadRemoved(elem *C.GstElement, pad *C.GstPad) {
} }
//export goGstElementClassPostMessage //export goGstElementClassPostMessage
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassPostMessage(elem *C.GstElement, msg *C.GstMessage) C.gboolean { func goGstElementClassPostMessage(elem *C.GstElement, msg *C.GstMessage) C.gboolean {
var ret C.gboolean var ret C.gboolean
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
@@ -86,6 +98,8 @@ func goGstElementClassPostMessage(elem *C.GstElement, msg *C.GstMessage) C.gbool
} }
//export goGstElementClassProvideClock //export goGstElementClassProvideClock
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassProvideClock(elem *C.GstElement) *C.GstClock { func goGstElementClassProvideClock(elem *C.GstElement) *C.GstClock {
var clock *Clock var clock *Clock
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
@@ -101,6 +115,8 @@ func goGstElementClassProvideClock(elem *C.GstElement) *C.GstClock {
} }
//export goGstElementClassQuery //export goGstElementClassQuery
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassQuery(elem *C.GstElement, query *C.GstQuery) C.gboolean { func goGstElementClassQuery(elem *C.GstElement, query *C.GstQuery) C.gboolean {
var ret C.gboolean var ret C.gboolean
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
@@ -113,6 +129,8 @@ func goGstElementClassQuery(elem *C.GstElement, query *C.GstQuery) C.gboolean {
} }
//export goGstElementClassReleasePad //export goGstElementClassReleasePad
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassReleasePad(elem *C.GstElement, pad *C.GstPad) { func goGstElementClassReleasePad(elem *C.GstElement, pad *C.GstPad) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))
@@ -122,6 +140,8 @@ func goGstElementClassReleasePad(elem *C.GstElement, pad *C.GstPad) {
} }
//export goGstElementClassRequestNewPad //export goGstElementClassRequestNewPad
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassRequestNewPad(elem *C.GstElement, templ *C.GstPadTemplate, name *C.gchar, caps *C.GstCaps) *C.GstPad { func goGstElementClassRequestNewPad(elem *C.GstElement, templ *C.GstPadTemplate, name *C.gchar, caps *C.GstCaps) *C.GstPad {
var pad *Pad var pad *Pad
@@ -145,6 +165,8 @@ func goGstElementClassRequestNewPad(elem *C.GstElement, templ *C.GstPadTemplate,
} }
//export goGstElementClassSendEvent //export goGstElementClassSendEvent
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassSendEvent(elem *C.GstElement, event *C.GstEvent) C.gboolean { func goGstElementClassSendEvent(elem *C.GstElement, event *C.GstEvent) C.gboolean {
var ret C.gboolean var ret C.gboolean
@@ -158,6 +180,8 @@ func goGstElementClassSendEvent(elem *C.GstElement, event *C.GstEvent) C.gboolea
} }
//export goGstElementClassSetBus //export goGstElementClassSetBus
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassSetBus(elem *C.GstElement, bus *C.GstBus) { func goGstElementClassSetBus(elem *C.GstElement, bus *C.GstBus) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))
@@ -167,6 +191,8 @@ func goGstElementClassSetBus(elem *C.GstElement, bus *C.GstBus) {
} }
//export goGstElementClassSetClock //export goGstElementClassSetClock
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassSetClock(elem *C.GstElement, clock *C.GstClock) C.gboolean { func goGstElementClassSetClock(elem *C.GstElement, clock *C.GstClock) C.gboolean {
var ret C.gboolean var ret C.gboolean
@@ -180,6 +206,8 @@ func goGstElementClassSetClock(elem *C.GstElement, clock *C.GstClock) C.gboolean
} }
//export goGstElementClassSetContext //export goGstElementClassSetContext
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassSetContext(elem *C.GstElement, ctx *C.GstContext) { func goGstElementClassSetContext(elem *C.GstElement, ctx *C.GstContext) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))
@@ -189,6 +217,8 @@ func goGstElementClassSetContext(elem *C.GstElement, ctx *C.GstContext) {
} }
//export goGstElementClassSetState //export goGstElementClassSetState
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassSetState(elem *C.GstElement, state C.GstState) C.GstStateChangeReturn { func goGstElementClassSetState(elem *C.GstElement, state C.GstState) C.GstStateChangeReturn {
var ret C.GstStateChangeReturn var ret C.GstStateChangeReturn
@@ -204,6 +234,8 @@ func goGstElementClassSetState(elem *C.GstElement, state C.GstState) C.GstStateC
} }
//export goGstElementClassStateChanged //export goGstElementClassStateChanged
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstElementClassStateChanged(elem *C.GstElement, old, new, pending C.GstState) { func goGstElementClassStateChanged(elem *C.GstElement, old, new, pending C.GstState) {
goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))})
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem))

View File

@@ -12,11 +12,15 @@ import (
) )
// NewElement creates a new element using the factory of the given name. // NewElement creates a new element using the factory of the given name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewElement(factory string) (*Element, error) { func NewElement(factory string) (*Element, error) {
return NewElementWithName(factory, "") return NewElementWithName(factory, "")
} }
// NewElementWithName creates a new element and sets it's name to the given value. // NewElementWithName creates a new element and sets it's name to the given value.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewElementWithName(factory string, name string) (*Element, error) { func NewElementWithName(factory string, name string) (*Element, error) {
elemName := C.CString(factory) elemName := C.CString(factory)
defer C.free(unsafe.Pointer(elemName)) defer C.free(unsafe.Pointer(elemName))
@@ -38,6 +42,8 @@ func NewElementWithName(factory string, name string) (*Element, error) {
// //
// this function is needed for gstreamer props that have the "Construct Only" flag, e.g.: // this function is needed for gstreamer props that have the "Construct Only" flag, e.g.:
// https://gstreamer.freedesktop.org/documentation/audio/gstaudioaggregator.html?gi-language=c#GstAudioAggregator:force-live // https://gstreamer.freedesktop.org/documentation/audio/gstaudioaggregator.html?gi-language=c#GstAudioAggregator:force-live
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewElementWithProperties(factory string, properties map[string]interface{}) (*Element, error) { func NewElementWithProperties(factory string, properties map[string]interface{}) (*Element, error) {
props := make([]*C.char, 0) props := make([]*C.char, 0)
values := make([]C.GValue, 0) values := make([]C.GValue, 0)
@@ -78,6 +84,8 @@ func NewElementWithProperties(factory string, properties map[string]interface{})
// NewElementMany is a convenience wrapper around building many GstElements in a // NewElementMany is a convenience wrapper around building many GstElements in a
// single function call. It returns an error if the creation of any element fails. A // single function call. It returns an error if the creation of any element fails. A
// slice in the order the names were given is returned. // slice in the order the names were given is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewElementMany(elemNames ...string) ([]*Element, error) { func NewElementMany(elemNames ...string) ([]*Element, error) {
elems := make([]*Element, len(elemNames)) elems := make([]*Element, len(elemNames))
for idx, name := range elemNames { for idx, name := range elemNames {
@@ -94,6 +102,8 @@ func NewElementMany(elemNames ...string) ([]*Element, error) {
type ElementFactory struct{ *PluginFeature } type ElementFactory struct{ *PluginFeature }
// Find returns the factory for the given plugin, or nil if it doesn't exist. // Find returns the factory for the given plugin, or nil if it doesn't exist.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func Find(name string) *ElementFactory { func Find(name string) *ElementFactory {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -105,29 +115,41 @@ func Find(name string) *ElementFactory {
} }
// Instance returns the C GstFactory instance // Instance returns the C GstFactory instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) Instance() *C.GstElementFactory { return C.toGstElementFactory(e.Unsafe()) } func (e *ElementFactory) Instance() *C.GstElementFactory { return C.toGstElementFactory(e.Unsafe()) }
// CanSinkAllCaps checks if the factory can sink all possible capabilities. // CanSinkAllCaps checks if the factory can sink all possible capabilities.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) CanSinkAllCaps(caps *Caps) bool { func (e *ElementFactory) CanSinkAllCaps(caps *Caps) bool {
return gobool(C.gst_element_factory_can_sink_all_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance()))) return gobool(C.gst_element_factory_can_sink_all_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance())))
} }
// CanSinkAnyCaps checks if the factory can sink any possible capability. // CanSinkAnyCaps checks if the factory can sink any possible capability.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) CanSinkAnyCaps(caps *Caps) bool { func (e *ElementFactory) CanSinkAnyCaps(caps *Caps) bool {
return gobool(C.gst_element_factory_can_sink_any_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance()))) return gobool(C.gst_element_factory_can_sink_any_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance())))
} }
// CanSourceAllCaps checks if the factory can src all possible capabilities. // CanSourceAllCaps checks if the factory can src all possible capabilities.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) CanSourceAllCaps(caps *Caps) bool { func (e *ElementFactory) CanSourceAllCaps(caps *Caps) bool {
return gobool(C.gst_element_factory_can_src_all_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance()))) return gobool(C.gst_element_factory_can_src_all_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance())))
} }
// CanSourceAnyCaps checks if the factory can src any possible capability. // CanSourceAnyCaps checks if the factory can src any possible capability.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) CanSourceAnyCaps(caps *Caps) bool { func (e *ElementFactory) CanSourceAnyCaps(caps *Caps) bool {
return gobool(C.gst_element_factory_can_src_any_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance()))) return gobool(C.gst_element_factory_can_src_any_caps((*C.GstElementFactory)(e.Instance()), (*C.GstCaps)(caps.Instance())))
} }
// GetMetadata gets the metadata on this factory with key. // GetMetadata gets the metadata on this factory with key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) GetMetadata(key string) string { func (e *ElementFactory) GetMetadata(key string) string {
ckey := C.CString(key) ckey := C.CString(key)
defer C.free(unsafe.Pointer(ckey)) defer C.free(unsafe.Pointer(ckey))
@@ -137,6 +159,8 @@ func (e *ElementFactory) GetMetadata(key string) string {
} }
// GetMetadataKeys gets the available keys for the metadata on this factory. // GetMetadataKeys gets the available keys for the metadata on this factory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementFactory) GetMetadataKeys() []string { func (e *ElementFactory) GetMetadataKeys() []string {
keys := C.gst_element_factory_get_metadata_keys((*C.GstElementFactory)(e.Instance())) keys := C.gst_element_factory_get_metadata_keys((*C.GstElementFactory)(e.Instance()))
if keys == nil { if keys == nil {

View File

@@ -51,6 +51,8 @@ var ExtendsElement glib.Extendable = &extendElement{parent: glib.ExtendsObject}
// ElementImpl is an interface containing go equivalents of the virtual methods that can be // ElementImpl is an interface containing go equivalents of the virtual methods that can be
// overridden by a plugin extending an Element. // overridden by a plugin extending an Element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type ElementImpl interface { type ElementImpl interface {
// ChangeState is called by SetState to perform an incremental state change. // ChangeState is called by SetState to perform an incremental state change.
ChangeState(*Element, StateChange) StateChangeReturn ChangeState(*Element, StateChange) StateChangeReturn
@@ -89,10 +91,18 @@ type ElementImpl interface {
type extendElement struct{ parent glib.Extendable } type extendElement struct{ parent glib.Extendable }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendElement) Type() glib.Type { return glib.Type(C.gst_element_get_type()) } func (e *extendElement) Type() glib.Type { return glib.Type(C.gst_element_get_type()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendElement) ClassSize() int64 { return int64(C.sizeof_GstElementClass) } func (e *extendElement) ClassSize() int64 { return int64(C.sizeof_GstElementClass) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendElement) InstanceSize() int64 { return int64(C.sizeof_GstElement) } func (e *extendElement) InstanceSize() int64 { return int64(C.sizeof_GstElement) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *extendElement) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) { func (e *extendElement) InitClass(klass unsafe.Pointer, elem glib.GoObjectSubclass) {
e.parent.InitClass(klass, elem) e.parent.InitClass(klass, elem)

View File

@@ -16,6 +16,8 @@ const (
DomainStream Domain = "STREAM" DomainStream Domain = "STREAM"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (d Domain) toQuark() C.GQuark { func (d Domain) toQuark() C.GQuark {
switch d { switch d {
case DomainCore: case DomainCore:
@@ -100,6 +102,8 @@ const (
// GError is a Go wrapper for a C GError in the context of GStreamer. It implements the error interface // GError is a Go wrapper for a C GError in the context of GStreamer. It implements the error interface
// and provides additional functions for retrieving debug strings and details. // and provides additional functions for retrieving debug strings and details.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type GError struct { type GError struct {
errMsg, debugStr string errMsg, debugStr string
structure *Structure structure *Structure
@@ -110,21 +114,33 @@ type GError struct {
// Message is an alias to `Error()`. It's for clarity when this object // Message is an alias to `Error()`. It's for clarity when this object
// is parsed from a `GST_MESSAGE_INFO` or `GST_MESSAGE_WARNING`. // is parsed from a `GST_MESSAGE_INFO` or `GST_MESSAGE_WARNING`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *GError) Message() string { return e.Error() } func (e *GError) Message() string { return e.Error() }
// Error implements the error interface and returns the error message. // Error implements the error interface and returns the error message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *GError) Error() string { return e.errMsg } func (e *GError) Error() string { return e.errMsg }
// DebugString returns any debug info alongside the error. // DebugString returns any debug info alongside the error.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *GError) DebugString() string { return e.debugStr } func (e *GError) DebugString() string { return e.debugStr }
// Structure returns the structure of the error message which may contain additional metadata. // Structure returns the structure of the error message which may contain additional metadata.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *GError) Structure() *Structure { return e.structure } func (e *GError) Structure() *Structure { return e.structure }
// Code returns the error code of the error message. // Code returns the error code of the error message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *GError) Code() ErrorCode { return e.code } func (e *GError) Code() ErrorCode { return e.code }
// NewGError wraps the given error inside a GError (to be used with message constructors). // NewGError wraps the given error inside a GError (to be used with message constructors).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewGError(code ErrorCode, err error) *GError { func NewGError(code ErrorCode, err error) *GError {
return &GError{ return &GError{
errMsg: err.Error(), errMsg: err.Error(),

View File

@@ -10,6 +10,8 @@ import (
) )
// Event is a go wrapper around a GstEvent. // Event is a go wrapper around a GstEvent.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Event struct { type Event struct {
ptr *C.GstEvent ptr *C.GstEvent
} }
@@ -19,6 +21,8 @@ type Event struct {
// FromGstEventUnsafeNone wraps the pointer to the given C GstEvent with the go type. // FromGstEventUnsafeNone wraps the pointer to the given C GstEvent with the go type.
// A ref is taken and finalizer applied. // A ref is taken and finalizer applied.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstEventUnsafeNone(ev unsafe.Pointer) *Event { func FromGstEventUnsafeNone(ev unsafe.Pointer) *Event {
event := ToGstEvent(ev) event := ToGstEvent(ev)
event.Ref() event.Ref()
@@ -28,6 +32,8 @@ func FromGstEventUnsafeNone(ev unsafe.Pointer) *Event {
// FromGstEventUnsafeFull wraps the pointer to the given C GstEvent without taking a ref. // FromGstEventUnsafeFull wraps the pointer to the given C GstEvent without taking a ref.
// A finalizer is applied. // A finalizer is applied.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstEventUnsafeFull(ev unsafe.Pointer) *Event { func FromGstEventUnsafeFull(ev unsafe.Pointer) *Event {
event := ToGstEvent(ev) event := ToGstEvent(ev)
runtime.SetFinalizer(event, (*Event).Unref) runtime.SetFinalizer(event, (*Event).Unref)
@@ -36,33 +42,47 @@ func FromGstEventUnsafeFull(ev unsafe.Pointer) *Event {
// ToGstEvent converts the given pointer into an Event without affecting the ref count or // ToGstEvent converts the given pointer into an Event without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstEvent(ev unsafe.Pointer) *Event { func ToGstEvent(ev unsafe.Pointer) *Event {
return wrapEvent((*C.GstEvent)(ev)) return wrapEvent((*C.GstEvent)(ev))
} }
// Instance returns the underlying GstEvent instance. // Instance returns the underlying GstEvent instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Instance() *C.GstEvent { return C.toGstEvent(unsafe.Pointer(e.ptr)) } func (e *Event) Instance() *C.GstEvent { return C.toGstEvent(unsafe.Pointer(e.ptr)) }
// Type returns the type of the event // Type returns the type of the event
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Type() EventType { return EventType(e.Instance()._type) } func (e *Event) Type() EventType { return EventType(e.Instance()._type) }
// Timestamp returns the timestamp of the event. // Timestamp returns the timestamp of the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Timestamp() time.Duration { func (e *Event) Timestamp() time.Duration {
ts := e.Instance().timestamp ts := e.Instance().timestamp
return time.Duration(uint64(ts)) * time.Nanosecond return time.Duration(uint64(ts)) * time.Nanosecond
} }
// Seqnum returns the sequence number of the event. // Seqnum returns the sequence number of the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Seqnum() uint32 { func (e *Event) Seqnum() uint32 {
return uint32(e.Instance().seqnum) return uint32(e.Instance().seqnum)
} }
// Copy copies the event using the event specific copy function. // Copy copies the event using the event specific copy function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Copy() *Event { func (e *Event) Copy() *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_copy(e.Instance()))) return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_copy(e.Instance())))
} }
// CopySegment parses a segment event and copies the Segment into the location given by segment. // CopySegment parses a segment event and copies the Segment into the location given by segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) CopySegment(segment *Segment) { func (e *Event) CopySegment(segment *Segment) {
C.gst_event_copy_segment(e.Instance(), segment.Instance()) C.gst_event_copy_segment(e.Instance(), segment.Instance())
} }
@@ -74,6 +94,8 @@ func (e *Event) CopySegment(segment *Segment) {
// //
// If the event contains any information that related to the running time, this information will need to be // If the event contains any information that related to the running time, this information will need to be
// updated before usage with this offset. // updated before usage with this offset.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) GetRunningTimeOffset() int64 { func (e *Event) GetRunningTimeOffset() int64 {
return int64(C.gst_event_get_running_time_offset(e.Instance())) return int64(C.gst_event_get_running_time_offset(e.Instance()))
} }
@@ -87,16 +109,22 @@ func (e *Event) GetRunningTimeOffset() int64 {
// //
// Note that events and messages share the same sequence number incrementor; two events or messages will never // Note that events and messages share the same sequence number incrementor; two events or messages will never
// have the same sequence number unless that correspondence was made explicitly. // have the same sequence number unless that correspondence was made explicitly.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) GetSeqnum() uint32 { func (e *Event) GetSeqnum() uint32 {
return uint32(C.gst_event_get_seqnum(e.Instance())) return uint32(C.gst_event_get_seqnum(e.Instance()))
} }
// GetStructure accesses the structure of the event. // GetStructure accesses the structure of the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) GetStructure() *Structure { func (e *Event) GetStructure() *Structure {
return wrapStructure(C.gst_event_get_structure(e.Instance())) return wrapStructure(C.gst_event_get_structure(e.Instance()))
} }
// HasName checks if event has the given name. This function is usually used to check the name of a custom event. // HasName checks if event has the given name. This function is usually used to check the name of a custom event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) HasName(name string) bool { func (e *Event) HasName(name string) bool {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -104,6 +132,8 @@ func (e *Event) HasName(name string) bool {
} }
// ParseBufferSize gets the format, minsize, maxsize and async-flag in the buffersize event. // ParseBufferSize gets the format, minsize, maxsize and async-flag in the buffersize event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseBufferSize() (format Format, minSize, maxSize int64, async bool) { func (e *Event) ParseBufferSize() (format Format, minSize, maxSize int64, async bool) {
var gformat C.GstFormat var gformat C.GstFormat
var gmin, gmax C.gint64 var gmin, gmax C.gint64
@@ -113,6 +143,8 @@ func (e *Event) ParseBufferSize() (format Format, minSize, maxSize int64, async
} }
// ParseCaps gets the caps from event. The caps remains valid as long as event remains valid. // ParseCaps gets the caps from event. The caps remains valid as long as event remains valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseCaps() *Caps { func (e *Event) ParseCaps() *Caps {
var caps *C.GstCaps var caps *C.GstCaps
C.gst_event_parse_caps(e.Instance(), &caps) C.gst_event_parse_caps(e.Instance(), &caps)
@@ -121,6 +153,8 @@ func (e *Event) ParseCaps() *Caps {
// ParseFlushStop parses the FLUSH_STOP event and retrieve the reset_time member. Value reflects whether // ParseFlushStop parses the FLUSH_STOP event and retrieve the reset_time member. Value reflects whether
// time should be reset. // time should be reset.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseFlushStop() (resetTime bool) { func (e *Event) ParseFlushStop() (resetTime bool) {
var gbool C.gboolean var gbool C.gboolean
C.gst_event_parse_flush_stop(e.Instance(), &gbool) C.gst_event_parse_flush_stop(e.Instance(), &gbool)
@@ -128,6 +162,8 @@ func (e *Event) ParseFlushStop() (resetTime bool) {
} }
// ParseGap extracts timestamp and duration from a new GAP event. // ParseGap extracts timestamp and duration from a new GAP event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseGap() (timestamp, duration time.Duration) { func (e *Event) ParseGap() (timestamp, duration time.Duration) {
var ts, dur C.GstClockTime var ts, dur C.GstClockTime
C.gst_event_parse_gap(e.Instance(), &ts, &dur) C.gst_event_parse_gap(e.Instance(), &ts, &dur)
@@ -142,6 +178,8 @@ func (e *Event) ParseGap() (timestamp, duration time.Duration) {
// } // }
// ParseGroupID returns a group ID if set on the event. // ParseGroupID returns a group ID if set on the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseGroupID() (ok bool, gid uint) { func (e *Event) ParseGroupID() (ok bool, gid uint) {
var out C.guint var out C.guint
gok := C.gst_event_parse_group_id(e.Instance(), &out) gok := C.gst_event_parse_group_id(e.Instance(), &out)
@@ -155,6 +193,8 @@ func (e *Event) ParseGroupID() (ok bool, gid uint) {
// func (e *Event) ParseInstantRateChange() {} // func (e *Event) ParseInstantRateChange() {}
// ParseLatency gets the latency in the latency event. // ParseLatency gets the latency in the latency event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseLatency() ClockTime { func (e *Event) ParseLatency() ClockTime {
var out C.GstClockTime var out C.GstClockTime
C.gst_event_parse_latency(e.Instance(), &out) C.gst_event_parse_latency(e.Instance(), &out)
@@ -163,6 +203,8 @@ func (e *Event) ParseLatency() ClockTime {
// ParseProtection parses an event containing protection system specific information and stores the results in // ParseProtection parses an event containing protection system specific information and stores the results in
// system_id, data and origin. The data stored in system_id, origin and data are valid until event is released. // system_id, data and origin. The data stored in system_id, origin and data are valid until event is released.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseProtection() (systemID string, data *Buffer, origin string) { func (e *Event) ParseProtection() (systemID string, data *Buffer, origin string) {
idPtr := C.malloc(C.sizeof_char * 1024) idPtr := C.malloc(C.sizeof_char * 1024)
originPtr := C.malloc(C.sizeof_char * 1024) originPtr := C.malloc(C.sizeof_char * 1024)
@@ -182,6 +224,8 @@ func (e *Event) ParseProtection() (systemID string, data *Buffer, origin string)
// the different QoS values. // the different QoS values.
// //
// timestamp will be adjusted for any pad offsets of pads it was passing through. // timestamp will be adjusted for any pad offsets of pads it was passing through.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseQOS() (qTtype QOSType, proportion float64, diff ClockTimeDiff, timestamp ClockTime) { func (e *Event) ParseQOS() (qTtype QOSType, proportion float64, diff ClockTimeDiff, timestamp ClockTime) {
var gtype C.GstQOSType var gtype C.GstQOSType
var gprop C.gdouble var gprop C.gdouble
@@ -195,6 +239,8 @@ func (e *Event) ParseQOS() (qTtype QOSType, proportion float64, diff ClockTimeDi
} }
// ParseSeek parses a seek event. // ParseSeek parses a seek event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseSeek() (rate float64, format Format, flags SeekFlags, startType SeekType, start int64, stopType SeekType, stop int64) { func (e *Event) ParseSeek() (rate float64, format Format, flags SeekFlags, startType SeekType, start int64, stopType SeekType, stop int64) {
var grate C.gdouble var grate C.gdouble
var gformat C.GstFormat var gformat C.GstFormat
@@ -207,6 +253,8 @@ func (e *Event) ParseSeek() (rate float64, format Format, flags SeekFlags, start
// ParseSeekTrickModeInterval retrieves the trickmode interval that may have been set on a seek event with // ParseSeekTrickModeInterval retrieves the trickmode interval that may have been set on a seek event with
// SetSeekTrickModeInterval. // SetSeekTrickModeInterval.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseSeekTrickModeInterval() (interval ClockTime) { func (e *Event) ParseSeekTrickModeInterval() (interval ClockTime) {
var out C.GstClockTime var out C.GstClockTime
C.gst_event_parse_seek_trickmode_interval(e.Instance(), &out) C.gst_event_parse_seek_trickmode_interval(e.Instance(), &out)
@@ -216,6 +264,8 @@ func (e *Event) ParseSeekTrickModeInterval() (interval ClockTime) {
// ParseSegment parses a segment event and stores the result in the given segment location. segment remains valid // ParseSegment parses a segment event and stores the result in the given segment location. segment remains valid
// only until the event is freed. Don't modify the segment and make a copy if you want to modify it or store it for // only until the event is freed. Don't modify the segment and make a copy if you want to modify it or store it for
// later use. // later use.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseSegment() *Segment { func (e *Event) ParseSegment() *Segment {
var out *C.GstSegment var out *C.GstSegment
C.gst_event_parse_segment(e.Instance(), &out) C.gst_event_parse_segment(e.Instance(), &out)
@@ -223,6 +273,8 @@ func (e *Event) ParseSegment() *Segment {
} }
// ParseSegmentDone extracts the position and format from the segment done message. // ParseSegmentDone extracts the position and format from the segment done message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseSegmentDone() (Format, int64) { func (e *Event) ParseSegmentDone() (Format, int64) {
var format C.GstFormat var format C.GstFormat
var pos C.gint64 var pos C.gint64
@@ -231,6 +283,8 @@ func (e *Event) ParseSegmentDone() (Format, int64) {
} }
// ParseSelectStreams parses the SELECT_STREAMS event and retrieve the contained streams. // ParseSelectStreams parses the SELECT_STREAMS event and retrieve the contained streams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseSelectStreams() []*Stream { func (e *Event) ParseSelectStreams() []*Stream {
var outList *C.GList var outList *C.GList
C.gst_event_parse_select_streams(e.Instance(), &outList) C.gst_event_parse_select_streams(e.Instance(), &outList)
@@ -238,6 +292,8 @@ func (e *Event) ParseSelectStreams() []*Stream {
} }
// ParseSinkMessage parses the sink-message event. Unref msg after usage. // ParseSinkMessage parses the sink-message event. Unref msg after usage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseSinkMessage() *Message { func (e *Event) ParseSinkMessage() *Message {
var msg *C.GstMessage var msg *C.GstMessage
C.gst_event_parse_sink_message(e.Instance(), &msg) C.gst_event_parse_sink_message(e.Instance(), &msg)
@@ -245,6 +301,8 @@ func (e *Event) ParseSinkMessage() *Message {
} }
// ParseStep parses a step message // ParseStep parses a step message
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseStep() (format Format, amount uint64, rate float64, flush, intermediate bool) { func (e *Event) ParseStep() (format Format, amount uint64, rate float64, flush, intermediate bool) {
var gformat C.GstFormat var gformat C.GstFormat
var gamount C.guint64 var gamount C.guint64
@@ -255,6 +313,8 @@ func (e *Event) ParseStep() (format Format, amount uint64, rate float64, flush,
} }
// ParseStream parses a stream-start event and extract the GstStream from it. // ParseStream parses a stream-start event and extract the GstStream from it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseStream() *Stream { func (e *Event) ParseStream() *Stream {
var stream *C.GstStream var stream *C.GstStream
C.gst_event_parse_stream(e.Instance(), &stream) C.gst_event_parse_stream(e.Instance(), &stream)
@@ -262,6 +322,8 @@ func (e *Event) ParseStream() *Stream {
} }
// ParseStreamCollection parses a stream collection from the event. // ParseStreamCollection parses a stream collection from the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseStreamCollection() *StreamCollection { func (e *Event) ParseStreamCollection() *StreamCollection {
stream := &C.GstStreamCollection{} stream := &C.GstStreamCollection{}
C.gst_event_parse_stream_collection(e.Instance(), &stream) C.gst_event_parse_stream_collection(e.Instance(), &stream)
@@ -269,6 +331,8 @@ func (e *Event) ParseStreamCollection() *StreamCollection {
} }
// ParseStreamFlags parses the stream flags from an event. // ParseStreamFlags parses the stream flags from an event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseStreamFlags() StreamFlags { func (e *Event) ParseStreamFlags() StreamFlags {
var out C.GstStreamFlags var out C.GstStreamFlags
C.gst_event_parse_stream_flags(e.Instance(), &out) C.gst_event_parse_stream_flags(e.Instance(), &out)
@@ -276,6 +340,8 @@ func (e *Event) ParseStreamFlags() StreamFlags {
} }
// ParseStreamGroupDone parses a stream-group-done event and store the result in the given group_id location. // ParseStreamGroupDone parses a stream-group-done event and store the result in the given group_id location.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseStreamGroupDone() uint { func (e *Event) ParseStreamGroupDone() uint {
var out C.guint var out C.guint
C.gst_event_parse_stream_group_done(e.Instance(), &out) C.gst_event_parse_stream_group_done(e.Instance(), &out)
@@ -283,6 +349,8 @@ func (e *Event) ParseStreamGroupDone() uint {
} }
// ParseStreamStart parses a stream-id event and store the result in the given stream_id location. // ParseStreamStart parses a stream-id event and store the result in the given stream_id location.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseStreamStart() string { func (e *Event) ParseStreamStart() string {
idPtr := C.malloc(C.sizeof_char * 1024) idPtr := C.malloc(C.sizeof_char * 1024)
defer C.free(idPtr) defer C.free(idPtr)
@@ -293,6 +361,8 @@ func (e *Event) ParseStreamStart() string {
// ParseTag parses a tag event and stores the results in the given taglist location. Do not modify or free the returned // ParseTag parses a tag event and stores the results in the given taglist location. Do not modify or free the returned
// tag list. // tag list.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseTag() *TagList { func (e *Event) ParseTag() *TagList {
var out *C.GstTagList var out *C.GstTagList
C.gst_event_parse_tag(e.Instance(), &out) C.gst_event_parse_tag(e.Instance(), &out)
@@ -300,6 +370,8 @@ func (e *Event) ParseTag() *TagList {
} }
// ParseTOC parses a TOC event and store the results in the given toc and updated locations. // ParseTOC parses a TOC event and store the results in the given toc and updated locations.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseTOC() (toc *TOC, updated bool) { func (e *Event) ParseTOC() (toc *TOC, updated bool) {
var out *C.GstToc var out *C.GstToc
var gupdated C.gboolean var gupdated C.gboolean
@@ -308,6 +380,8 @@ func (e *Event) ParseTOC() (toc *TOC, updated bool) {
} }
// ParseTOCSelect parses a TOC select event and store the results in the given uid location. // ParseTOCSelect parses a TOC select event and store the results in the given uid location.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) ParseTOCSelect() string { func (e *Event) ParseTOCSelect() string {
idPtr := C.malloc(C.sizeof_char * 1024) idPtr := C.malloc(C.sizeof_char * 1024)
defer C.free(unsafe.Pointer(idPtr)) defer C.free(unsafe.Pointer(idPtr))
@@ -316,6 +390,8 @@ func (e *Event) ParseTOCSelect() string {
} }
// Ref increases the ref count on the event by one. // Ref increases the ref count on the event by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Ref() *Event { func (e *Event) Ref() *Event {
C.gst_event_ref(e.Instance()) C.gst_event_ref(e.Instance())
return e return e
@@ -327,6 +403,8 @@ func (e *Event) Ref() *Event {
// } // }
// NextGroupID returns a new group id that can be used for an event. // NextGroupID returns a new group id that can be used for an event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NextGroupID() uint { func NextGroupID() uint {
return uint(C.gst_util_group_id_next()) return uint(C.gst_util_group_id_next())
} }
@@ -337,17 +415,23 @@ func NextGroupID() uint {
// played for example. // played for example.
// //
// Use NextGroupID to get a new group id. // Use NextGroupID to get a new group id.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) SetGroupID(id uint) { func (e *Event) SetGroupID(id uint) {
C.gst_event_set_group_id(e.Instance(), C.guint(id)) C.gst_event_set_group_id(e.Instance(), C.guint(id))
} }
// SetRunningTimeOffset sets the running time offset of a event. See GetRunningTimeOffset for more information. // SetRunningTimeOffset sets the running time offset of a event. See GetRunningTimeOffset for more information.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) SetRunningTimeOffset(offset int64) { func (e *Event) SetRunningTimeOffset(offset int64) {
C.gst_event_set_running_time_offset(e.Instance(), C.gint64(offset)) C.gst_event_set_running_time_offset(e.Instance(), C.gint64(offset))
} }
// SetSeekTrickModeInterval sets a trickmode interval on a (writable) seek event. Elements that support TRICKMODE_KEY_UNITS // SetSeekTrickModeInterval sets a trickmode interval on a (writable) seek event. Elements that support TRICKMODE_KEY_UNITS
// seeks SHOULD use this as the minimal interval between each frame they may output. // seeks SHOULD use this as the minimal interval between each frame they may output.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) SetSeekTrickModeInterval(interval ClockTime) { func (e *Event) SetSeekTrickModeInterval(interval ClockTime) {
C.gst_event_set_seek_trickmode_interval(e.Instance(), C.GstClockTime(interval)) C.gst_event_set_seek_trickmode_interval(e.Instance(), C.GstClockTime(interval))
} }
@@ -356,24 +440,34 @@ func (e *Event) SetSeekTrickModeInterval(interval ClockTime) {
// //
// This function might be called by the creator of a event to indicate that the event relates to other events or messages. // This function might be called by the creator of a event to indicate that the event relates to other events or messages.
// See GetSeqnum for more information. // See GetSeqnum for more information.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) SetSeqnum(seqnum uint32) { func (e *Event) SetSeqnum(seqnum uint32) {
C.gst_event_set_seqnum(e.Instance(), C.guint32(seqnum)) C.gst_event_set_seqnum(e.Instance(), C.guint32(seqnum))
} }
// SetStream sets the stream on the stream-start event // SetStream sets the stream on the stream-start event
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) SetStream(stream *Stream) { func (e *Event) SetStream(stream *Stream) {
C.gst_event_set_stream(e.Instance(), stream.Instance()) C.gst_event_set_stream(e.Instance(), stream.Instance())
} }
// SetStreamFlags sets the stream flags on the event. // SetStreamFlags sets the stream flags on the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) SetStreamFlags(flags StreamFlags) { func (e *Event) SetStreamFlags(flags StreamFlags) {
C.gst_event_set_stream_flags(e.Instance(), C.GstStreamFlags(flags)) C.gst_event_set_stream_flags(e.Instance(), C.GstStreamFlags(flags))
} }
// Unref decreases the refcount of an event, freeing it if the refcount reaches 0. // Unref decreases the refcount of an event, freeing it if the refcount reaches 0.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) Unref() { C.gst_event_unref(e.Instance()) } func (e *Event) Unref() { C.gst_event_unref(e.Instance()) }
// WritableStructure returns a writable version of the structure. // WritableStructure returns a writable version of the structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *Event) WritableStructure() *Structure { func (e *Event) WritableStructure() *Structure {
return wrapStructure(C.gst_event_writable_structure(e.Instance())) return wrapStructure(C.gst_event_writable_structure(e.Instance()))
} }

View File

@@ -11,6 +11,8 @@ import (
// elements that they should provide a buffer of the specified dimensions. // elements that they should provide a buffer of the specified dimensions.
// //
// When the async flag is set, a thread boundary is preferred. // When the async flag is set, a thread boundary is preferred.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferSizeEvent(format Format, minSize, maxSize int64, async bool) *Event { func NewBufferSizeEvent(format Format, minSize, maxSize int64, async bool) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_buffer_size( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_buffer_size(
C.GstFormat(format), C.GstFormat(format),
@@ -22,6 +24,8 @@ func NewBufferSizeEvent(format Format, minSize, maxSize int64, async bool) *Even
// NewCapsEvent creates a new CAPS event for caps. The caps event can only travel downstream synchronized with // NewCapsEvent creates a new CAPS event for caps. The caps event can only travel downstream synchronized with
// the buffer flow and contains the format of the buffers that will follow after the event. // the buffer flow and contains the format of the buffers that will follow after the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCapsEvent(caps *Caps) *Event { func NewCapsEvent(caps *Caps) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_caps( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_caps(
caps.Instance(), caps.Instance(),
@@ -37,6 +41,8 @@ func NewCapsEvent(caps *Caps) *Event {
// When all sinks have posted an EOS message, an EOS message is forwarded to the application. // When all sinks have posted an EOS message, an EOS message is forwarded to the application.
// //
// The EOS event itself will not cause any state transitions of the pipeline. // The EOS event itself will not cause any state transitions of the pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewEOSEvent() *Event { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_eos())) } func NewEOSEvent() *Event { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_eos())) }
// NewFlushStartEvent allocates a new flush start event. The flush start event can be sent upstream and downstream and // NewFlushStartEvent allocates a new flush start event. The flush start event can be sent upstream and downstream and
@@ -49,6 +55,8 @@ func NewEOSEvent() *Event { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_e
// Elements should unlock any blocking functions and exit their streaming functions as fast as possible when this event is received. // Elements should unlock any blocking functions and exit their streaming functions as fast as possible when this event is received.
// //
// This event is typically generated after a seek to flush out all queued data in the pipeline so that the new media is played as soon as possible. // This event is typically generated after a seek to flush out all queued data in the pipeline so that the new media is played as soon as possible.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewFlushStartEvent() *Event { func NewFlushStartEvent() *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_flush_start())) return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_flush_start()))
} }
@@ -59,6 +67,8 @@ func NewFlushStartEvent() *Event {
// Elements can process this event synchronized with the dataflow since the preceding FLUSH_START event stopped the dataflow. // Elements can process this event synchronized with the dataflow since the preceding FLUSH_START event stopped the dataflow.
// //
// This event is typically generated to complete a seek and to resume dataflow. // This event is typically generated to complete a seek and to resume dataflow.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewFlushStopEvent(resetTime bool) *Event { func NewFlushStopEvent(resetTime bool) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_flush_stop(gboolean(resetTime)))) return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_flush_stop(gboolean(resetTime))))
} }
@@ -66,6 +76,8 @@ func NewFlushStopEvent(resetTime bool) *Event {
// NewGapEvent creates a new GAP event. A gap event can be thought of as conceptually equivalent to a buffer to signal that there is no data for a // NewGapEvent creates a new GAP event. A gap event can be thought of as conceptually equivalent to a buffer to signal that there is no data for a
// certain amount of time. This is useful to signal a gap to downstream elements which may wait for data, such as muxers or mixers or overlays, // certain amount of time. This is useful to signal a gap to downstream elements which may wait for data, such as muxers or mixers or overlays,
// especially for sparse streams such as subtitle streams. // especially for sparse streams such as subtitle streams.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewGapEvent(timestamp, duration ClockTime) *Event { func NewGapEvent(timestamp, duration ClockTime) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_gap( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_gap(
C.GstClockTime(timestamp), C.GstClockTime(timestamp),
@@ -104,6 +116,8 @@ func NewGapEvent(timestamp, duration ClockTime) *Event {
// running time before synchronizing against the clock. // running time before synchronizing against the clock.
// //
// The latency is mostly used in live sinks and is always expressed in the time format. // The latency is mostly used in live sinks and is always expressed in the time format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewLatencyEvent(latency ClockTime) *Event { func NewLatencyEvent(latency ClockTime) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_latency( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_latency(
C.GstClockTime(latency), C.GstClockTime(latency),
@@ -111,6 +125,8 @@ func NewLatencyEvent(latency ClockTime) *Event {
} }
// NewNavigationEvent creates a new navigation event from the given description. The event will take ownership of the structure. // NewNavigationEvent creates a new navigation event from the given description. The event will take ownership of the structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewNavigationEvent(structure *Structure) *Event { func NewNavigationEvent(structure *Structure) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_navigation( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_navigation(
structure.Instance(), structure.Instance(),
@@ -132,6 +148,8 @@ func NewNavigationEvent(structure *Structure) *Event {
// //
// The events returned by NewProtectionEvent are implemented in such a way as to ensure that the most recently-pushed protection info event of a particular origin and system_id will be // The events returned by NewProtectionEvent are implemented in such a way as to ensure that the most recently-pushed protection info event of a particular origin and system_id will be
// stuck to the output pad of the sending element. // stuck to the output pad of the sending element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewProtectionEvent(systemID string, buffer *Buffer, origin string) *Event { func NewProtectionEvent(systemID string, buffer *Buffer, origin string) *Event {
cSystemID := C.CString(systemID) cSystemID := C.CString(systemID)
cOrigin := C.CString(origin) cOrigin := C.CString(origin)
@@ -164,6 +182,8 @@ func NewProtectionEvent(systemID string, buffer *Buffer, origin string) *Event {
// late in the sink as well. A (negative) diff value so that timestamp + diff would yield a result smaller than 0 is not allowed. // late in the sink as well. A (negative) diff value so that timestamp + diff would yield a result smaller than 0 is not allowed.
// //
// The application can use general event probes to intercept the QoS event and implement custom application specific QoS handling. // The application can use general event probes to intercept the QoS event and implement custom application specific QoS handling.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewQOSEvent(qType QOSType, proportion float64, diff ClockTimeDiff, timestamp ClockTime) *Event { func NewQOSEvent(qType QOSType, proportion float64, diff ClockTimeDiff, timestamp ClockTime) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_qos( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_qos(
C.GstQOSType(qType), C.GstQOSType(qType),
@@ -175,6 +195,8 @@ func NewQOSEvent(qType QOSType, proportion float64, diff ClockTimeDiff, timestam
// NewReconfigureEvent creates a new reconfigure event. The purpose of the reconfigure event is to travel upstream and make elements renegotiate their caps or reconfigure their buffer pools. // NewReconfigureEvent creates a new reconfigure event. The purpose of the reconfigure event is to travel upstream and make elements renegotiate their caps or reconfigure their buffer pools.
// This is useful when changing properties on elements or changing the topology of the pipeline. // This is useful when changing properties on elements or changing the topology of the pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewReconfigureEvent() *Event { func NewReconfigureEvent() *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_reconfigure())) return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_reconfigure()))
} }
@@ -198,6 +220,8 @@ func NewReconfigureEvent() *Event {
// //
// It is not possible to seek relative to the current playback position, to do this, PAUSE the pipeline, query the current playback position with GST_QUERY_POSITION and update the playback segment // It is not possible to seek relative to the current playback position, to do this, PAUSE the pipeline, query the current playback position with GST_QUERY_POSITION and update the playback segment
// current position with a GST_SEEK_TYPE_SET to the desired position. // current position with a GST_SEEK_TYPE_SET to the desired position.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSeekEvent(rate float64, format Format, flags SeekFlags, startType SeekType, start int64, stopType SeekType, stop int64) *Event { func NewSeekEvent(rate float64, format Format, flags SeekFlags, startType SeekType, start int64, stopType SeekType, stop int64) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_seek( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_seek(
C.gdouble(rate), C.gdouble(rate),
@@ -228,6 +252,8 @@ func NewSeekEvent(rate float64, format Format, flags SeekFlags, startType SeekTy
// After a segment event, the buffer stream time is calculated with: // After a segment event, the buffer stream time is calculated with:
// //
// time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate) // time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate)
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSegmentEvent(segment *Segment) *Event { func NewSegmentEvent(segment *Segment) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_segment( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_segment(
segment.Instance(), segment.Instance(),
@@ -235,6 +261,8 @@ func NewSegmentEvent(segment *Segment) *Event {
} }
// NewSegmentDoneEvent creates a new segment-done event. This event is sent by elements that finish playback of a segment as a result of a segment seek. // NewSegmentDoneEvent creates a new segment-done event. This event is sent by elements that finish playback of a segment as a result of a segment seek.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSegmentDoneEvent(format Format, position int64) *Event { func NewSegmentDoneEvent(format Format, position int64) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_segment_done( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_segment_done(
C.GstFormat(format), C.gint64(position), C.GstFormat(format), C.gint64(position),
@@ -249,6 +277,8 @@ func NewSegmentDoneEvent(format Format, position int64) *Event {
// EventStreamCollection or MessageStreamCollection. // EventStreamCollection or MessageStreamCollection.
// //
// Note: The list of streams can not be empty. // Note: The list of streams can not be empty.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSelectStreamsEvent(streams []*Stream) *Event { func NewSelectStreamsEvent(streams []*Stream) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_select_streams( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_select_streams(
streamSliceToGlist(streams), streamSliceToGlist(streams),
@@ -259,6 +289,8 @@ func NewSelectStreamsEvent(streams []*Stream) *Event {
// synchronized with the stream. // synchronized with the stream.
// //
// name is used to store multiple sticky events on one pad. // name is used to store multiple sticky events on one pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSinkMessageEvent(name string, msg *Message) *Event { func NewSinkMessageEvent(name string, msg *Message) *Event {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -277,6 +309,8 @@ func NewSinkMessageEvent(name string, msg *Message) *Event {
// The flush flag will clear any pending data in the pipeline before starting the step operation. // The flush flag will clear any pending data in the pipeline before starting the step operation.
// //
// The intermediate flag instructs the pipeline that this step operation is part of a larger step operation. // The intermediate flag instructs the pipeline that this step operation is part of a larger step operation.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStepEvent(format Format, amount uint64, rate float64, flush, intermediate bool) *Event { func NewStepEvent(format Format, amount uint64, rate float64, flush, intermediate bool) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_step( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_step(
C.GstFormat(format), C.GstFormat(format),
@@ -291,6 +325,8 @@ func NewStepEvent(format Format, amount uint64, rate float64, flush, intermediat
// //
// Source elements, demuxers and other elements that manage collections of streams and post GstStreamCollection messages on the bus also send this event downstream // Source elements, demuxers and other elements that manage collections of streams and post GstStreamCollection messages on the bus also send this event downstream
// on each pad involved in the collection, so that activation of a new collection can be tracked through the downstream data flow. // on each pad involved in the collection, so that activation of a new collection can be tracked through the downstream data flow.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamCollectionEvent(collection *StreamCollection) *Event { func NewStreamCollectionEvent(collection *StreamCollection) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_stream_collection( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_stream_collection(
collection.Instance(), collection.Instance(),
@@ -303,6 +339,8 @@ func NewStreamCollectionEvent(collection *StreamCollection) *Event {
// //
// This event is followed by EOS at some point in the future, and is generally used when switching pads - to unblock downstream so that new pads can be exposed before // This event is followed by EOS at some point in the future, and is generally used when switching pads - to unblock downstream so that new pads can be exposed before
// sending EOS on the existing pads. // sending EOS on the existing pads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamGroupDoneEvent(groupID uint) *Event { func NewStreamGroupDoneEvent(groupID uint) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_stream_group_done(C.guint(groupID)))) return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_stream_group_done(C.guint(groupID))))
} }
@@ -318,6 +356,8 @@ func NewStreamGroupDoneEvent(groupID uint) *Event {
// only be created for a stream if the upstream stream is split into (potentially) multiple new streams, e.g. in a demuxer, but not for every single element in the pipeline. // only be created for a stream if the upstream stream is split into (potentially) multiple new streams, e.g. in a demuxer, but not for every single element in the pipeline.
// Pad CreateStreamID can be used to create a stream-id. There are no particular semantics for the stream-id, though it should be deterministic (to support stream matching) // Pad CreateStreamID can be used to create a stream-id. There are no particular semantics for the stream-id, though it should be deterministic (to support stream matching)
// and it might be used to order streams (besides any information conveyed by stream flags). // and it might be used to order streams (besides any information conveyed by stream flags).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamStartEvent(streamID string) *Event { func NewStreamStartEvent(streamID string) *Event {
cName := C.CString(streamID) cName := C.CString(streamID)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -330,6 +370,8 @@ func NewStreamStartEvent(streamID string) *Event {
// //
// The scope of the taglist specifies if the taglist applies to the complete medium or only to this specific stream. As the tag event is a sticky event, elements should merge // The scope of the taglist specifies if the taglist applies to the complete medium or only to this specific stream. As the tag event is a sticky event, elements should merge
// tags received from upstream with a given scope with their own tags with the same scope and create a new tag event from it. // tags received from upstream with a given scope with their own tags with the same scope and create a new tag event from it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTagEvent(tagList *TagList) *Event { func NewTagEvent(tagList *TagList) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_tag( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_tag(
tagList.Ref().Instance(), tagList.Ref().Instance(),
@@ -337,6 +379,8 @@ func NewTagEvent(tagList *TagList) *Event {
} }
// NewTOCEvent generates a TOC event from the given toc. The purpose of the TOC event is to inform elements that some kind of the TOC was found. // NewTOCEvent generates a TOC event from the given toc. The purpose of the TOC event is to inform elements that some kind of the TOC was found.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTOCEvent(toc *TOC, updated bool) *Event { func NewTOCEvent(toc *TOC, updated bool) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_toc( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_toc(
toc.Instance(), gboolean(updated), toc.Instance(), gboolean(updated),
@@ -345,6 +389,8 @@ func NewTOCEvent(toc *TOC, updated bool) *Event {
// NewTOCSelectEvent generates a TOC select event with the given uid. The purpose of the TOC select event is to start playback based on the TOC's // NewTOCSelectEvent generates a TOC select event with the given uid. The purpose of the TOC select event is to start playback based on the TOC's
// entry with the given uid. // entry with the given uid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTOCSelectEvent(uid string) *Event { func NewTOCSelectEvent(uid string) *Event {
cUID := C.CString(uid) cUID := C.CString(uid)
defer C.free(unsafe.Pointer(cUID)) defer C.free(unsafe.Pointer(cUID))
@@ -355,6 +401,8 @@ func NewTOCSelectEvent(uid string) *Event {
// NewCustomEvent creates a new custom-typed event. This can be used for anything not handled by other event-specific functions to pass an event // NewCustomEvent creates a new custom-typed event. This can be used for anything not handled by other event-specific functions to pass an event
// to another element. // to another element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCustomEvent(eventType EventType, structure *Structure) *Event { func NewCustomEvent(eventType EventType, structure *Structure) *Event {
return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_custom( return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_custom(
C.GstEventType(eventType), structure.Instance(), C.GstEventType(eventType), structure.Instance(),

View File

@@ -13,11 +13,15 @@ import (
type GhostPad struct{ *ProxyPad } type GhostPad struct{ *ProxyPad }
// FromGstGhostPadUnsafeNone wraps the given GstGhostPad. // FromGstGhostPadUnsafeNone wraps the given GstGhostPad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstGhostPadUnsafeNone(pad unsafe.Pointer) *GhostPad { func FromGstGhostPadUnsafeNone(pad unsafe.Pointer) *GhostPad {
return &GhostPad{&ProxyPad{&Pad{wrapObject(glib.TransferNone(pad))}}} return &GhostPad{&ProxyPad{&Pad{wrapObject(glib.TransferNone(pad))}}}
} }
// FromGstGhostPadUnsafeFull wraps the given GstGhostPad. // FromGstGhostPadUnsafeFull wraps the given GstGhostPad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstGhostPadUnsafeFull(pad unsafe.Pointer) *GhostPad { func FromGstGhostPadUnsafeFull(pad unsafe.Pointer) *GhostPad {
return &GhostPad{&ProxyPad{&Pad{wrapObject(glib.TransferFull(pad))}}} return &GhostPad{&ProxyPad{&Pad{wrapObject(glib.TransferFull(pad))}}}
@@ -28,6 +32,8 @@ func FromGstGhostPadUnsafeFull(pad unsafe.Pointer) *GhostPad {
// selected. // selected.
// //
// Will ref the target. // Will ref the target.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewGhostPad(name string, target *Pad) *GhostPad { func NewGhostPad(name string, target *Pad) *GhostPad {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -50,6 +56,8 @@ func NewGhostPad(name string, target *Pad) *GhostPad {
// selected. // selected.
// //
// Will ref the target. // Will ref the target.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewGhostPadFromTemplate(name string, target *Pad, tmpl *PadTemplate) *GhostPad { func NewGhostPadFromTemplate(name string, target *Pad, tmpl *PadTemplate) *GhostPad {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -72,6 +80,8 @@ func NewGhostPadFromTemplate(name string, target *Pad, tmpl *PadTemplate) *Ghost
// ghostpad later with the SetTarget function. If name is empty, one will be selected. // ghostpad later with the SetTarget function. If name is empty, one will be selected.
// //
// The created ghostpad will not have a padtemplate. // The created ghostpad will not have a padtemplate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewGhostPadNoTarget(name string, direction PadDirection) *GhostPad { func NewGhostPadNoTarget(name string, direction PadDirection) *GhostPad {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -91,6 +101,8 @@ func NewGhostPadNoTarget(name string, direction PadDirection) *GhostPad {
// NewGhostPadNoTargetFromTemplate creates a new ghostpad based on templ, without setting a target. The direction will be taken // NewGhostPadNoTargetFromTemplate creates a new ghostpad based on templ, without setting a target. The direction will be taken
// from the templ. // from the templ.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewGhostPadNoTargetFromTemplate(name string, tmpl *PadTemplate) *GhostPad { func NewGhostPadNoTargetFromTemplate(name string, tmpl *PadTemplate) *GhostPad {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -109,9 +121,13 @@ func NewGhostPadNoTargetFromTemplate(name string, tmpl *PadTemplate) *GhostPad {
} }
// Instance returns the underlying ghost pad instance. // Instance returns the underlying ghost pad instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GhostPad) Instance() *C.GstGhostPad { return C.toGstGhostPad(g.Unsafe()) } func (g *GhostPad) Instance() *C.GstGhostPad { return C.toGstGhostPad(g.Unsafe()) }
// GetTarget gets the target pad of gpad. // GetTarget gets the target pad of gpad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GhostPad) GetTarget() *Pad { func (g *GhostPad) GetTarget() *Pad {
pad := C.gst_ghost_pad_get_target(g.Instance()) pad := C.gst_ghost_pad_get_target(g.Instance())
if pad == nil { if pad == nil {
@@ -122,6 +138,8 @@ func (g *GhostPad) GetTarget() *Pad {
// SetTarget sets the new target of the ghostpad gpad. Any existing target is unlinked and links to the new target are // SetTarget sets the new target of the ghostpad gpad. Any existing target is unlinked and links to the new target are
// established. if newtarget is nil the target will be cleared. // established. if newtarget is nil the target will be cleared.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GhostPad) SetTarget(target *Pad) bool { func (g *GhostPad) SetTarget(target *Pad) bool {
var ctarget *C.GstPad var ctarget *C.GstPad
@@ -135,6 +153,8 @@ func (g *GhostPad) SetTarget(target *Pad) bool {
} }
// ActivateModeDefault invokes the default activate mode function of a ghost pad. // ActivateModeDefault invokes the default activate mode function of a ghost pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GhostPad) ActivateModeDefault(parent *Object, mode PadMode, active bool) bool { func (g *GhostPad) ActivateModeDefault(parent *Object, mode PadMode, active bool) bool {
if parent == nil { if parent == nil {
return gobool(C.gst_ghost_pad_activate_mode_default( return gobool(C.gst_ghost_pad_activate_mode_default(
@@ -147,6 +167,8 @@ func (g *GhostPad) ActivateModeDefault(parent *Object, mode PadMode, active bool
} }
// InternalActivateModeDefault invokes the default activate mode function of a proxy pad that is owned by a ghost pad. // InternalActivateModeDefault invokes the default activate mode function of a proxy pad that is owned by a ghost pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *GhostPad) InternalActivateModeDefault(parent *Object, mode PadMode, active bool) bool { func (g *GhostPad) InternalActivateModeDefault(parent *Object, mode PadMode, active bool) bool {
if parent == nil { if parent == nil {
return gobool(C.gst_ghost_pad_internal_activate_mode_default( return gobool(C.gst_ghost_pad_internal_activate_mode_default(
@@ -162,14 +184,20 @@ func (g *GhostPad) InternalActivateModeDefault(parent *Object, mode PadMode, act
type ProxyPad struct{ *Pad } type ProxyPad struct{ *Pad }
// toPad returns the underling GstPad of this ProxyPad. // toPad returns the underling GstPad of this ProxyPad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) toPad() *C.GstPad { return C.toGstPad(p.Unsafe()) } func (p *ProxyPad) toPad() *C.GstPad { return C.toGstPad(p.Unsafe()) }
// Instance returns the underlying GstProxyPad instance. // Instance returns the underlying GstProxyPad instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) Instance() *C.GstProxyPad { return C.toGstProxyPad(p.Unsafe()) } func (p *ProxyPad) Instance() *C.GstProxyPad { return C.toGstProxyPad(p.Unsafe()) }
// GetInternal gets the internal pad of pad. // GetInternal gets the internal pad of pad.
// //
// The internal pad of a GhostPad is the internally used pad of opposite direction, which is used to link to the target. // The internal pad of a GhostPad is the internally used pad of opposite direction, which is used to link to the target.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) GetInternal() *ProxyPad { func (p *ProxyPad) GetInternal() *ProxyPad {
pad := C.gst_proxy_pad_get_internal(p.Instance()) pad := C.gst_proxy_pad_get_internal(p.Instance())
proxyPad := wrapProxyPad(toGObject(unsafe.Pointer(pad))) proxyPad := wrapProxyPad(toGObject(unsafe.Pointer(pad)))
@@ -178,16 +206,22 @@ func (p *ProxyPad) GetInternal() *ProxyPad {
} }
// ChainDefault invokes the default chain function of the proxy pad. // ChainDefault invokes the default chain function of the proxy pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) ChainDefault(parent *Object, buffer *Buffer) FlowReturn { func (p *ProxyPad) ChainDefault(parent *Object, buffer *Buffer) FlowReturn {
return FlowReturn(C.gst_proxy_pad_chain_default(p.toPad(), parent.Instance(), buffer.Instance())) return FlowReturn(C.gst_proxy_pad_chain_default(p.toPad(), parent.Instance(), buffer.Instance()))
} }
// ChainListDefault invokes the default chain list function of the proxy pad. // ChainListDefault invokes the default chain list function of the proxy pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) ChainListDefault(parent *Object, bufferList *BufferList) FlowReturn { func (p *ProxyPad) ChainListDefault(parent *Object, bufferList *BufferList) FlowReturn {
return FlowReturn(C.gst_proxy_pad_chain_list_default(p.toPad(), parent.Instance(), bufferList.Instance())) return FlowReturn(C.gst_proxy_pad_chain_list_default(p.toPad(), parent.Instance(), bufferList.Instance()))
} }
// GetRangeDefault invokes the default getrange function of the proxy pad. // GetRangeDefault invokes the default getrange function of the proxy pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) GetRangeDefault(parent *Object, offset uint64, size uint) (FlowReturn, *Buffer) { func (p *ProxyPad) GetRangeDefault(parent *Object, offset uint64, size uint) (FlowReturn, *Buffer) {
var buf *C.GstBuffer var buf *C.GstBuffer
ret := FlowReturn(C.gst_proxy_pad_getrange_default(p.toPad(), parent.Instance(), C.guint64(offset), C.guint(size), &buf)) ret := FlowReturn(C.gst_proxy_pad_getrange_default(p.toPad(), parent.Instance(), C.guint64(offset), C.guint(size), &buf))
@@ -198,6 +232,8 @@ func (p *ProxyPad) GetRangeDefault(parent *Object, offset uint64, size uint) (Fl
} }
// GetInternalLinksDefault invokes the default iterate internal links function of the proxy pad. // GetInternalLinksDefault invokes the default iterate internal links function of the proxy pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *ProxyPad) GetInternalLinksDefault(parent *Object) ([]*Pad, error) { func (p *ProxyPad) GetInternalLinksDefault(parent *Object) ([]*Pad, error) {
iterator := C.gst_proxy_pad_iterate_internal_links_default(p.toPad(), parent.Instance()) iterator := C.gst_proxy_pad_iterate_internal_links_default(p.toPad(), parent.Instance())
return iteratorToPadSlice(iterator) return iteratorToPadSlice(iterator)

View File

@@ -25,6 +25,8 @@ var CAT *DebugCategory
// The bindings will also set up their own internal DebugCategory for logging // The bindings will also set up their own internal DebugCategory for logging
// than can be invoked from applications or plugins as well. However, for // than can be invoked from applications or plugins as well. However, for
// plugins it is generally better to initialize your own DebugCategory. // plugins it is generally better to initialize your own DebugCategory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func Init(args *[]string) { func Init(args *[]string) {
if args != nil { if args != nil {
cargc := C.int(len(*args)) cargc := C.int(len(*args))
@@ -49,6 +51,8 @@ func Init(args *[]string) {
// Deinit is a wrapper for gst_deinit Clean up any resources created by GStreamer in gst_init(). // Deinit is a wrapper for gst_deinit Clean up any resources created by GStreamer in gst_init().
// It is normally not needed to call this function in a normal application as the resources will automatically be freed // It is normally not needed to call this function in a normal application as the resources will automatically be freed
// when the program terminates. This function is therefore mostly used by testsuites and other memory profiling tools. // when the program terminates. This function is therefore mostly used by testsuites and other memory profiling tools.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func Deinit() { func Deinit() {
C.gst_deinit() C.gst_deinit()
} }

View File

@@ -34,25 +34,35 @@ import (
) )
// MapInfo is a go representation of a GstMapInfo. // MapInfo is a go representation of a GstMapInfo.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type MapInfo struct { type MapInfo struct {
ptr *C.GstMapInfo ptr *C.GstMapInfo
} }
// Instance returns the underlying GstMapInfo instance. // Instance returns the underlying GstMapInfo instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Instance() *C.GstMapInfo { func (m *MapInfo) Instance() *C.GstMapInfo {
return m.ptr return m.ptr
} }
// Reader returns a Reader for the contents of this map's memory. // Reader returns a Reader for the contents of this map's memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Reader() io.Reader { func (m *MapInfo) Reader() io.Reader {
return bytes.NewReader(m.Bytes()) return bytes.NewReader(m.Bytes())
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type mapInfoWriter struct { type mapInfoWriter struct {
mapInfo *MapInfo mapInfo *MapInfo
wsize int wsize int
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *mapInfoWriter) Write(p []byte) (int, error) { func (m *mapInfoWriter) Write(p []byte) (int, error) {
if m.wsize+len(p) > int(m.mapInfo.Size()) { if m.wsize+len(p) > int(m.mapInfo.Size()) {
return 0, errors.New("attempt to write more data than allocated to MapInfo") return 0, errors.New("attempt to write more data than allocated to MapInfo")
@@ -65,6 +75,8 @@ func (m *mapInfoWriter) Write(p []byte) (int, error) {
// Writer returns a writer that will copy the contents passed to Write directly to the // Writer returns a writer that will copy the contents passed to Write directly to the
// map's memory sequentially. An error will be returned if an attempt is made to write // map's memory sequentially. An error will be returned if an attempt is made to write
// more data than the map can hold. // more data than the map can hold.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Writer() io.Writer { func (m *MapInfo) Writer() io.Writer {
return &mapInfoWriter{ return &mapInfoWriter{
mapInfo: m, mapInfo: m,
@@ -73,46 +85,64 @@ func (m *MapInfo) Writer() io.Writer {
} }
// WriteData writes the given sequence directly to the map's memory. // WriteData writes the given sequence directly to the map's memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) WriteData(data []byte) { func (m *MapInfo) WriteData(data []byte) {
C.memcpy(unsafe.Pointer(m.ptr.data), unsafe.Pointer(&data[0]), C.gsize(len(data))) C.memcpy(unsafe.Pointer(m.ptr.data), unsafe.Pointer(&data[0]), C.gsize(len(data)))
} }
// WriteAt writes the given data sequence directly to the map's memory at the given offset. // WriteAt writes the given data sequence directly to the map's memory at the given offset.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) WriteAt(offset int, data []byte) { func (m *MapInfo) WriteAt(offset int, data []byte) {
C.memcpy_offset(unsafe.Pointer(m.ptr.data), C.guint(offset), unsafe.Pointer(&data[0]), C.gsize(len(data))) C.memcpy_offset(unsafe.Pointer(m.ptr.data), C.guint(offset), unsafe.Pointer(&data[0]), C.gsize(len(data)))
} }
// Memory returns the underlying memory object. // Memory returns the underlying memory object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Memory() *Memory { func (m *MapInfo) Memory() *Memory {
return wrapMemory(m.ptr.memory) return wrapMemory(m.ptr.memory)
} }
// Data returns a pointer to the raw data inside this map. // Data returns a pointer to the raw data inside this map.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Data() unsafe.Pointer { func (m *MapInfo) Data() unsafe.Pointer {
return unsafe.Pointer(m.ptr.data) return unsafe.Pointer(m.ptr.data)
} }
// Flags returns the flags set on this map. // Flags returns the flags set on this map.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Flags() MapFlags { func (m *MapInfo) Flags() MapFlags {
return MapFlags(m.ptr.flags) return MapFlags(m.ptr.flags)
} }
// Size returrns the size of this map. // Size returrns the size of this map.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Size() int64 { func (m *MapInfo) Size() int64 {
return int64(m.ptr.size) return int64(m.ptr.size)
} }
// MaxSize returns the maximum size of this map. // MaxSize returns the maximum size of this map.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) MaxSize() int64 { func (m *MapInfo) MaxSize() int64 {
return int64(m.ptr.maxsize) return int64(m.ptr.maxsize)
} }
// Bytes returns a byte slice of the data inside this map info. // Bytes returns a byte slice of the data inside this map info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) Bytes() []byte { func (m *MapInfo) Bytes() []byte {
return C.GoBytes(m.Data(), (C.int)(m.Size())) return C.GoBytes(m.Data(), (C.int)(m.Size()))
} }
// AsInt8Slice returns the contents of this map as a slice of signed 8-bit integers. // AsInt8Slice returns the contents of this map as a slice of signed 8-bit integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt8Slice() []int8 { func (m *MapInfo) AsInt8Slice() []int8 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -126,6 +156,8 @@ func (m *MapInfo) AsInt8Slice() []int8 {
} }
// AsInt16BESlice returns the contents of this map as a slice of signed 16-bit big-endian integers. // AsInt16BESlice returns the contents of this map as a slice of signed 16-bit big-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt16BESlice() []int16 { func (m *MapInfo) AsInt16BESlice() []int16 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -139,6 +171,8 @@ func (m *MapInfo) AsInt16BESlice() []int16 {
} }
// AsInt16LESlice returns the contents of this map as a slice of signed 16-bit little-endian integers. // AsInt16LESlice returns the contents of this map as a slice of signed 16-bit little-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt16LESlice() []int16 { func (m *MapInfo) AsInt16LESlice() []int16 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -152,6 +186,8 @@ func (m *MapInfo) AsInt16LESlice() []int16 {
} }
// AsInt32BESlice returns the contents of this map as a slice of signed 32-bit big-endian integers. // AsInt32BESlice returns the contents of this map as a slice of signed 32-bit big-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt32BESlice() []int32 { func (m *MapInfo) AsInt32BESlice() []int32 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -165,6 +201,8 @@ func (m *MapInfo) AsInt32BESlice() []int32 {
} }
// AsInt32LESlice returns the contents of this map as a slice of signed 32-bit little-endian integers. // AsInt32LESlice returns the contents of this map as a slice of signed 32-bit little-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt32LESlice() []int32 { func (m *MapInfo) AsInt32LESlice() []int32 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -178,6 +216,8 @@ func (m *MapInfo) AsInt32LESlice() []int32 {
} }
// AsInt64BESlice returns the contents of this map as a slice of signed 64-bit big-endian integers. // AsInt64BESlice returns the contents of this map as a slice of signed 64-bit big-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt64BESlice() []int64 { func (m *MapInfo) AsInt64BESlice() []int64 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -191,6 +231,8 @@ func (m *MapInfo) AsInt64BESlice() []int64 {
} }
// AsInt64LESlice returns the contents of this map as a slice of signed 64-bit little-endian integers. // AsInt64LESlice returns the contents of this map as a slice of signed 64-bit little-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsInt64LESlice() []int64 { func (m *MapInfo) AsInt64LESlice() []int64 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -204,6 +246,8 @@ func (m *MapInfo) AsInt64LESlice() []int64 {
} }
// AsUint8Slice returns the contents of this map as a slice of unsigned 8-bit integers. // AsUint8Slice returns the contents of this map as a slice of unsigned 8-bit integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint8Slice() []uint8 { func (m *MapInfo) AsUint8Slice() []uint8 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -217,6 +261,8 @@ func (m *MapInfo) AsUint8Slice() []uint8 {
} }
// AsUint16BESlice returns the contents of this map as a slice of unsigned 16-bit big-endian integers. // AsUint16BESlice returns the contents of this map as a slice of unsigned 16-bit big-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint16BESlice() []uint16 { func (m *MapInfo) AsUint16BESlice() []uint16 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -230,6 +276,8 @@ func (m *MapInfo) AsUint16BESlice() []uint16 {
} }
// AsUint16LESlice returns the contents of this map as a slice of unsigned 16-bit little-endian integers. // AsUint16LESlice returns the contents of this map as a slice of unsigned 16-bit little-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint16LESlice() []uint16 { func (m *MapInfo) AsUint16LESlice() []uint16 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -243,6 +291,8 @@ func (m *MapInfo) AsUint16LESlice() []uint16 {
} }
// AsUint32BESlice returns the contents of this map as a slice of unsigned 32-bit big-endian integers. // AsUint32BESlice returns the contents of this map as a slice of unsigned 32-bit big-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint32BESlice() []uint32 { func (m *MapInfo) AsUint32BESlice() []uint32 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -256,6 +306,8 @@ func (m *MapInfo) AsUint32BESlice() []uint32 {
} }
// AsUint32LESlice returns the contents of this map as a slice of unsigned 32-bit little-endian integers. // AsUint32LESlice returns the contents of this map as a slice of unsigned 32-bit little-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint32LESlice() []uint32 { func (m *MapInfo) AsUint32LESlice() []uint32 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -269,6 +321,8 @@ func (m *MapInfo) AsUint32LESlice() []uint32 {
} }
// AsUint64BESlice returns the contents of this map as a slice of unsigned 64-bit big-endian integers. // AsUint64BESlice returns the contents of this map as a slice of unsigned 64-bit big-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint64BESlice() []uint64 { func (m *MapInfo) AsUint64BESlice() []uint64 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -282,6 +336,8 @@ func (m *MapInfo) AsUint64BESlice() []uint64 {
} }
// AsUint64LESlice returns the contents of this map as a slice of unsigned 64-bit little-endian integers. // AsUint64LESlice returns the contents of this map as a slice of unsigned 64-bit little-endian integers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsUint64LESlice() []uint64 { func (m *MapInfo) AsUint64LESlice() []uint64 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -295,6 +351,8 @@ func (m *MapInfo) AsUint64LESlice() []uint64 {
} }
// AsFloat32BESlice returns the contents of this map as a slice of 32-bit big-endian floats. // AsFloat32BESlice returns the contents of this map as a slice of 32-bit big-endian floats.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsFloat32BESlice() []float32 { func (m *MapInfo) AsFloat32BESlice() []float32 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -308,6 +366,8 @@ func (m *MapInfo) AsFloat32BESlice() []float32 {
} }
// AsFloat32LESlice returns the contents of this map as a slice of 32-bit little-endian floats. // AsFloat32LESlice returns the contents of this map as a slice of 32-bit little-endian floats.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsFloat32LESlice() []float32 { func (m *MapInfo) AsFloat32LESlice() []float32 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -321,6 +381,8 @@ func (m *MapInfo) AsFloat32LESlice() []float32 {
} }
// AsFloat64BESlice returns the contents of this map as a slice of 64-bit big-endian floats. // AsFloat64BESlice returns the contents of this map as a slice of 64-bit big-endian floats.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsFloat64BESlice() []float64 { func (m *MapInfo) AsFloat64BESlice() []float64 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)
@@ -334,6 +396,8 @@ func (m *MapInfo) AsFloat64BESlice() []float64 {
} }
// AsFloat64LESlice returns the contents of this map as a slice of 64-bit little-endian floats. // AsFloat64LESlice returns the contents of this map as a slice of 64-bit little-endian floats.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MapInfo) AsFloat64LESlice() []float64 { func (m *MapInfo) AsFloat64LESlice() []float64 {
br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size))
defer C.freeByteReader(br) defer C.freeByteReader(br)

View File

@@ -17,6 +17,8 @@ import (
// memory blocks, but there are no methods implemented yet for modifying ones already in existence. // memory blocks, but there are no methods implemented yet for modifying ones already in existence.
// //
// Use the Buffer and its Map methods to interact with memory in both a read and writable way. // Use the Buffer and its Map methods to interact with memory in both a read and writable way.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Memory struct { type Memory struct {
ptr *C.GstMemory ptr *C.GstMemory
mapInfo *MapInfo mapInfo *MapInfo
@@ -24,6 +26,8 @@ type Memory struct {
// FromGstMemoryUnsafe wraps the given C GstMemory in the go type. It is meant for internal usage // FromGstMemoryUnsafe wraps the given C GstMemory in the go type. It is meant for internal usage
// and exported for visibility to other packages. // and exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMemoryUnsafe(mem unsafe.Pointer) *Memory { func FromGstMemoryUnsafe(mem unsafe.Pointer) *Memory {
wrapped := wrapMemory((*C.GstMemory)(mem)) wrapped := wrapMemory((*C.GstMemory)(mem))
wrapped.Ref() wrapped.Ref()
@@ -32,11 +36,15 @@ func FromGstMemoryUnsafe(mem unsafe.Pointer) *Memory {
} }
// FromGstMemoryUnsafeNone is an alias to FromGstMemoryUnsafe. // FromGstMemoryUnsafeNone is an alias to FromGstMemoryUnsafe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMemoryUnsafeNone(mem unsafe.Pointer) *Memory { func FromGstMemoryUnsafeNone(mem unsafe.Pointer) *Memory {
return FromGstMemoryUnsafe(mem) return FromGstMemoryUnsafe(mem)
} }
// FromGstMemoryUnsafeFull wraps the given memory without taking an additional reference. // FromGstMemoryUnsafeFull wraps the given memory without taking an additional reference.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMemoryUnsafeFull(mem unsafe.Pointer) *Memory { func FromGstMemoryUnsafeFull(mem unsafe.Pointer) *Memory {
wrapped := wrapMemory((*C.GstMemory)(mem)) wrapped := wrapMemory((*C.GstMemory)(mem))
runtime.SetFinalizer(wrapped, (*Memory).Unref) runtime.SetFinalizer(wrapped, (*Memory).Unref)
@@ -47,6 +55,8 @@ func FromGstMemoryUnsafeFull(mem unsafe.Pointer) *Memory {
// //
// The prefix/padding must be filled with 0 if flags contains MemoryFlagZeroPrefixed // The prefix/padding must be filled with 0 if flags contains MemoryFlagZeroPrefixed
// and MemoryFlagZeroPadded respectively. // and MemoryFlagZeroPadded respectively.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewMemoryWrapped(flags MemoryFlags, data []byte, maxSize, offset int64) *Memory { func NewMemoryWrapped(flags MemoryFlags, data []byte, maxSize, offset int64) *Memory {
mem := C.gst_memory_new_wrapped( mem := C.gst_memory_new_wrapped(
C.GstMemoryFlags(flags), C.GstMemoryFlags(flags),
@@ -61,40 +71,60 @@ func NewMemoryWrapped(flags MemoryFlags, data []byte, maxSize, offset int64) *Me
} }
// Instance returns the underlying GstMemory instance. // Instance returns the underlying GstMemory instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Instance() *C.GstMemory { return C.toGstMemory(unsafe.Pointer(m.ptr)) } func (m *Memory) Instance() *C.GstMemory { return C.toGstMemory(unsafe.Pointer(m.ptr)) }
// Ref increases the ref count on this memory block by one. // Ref increases the ref count on this memory block by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Ref() *Memory { func (m *Memory) Ref() *Memory {
return wrapMemory(C.gst_memory_ref(m.Instance())) return wrapMemory(C.gst_memory_ref(m.Instance()))
} }
// Unref decreases the ref count on this memory block by one. When the refcount reaches // Unref decreases the ref count on this memory block by one. When the refcount reaches
// zero the memory is freed. // zero the memory is freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Unref() { C.gst_memory_unref(m.Instance()) } func (m *Memory) Unref() { C.gst_memory_unref(m.Instance()) }
// Allocator returns the allocator for this memory. // Allocator returns the allocator for this memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Allocator() *Allocator { func (m *Memory) Allocator() *Allocator {
return wrapAllocator(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(m.Instance().allocator))}) return wrapAllocator(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(m.Instance().allocator))})
} }
// Parent returns this memory block's parent. // Parent returns this memory block's parent.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Parent() *Memory { return wrapMemory(m.Instance().parent) } func (m *Memory) Parent() *Memory { return wrapMemory(m.Instance().parent) }
// MaxSize returns the maximum size allocated for this memory block. // MaxSize returns the maximum size allocated for this memory block.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) MaxSize() int64 { return int64(m.Instance().maxsize) } func (m *Memory) MaxSize() int64 { return int64(m.Instance().maxsize) }
// Alignment returns the alignment of the memory. // Alignment returns the alignment of the memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Alignment() int64 { return int64(m.Instance().align) } func (m *Memory) Alignment() int64 { return int64(m.Instance().align) }
// Offset returns the offset where valid data starts. // Offset returns the offset where valid data starts.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Offset() int64 { return int64(m.Instance().offset) } func (m *Memory) Offset() int64 { return int64(m.Instance().offset) }
// Size returns the size of valid data. // Size returns the size of valid data.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Size() int64 { return int64(m.Instance().size) } func (m *Memory) Size() int64 { return int64(m.Instance().size) }
// Copy returns a copy of size bytes from mem starting from offset. This copy is // Copy returns a copy of size bytes from mem starting from offset. This copy is
// guaranteed to be writable. size can be set to -1 to return a copy from offset // guaranteed to be writable. size can be set to -1 to return a copy from offset
// to the end of the memory region. // to the end of the memory region.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Copy(offset, size int64) *Memory { func (m *Memory) Copy(offset, size int64) *Memory {
mem := C.gst_memory_copy(m.Instance(), C.gssize(offset), C.gssize(size)) mem := C.gst_memory_copy(m.Instance(), C.gssize(offset), C.gssize(size))
return FromGstMemoryUnsafeFull(unsafe.Pointer(mem)) return FromGstMemoryUnsafeFull(unsafe.Pointer(mem))
@@ -106,6 +136,8 @@ func (m *Memory) Copy(offset, size int64) *Memory {
// memory with the appropriate flags, or map initially with both read/write access. // memory with the appropriate flags, or map initially with both read/write access.
// //
// Unmap the Memory after usage. // Unmap the Memory after usage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Map(flags MapFlags) *MapInfo { func (m *Memory) Map(flags MapFlags) *MapInfo {
if m.mapInfo != nil { if m.mapInfo != nil {
return m.mapInfo return m.mapInfo
@@ -124,6 +156,8 @@ func (m *Memory) Map(flags MapFlags) *MapInfo {
} }
// Unmap will unmap the data inside this memory. Use this after calling Map on the Memory. // Unmap will unmap the data inside this memory. Use this after calling Map on the Memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Unmap() { func (m *Memory) Unmap() {
if m.mapInfo == nil { if m.mapInfo == nil {
return return
@@ -133,6 +167,8 @@ func (m *Memory) Unmap() {
} }
// Bytes will return a byte slice of the data inside this memory if it is readable. // Bytes will return a byte slice of the data inside this memory if it is readable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Memory) Bytes() []byte { func (m *Memory) Bytes() []byte {
mapInfo := m.Map(MapRead) mapInfo := m.Map(MapRead)
if mapInfo == nil { if mapInfo == nil {

View File

@@ -14,12 +14,16 @@ import (
// Message is a Go wrapper around a GstMessage. It provides convenience methods for // Message is a Go wrapper around a GstMessage. It provides convenience methods for
// unref-ing and parsing the underlying messages. // unref-ing and parsing the underlying messages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Message struct { type Message struct {
msg *C.GstMessage msg *C.GstMessage
} }
// FromGstMessageUnsafeNone wraps the given unsafe.Pointer in a message. A ref is taken // FromGstMessageUnsafeNone wraps the given unsafe.Pointer in a message. A ref is taken
// on the message and a runtime finalizer placed on the object. // on the message and a runtime finalizer placed on the object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMessageUnsafeNone(msg unsafe.Pointer) *Message { func FromGstMessageUnsafeNone(msg unsafe.Pointer) *Message {
gomsg := ToGstMessage(msg) gomsg := ToGstMessage(msg)
gomsg.Ref() gomsg.Ref()
@@ -29,6 +33,8 @@ func FromGstMessageUnsafeNone(msg unsafe.Pointer) *Message {
// FromGstMessageUnsafeFull wraps the given unsafe.Pointer in a message. No ref is taken // FromGstMessageUnsafeFull wraps the given unsafe.Pointer in a message. No ref is taken
// and a finalizer is placed on the resulting object. // and a finalizer is placed on the resulting object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMessageUnsafeFull(msg unsafe.Pointer) *Message { func FromGstMessageUnsafeFull(msg unsafe.Pointer) *Message {
gomsg := ToGstMessage(msg) gomsg := ToGstMessage(msg)
runtime.SetFinalizer(gomsg, (*Message).Unref) runtime.SetFinalizer(gomsg, (*Message).Unref)
@@ -37,48 +43,68 @@ func FromGstMessageUnsafeFull(msg unsafe.Pointer) *Message {
// ToGstMessage converts the given pointer into a Message without affecting the ref count or // ToGstMessage converts the given pointer into a Message without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstMessage(msg unsafe.Pointer) *Message { return wrapMessage((*C.GstMessage)(msg)) } func ToGstMessage(msg unsafe.Pointer) *Message { return wrapMessage((*C.GstMessage)(msg)) }
// Instance returns the underlying GstMessage object. // Instance returns the underlying GstMessage object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) Instance() *C.GstMessage { return C.toGstMessage(unsafe.Pointer(m.msg)) } func (m *Message) Instance() *C.GstMessage { return C.toGstMessage(unsafe.Pointer(m.msg)) }
// Unref will call `gst_message_unref` on the underlying GstMessage, freeing it from memory. // Unref will call `gst_message_unref` on the underlying GstMessage, freeing it from memory.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) Unref() { C.gst_message_unref(m.Instance()) } func (m *Message) Unref() { C.gst_message_unref(m.Instance()) }
// Ref will increase the ref count on this message. This increases the total amount of times // Ref will increase the ref count on this message. This increases the total amount of times
// Unref needs to be called before the object is freed from memory. It returns the underlying // Unref needs to be called before the object is freed from memory. It returns the underlying
// message object for convenience. // message object for convenience.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) Ref() *Message { func (m *Message) Ref() *Message {
C.gst_message_ref(m.Instance()) C.gst_message_ref(m.Instance())
return m return m
} }
// Copy will copy this object into a new Message. // Copy will copy this object into a new Message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) Copy() *Message { func (m *Message) Copy() *Message {
newNative := C.gst_message_copy(m.Instance()) newNative := C.gst_message_copy(m.Instance())
return FromGstMessageUnsafeFull(unsafe.Pointer(newNative)) return FromGstMessageUnsafeFull(unsafe.Pointer(newNative))
} }
// Source returns name of the source of the message. // Source returns name of the source of the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) Source() string { return C.GoString(m.Instance().src.name) } func (m *Message) Source() string { return C.GoString(m.Instance().src.name) }
// Source returns object of the source of the message. // Source returns object of the source of the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) SourceObject() *Object { func (m *Message) SourceObject() *Object {
return wrapObject(glib.Take(unsafe.Pointer(m.Instance().src))) return wrapObject(glib.Take(unsafe.Pointer(m.Instance().src)))
} }
// Type returns the MessageType of the message. // Type returns the MessageType of the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) Type() MessageType { func (m *Message) Type() MessageType {
return MessageType(m.Instance()._type) return MessageType(m.Instance()._type)
} }
// TypeName returns a Go string of the GstMessageType name. // TypeName returns a Go string of the GstMessageType name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) TypeName() string { func (m *Message) TypeName() string {
return C.GoString(C.gst_message_type_get_name((C.GstMessageType)(m.Type()))) return C.GoString(C.gst_message_type_get_name((C.GstMessageType)(m.Type())))
} }
// GetStructure returns the GstStructure of this message, using the type of the message // GetStructure returns the GstStructure of this message, using the type of the message
// to determine the method to use. The returned structure must not be freed. // to determine the method to use. The returned structure must not be freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) GetStructure() *Structure { func (m *Message) GetStructure() *Structure {
var st *C.GstStructure var st *C.GstStructure
@@ -105,6 +131,8 @@ func (m *Message) GetStructure() *Structure {
// parseToError returns a new GError from this message instance. There are multiple // parseToError returns a new GError from this message instance. There are multiple
// message types that parse to this interface. // message types that parse to this interface.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) parseToError() *GError { func (m *Message) parseToError() *GError {
var gerr *C.GError var gerr *C.GError
var debugInfo *C.gchar var debugInfo *C.gchar
@@ -136,24 +164,32 @@ func (m *Message) parseToError() *GError {
// ParseInfo is identical to ParseError. The returned types are the same. However, // ParseInfo is identical to ParseError. The returned types are the same. However,
// this is intended for use with GstMessageType `GST_MESSAGE_INFO`. // this is intended for use with GstMessageType `GST_MESSAGE_INFO`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseInfo() *GError { func (m *Message) ParseInfo() *GError {
return m.parseToError() return m.parseToError()
} }
// ParseWarning is identical to ParseError. The returned types are the same. However, // ParseWarning is identical to ParseError. The returned types are the same. However,
// this is intended for use with GstMessageType `GST_MESSAGE_WARNING`. // this is intended for use with GstMessageType `GST_MESSAGE_WARNING`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseWarning() *GError { func (m *Message) ParseWarning() *GError {
return m.parseToError() return m.parseToError()
} }
// ParseError will return a GError from the contents of this message. This will only work // ParseError will return a GError from the contents of this message. This will only work
// if the GstMessageType is `GST_MESSAGE_ERROR`. // if the GstMessageType is `GST_MESSAGE_ERROR`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseError() *GError { func (m *Message) ParseError() *GError {
return m.parseToError() return m.parseToError()
} }
// ParseStateChanged will return the old and new states as Go strings. This will only work // ParseStateChanged will return the old and new states as Go strings. This will only work
// if the GstMessageType is `GST_MESSAGE_STATE_CHANGED`. // if the GstMessageType is `GST_MESSAGE_STATE_CHANGED`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStateChanged() (oldState, newState State) { func (m *Message) ParseStateChanged() (oldState, newState State) {
var gOldState, gNewState C.GstState var gOldState, gNewState C.GstState
C.gst_message_parse_state_changed(m.Instance(), (*C.GstState)(unsafe.Pointer(&gOldState)), (*C.GstState)(unsafe.Pointer(&gNewState)), nil) C.gst_message_parse_state_changed(m.Instance(), (*C.GstState)(unsafe.Pointer(&gOldState)), (*C.GstState)(unsafe.Pointer(&gNewState)), nil)
@@ -163,6 +199,8 @@ func (m *Message) ParseStateChanged() (oldState, newState State) {
} }
// ParseTags extracts the tag list from the GstMessage. Tags are copied. // ParseTags extracts the tag list from the GstMessage. Tags are copied.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseTags() *TagList { func (m *Message) ParseTags() *TagList {
var tagList *C.GstTagList var tagList *C.GstTagList
C.gst_message_parse_tag(m.Instance(), &tagList) C.gst_message_parse_tag(m.Instance(), &tagList)
@@ -174,6 +212,8 @@ func (m *Message) ParseTags() *TagList {
// ParseTOC extracts the TOC from the GstMessage. The TOC returned in the output argument is // ParseTOC extracts the TOC from the GstMessage. The TOC returned in the output argument is
// a copy. // a copy.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseTOC() (toc *TOC, updated bool) { func (m *Message) ParseTOC() (toc *TOC, updated bool) {
var gtoc *C.GstToc var gtoc *C.GstToc
var gupdated C.gboolean var gupdated C.gboolean
@@ -183,6 +223,8 @@ func (m *Message) ParseTOC() (toc *TOC, updated bool) {
// ParseStreamStatus parses the stream status type of the message as well as the element // ParseStreamStatus parses the stream status type of the message as well as the element
// that produced it. // that produced it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStreamStatus() (StreamStatusType, *Element) { func (m *Message) ParseStreamStatus() (StreamStatusType, *Element) {
var cElem *C.GstElement var cElem *C.GstElement
var cStatusType C.GstStreamStatusType var cStatusType C.GstStreamStatusType
@@ -195,6 +237,8 @@ func (m *Message) ParseStreamStatus() (StreamStatusType, *Element) {
} }
// ParseAsyncDone extracts the running time from the async task done message. // ParseAsyncDone extracts the running time from the async task done message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseAsyncDone() ClockTime { func (m *Message) ParseAsyncDone() ClockTime {
var clockTime C.GstClockTime var clockTime C.GstClockTime
C.gst_message_parse_async_done(m.Instance(), &clockTime) C.gst_message_parse_async_done(m.Instance(), &clockTime)
@@ -202,6 +246,8 @@ func (m *Message) ParseAsyncDone() ClockTime {
} }
// BufferingStats represents the buffering stats as retrieved from a GST_MESSAGE_TYPE_BUFFERING. // BufferingStats represents the buffering stats as retrieved from a GST_MESSAGE_TYPE_BUFFERING.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type BufferingStats struct { type BufferingStats struct {
// The buffering mode // The buffering mode
BufferingMode BufferingMode BufferingMode BufferingMode
@@ -214,6 +260,8 @@ type BufferingStats struct {
} }
// ParseBuffering extracts the buffering percent from the GstMessage. // ParseBuffering extracts the buffering percent from the GstMessage.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseBuffering() int { func (m *Message) ParseBuffering() int {
var cInt C.gint var cInt C.gint
C.gst_message_parse_buffering(m.Instance(), &cInt) C.gst_message_parse_buffering(m.Instance(), &cInt)
@@ -221,6 +269,8 @@ func (m *Message) ParseBuffering() int {
} }
// ParseBufferingStats extracts the buffering stats values from message. // ParseBufferingStats extracts the buffering stats values from message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseBufferingStats() *BufferingStats { func (m *Message) ParseBufferingStats() *BufferingStats {
var mode C.GstBufferingMode var mode C.GstBufferingMode
var avgIn, avgOut C.gint var avgIn, avgOut C.gint
@@ -238,6 +288,8 @@ func (m *Message) ParseBufferingStats() *BufferingStats {
} }
// StepStartValues represents the values inside a StepStart message. // StepStartValues represents the values inside a StepStart message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type StepStartValues struct { type StepStartValues struct {
Active bool Active bool
Format Format Format Format
@@ -248,6 +300,8 @@ type StepStartValues struct {
} }
// ParseStepStart extracts the values for the StepStart message. // ParseStepStart extracts the values for the StepStart message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStepStart() *StepStartValues { func (m *Message) ParseStepStart() *StepStartValues {
var active, flush, intermediate C.gboolean var active, flush, intermediate C.gboolean
var amount C.guint64 var amount C.guint64
@@ -268,6 +322,8 @@ func (m *Message) ParseStepStart() *StepStartValues {
} }
// StepDoneValues represents the values inside a StepDone message. // StepDoneValues represents the values inside a StepDone message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type StepDoneValues struct { type StepDoneValues struct {
Format Format Format Format
Amount uint64 Amount uint64
@@ -279,6 +335,8 @@ type StepDoneValues struct {
} }
// ParseStepDone extracts the values for the StepDone message. // ParseStepDone extracts the values for the StepDone message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStepDone() *StepDoneValues { func (m *Message) ParseStepDone() *StepDoneValues {
var format C.GstFormat var format C.GstFormat
var amount, duration C.guint64 var amount, duration C.guint64
@@ -307,6 +365,8 @@ func (m *Message) ParseStepDone() *StepDoneValues {
// ParseNewClock parses the new Clock in the message. The clock object returned // ParseNewClock parses the new Clock in the message. The clock object returned
// remains valid until the message is freed. // remains valid until the message is freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseNewClock() *Clock { func (m *Message) ParseNewClock() *Clock {
var clock *C.GstClock var clock *C.GstClock
C.gst_message_parse_new_clock(m.Instance(), &clock) C.gst_message_parse_new_clock(m.Instance(), &clock)
@@ -315,6 +375,8 @@ func (m *Message) ParseNewClock() *Clock {
// ParseClockProvide extracts the clock and ready flag from the GstMessage. // ParseClockProvide extracts the clock and ready flag from the GstMessage.
// The clock object returned remains valid until the message is freed. // The clock object returned remains valid until the message is freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseClockProvide() (clock *Clock, ready bool) { func (m *Message) ParseClockProvide() (clock *Clock, ready bool) {
var gclock *C.GstClock var gclock *C.GstClock
var gready C.gboolean var gready C.gboolean
@@ -324,6 +386,8 @@ func (m *Message) ParseClockProvide() (clock *Clock, ready bool) {
// ParseStructureChange extracts the change type and completion status from the GstMessage. // ParseStructureChange extracts the change type and completion status from the GstMessage.
// If the returned bool is true, the change is still in progress. // If the returned bool is true, the change is still in progress.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStructureChange() (chgType StructureChangeType, owner *Element, busy bool) { func (m *Message) ParseStructureChange() (chgType StructureChangeType, owner *Element, busy bool) {
var gElem *C.GstElement var gElem *C.GstElement
var gbusy C.gboolean var gbusy C.gboolean
@@ -336,6 +400,8 @@ func (m *Message) ParseStructureChange() (chgType StructureChangeType, owner *El
} }
// ParseSegmentStart extracts the position and format of the SegmentStart message. // ParseSegmentStart extracts the position and format of the SegmentStart message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseSegmentStart() (Format, int64) { func (m *Message) ParseSegmentStart() (Format, int64) {
var format C.GstFormat var format C.GstFormat
var position C.gint64 var position C.gint64
@@ -344,6 +410,8 @@ func (m *Message) ParseSegmentStart() (Format, int64) {
} }
// ParseSegmentDone extracts the position and format of the SegmentDone message. // ParseSegmentDone extracts the position and format of the SegmentDone message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseSegmentDone() (Format, int64) { func (m *Message) ParseSegmentDone() (Format, int64) {
var format C.GstFormat var format C.GstFormat
var position C.gint64 var position C.gint64
@@ -352,6 +420,8 @@ func (m *Message) ParseSegmentDone() (Format, int64) {
} }
// ParseRequestState parses the requests state from the message. // ParseRequestState parses the requests state from the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseRequestState() State { func (m *Message) ParseRequestState() State {
var state C.GstState var state C.GstState
C.gst_message_parse_request_state(m.Instance(), &state) C.gst_message_parse_request_state(m.Instance(), &state)
@@ -359,6 +429,8 @@ func (m *Message) ParseRequestState() State {
} }
// QoSValues represents the values inside a QoS message. // QoSValues represents the values inside a QoS message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type QoSValues struct { type QoSValues struct {
// If the message was generated by a live element // If the message was generated by a live element
Live bool Live bool
@@ -375,6 +447,8 @@ type QoSValues struct {
// ParseQoS extracts the timestamps and live status from the QoS message. // ParseQoS extracts the timestamps and live status from the QoS message.
// The values reflect those of the dropped buffer. Values of ClockTimeNone // The values reflect those of the dropped buffer. Values of ClockTimeNone
// or -1 mean unknown values. // or -1 mean unknown values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseQoS() *QoSValues { func (m *Message) ParseQoS() *QoSValues {
var live C.gboolean var live C.gboolean
var runningTime, streamTime, timestamp, duration C.guint64 var runningTime, streamTime, timestamp, duration C.guint64
@@ -392,6 +466,8 @@ func (m *Message) ParseQoS() *QoSValues {
} }
// ParseProgress parses the progress type, code and text. // ParseProgress parses the progress type, code and text.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseProgress() (progressType ProgressType, code, text string) { func (m *Message) ParseProgress() (progressType ProgressType, code, text string) {
codePtr := C.malloc(C.sizeof_char * 1024) codePtr := C.malloc(C.sizeof_char * 1024)
defer C.free(unsafe.Pointer(codePtr)) defer C.free(unsafe.Pointer(codePtr))
@@ -410,6 +486,8 @@ func (m *Message) ParseProgress() (progressType ProgressType, code, text string)
} }
// ParseResetTime extracts the running-time from the ResetTime message. // ParseResetTime extracts the running-time from the ResetTime message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseResetTime() ClockTime { func (m *Message) ParseResetTime() ClockTime {
var clockTime C.GstClockTime var clockTime C.GstClockTime
C.gst_message_parse_reset_time(m.Instance(), &clockTime) C.gst_message_parse_reset_time(m.Instance(), &clockTime)
@@ -419,6 +497,8 @@ func (m *Message) ParseResetTime() ClockTime {
// ParseDeviceAdded parses a device-added message. The device-added message is // ParseDeviceAdded parses a device-added message. The device-added message is
// produced by GstDeviceProvider or a GstDeviceMonitor. It announces the appearance // produced by GstDeviceProvider or a GstDeviceMonitor. It announces the appearance
// of monitored devices. // of monitored devices.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseDeviceAdded() *Device { func (m *Message) ParseDeviceAdded() *Device {
var device *C.GstDevice var device *C.GstDevice
C.gst_message_parse_device_added(m.Instance(), &device) C.gst_message_parse_device_added(m.Instance(), &device)
@@ -428,6 +508,8 @@ func (m *Message) ParseDeviceAdded() *Device {
// ParseDeviceRemoved parses a device-removed message. The device-removed message // ParseDeviceRemoved parses a device-removed message. The device-removed message
// is produced by GstDeviceProvider or a GstDeviceMonitor. It announces the disappearance // is produced by GstDeviceProvider or a GstDeviceMonitor. It announces the disappearance
// of monitored devices. // of monitored devices.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseDeviceRemoved() *Device { func (m *Message) ParseDeviceRemoved() *Device {
var device *C.GstDevice var device *C.GstDevice
C.gst_message_parse_device_removed(m.Instance(), &device) C.gst_message_parse_device_removed(m.Instance(), &device)
@@ -439,6 +521,8 @@ func (m *Message) ParseDeviceRemoved() *Device {
// have changed. // have changed.
// The first device returned is the updated Device, and the second changedDevice represents // The first device returned is the updated Device, and the second changedDevice represents
// the old state of the device. // the old state of the device.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseDeviceChanged() (newDevice, oldDevice *Device) { func (m *Message) ParseDeviceChanged() (newDevice, oldDevice *Device) {
var gstNewDevice, gstOldDevice *C.GstDevice var gstNewDevice, gstOldDevice *C.GstDevice
C.gst_message_parse_device_changed(m.Instance(), &gstNewDevice, &gstOldDevice) C.gst_message_parse_device_changed(m.Instance(), &gstNewDevice, &gstOldDevice)
@@ -448,6 +532,8 @@ func (m *Message) ParseDeviceChanged() (newDevice, oldDevice *Device) {
// ParsePropertyNotify parses a property-notify message. These will be posted on the bus only // ParsePropertyNotify parses a property-notify message. These will be posted on the bus only
// when set up with Element.AddPropertyNotifyWatch (TODO) or Element.AddPropertyDeepNotifyWatch (TODO). // when set up with Element.AddPropertyNotifyWatch (TODO) or Element.AddPropertyDeepNotifyWatch (TODO).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParsePropertyNotify() (obj *Object, propertName string, propertyValue *glib.Value) { func (m *Message) ParsePropertyNotify() (obj *Object, propertName string, propertyValue *glib.Value) {
var gstobj *C.GstObject var gstobj *C.GstObject
var gval *C.GValue var gval *C.GValue
@@ -463,6 +549,8 @@ func (m *Message) ParsePropertyNotify() (obj *Object, propertName string, proper
} }
// ParseStreamCollection parses a stream-collection message. // ParseStreamCollection parses a stream-collection message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStreamCollection() *StreamCollection { func (m *Message) ParseStreamCollection() *StreamCollection {
var collection *C.GstStreamCollection var collection *C.GstStreamCollection
C.gst_message_parse_stream_collection( C.gst_message_parse_stream_collection(
@@ -473,6 +561,8 @@ func (m *Message) ParseStreamCollection() *StreamCollection {
} }
// ParseStreamsSelected parses a streams-selected message. // ParseStreamsSelected parses a streams-selected message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseStreamsSelected() *StreamCollection { func (m *Message) ParseStreamsSelected() *StreamCollection {
var collection *C.GstStreamCollection var collection *C.GstStreamCollection
C.gst_message_parse_streams_selected( C.gst_message_parse_streams_selected(
@@ -483,12 +573,16 @@ func (m *Message) ParseStreamsSelected() *StreamCollection {
} }
// NumRedirectEntries returns the number of redirect entries in a MessageRedirect. // NumRedirectEntries returns the number of redirect entries in a MessageRedirect.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) NumRedirectEntries() int64 { func (m *Message) NumRedirectEntries() int64 {
return int64(C.gst_message_get_num_redirect_entries(m.Instance())) return int64(C.gst_message_get_num_redirect_entries(m.Instance()))
} }
// ParseRedirectEntryAt parses the redirect entry at the given index. Total indices can be retrieved // ParseRedirectEntryAt parses the redirect entry at the given index. Total indices can be retrieved
// with NumRedirectEntries(). // with NumRedirectEntries().
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseRedirectEntryAt(idx int64) (location string, tags *TagList, structure *Structure) { func (m *Message) ParseRedirectEntryAt(idx int64) (location string, tags *TagList, structure *Structure) {
locPtr := C.malloc(C.sizeof_char * 1024) locPtr := C.malloc(C.sizeof_char * 1024)
defer C.free(unsafe.Pointer(locPtr)) defer C.free(unsafe.Pointer(locPtr))
@@ -506,6 +600,8 @@ func (m *Message) ParseRedirectEntryAt(idx int64) (location string, tags *TagLis
} }
// ParseHaveContext parses the context from a HaveContext message. // ParseHaveContext parses the context from a HaveContext message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) ParseHaveContext() *Context { func (m *Message) ParseHaveContext() *Context {
var ctx *C.GstContext var ctx *C.GstContext
C.gst_message_parse_have_context(m.Instance(), &ctx) C.gst_message_parse_have_context(m.Instance(), &ctx)

View File

@@ -10,10 +10,14 @@ import (
// GstObjectHolder interface is used as a go representation of the GLib check // GstObjectHolder interface is used as a go representation of the GLib check
// for an input type to be derived from the GstObject. // for an input type to be derived from the GstObject.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type GstObjectHolder interface { type GstObjectHolder interface {
GstObject() *C.GstObject GstObject() *C.GstObject
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getMessageSourceObj(src GstObjectHolder) *C.GstObject { func getMessageSourceObj(src GstObjectHolder) *C.GstObject {
if src == nil { if src == nil {
return nil return nil
@@ -27,6 +31,8 @@ func getMessageSourceObj(src GstObjectHolder) *C.GstObject {
// //
// The source of all message constructors must be a valid Object or descendant, specifically // The source of all message constructors must be a valid Object or descendant, specifically
// one created from the go runtime. If not the message returned will be nil. // one created from the go runtime. If not the message returned will be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewApplicationMessage(src GstObjectHolder, structure *Structure) *Message { func NewApplicationMessage(src GstObjectHolder, structure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -39,6 +45,8 @@ func NewApplicationMessage(src GstObjectHolder, structure *Structure) *Message {
// RunningTime contains the time of the desired running time when this elements goes to PLAYING. // RunningTime contains the time of the desired running time when this elements goes to PLAYING.
// A value less than 0 for runningTime means that the element has no clock interaction and thus doesn't // A value less than 0 for runningTime means that the element has no clock interaction and thus doesn't
// care about the running time of the pipeline. // care about the running time of the pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAsyncDoneMessage(src GstObjectHolder, runningTime ClockTime) *Message { func NewAsyncDoneMessage(src GstObjectHolder, runningTime ClockTime) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -52,6 +60,8 @@ func NewAsyncDoneMessage(src GstObjectHolder, runningTime ClockTime) *Message {
} }
// NewAsyncStartMessage returns a message that is posted by elements when they start an ASYNC state change. // NewAsyncStartMessage returns a message that is posted by elements when they start an ASYNC state change.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAsyncStartMessage(src GstObjectHolder) *Message { func NewAsyncStartMessage(src GstObjectHolder) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -67,6 +77,8 @@ func NewAsyncStartMessage(src GstObjectHolder) *Message {
// pipeline (back) to PLAYING. The application must be prepared to receive BUFFERING messages in the PREROLLING state and // pipeline (back) to PLAYING. The application must be prepared to receive BUFFERING messages in the PREROLLING state and
// may only set the pipeline to PLAYING after receiving a message with percent set to 100, which can happen after the pipeline // may only set the pipeline to PLAYING after receiving a message with percent set to 100, which can happen after the pipeline
// completed prerolling. // completed prerolling.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferingMessage(src GstObjectHolder, percent int) *Message { func NewBufferingMessage(src GstObjectHolder, percent int) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -79,6 +91,8 @@ func NewBufferingMessage(src GstObjectHolder, percent int) *Message {
// //
// If this message is posted by the pipeline, the pipeline will select a new clock again when it goes to PLAYING. It might // If this message is posted by the pipeline, the pipeline will select a new clock again when it goes to PLAYING. It might
// therefore be needed to set the pipeline to PAUSED and PLAYING again. // therefore be needed to set the pipeline to PAUSED and PLAYING again.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewClockLostMessage(src GstObjectHolder, clock *Clock) *Message { func NewClockLostMessage(src GstObjectHolder, clock *Clock) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -91,6 +105,8 @@ func NewClockLostMessage(src GstObjectHolder, clock *Clock) *Message {
// clock or lost its ability to provide a clock (maybe because it paused or became EOS). // clock or lost its ability to provide a clock (maybe because it paused or became EOS).
// //
// This message is mainly used internally to manage the clock selection. // This message is mainly used internally to manage the clock selection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewClockProvideMessage(src GstObjectHolder, clock *Clock, ready bool) *Message { func NewClockProvideMessage(src GstObjectHolder, clock *Clock, ready bool) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -101,6 +117,8 @@ func NewClockProvideMessage(src GstObjectHolder, clock *Clock, ready bool) *Mess
// NewCustomMessage creates a new custom-typed message. This can be used for anything not handled by other message-specific // NewCustomMessage creates a new custom-typed message. This can be used for anything not handled by other message-specific
// functions to pass a message to the app. The structure field can be nil. // functions to pass a message to the app. The structure field can be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCustomMessage(src GstObjectHolder, msgType MessageType, structure *Structure) *Message { func NewCustomMessage(src GstObjectHolder, msgType MessageType, structure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -114,6 +132,8 @@ func NewCustomMessage(src GstObjectHolder, msgType MessageType, structure *Struc
// NewDeviceAddedMessage creates a new device-added message. The device-added message is produced by a DeviceProvider or a DeviceMonitor. // NewDeviceAddedMessage creates a new device-added message. The device-added message is produced by a DeviceProvider or a DeviceMonitor.
// They announce the appearance of monitored devices. // They announce the appearance of monitored devices.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDeviceAddedMessage(src GstObjectHolder, device *Device) *Message { func NewDeviceAddedMessage(src GstObjectHolder, device *Device) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -124,6 +144,8 @@ func NewDeviceAddedMessage(src GstObjectHolder, device *Device) *Message {
// NewDeviceChangedMessage creates a new device-changed message. The device-changed message is produced by a DeviceProvider or a DeviceMonitor. // NewDeviceChangedMessage creates a new device-changed message. The device-changed message is produced by a DeviceProvider or a DeviceMonitor.
// They announce that a device properties has changed and device represent the new modified version of changed_device. // They announce that a device properties has changed and device represent the new modified version of changed_device.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDeviceChangedMessage(src GstObjectHolder, device, changedDevice *Device) *Message { func NewDeviceChangedMessage(src GstObjectHolder, device, changedDevice *Device) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -134,6 +156,8 @@ func NewDeviceChangedMessage(src GstObjectHolder, device, changedDevice *Device)
// NewDeviceRemovedMessage creates a new device-removed message. The device-removed message is produced by a DeviceProvider or a DeviceMonitor. // NewDeviceRemovedMessage creates a new device-removed message. The device-removed message is produced by a DeviceProvider or a DeviceMonitor.
// They announce the disappearance of monitored devices. // They announce the disappearance of monitored devices.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDeviceRemovedMessage(src GstObjectHolder, device *Device) *Message { func NewDeviceRemovedMessage(src GstObjectHolder, device *Device) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -144,6 +168,8 @@ func NewDeviceRemovedMessage(src GstObjectHolder, device *Device) *Message {
// NewDurationChangedMessage creates a new duration changed message. This message is posted by elements that know the duration of a // NewDurationChangedMessage creates a new duration changed message. This message is posted by elements that know the duration of a
// stream when the duration changes. This message is received by bins and is used to calculate the total duration of a pipeline. // stream when the duration changes. This message is received by bins and is used to calculate the total duration of a pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDurationChangedMessage(src GstObjectHolder) *Message { func NewDurationChangedMessage(src GstObjectHolder) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -155,6 +181,8 @@ func NewDurationChangedMessage(src GstObjectHolder) *Message {
// NewElementMessage creates a new element-specific message. This is meant as a generic way of allowing one-way communication from an // NewElementMessage creates a new element-specific message. This is meant as a generic way of allowing one-way communication from an
// element to an application, for example "the firewire cable was unplugged". The format of the message should be documented in the // element to an application, for example "the firewire cable was unplugged". The format of the message should be documented in the
// element's documentation. The structure field can be nil. // element's documentation. The structure field can be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewElementMessage(src GstObjectHolder, structure *Structure) *Message { func NewElementMessage(src GstObjectHolder, structure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -168,6 +196,8 @@ func NewElementMessage(src GstObjectHolder, structure *Structure) *Message {
// NewEOSMessage creates a new eos message. This message is generated and posted in the sink elements of a Bin. The bin will only forward // NewEOSMessage creates a new eos message. This message is generated and posted in the sink elements of a Bin. The bin will only forward
// the EOS message to the application if all sinks have posted an EOS message. // the EOS message to the application if all sinks have posted an EOS message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewEOSMessage(src GstObjectHolder) *Message { func NewEOSMessage(src GstObjectHolder) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -179,6 +209,8 @@ func NewEOSMessage(src GstObjectHolder) *Message {
// NewErrorMessage creates a new error message. The message will copy error and debug. This message is posted by element when a fatal event // NewErrorMessage creates a new error message. The message will copy error and debug. This message is posted by element when a fatal event
// occurred. The pipeline will probably (partially) stop. The application receiving this message should stop the pipeline. // occurred. The pipeline will probably (partially) stop. The application receiving this message should stop the pipeline.
// Structure can be nil to not add a structure to the message. // Structure can be nil to not add a structure to the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewErrorMessage(src GstObjectHolder, err error, debugStr string, structure *Structure) *Message { func NewErrorMessage(src GstObjectHolder, err error, debugStr string, structure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -210,6 +242,8 @@ func NewErrorMessage(src GstObjectHolder, err error, debugStr string, structure
} }
// NewHaveContextMessage creates a message that is posted when an element has a new local Context. // NewHaveContextMessage creates a message that is posted when an element has a new local Context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewHaveContextMessage(src GstObjectHolder, ctx *Context) *Message { func NewHaveContextMessage(src GstObjectHolder, ctx *Context) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -222,6 +256,8 @@ func NewHaveContextMessage(src GstObjectHolder, ctx *Context) *Message {
} }
// NewInfoMessage creates a new info message. Structure can be nil. // NewInfoMessage creates a new info message. Structure can be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewInfoMessage(src GstObjectHolder, msg string, debugStr string, structure *Structure) *Message { func NewInfoMessage(src GstObjectHolder, msg string, debugStr string, structure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -253,6 +289,8 @@ func NewInfoMessage(src GstObjectHolder, msg string, debugStr string, structure
} }
// NewLatencyMessage creates a message that can be posted by elements when their latency requirements have changed. // NewLatencyMessage creates a message that can be posted by elements when their latency requirements have changed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewLatencyMessage(src GstObjectHolder) *Message { func NewLatencyMessage(src GstObjectHolder) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -262,6 +300,8 @@ func NewLatencyMessage(src GstObjectHolder) *Message {
} }
// NewNeedContextMessage creates a message that is posted when an element needs a specific Context. // NewNeedContextMessage creates a message that is posted when an element needs a specific Context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewNeedContextMessage(src GstObjectHolder, ctxType string) *Message { func NewNeedContextMessage(src GstObjectHolder, ctxType string) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -272,6 +312,8 @@ func NewNeedContextMessage(src GstObjectHolder, ctxType string) *Message {
} }
// NewNewClockMessage creates a new clock message. This message is posted whenever the pipeline selects a new clock for the pipeline. // NewNewClockMessage creates a new clock message. This message is posted whenever the pipeline selects a new clock for the pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewNewClockMessage(src GstObjectHolder, clock *Clock) *Message { func NewNewClockMessage(src GstObjectHolder, clock *Clock) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -283,6 +325,8 @@ func NewNewClockMessage(src GstObjectHolder, clock *Clock) *Message {
// NewProgressMessage creates messages that are posted by elements when they use an asynchronous task to perform actions triggered by a state change. // NewProgressMessage creates messages that are posted by elements when they use an asynchronous task to perform actions triggered by a state change.
// //
// Code contains a well defined string describing the action. Text should contain a user visible string detailing the current action. // Code contains a well defined string describing the action. Text should contain a user visible string detailing the current action.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewProgressMessage(src GstObjectHolder, progressType ProgressType, code, text string) *Message { func NewProgressMessage(src GstObjectHolder, progressType ProgressType, code, text string) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -295,6 +339,8 @@ func NewProgressMessage(src GstObjectHolder, progressType ProgressType, code, te
// NewPropertyNotifyMessage creates a new message notifying an object's properties have changed. If the // NewPropertyNotifyMessage creates a new message notifying an object's properties have changed. If the
// source OR the value cannot be coereced to C types, the function will return nil. // source OR the value cannot be coereced to C types, the function will return nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPropertyNotifyMessage(src GstObjectHolder, propName string, val interface{}) *Message { func NewPropertyNotifyMessage(src GstObjectHolder, propName string, val interface{}) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -320,6 +366,8 @@ func NewPropertyNotifyMessage(src GstObjectHolder, propName string, val interfac
// //
// running_time, stream_time, timestamp, duration should be set to the respective running-time, stream-time, timestamp and duration of the (dropped) buffer // running_time, stream_time, timestamp, duration should be set to the respective running-time, stream-time, timestamp and duration of the (dropped) buffer
// that generated the QoS event. Values can be left to less than zero when unknown. // that generated the QoS event. Values can be left to less than zero when unknown.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewQoSMessage(src GstObjectHolder, live bool, runningTime, streamTime, timestamp, duration uint64) *Message { func NewQoSMessage(src GstObjectHolder, live bool, runningTime, streamTime, timestamp, duration uint64) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -350,6 +398,8 @@ func NewQoSMessage(src GstObjectHolder, live bool, runningTime, streamTime, time
// an entry that is "best" for them. One example would be a recipient that scans the entries for the one with the highest bitrate tag. // an entry that is "best" for them. One example would be a recipient that scans the entries for the one with the highest bitrate tag.
// //
// The specified location string is copied. However, ownership over the tag list and structure are transferred to the message. // The specified location string is copied. However, ownership over the tag list and structure are transferred to the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewRedirectMessage(src GstObjectHolder, location string, tagList *TagList, entryStructure *Structure) *Message { func NewRedirectMessage(src GstObjectHolder, location string, tagList *TagList, entryStructure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -376,6 +426,8 @@ func NewRedirectMessage(src GstObjectHolder, location string, tagList *TagList,
} }
// AddRedirectEntry creates and appends a new entry to the message. // AddRedirectEntry creates and appends a new entry to the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) AddRedirectEntry(location string, tagList *TagList, entryStructure *Structure) { func (m *Message) AddRedirectEntry(location string, tagList *TagList, entryStructure *Structure) {
var loc *C.gchar var loc *C.gchar
var tl *C.GstTagList var tl *C.GstTagList
@@ -396,6 +448,8 @@ func (m *Message) AddRedirectEntry(location string, tagList *TagList, entryStruc
// NewRequestStateMessage creates a message that can be posted by elements when they want to have their state changed. // NewRequestStateMessage creates a message that can be posted by elements when they want to have their state changed.
// A typical use case would be an audio server that wants to pause the pipeline because a higher priority stream is being played. // A typical use case would be an audio server that wants to pause the pipeline because a higher priority stream is being played.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewRequestStateMessage(src GstObjectHolder, state State) *Message { func NewRequestStateMessage(src GstObjectHolder, state State) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -405,6 +459,8 @@ func NewRequestStateMessage(src GstObjectHolder, state State) *Message {
} }
// NewResetTimeMessage creates a message that is posted when the pipeline running-time should be reset to running_time, like after a flushing seek. // NewResetTimeMessage creates a message that is posted when the pipeline running-time should be reset to running_time, like after a flushing seek.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewResetTimeMessage(src GstObjectHolder, runningTime ClockTime) *Message { func NewResetTimeMessage(src GstObjectHolder, runningTime ClockTime) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -415,6 +471,8 @@ func NewResetTimeMessage(src GstObjectHolder, runningTime ClockTime) *Message {
// NewSegmentDoneMessage creates a new segment done message. This message is posted by elements that finish playback of a segment as a result of a // NewSegmentDoneMessage creates a new segment done message. This message is posted by elements that finish playback of a segment as a result of a
// segment seek. This message is received by the application after all elements that posted a segment_start have posted the segment_done. // segment seek. This message is received by the application after all elements that posted a segment_start have posted the segment_done.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSegmentDoneMessage(src GstObjectHolder, format Format, position int64) *Message { func NewSegmentDoneMessage(src GstObjectHolder, format Format, position int64) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -429,6 +487,8 @@ func NewSegmentDoneMessage(src GstObjectHolder, format Format, position int64) *
// NewSegmentStartMessage creates a new segment message. This message is posted by elements that start playback of a segment as a result of a segment seek. // NewSegmentStartMessage creates a new segment message. This message is posted by elements that start playback of a segment as a result of a segment seek.
// This message is not received by the application but is used for maintenance reasons in container elements. // This message is not received by the application but is used for maintenance reasons in container elements.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSegmentStartMessage(src GstObjectHolder, format Format, position int64) *Message { func NewSegmentStartMessage(src GstObjectHolder, format Format, position int64) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -442,6 +502,8 @@ func NewSegmentStartMessage(src GstObjectHolder, format Format, position int64)
} }
// NewStateChangedMessage creates a state change message. This message is posted whenever an element changed its state. // NewStateChangedMessage creates a state change message. This message is posted whenever an element changed its state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStateChangedMessage(src GstObjectHolder, oldState, newState, pendingState State) *Message { func NewStateChangedMessage(src GstObjectHolder, oldState, newState, pendingState State) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -455,6 +517,8 @@ func NewStateChangedMessage(src GstObjectHolder, oldState, newState, pendingStat
// NewStateDirtyMessage creates a state dirty message. This message is posted whenever an element changed its state asynchronously // NewStateDirtyMessage creates a state dirty message. This message is posted whenever an element changed its state asynchronously
// and is used internally to update the states of container objects. // and is used internally to update the states of container objects.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStateDirtyMessage(src GstObjectHolder) *Message { func NewStateDirtyMessage(src GstObjectHolder) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -467,6 +531,8 @@ func NewStateDirtyMessage(src GstObjectHolder) *Message {
// complete step operation. // complete step operation.
// //
// Duration will contain the amount of time of the stepped amount of media in format format. // Duration will contain the amount of time of the stepped amount of media in format format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStepDoneMessage(src GstObjectHolder, format Format, amount uint64, rate float64, flush, intermediate bool, duration uint64, eos bool) *Message { func NewStepDoneMessage(src GstObjectHolder, format Format, amount uint64, rate float64, flush, intermediate bool, duration uint64, eos bool) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -490,6 +556,8 @@ func NewStepDoneMessage(src GstObjectHolder, format Format, amount uint64, rate
// //
// Active is set to TRUE when the element has activated the step operation and is now ready to start executing the step in the streaming thread. // Active is set to TRUE when the element has activated the step operation and is now ready to start executing the step in the streaming thread.
// After this message is emitted, the application can queue a new step operation in the element. // After this message is emitted, the application can queue a new step operation in the element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStepStartMessage(src GstObjectHolder, active bool, format Format, amount uint64, rate float64, flush, intermediate bool) *Message { func NewStepStartMessage(src GstObjectHolder, active bool, format Format, amount uint64, rate float64, flush, intermediate bool) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -507,6 +575,8 @@ func NewStepStartMessage(src GstObjectHolder, active bool, format Format, amount
} }
// NewStreamCollectionMessage creates a new stream-collection message. The message is used to announce new StreamCollections. // NewStreamCollectionMessage creates a new stream-collection message. The message is used to announce new StreamCollections.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamCollectionMessage(src GstObjectHolder, collection *StreamCollection) *Message { func NewStreamCollectionMessage(src GstObjectHolder, collection *StreamCollection) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -517,6 +587,8 @@ func NewStreamCollectionMessage(src GstObjectHolder, collection *StreamCollectio
// NewStreamStartMessage creates a new stream_start message. This message is generated and posted in the sink elements of a Bin. // NewStreamStartMessage creates a new stream_start message. This message is generated and posted in the sink elements of a Bin.
// The bin will only forward the StreamStart message to the application if all sinks have posted a StreamStart message. // The bin will only forward the StreamStart message to the application if all sinks have posted a StreamStart message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamStartMessage(src GstObjectHolder) *Message { func NewStreamStartMessage(src GstObjectHolder) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -527,6 +599,8 @@ func NewStreamStartMessage(src GstObjectHolder) *Message {
// NewStreamStatusMessage creates a new stream status message. This message is posted when a streaming thread is created/destroyed or // NewStreamStatusMessage creates a new stream status message. This message is posted when a streaming thread is created/destroyed or
// when the state changed. // when the state changed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamStatusMessage(src GstObjectHolder, stType StreamStatusType, owner *Element) *Message { func NewStreamStatusMessage(src GstObjectHolder, stType StreamStatusType, owner *Element) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -541,6 +615,8 @@ func NewStreamStatusMessage(src GstObjectHolder, stType StreamStatusType, owner
// The message also contains the StreamCollection to which the various streams belong to. // The message also contains the StreamCollection to which the various streams belong to.
// //
// Users of this constructor can add the selected streams with StreamsSelectedAdd. // Users of this constructor can add the selected streams with StreamsSelectedAdd.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamSelectedMessage(src GstObjectHolder, collection *StreamCollection) *Message { func NewStreamSelectedMessage(src GstObjectHolder, collection *StreamCollection) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -550,16 +626,22 @@ func NewStreamSelectedMessage(src GstObjectHolder, collection *StreamCollection)
} }
// StreamsSelectedAdd adds the stream to the message // StreamsSelectedAdd adds the stream to the message
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) StreamsSelectedAdd(stream *Stream) { func (m *Message) StreamsSelectedAdd(stream *Stream) {
C.gst_message_streams_selected_add(m.Instance(), stream.Instance()) C.gst_message_streams_selected_add(m.Instance(), stream.Instance())
} }
// StreamsSelectedSize returns the number of streams contained in the message. // StreamsSelectedSize returns the number of streams contained in the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) StreamsSelectedSize() uint { func (m *Message) StreamsSelectedSize() uint {
return uint(C.gst_message_streams_selected_get_size(m.Instance())) return uint(C.gst_message_streams_selected_get_size(m.Instance()))
} }
// StreamsSelectedGetStream retrieves the Stream with index index from the message. // StreamsSelectedGetStream retrieves the Stream with index index from the message.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) StreamsSelectedGetStream(index uint) *Stream { func (m *Message) StreamsSelectedGetStream(index uint) *Stream {
stream := C.gst_message_streams_selected_get_stream(m.Instance(), C.guint(index)) stream := C.gst_message_streams_selected_get_stream(m.Instance(), C.guint(index))
if stream == nil { if stream == nil {
@@ -572,6 +654,8 @@ func (m *Message) StreamsSelectedGetStream(index uint) *Stream {
// of being changed, for example when pads are linked or unlinked. // of being changed, for example when pads are linked or unlinked.
// //
// Src should be the sinkpad that unlinked or linked. // Src should be the sinkpad that unlinked or linked.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStructureChangeMessage(src GstObjectHolder, chgType StructureChangeType, owner *Element, busy bool) *Message { func NewStructureChangeMessage(src GstObjectHolder, chgType StructureChangeType, owner *Element, busy bool) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -586,6 +670,8 @@ func NewStructureChangeMessage(src GstObjectHolder, chgType StructureChangeType,
} }
// NewTagMessage creates a new tag message. The message will take ownership of the tag list. The message is posted by elements that discovered a new taglist. // NewTagMessage creates a new tag message. The message will take ownership of the tag list. The message is posted by elements that discovered a new taglist.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTagMessage(src GstObjectHolder, tagList *TagList) *Message { func NewTagMessage(src GstObjectHolder, tagList *TagList) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -595,6 +681,8 @@ func NewTagMessage(src GstObjectHolder, tagList *TagList) *Message {
} }
// NewTOCMessage creates a new TOC message. The message is posted by elements that discovered or updated a TOC. // NewTOCMessage creates a new TOC message. The message is posted by elements that discovered or updated a TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTOCMessage(src GstObjectHolder, toc *TOC, updated bool) *Message { func NewTOCMessage(src GstObjectHolder, toc *TOC, updated bool) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {
@@ -608,6 +696,8 @@ func NewTOCMessage(src GstObjectHolder, toc *TOC, updated bool) *Message {
} }
// NewWarningMessage creates a new warning message. Structure can be nil. // NewWarningMessage creates a new warning message. Structure can be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewWarningMessage(src GstObjectHolder, msg string, debugStr string, structure *Structure) *Message { func NewWarningMessage(src GstObjectHolder, msg string, debugStr string, structure *Structure) *Message {
srcObj := getMessageSourceObj(src) srcObj := getMessageSourceObj(src)
if srcObj == nil { if srcObj == nil {

View File

@@ -14,6 +14,8 @@ import (
// This stringer really just helps in keeping track of making sure all message types are // This stringer really just helps in keeping track of making sure all message types are
// accounted for in some way. It's the devil, writing it was the devil, and I hope you // accounted for in some way. It's the devil, writing it was the devil, and I hope you
// enjoy being able to `fmt.Println(msg)`. // enjoy being able to `fmt.Println(msg)`.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Message) String() string { func (m *Message) String() string {
msg := fmt.Sprintf("[%s] %s - ", m.Source(), strings.ToUpper(m.TypeName())) msg := fmt.Sprintf("[%s] %s - ", m.Source(), strings.ToUpper(m.TypeName()))
switch m.Type() { switch m.Type() {

View File

@@ -31,35 +31,53 @@ import (
) )
// Meta is a go representation of GstMeta. // Meta is a go representation of GstMeta.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Meta struct { type Meta struct {
ptr *C.GstMeta ptr *C.GstMeta
} }
// FromGstMetaUnsafe wraps the pointer to the given C GstMeta with the go type. // FromGstMetaUnsafe wraps the pointer to the given C GstMeta with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMetaUnsafe(ptr unsafe.Pointer) *Meta { return wrapMeta(C.toGstMeta(ptr)) } func FromGstMetaUnsafe(ptr unsafe.Pointer) *Meta { return wrapMeta(C.toGstMeta(ptr)) }
// Instance returns the underlying GstMeta instance. // Instance returns the underlying GstMeta instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Meta) Instance() *C.GstMeta { return C.toGstMeta(unsafe.Pointer(m.ptr)) } func (m *Meta) Instance() *C.GstMeta { return C.toGstMeta(unsafe.Pointer(m.ptr)) }
// Flags returns the flags on this Meta instance. // Flags returns the flags on this Meta instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Meta) Flags() MetaFlags { return MetaFlags(m.Instance().flags) } func (m *Meta) Flags() MetaFlags { return MetaFlags(m.Instance().flags) }
// SetFlags sets the flags on this Meta instance. // SetFlags sets the flags on this Meta instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Meta) SetFlags(flags MetaFlags) { m.Instance().flags = C.GstMetaFlags(flags) } func (m *Meta) SetFlags(flags MetaFlags) { m.Instance().flags = C.GstMetaFlags(flags) }
// Info returns the extra info with this metadata. // Info returns the extra info with this metadata.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Meta) Info() *MetaInfo { return wrapMetaInfo(m.Instance().info) } func (m *Meta) Info() *MetaInfo { return wrapMetaInfo(m.Instance().info) }
// SetInfo sets the info on this metadata. // SetInfo sets the info on this metadata.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *Meta) SetInfo(info *MetaInfo) { m.Instance().info = info.Instance() } func (m *Meta) SetInfo(info *MetaInfo) { m.Instance().info = info.Instance() }
// MetaInfo is a go representation of GstMetaInfo // MetaInfo is a go representation of GstMetaInfo
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type MetaInfo struct { type MetaInfo struct {
ptr *C.GstMetaInfo ptr *C.GstMetaInfo
} }
// FromGstMetaInfoUnsafe wraps the given unsafe pointer in a MetaInfo instance. // FromGstMetaInfoUnsafe wraps the given unsafe pointer in a MetaInfo instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstMetaInfoUnsafe(ptr unsafe.Pointer) *MetaInfo { func FromGstMetaInfoUnsafe(ptr unsafe.Pointer) *MetaInfo {
if ptr == nil { if ptr == nil {
return nil return nil
@@ -68,6 +86,8 @@ func FromGstMetaInfoUnsafe(ptr unsafe.Pointer) *MetaInfo {
} }
// RegisterAPIType registers and returns a GType for the given api name and associates it with tags. // RegisterAPIType registers and returns a GType for the given api name and associates it with tags.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func RegisterAPIType(name string, tags []string) glib.Type { func RegisterAPIType(name string, tags []string) glib.Type {
cTags := gcharStrings(tags) cTags := gcharStrings(tags)
defer C.g_free((C.gpointer)(unsafe.Pointer(cTags))) defer C.g_free((C.gpointer)(unsafe.Pointer(cTags)))
@@ -78,6 +98,8 @@ func RegisterAPIType(name string, tags []string) glib.Type {
} }
// GetAPIInfo gets the MetaInfo for the given api type. // GetAPIInfo gets the MetaInfo for the given api type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func GetAPIInfo(name string) *MetaInfo { func GetAPIInfo(name string) *MetaInfo {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -85,12 +107,16 @@ func GetAPIInfo(name string) *MetaInfo {
} }
// GetAPITags retrieves the tags for the given api type. // GetAPITags retrieves the tags for the given api type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func GetAPITags(apiType glib.Type) []string { func GetAPITags(apiType glib.Type) []string {
tags := C.gst_meta_api_type_get_tags(C.GType(apiType)) tags := C.gst_meta_api_type_get_tags(C.GType(apiType))
return goStrings(C.sizeOfGCharArray(tags), tags) return goStrings(C.sizeOfGCharArray(tags), tags)
} }
// APIHasTag returns true if the given api has the given tag. // APIHasTag returns true if the given api has the given tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func APIHasTag(api glib.Type, tag string) bool { func APIHasTag(api glib.Type, tag string) bool {
q := newQuarkFromString(tag) q := newQuarkFromString(tag)
return gobool(C.gst_meta_api_type_has_tag(C.GType(api), q)) return gobool(C.gst_meta_api_type_has_tag(C.GType(api), q))
@@ -108,6 +134,8 @@ type MetaFreeFunc func(buffer *Buffer)
type MetaTransformFunc func(transBuf, buf *Buffer, mType string, data *MetaTransformCopy) bool type MetaTransformFunc func(transBuf, buf *Buffer, mType string, data *MetaTransformCopy) bool
// MetaTransformCopy is extra data passed to a MetaTransformFunc // MetaTransformCopy is extra data passed to a MetaTransformFunc
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type MetaTransformCopy struct { type MetaTransformCopy struct {
// true if only region is copied // true if only region is copied
Region bool Region bool
@@ -119,6 +147,8 @@ type MetaTransformCopy struct {
// MetaInfoCallbackFuncs represents callback functions to include when registering a new // MetaInfoCallbackFuncs represents callback functions to include when registering a new
// meta type. // meta type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type MetaInfoCallbackFuncs struct { type MetaInfoCallbackFuncs struct {
InitFunc MetaInitFunc InitFunc MetaInitFunc
FreeFunc MetaFreeFunc FreeFunc MetaFreeFunc
@@ -131,6 +161,8 @@ var registeredMetas = make(map[glib.Type]map[string]*MetaInfoCallbackFuncs)
// RegisterMeta registers and returns a new MetaInfo instance denoting the // RegisterMeta registers and returns a new MetaInfo instance denoting the
// given type, name, and size. // given type, name, and size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func RegisterMeta(api glib.Type, name string, size int64, cbFuncs *MetaInfoCallbackFuncs) *MetaInfo { func RegisterMeta(api glib.Type, name string, size int64, cbFuncs *MetaInfoCallbackFuncs) *MetaInfo {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -154,22 +186,36 @@ func RegisterMeta(api glib.Type, name string, size int64, cbFuncs *MetaInfoCallb
} }
// Instance returns the underlying GstMetaInfo instance. // Instance returns the underlying GstMetaInfo instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) Instance() *C.GstMetaInfo { return m.ptr } func (m *MetaInfo) Instance() *C.GstMetaInfo { return m.ptr }
// API returns the tag identifying the metadata structure and api. // API returns the tag identifying the metadata structure and api.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) API() glib.Type { return glib.Type(m.Instance().api) } func (m *MetaInfo) API() glib.Type { return glib.Type(m.Instance().api) }
// SetAPI sets the API tag identifying the metadata structure and api. // SetAPI sets the API tag identifying the metadata structure and api.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) SetAPI(t glib.Type) { m.Instance().api = C.GType(t) } func (m *MetaInfo) SetAPI(t glib.Type) { m.Instance().api = C.GType(t) }
// Type returns the type identifying the implementor of the api. // Type returns the type identifying the implementor of the api.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) Type() glib.Type { return glib.Type(m.Instance()._type) } func (m *MetaInfo) Type() glib.Type { return glib.Type(m.Instance()._type) }
// SetType sets the type identifying the implementor of the api. // SetType sets the type identifying the implementor of the api.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) SetType(t glib.Type) { m.Instance()._type = C.GType(t) } func (m *MetaInfo) SetType(t glib.Type) { m.Instance()._type = C.GType(t) }
// Size returns the size of the metadata. // Size returns the size of the metadata.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) Size() int64 { return int64(m.Instance().size) } func (m *MetaInfo) Size() int64 { return int64(m.Instance().size) }
// SetSize sets the size on the metadata. // SetSize sets the size on the metadata.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MetaInfo) SetSize(size int64) { m.Instance().size = C.gsize(size) } func (m *MetaInfo) SetSize(size int64) { m.Instance().size = C.gsize(size) }

View File

@@ -12,6 +12,8 @@ import (
// MiniObject is an opaque struct meant to form the base of gstreamer // MiniObject is an opaque struct meant to form the base of gstreamer
// classes extending the GstMiniObject. // classes extending the GstMiniObject.
// This object is a WIP and is intended primarily for forming the base of extending classes. // This object is a WIP and is intended primarily for forming the base of extending classes.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type MiniObject struct { type MiniObject struct {
ptr unsafe.Pointer ptr unsafe.Pointer
parent *MiniObject parent *MiniObject
@@ -20,6 +22,8 @@ type MiniObject struct {
// NewMiniObject initializes a new mini object with the desired flags, types, and callbacks. // NewMiniObject initializes a new mini object with the desired flags, types, and callbacks.
// If you don't need any callbacks you can specify nil. // If you don't need any callbacks you can specify nil.
// TODO: This is more for reference and is not fully implemented. // TODO: This is more for reference and is not fully implemented.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewMiniObject(flags MiniObjectFlags, gtype glib.Type) *MiniObject { func NewMiniObject(flags MiniObjectFlags, gtype glib.Type) *MiniObject {
var cMiniObj C.GstMiniObject var cMiniObj C.GstMiniObject
C.gst_mini_object_init( C.gst_mini_object_init(
@@ -32,38 +36,56 @@ func NewMiniObject(flags MiniObjectFlags, gtype glib.Type) *MiniObject {
} }
// native returns the pointer to the underlying object. // native returns the pointer to the underlying object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) unsafe() unsafe.Pointer { return m.ptr } func (m *MiniObject) unsafe() unsafe.Pointer { return m.ptr }
// Parent returns the parent of this MiniObject // Parent returns the parent of this MiniObject
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) Parent() *MiniObject { return m.parent } func (m *MiniObject) Parent() *MiniObject { return m.parent }
// Instance returns the native GstMiniObject instance. // Instance returns the native GstMiniObject instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) Instance() *C.GstMiniObject { return C.toGstMiniObject(m.unsafe()) } func (m *MiniObject) Instance() *C.GstMiniObject { return C.toGstMiniObject(m.unsafe()) }
// Ref increases the ref count on this object by one. // Ref increases the ref count on this object by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) Ref() { C.gst_mini_object_ref(m.Instance()) } func (m *MiniObject) Ref() { C.gst_mini_object_ref(m.Instance()) }
// Unref decreases the ref count on this object by one. // Unref decreases the ref count on this object by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) Unref() { C.gst_mini_object_unref(m.Instance()) } func (m *MiniObject) Unref() { C.gst_mini_object_unref(m.Instance()) }
// AddParent adds the given object as a parent of this object. // AddParent adds the given object as a parent of this object.
// See https://gstreamer.freedesktop.org/documentation/gstreamer/gstminiobject.html?gi-language=c#gst_mini_object_add_parent. // See https://gstreamer.freedesktop.org/documentation/gstreamer/gstminiobject.html?gi-language=c#gst_mini_object_add_parent.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) AddParent(parent *MiniObject) { func (m *MiniObject) AddParent(parent *MiniObject) {
C.gst_mini_object_add_parent(m.Instance(), parent.Instance()) C.gst_mini_object_add_parent(m.Instance(), parent.Instance())
} }
// Copy creates a copy of this object. // Copy creates a copy of this object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) Copy() *MiniObject { func (m *MiniObject) Copy() *MiniObject {
return wrapMiniObject(C.gst_mini_object_copy(m.Instance())) return wrapMiniObject(C.gst_mini_object_copy(m.Instance()))
} }
// Type returns the type of this mini object. // Type returns the type of this mini object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) Type() glib.Type { func (m *MiniObject) Type() glib.Type {
return glib.Type(m.Instance()._type) return glib.Type(m.Instance()._type)
} }
// GetData returns the userdata pointer associated with this object at the given key, // GetData returns the userdata pointer associated with this object at the given key,
// or nil if none exists. // or nil if none exists.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) GetData(name string) unsafe.Pointer { func (m *MiniObject) GetData(name string) unsafe.Pointer {
data := C.gst_mini_object_get_qdata(m.Instance(), newQuarkFromString(name)) data := C.gst_mini_object_get_qdata(m.Instance(), newQuarkFromString(name))
if data == nil { if data == nil {
@@ -74,10 +96,14 @@ func (m *MiniObject) GetData(name string) unsafe.Pointer {
// SetData sets a userdata pointer associated with this object at the given key, // SetData sets a userdata pointer associated with this object at the given key,
// Use nil to delete an existing key. // Use nil to delete an existing key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (m *MiniObject) SetData(name string, ptr unsafe.Pointer) { func (m *MiniObject) SetData(name string, ptr unsafe.Pointer) {
C.gst_mini_object_set_qdata(m.Instance(), newQuarkFromString(name), (C.gpointer)(ptr), nil) C.gst_mini_object_set_qdata(m.Instance(), newQuarkFromString(name), (C.gpointer)(ptr), nil)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapMiniObject(p *C.GstMiniObject) *MiniObject { func wrapMiniObject(p *C.GstMiniObject) *MiniObject {
return &MiniObject{ptr: unsafe.Pointer(p)} return &MiniObject{ptr: unsafe.Pointer(p)}
} }

View File

@@ -14,25 +14,39 @@ type Object struct{ *glib.InitiallyUnowned }
// FromGstObjectUnsafeNone returns an Object wrapping the given pointer. It meant for internal // FromGstObjectUnsafeNone returns an Object wrapping the given pointer. It meant for internal
// usage and exported for visibility to other packages. // usage and exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstObjectUnsafeNone(ptr unsafe.Pointer) *Object { return wrapObject(glib.TransferNone(ptr)) } func FromGstObjectUnsafeNone(ptr unsafe.Pointer) *Object { return wrapObject(glib.TransferNone(ptr)) }
// FromGstObjectUnsafeFull returns an Object wrapping the given pointer. It meant for internal // FromGstObjectUnsafeFull returns an Object wrapping the given pointer. It meant for internal
// usage and exported for visibility to other packages. // usage and exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstObjectUnsafeFull(ptr unsafe.Pointer) *Object { return wrapObject(glib.TransferFull(ptr)) } func FromGstObjectUnsafeFull(ptr unsafe.Pointer) *Object { return wrapObject(glib.TransferFull(ptr)) }
// Instance returns the native C GstObject. // Instance returns the native C GstObject.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) Instance() *C.GstObject { return C.toGstObject(o.Unsafe()) } func (o *Object) Instance() *C.GstObject { return C.toGstObject(o.Unsafe()) }
// BaseObject is a convenience method for retrieving this object from embedded structs. // BaseObject is a convenience method for retrieving this object from embedded structs.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) BaseObject() *Object { return o } func (o *Object) BaseObject() *Object { return o }
// GstObject is an alias to Instance on the underlying GstObject of any extending struct. // GstObject is an alias to Instance on the underlying GstObject of any extending struct.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) GstObject() *C.GstObject { return C.toGstObject(o.Unsafe()) } func (o *Object) GstObject() *C.GstObject { return C.toGstObject(o.Unsafe()) }
// GObject returns the underlying GObject instance. // GObject returns the underlying GObject instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) GObject() *glib.Object { return o.InitiallyUnowned.Object } func (o *Object) GObject() *glib.Object { return o.InitiallyUnowned.Object }
// GetName returns the name of this object. // GetName returns the name of this object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) GetName() string { func (o *Object) GetName() string {
cName := C.gst_object_get_name((*C.GstObject)(o.Instance())) cName := C.gst_object_get_name((*C.GstObject)(o.Instance()))
//cName could be NULL which needs to be freed using //cName could be NULL which needs to be freed using
@@ -41,11 +55,15 @@ func (o *Object) GetName() string {
} }
// GetParent retrieves the parent of this object. // GetParent retrieves the parent of this object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) GetParent() *Object { func (o *Object) GetParent() *Object {
return wrapObject(glib.Take(unsafe.Pointer(C.gst_object_get_parent(o.Instance())))) return wrapObject(glib.Take(unsafe.Pointer(C.gst_object_get_parent(o.Instance()))))
} }
// GetValue retrieves the value for the given controlled property at the given timestamp. // GetValue retrieves the value for the given controlled property at the given timestamp.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) GetValue(property string, timestamp ClockTime) *glib.Value { func (o *Object) GetValue(property string, timestamp ClockTime) *glib.Value {
cprop := C.CString(property) cprop := C.CString(property)
defer C.free(unsafe.Pointer(cprop)) defer C.free(unsafe.Pointer(cprop))
@@ -57,6 +75,8 @@ func (o *Object) GetValue(property string, timestamp ClockTime) *glib.Value {
} }
// SetName sets the name of this object. // SetName sets the name of this object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) SetName(name string) bool { func (o *Object) SetName(name string) bool {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -64,6 +84,8 @@ func (o *Object) SetName(name string) bool {
} }
// SetParent sets the parent of this object. // SetParent sets the parent of this object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) SetParent(parent *Object) bool { func (o *Object) SetParent(parent *Object) bool {
return gobool(C.gst_object_set_parent(o.Instance(), parent.Instance())) return gobool(C.gst_object_set_parent(o.Instance(), parent.Instance()))
} }
@@ -71,6 +93,8 @@ func (o *Object) SetParent(parent *Object) bool {
// SetArg sets the argument name to value on this object. Note that function silently returns // SetArg sets the argument name to value on this object. Note that function silently returns
// if object has no property named name or when value cannot be converted to the type for this // if object has no property named name or when value cannot be converted to the type for this
// property. // property.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) SetArg(name, value string) { func (o *Object) SetArg(name, value string) {
cName := C.CString(name) cName := C.CString(name)
cValue := C.CString(value) cValue := C.CString(value)
@@ -85,6 +109,8 @@ func (o *Object) SetArg(name, value string) {
// Log logs a message to the given category from this object using the currently registered // Log logs a message to the given category from this object using the currently registered
// debugging handlers. // debugging handlers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) Log(cat *DebugCategory, level DebugLevel, message string) { func (o *Object) Log(cat *DebugCategory, level DebugLevel, message string) {
cat.logDepth(level, message, 2, (*C.GObject)(o.Unsafe())) cat.logDepth(level, message, 2, (*C.GObject)(o.Unsafe()))
} }
@@ -92,6 +118,8 @@ func (o *Object) Log(cat *DebugCategory, level DebugLevel, message string) {
// Clear will will clear all references to this object. If the reference is already null // Clear will will clear all references to this object. If the reference is already null
// the the function does nothing. Otherwise the reference count is decreased and the pointer // the the function does nothing. Otherwise the reference count is decreased and the pointer
// set to null. // set to null.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) Clear() { func (o *Object) Clear() {
if ptr := o.Unsafe(); ptr != nil { if ptr := o.Unsafe(); ptr != nil {
C.gst_clear_object((**C.GstObject)(unsafe.Pointer(&ptr))) C.gst_clear_object((**C.GstObject)(unsafe.Pointer(&ptr)))
@@ -100,6 +128,8 @@ func (o *Object) Clear() {
// Ref increments the reference count on object. This function does not take the lock on object // Ref increments the reference count on object. This function does not take the lock on object
// because it relies on atomic refcounting. For convenience the same object is returned. // because it relies on atomic refcounting. For convenience the same object is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) Ref() *Object { func (o *Object) Ref() *Object {
C.gst_object_ref((C.gpointer)(o.Unsafe())) C.gst_object_ref((C.gpointer)(o.Unsafe()))
return o return o
@@ -107,14 +137,20 @@ func (o *Object) Ref() *Object {
// Unref decrements the reference count on object. If reference count hits zero, destroy object. // Unref decrements the reference count on object. If reference count hits zero, destroy object.
// This function does not take the lock on object as it relies on atomic refcounting. // This function does not take the lock on object as it relies on atomic refcounting.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) Unref() { func (o *Object) Unref() {
C.gst_object_unref((C.gpointer)(o.Unsafe())) C.gst_object_unref((C.gpointer)(o.Unsafe()))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) AddControlBinding(binding *ControlBinding) { func (o *Object) AddControlBinding(binding *ControlBinding) {
C.gst_object_add_control_binding(o.Instance(), binding.Instance()) C.gst_object_add_control_binding(o.Instance(), binding.Instance())
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) RemoveControlBinding(binding *ControlBinding) { func (o *Object) RemoveControlBinding(binding *ControlBinding) {
C.gst_object_remove_control_binding(o.Instance(), binding.Instance()) C.gst_object_remove_control_binding(o.Instance(), binding.Instance())
} }
@@ -124,16 +160,22 @@ func (o *Object) RemoveControlBinding(binding *ControlBinding) {
// and is not considered thread safe // and is not considered thread safe
// Has returns true if this GstObject has the given flags. // Has returns true if this GstObject has the given flags.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) hasFlags(flags uint32) bool { func (o *Object) hasFlags(flags uint32) bool {
return gobool(C.gstObjectFlagIsSet(o.Instance(), C.guint32(flags))) return gobool(C.gstObjectFlagIsSet(o.Instance(), C.guint32(flags)))
} }
// SetFlags sets the flags // SetFlags sets the flags
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) setFlags(flags uint32) { func (o *Object) setFlags(flags uint32) {
C.gstObjectFlagSet(o.Instance(), C.guint32(flags)) C.gstObjectFlagSet(o.Instance(), C.guint32(flags))
} }
// SetFlags unsets the flags // SetFlags unsets the flags
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (o *Object) unsetFlags(flags uint32) { func (o *Object) unsetFlags(flags uint32) {
C.gstObjectFlagUnset(o.Instance(), C.guint32(flags)) C.gstObjectFlagUnset(o.Instance(), C.guint32(flags))
} }

View File

@@ -94,6 +94,8 @@ import (
type PadFuncMap map[unsafe.Pointer]interface{} type PadFuncMap map[unsafe.Pointer]interface{}
// FuncForPad will return the function in this map for the given pad. // FuncForPad will return the function in this map for the given pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p PadFuncMap) FuncForPad(pad unsafe.Pointer) interface{} { func (p PadFuncMap) FuncForPad(pad unsafe.Pointer) interface{} {
for k, v := range p { for k, v := range p {
if gobool(C.padsAreEqual(k, pad)) { if gobool(C.padsAreEqual(k, pad)) {
@@ -104,6 +106,8 @@ func (p PadFuncMap) FuncForPad(pad unsafe.Pointer) interface{} {
} }
// RemoveFuncForPad will remove the function for the given pad from this map. // RemoveFuncForPad will remove the function for the given pad from this map.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p PadFuncMap) RemoveFuncForPad(pad unsafe.Pointer) { func (p PadFuncMap) RemoveFuncForPad(pad unsafe.Pointer) {
for k := range p { for k := range p {
if gobool(C.padsAreEqual(k, pad)) { if gobool(C.padsAreEqual(k, pad)) {
@@ -116,16 +120,22 @@ func (p PadFuncMap) RemoveFuncForPad(pad unsafe.Pointer) {
type Pad struct{ *Object } type Pad struct{ *Object }
// FromGstPadUnsafeFull wraps the given pad in a reference and finalizer. // FromGstPadUnsafeFull wraps the given pad in a reference and finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPadUnsafeFull(pad unsafe.Pointer) *Pad { func FromGstPadUnsafeFull(pad unsafe.Pointer) *Pad {
return &Pad{wrapObject(glib.TransferFull(pad))} return &Pad{wrapObject(glib.TransferFull(pad))}
} }
// FromGstPadUnsafeNone wraps the given pad in a finalizer. // FromGstPadUnsafeNone wraps the given pad in a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPadUnsafeNone(pad unsafe.Pointer) *Pad { func FromGstPadUnsafeNone(pad unsafe.Pointer) *Pad {
return &Pad{wrapObject(glib.TransferNone(pad))} return &Pad{wrapObject(glib.TransferNone(pad))}
} }
// NewPad returns a new pad with the given direction. If name is empty, one will be generated for you. // NewPad returns a new pad with the given direction. If name is empty, one will be generated for you.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPad(name string, direction PadDirection) *Pad { func NewPad(name string, direction PadDirection) *Pad {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -142,6 +152,8 @@ func NewPad(name string, direction PadDirection) *Pad {
// NewPadFromTemplate creates a new pad with the given name from the given template. If name is empty, one will // NewPadFromTemplate creates a new pad with the given name from the given template. If name is empty, one will
// be generated for you. // be generated for you.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPadFromTemplate(tmpl *PadTemplate, name string) *Pad { func NewPadFromTemplate(tmpl *PadTemplate, name string) *Pad {
var cName *C.gchar var cName *C.gchar
if name != "" { if name != "" {
@@ -157,19 +169,27 @@ func NewPadFromTemplate(tmpl *PadTemplate, name string) *Pad {
} }
// Instance returns the underlying C GstPad. // Instance returns the underlying C GstPad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Instance() *C.GstPad { return C.toGstPad(p.Unsafe()) } func (p *Pad) Instance() *C.GstPad { return C.toGstPad(p.Unsafe()) }
// Direction returns the direction of this pad. // Direction returns the direction of this pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Direction() PadDirection { func (p *Pad) Direction() PadDirection {
return PadDirection(C.gst_pad_get_direction((*C.GstPad)(p.Instance()))) return PadDirection(C.gst_pad_get_direction((*C.GstPad)(p.Instance())))
} }
// Template returns the template for this pad or nil. // Template returns the template for this pad or nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Template() *PadTemplate { func (p *Pad) Template() *PadTemplate {
return wrapPadTemplate(toGObject(unsafe.Pointer(p.Instance().padtemplate))) return wrapPadTemplate(toGObject(unsafe.Pointer(p.Instance().padtemplate)))
} }
// CurrentCaps returns the caps for this Pad or nil. // CurrentCaps returns the caps for this Pad or nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) CurrentCaps() *Caps { func (p *Pad) CurrentCaps() *Caps {
caps := C.gst_pad_get_current_caps((*C.GstPad)(p.Instance())) caps := C.gst_pad_get_current_caps((*C.GstPad)(p.Instance()))
if caps == nil { if caps == nil {
@@ -182,6 +202,8 @@ func (p *Pad) CurrentCaps() *Caps {
// For use from within pad activation functions only. // For use from within pad activation functions only.
// //
// If you don't know what this is, you probably don't want to call it. // If you don't know what this is, you probably don't want to call it.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) ActivateMode(mode PadMode, active bool) { func (p *Pad) ActivateMode(mode PadMode, active bool) {
C.gst_pad_activate_mode(p.Instance(), C.GstPadMode(mode), gboolean(active)) C.gst_pad_activate_mode(p.Instance(), C.GstPadMode(mode), gboolean(active))
} }
@@ -196,6 +218,8 @@ type PadProbeCallback func(*Pad, *PadProbeInfo) PadProbeReturn
// In each of the groups, probes are called in the order in which they were added. // In each of the groups, probes are called in the order in which they were added.
// //
// A probe ID is returned that can be used to remove the probe. // A probe ID is returned that can be used to remove the probe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) AddProbe(mask PadProbeType, f PadProbeCallback) uint64 { func (p *Pad) AddProbe(mask PadProbeType, f PadProbeCallback) uint64 {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
@@ -212,6 +236,8 @@ func (p *Pad) AddProbe(mask PadProbeType, f PadProbeCallback) uint64 {
} }
// CanLink checks if this pad is compatible with the given sink pad. // CanLink checks if this pad is compatible with the given sink pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) CanLink(sink *Pad) bool { func (p *Pad) CanLink(sink *Pad) bool {
return gobool(C.gst_pad_can_link(p.Instance(), sink.Instance())) return gobool(C.gst_pad_can_link(p.Instance(), sink.Instance()))
} }
@@ -226,6 +252,8 @@ func (p *Pad) CanLink(sink *Pad) bool {
// the caller. FlowNotSupported is returned if pad has no chain function. // the caller. FlowNotSupported is returned if pad has no chain function.
// //
// In all cases, success or failure, the caller loses its reference to buffer after calling this function. // In all cases, success or failure, the caller loses its reference to buffer after calling this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Chain(buffer *Buffer) FlowReturn { func (p *Pad) Chain(buffer *Buffer) FlowReturn {
return FlowReturn(C.gst_pad_chain(p.Instance(), buffer.Ref().Instance())) return FlowReturn(C.gst_pad_chain(p.Instance(), buffer.Ref().Instance()))
} }
@@ -240,11 +268,15 @@ func (p *Pad) Chain(buffer *Buffer) FlowReturn {
// to the caller. FlowNotSupported is returned if pad has no chainlist function. // to the caller. FlowNotSupported is returned if pad has no chainlist function.
// //
// In all cases, success or failure, the caller loses its reference to list after calling this function. // In all cases, success or failure, the caller loses its reference to list after calling this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) ChainList(bufferList *BufferList) FlowReturn { func (p *Pad) ChainList(bufferList *BufferList) FlowReturn {
return FlowReturn(C.gst_pad_chain_list(p.Instance(), bufferList.Ref().Instance())) return FlowReturn(C.gst_pad_chain_list(p.Instance(), bufferList.Ref().Instance()))
} }
// CheckReconfigure checks and clear the PadFlagNeedReconfigure flag on pad and return TRUE if the flag was set. // CheckReconfigure checks and clear the PadFlagNeedReconfigure flag on pad and return TRUE if the flag was set.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) CheckReconfigure() bool { func (p *Pad) CheckReconfigure() bool {
return gobool(C.gst_pad_check_reconfigure(p.Instance())) return gobool(C.gst_pad_check_reconfigure(p.Instance()))
} }
@@ -259,6 +291,8 @@ func (p *Pad) CheckReconfigure() bool {
// //
// Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as // Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as
// by using the format %03u instead of %u. // by using the format %03u instead of %u.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) CreateStreamID(parent *Element, streamID string) string { func (p *Pad) CreateStreamID(parent *Element, streamID string) string {
var gstreamID *C.gchar var gstreamID *C.gchar
if streamID != "" { if streamID != "" {
@@ -279,6 +313,8 @@ func (p *Pad) CreateStreamID(parent *Element, streamID string) string {
// The EOS event will pause the task associated with pad before it is forwarded to all internally linked pads, // The EOS event will pause the task associated with pad before it is forwarded to all internally linked pads,
// //
// The event is sent to all pads internally linked to pad. This function takes ownership of event. // The event is sent to all pads internally linked to pad. This function takes ownership of event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) EventDefault(parent *Object, event *Event) bool { func (p *Pad) EventDefault(parent *Object, event *Event) bool {
if parent == nil { if parent == nil {
return gobool(C.gst_pad_event_default(p.Instance(), nil, event.Ref().Instance())) return gobool(C.gst_pad_event_default(p.Instance(), nil, event.Ref().Instance()))
@@ -294,6 +330,8 @@ type PadForwardFunc func(pad *Pad) bool
// that the forward function is only called once for each pad. // that the forward function is only called once for each pad.
// //
// When forward returns TRUE, no further pads will be processed. // When forward returns TRUE, no further pads will be processed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Forward(f PadForwardFunc) bool { func (p *Pad) Forward(f PadForwardFunc) bool {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -308,6 +346,8 @@ func (p *Pad) Forward(f PadForwardFunc) bool {
// //
// The allowed capabilities is calculated as the intersection of the results of calling QueryCaps on pad and its peer. The caller owns a reference on the // The allowed capabilities is calculated as the intersection of the results of calling QueryCaps on pad and its peer. The caller owns a reference on the
// resulting caps. // resulting caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetAllowedCaps() *Caps { func (p *Pad) GetAllowedCaps() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_get_allowed_caps( return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_get_allowed_caps(
p.Instance(), p.Instance(),
@@ -315,6 +355,8 @@ func (p *Pad) GetAllowedCaps() *Caps {
} }
// GetCurrentCaps gets the capabilities currently configured on pad with the last EventCaps event. // GetCurrentCaps gets the capabilities currently configured on pad with the last EventCaps event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetCurrentCaps() *Caps { func (p *Pad) GetCurrentCaps() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_get_current_caps( return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_get_current_caps(
p.Instance(), p.Instance(),
@@ -322,17 +364,23 @@ func (p *Pad) GetCurrentCaps() *Caps {
} }
// GetDirection gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK. // GetDirection gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetDirection() PadDirection { func (p *Pad) GetDirection() PadDirection {
return PadDirection(C.gst_pad_get_direction(p.Instance())) return PadDirection(C.gst_pad_get_direction(p.Instance()))
} }
// GetElementPrivate gets the private data of a pad. No locking is performed in this function. // GetElementPrivate gets the private data of a pad. No locking is performed in this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetElementPrivate() interface{} { func (p *Pad) GetElementPrivate() interface{} {
ptr := C.gst_pad_get_element_private(p.Instance()) ptr := C.gst_pad_get_element_private(p.Instance())
return gopointer.Restore(unsafe.Pointer(ptr)) return gopointer.Restore(unsafe.Pointer(ptr))
} }
// GetLastFlowReturn gets the FlowReturn return from the last data passed by this pad. // GetLastFlowReturn gets the FlowReturn return from the last data passed by this pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetLastFlowReturn() FlowReturn { func (p *Pad) GetLastFlowReturn() FlowReturn {
return FlowReturn(C.gst_pad_get_last_flow_return( return FlowReturn(C.gst_pad_get_last_flow_return(
p.Instance(), p.Instance(),
@@ -340,11 +388,15 @@ func (p *Pad) GetLastFlowReturn() FlowReturn {
} }
// GetOffset gets the offset applied to the running time of pad. pad has to be a source pad. // GetOffset gets the offset applied to the running time of pad. pad has to be a source pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetOffset() int64 { func (p *Pad) GetOffset() int64 {
return int64(C.gst_pad_get_offset(p.Instance())) return int64(C.gst_pad_get_offset(p.Instance()))
} }
// GetPadTemplate gets the template for this pad. // GetPadTemplate gets the template for this pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetPadTemplate() *PadTemplate { func (p *Pad) GetPadTemplate() *PadTemplate {
tmpl := C.gst_pad_get_pad_template(p.Instance()) tmpl := C.gst_pad_get_pad_template(p.Instance())
if tmpl == nil { if tmpl == nil {
@@ -354,6 +406,8 @@ func (p *Pad) GetPadTemplate() *PadTemplate {
} }
// GetPadTemplateCaps gets the capabilities for pad's template. // GetPadTemplateCaps gets the capabilities for pad's template.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetPadTemplateCaps() *Caps { func (p *Pad) GetPadTemplateCaps() *Caps {
caps := C.gst_pad_get_pad_template_caps(p.Instance()) caps := C.gst_pad_get_pad_template_caps(p.Instance())
if caps == nil { if caps == nil {
@@ -364,6 +418,8 @@ func (p *Pad) GetPadTemplateCaps() *Caps {
// GetParentElement gets the parent of pad, cast to a Element. If a pad has no parent or its // GetParentElement gets the parent of pad, cast to a Element. If a pad has no parent or its
// parent is not an element, return nil. // parent is not an element, return nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetParentElement() *Element { func (p *Pad) GetParentElement() *Element {
elem := C.gst_pad_get_parent_element(p.Instance()) elem := C.gst_pad_get_parent_element(p.Instance())
if elem == nil { if elem == nil {
@@ -373,6 +429,8 @@ func (p *Pad) GetParentElement() *Element {
} }
// GetPeer gets the peer of pad. // GetPeer gets the peer of pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetPeer() *Pad { func (p *Pad) GetPeer() *Pad {
peer := C.gst_pad_get_peer(p.Instance()) peer := C.gst_pad_get_peer(p.Instance())
if peer == nil { if peer == nil {
@@ -398,6 +456,8 @@ func (p *Pad) GetPeer() *Pad {
// When this function returns any other result value than FlowOK, buffer will be unchanged. // When this function returns any other result value than FlowOK, buffer will be unchanged.
// //
// This is a lowlevel function. Usually PullRange is used. // This is a lowlevel function. Usually PullRange is used.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetRange(offset uint64, size uint, buffer *Buffer) (FlowReturn, *Buffer) { func (p *Pad) GetRange(offset uint64, size uint, buffer *Buffer) (FlowReturn, *Buffer) {
var buf *C.GstBuffer var buf *C.GstBuffer
if buffer != nil { if buffer != nil {
@@ -414,6 +474,8 @@ func (p *Pad) GetRange(offset uint64, size uint, buffer *Buffer) (FlowReturn, *B
} }
// GetStickyEvent returns a new reference of the sticky event of type event_type from the event. // GetStickyEvent returns a new reference of the sticky event of type event_type from the event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetStickyEvent(eventType EventType, idx uint) *Event { func (p *Pad) GetStickyEvent(eventType EventType, idx uint) *Event {
ev := C.gst_pad_get_sticky_event(p.Instance(), C.GstEventType(eventType), C.guint(idx)) ev := C.gst_pad_get_sticky_event(p.Instance(), C.GstEventType(eventType), C.guint(idx))
if ev == nil { if ev == nil {
@@ -426,6 +488,8 @@ func (p *Pad) GetStickyEvent(eventType EventType, idx uint) *Event {
// stream-start event yet. // stream-start event yet.
// //
// This is a convenience wrapper around GetStickyEvent and Event ParseStream. // This is a convenience wrapper around GetStickyEvent and Event ParseStream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetStream() *Stream { func (p *Pad) GetStream() *Stream {
st := C.gst_pad_get_stream(p.Instance()) st := C.gst_pad_get_stream(p.Instance())
if st == nil { if st == nil {
@@ -440,6 +504,8 @@ func (p *Pad) GetStream() *Stream {
// This is a convenience wrapper around gst_pad_get_sticky_event and gst_event_parse_stream_start. // This is a convenience wrapper around gst_pad_get_sticky_event and gst_event_parse_stream_start.
// //
// The returned stream-id string should be treated as an opaque string, its contents should not be interpreted. // The returned stream-id string should be treated as an opaque string, its contents should not be interpreted.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetStreamID() string { func (p *Pad) GetStreamID() string {
id := C.gst_pad_get_stream_id(p.Instance()) id := C.gst_pad_get_stream_id(p.Instance())
if id == nil { if id == nil {
@@ -450,38 +516,52 @@ func (p *Pad) GetStreamID() string {
} }
// GetTaskState gets the pad task state. If no task is currently set, TaskStopped is returned. // GetTaskState gets the pad task state. If no task is currently set, TaskStopped is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetTaskState() TaskState { func (p *Pad) GetTaskState() TaskState {
return TaskState(C.gst_pad_get_task_state(p.Instance())) return TaskState(C.gst_pad_get_task_state(p.Instance()))
} }
// HasCurrentCaps checks if pad has caps set on it with a GST_EVENT_CAPS event. // HasCurrentCaps checks if pad has caps set on it with a GST_EVENT_CAPS event.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) HasCurrentCaps() bool { func (p *Pad) HasCurrentCaps() bool {
return gobool(C.gst_pad_has_current_caps(p.Instance())) return gobool(C.gst_pad_has_current_caps(p.Instance()))
} }
// IsActive queries if a pad is active // IsActive queries if a pad is active
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) IsActive() bool { func (p *Pad) IsActive() bool {
return gobool(C.gst_pad_is_active(p.Instance())) return gobool(C.gst_pad_is_active(p.Instance()))
} }
// IsBlocked checks if the pad is blocked or not. This function returns the last requested state of the pad. It is not certain that // IsBlocked checks if the pad is blocked or not. This function returns the last requested state of the pad. It is not certain that
// the pad is actually blocking at this point (see IsBlocking). // the pad is actually blocking at this point (see IsBlocking).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) IsBlocked() bool { func (p *Pad) IsBlocked() bool {
return gobool(C.gst_pad_is_blocked(p.Instance())) return gobool(C.gst_pad_is_blocked(p.Instance()))
} }
// IsBlocking checks if the pad is blocking or not. This is a guaranteed state of whether the pad is actually blocking on a GstBuffer // IsBlocking checks if the pad is blocking or not. This is a guaranteed state of whether the pad is actually blocking on a GstBuffer
// or a GstEvent. // or a GstEvent.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) IsBlocking() bool { func (p *Pad) IsBlocking() bool {
return gobool(C.gst_pad_is_blocking(p.Instance())) return gobool(C.gst_pad_is_blocking(p.Instance()))
} }
// IsLinked checks if a pad is linked to another pad or not. // IsLinked checks if a pad is linked to another pad or not.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) IsLinked() bool { func (p *Pad) IsLinked() bool {
return gobool(C.gst_pad_is_linked(p.Instance())) return gobool(C.gst_pad_is_linked(p.Instance()))
} }
// GetInternalLinks gets the pads to which the given pad is linked to inside of the parent element. // GetInternalLinks gets the pads to which the given pad is linked to inside of the parent element.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetInternalLinks() ([]*Pad, error) { func (p *Pad) GetInternalLinks() ([]*Pad, error) {
iterator := C.gst_pad_iterate_internal_links(p.Instance()) iterator := C.gst_pad_iterate_internal_links(p.Instance())
if iterator == nil { if iterator == nil {
@@ -492,6 +572,8 @@ func (p *Pad) GetInternalLinks() ([]*Pad, error) {
// GetInternalLinksDefault gets the list of pads to which the given pad is linked to inside of the parent element. This is the default // GetInternalLinksDefault gets the list of pads to which the given pad is linked to inside of the parent element. This is the default
// handler, and thus returns all of the pads inside the parent element with opposite direction. // handler, and thus returns all of the pads inside the parent element with opposite direction.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) GetInternalLinksDefault(parent *Object) ([]*Pad, error) { func (p *Pad) GetInternalLinksDefault(parent *Object) ([]*Pad, error) {
iterator := C.gst_pad_iterate_internal_links_default(p.Instance(), parent.Instance()) iterator := C.gst_pad_iterate_internal_links_default(p.Instance(), parent.Instance())
if iterator == nil { if iterator == nil {
@@ -501,6 +583,8 @@ func (p *Pad) GetInternalLinksDefault(parent *Object) ([]*Pad, error) {
} }
// Link links a sink pad to this source pad. // Link links a sink pad to this source pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Link(sink *Pad) PadLinkReturn { func (p *Pad) Link(sink *Pad) PadLinkReturn {
return PadLinkReturn(C.gst_pad_link(p.Instance(), sink.Instance())) return PadLinkReturn(C.gst_pad_link(p.Instance(), sink.Instance()))
} }
@@ -510,6 +594,8 @@ func (p *Pad) Link(sink *Pad) PadLinkReturn {
// This variant of Link provides a more granular control on the checks being done when linking. While providing some considerable speedups // This variant of Link provides a more granular control on the checks being done when linking. While providing some considerable speedups
// the caller of this method must be aware that wrong usage of those flags can cause severe issues. Refer to the documentation of GstPadLinkCheck // the caller of this method must be aware that wrong usage of those flags can cause severe issues. Refer to the documentation of GstPadLinkCheck
// for more information. // for more information.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) LinkFull(sink *Pad, flags PadLinkCheck) PadLinkReturn { func (p *Pad) LinkFull(sink *Pad, flags PadLinkCheck) PadLinkReturn {
return PadLinkReturn(C.gst_pad_link_full(p.Instance(), sink.Instance(), C.GstPadLinkCheck(flags))) return PadLinkReturn(C.gst_pad_link_full(p.Instance(), sink.Instance(), C.GstPadLinkCheck(flags)))
} }
@@ -519,6 +605,8 @@ func (p *Pad) LinkFull(sink *Pad, flags PadLinkCheck) PadLinkReturn {
// This is a convenience function to save having to create and add intermediate GstGhostPad's as required for linking across GstBin boundaries. // This is a convenience function to save having to create and add intermediate GstGhostPad's as required for linking across GstBin boundaries.
// //
// If src or sink pads don't have parent elements or do not share a common ancestor, the link will fail. // If src or sink pads don't have parent elements or do not share a common ancestor, the link will fail.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) LinkMaybeGhosting(sink *Pad) bool { func (p *Pad) LinkMaybeGhosting(sink *Pad) bool {
return gobool(C.gst_pad_link_maybe_ghosting(p.Instance(), sink.Instance())) return gobool(C.gst_pad_link_maybe_ghosting(p.Instance(), sink.Instance()))
} }
@@ -530,22 +618,30 @@ func (p *Pad) LinkMaybeGhosting(sink *Pad) bool {
// If src or sink pads don't have parent elements or do not share a common ancestor, the link will fail. // If src or sink pads don't have parent elements or do not share a common ancestor, the link will fail.
// //
// Calling LinkMaybeGhostingFull with flags == PadLinkCheckDefault is the recommended way of linking pads with safety checks applied. // Calling LinkMaybeGhostingFull with flags == PadLinkCheckDefault is the recommended way of linking pads with safety checks applied.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) LinkMaybeGhostingFull(sink *Pad, flags PadLinkCheck) bool { func (p *Pad) LinkMaybeGhostingFull(sink *Pad, flags PadLinkCheck) bool {
return gobool(C.gst_pad_link_maybe_ghosting_full(p.Instance(), sink.Instance(), C.GstPadLinkCheck(flags))) return gobool(C.gst_pad_link_maybe_ghosting_full(p.Instance(), sink.Instance(), C.GstPadLinkCheck(flags)))
} }
// MarkReconfigure marks this pad for needing reconfiguration. The next call to CheckReconfigure will return TRUE after this call. // MarkReconfigure marks this pad for needing reconfiguration. The next call to CheckReconfigure will return TRUE after this call.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) MarkReconfigure() { func (p *Pad) MarkReconfigure() {
C.gst_pad_mark_reconfigure(p.Instance()) C.gst_pad_mark_reconfigure(p.Instance())
} }
// NeedsReconfigure checks the GST_PAD_FLAG_NEED_RECONFIGURE flag on pad and return TRUE if the flag was set. // NeedsReconfigure checks the GST_PAD_FLAG_NEED_RECONFIGURE flag on pad and return TRUE if the flag was set.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) NeedsReconfigure() bool { func (p *Pad) NeedsReconfigure() bool {
return gobool(C.gst_pad_needs_reconfigure(p.Instance())) return gobool(C.gst_pad_needs_reconfigure(p.Instance()))
} }
// PauseTask pauses the task of pad. This function will also wait until the function executed by the task is finished if this function is not called // PauseTask pauses the task of pad. This function will also wait until the function executed by the task is finished if this function is not called
// from the task function. // from the task function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PauseTask() bool { func (p *Pad) PauseTask() bool {
return gobool(C.gst_pad_pause_task(p.Instance())) return gobool(C.gst_pad_pause_task(p.Instance()))
} }
@@ -553,11 +649,15 @@ func (p *Pad) PauseTask() bool {
// PeerQuery performs PadQuery on the peer of pad. // PeerQuery performs PadQuery on the peer of pad.
// //
// The caller is responsible for both the allocation and deallocation of the query structure. // The caller is responsible for both the allocation and deallocation of the query structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PeerQuery(query *Query) bool { func (p *Pad) PeerQuery(query *Query) bool {
return gobool(C.gst_pad_peer_query(p.Instance(), query.Instance())) return gobool(C.gst_pad_peer_query(p.Instance(), query.Instance()))
} }
// PeerQueryAcceptCaps checks if the peer of pad accepts caps. If pad has no peer, this function returns TRUE. // PeerQueryAcceptCaps checks if the peer of pad accepts caps. If pad has no peer, this function returns TRUE.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PeerQueryAcceptCaps(caps *Caps) bool { func (p *Pad) PeerQueryAcceptCaps(caps *Caps) bool {
return gobool(C.gst_pad_peer_query_accept_caps(p.Instance(), caps.Instance())) return gobool(C.gst_pad_peer_query_accept_caps(p.Instance(), caps.Instance()))
} }
@@ -567,6 +667,8 @@ func (p *Pad) PeerQueryAcceptCaps(caps *Caps) bool {
// When called on srcpads filter contains the caps that upstream could produce in the order preferred by upstream. // When called on srcpads filter contains the caps that upstream could produce in the order preferred by upstream.
// When called on sinkpads filter contains the caps accepted by downstream in the preferred order. filter might be nil but if it is not nil // When called on sinkpads filter contains the caps accepted by downstream in the preferred order. filter might be nil but if it is not nil
// the returned caps will be a subset of filter. // the returned caps will be a subset of filter.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PeerQueryCaps(filter *Caps) *Caps { func (p *Pad) PeerQueryCaps(filter *Caps) *Caps {
var caps *C.GstCaps var caps *C.GstCaps
if filter == nil { if filter == nil {
@@ -581,6 +683,8 @@ func (p *Pad) PeerQueryCaps(filter *Caps) *Caps {
} }
// PeerQueryConvert queries the peer pad of a given sink pad to convert src_val in src_format to dest_format. // PeerQueryConvert queries the peer pad of a given sink pad to convert src_val in src_format to dest_format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PeerQueryConvert(srcFormat, destFormat Format, srcVal int64) (bool, int64) { func (p *Pad) PeerQueryConvert(srcFormat, destFormat Format, srcVal int64) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_pad_peer_query_convert(p.Instance(), C.GstFormat(srcFormat), C.gint64(srcVal), C.GstFormat(destFormat), &out) gok := C.gst_pad_peer_query_convert(p.Instance(), C.GstFormat(srcFormat), C.gint64(srcVal), C.GstFormat(destFormat), &out)
@@ -588,6 +692,8 @@ func (p *Pad) PeerQueryConvert(srcFormat, destFormat Format, srcVal int64) (bool
} }
// PeerQueryDuration queries the peer pad of a given sink pad for the total stream duration. // PeerQueryDuration queries the peer pad of a given sink pad for the total stream duration.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PeerQueryDuration(format Format) (bool, int64) { func (p *Pad) PeerQueryDuration(format Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_pad_peer_query_duration(p.Instance(), C.GstFormat(format), &out) gok := C.gst_pad_peer_query_duration(p.Instance(), C.GstFormat(format), &out)
@@ -595,6 +701,8 @@ func (p *Pad) PeerQueryDuration(format Format) (bool, int64) {
} }
// PeerQueryPosition queries the peer of a given sink pad for the stream position. // PeerQueryPosition queries the peer of a given sink pad for the stream position.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PeerQueryPosition(format Format) (bool, int64) { func (p *Pad) PeerQueryPosition(format Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_pad_peer_query_position(p.Instance(), C.GstFormat(format), &out) gok := C.gst_pad_peer_query_position(p.Instance(), C.GstFormat(format), &out)
@@ -605,6 +713,8 @@ func (p *Pad) PeerQueryPosition(format Format) (bool, int64) {
// //
// This function is useful as a default accept caps query function for an element that can handle any stream format, but requires caps that // This function is useful as a default accept caps query function for an element that can handle any stream format, but requires caps that
// are acceptable for all opposite pads. // are acceptable for all opposite pads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) ProxyQueryAcceptCaps(query *Query) bool { func (p *Pad) ProxyQueryAcceptCaps(query *Query) bool {
return gobool(C.gst_pad_proxy_query_accept_caps(p.Instance(), query.Instance())) return gobool(C.gst_pad_proxy_query_accept_caps(p.Instance(), query.Instance()))
} }
@@ -613,6 +723,8 @@ func (p *Pad) ProxyQueryAcceptCaps(query *Query) bool {
// //
// This function is useful as a default caps query function for an element that can handle any stream format, but requires all its pads to have // This function is useful as a default caps query function for an element that can handle any stream format, but requires all its pads to have
// the same caps. Two such elements are tee and adder. // the same caps. Two such elements are tee and adder.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) ProxyQueryCaps(query *Query) bool { func (p *Pad) ProxyQueryCaps(query *Query) bool {
return gobool(C.gst_pad_proxy_query_caps(p.Instance(), query.Instance())) return gobool(C.gst_pad_proxy_query_caps(p.Instance(), query.Instance()))
} }
@@ -633,6 +745,8 @@ func (p *Pad) ProxyQueryCaps(query *Query) bool {
// //
// Note that less than size bytes can be returned in buffer when, for example, an EOS condition is near or when buffer is not large enough to hold size bytes. // Note that less than size bytes can be returned in buffer when, for example, an EOS condition is near or when buffer is not large enough to hold size bytes.
// The caller should check the result buffer size to get the result size. // The caller should check the result buffer size to get the result size.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PullRange(offset uint64, size uint, buffer *Buffer) (FlowReturn, *Buffer) { func (p *Pad) PullRange(offset uint64, size uint, buffer *Buffer) (FlowReturn, *Buffer) {
var buf *C.GstBuffer var buf *C.GstBuffer
if buffer != nil { if buffer != nil {
@@ -655,6 +769,8 @@ func (p *Pad) PullRange(offset uint64, size uint, buffer *Buffer) (FlowReturn, *
// The function proceeds calling Chain on the peer pad and returns the value from that function. If pad has no peer, GST_FLOW_NOT_LINKED will be returned. // The function proceeds calling Chain on the peer pad and returns the value from that function. If pad has no peer, GST_FLOW_NOT_LINKED will be returned.
// //
// In all cases, success or failure, the caller loses its reference to buffer after calling this function. // In all cases, success or failure, the caller loses its reference to buffer after calling this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Push(buf *Buffer) FlowReturn { func (p *Pad) Push(buf *Buffer) FlowReturn {
return FlowReturn(C.gst_pad_push(p.Instance(), buf.Ref().Instance())) return FlowReturn(C.gst_pad_push(p.Instance(), buf.Ref().Instance()))
} }
@@ -662,6 +778,8 @@ func (p *Pad) Push(buf *Buffer) FlowReturn {
// PushEvent sends the event to the peer of the given pad. This function is mainly used by elements to send events to their peer elements. // PushEvent sends the event to the peer of the given pad. This function is mainly used by elements to send events to their peer elements.
// //
// This function takes ownership of the provided event so you should Ref it if you want to reuse the event after this call. // This function takes ownership of the provided event so you should Ref it if you want to reuse the event after this call.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PushEvent(ev *Event) bool { func (p *Pad) PushEvent(ev *Event) bool {
return gobool(C.gst_pad_push_event(p.Instance(), ev.Ref().Instance())) return gobool(C.gst_pad_push_event(p.Instance(), ev.Ref().Instance()))
} }
@@ -675,6 +793,8 @@ func (p *Pad) PushEvent(ev *Event) bool {
// Chain. // Chain.
// //
// In all cases, success or failure, the caller loses its reference to list after calling this function. // In all cases, success or failure, the caller loses its reference to list after calling this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) PushList(bufList *BufferList) FlowReturn { func (p *Pad) PushList(bufList *BufferList) FlowReturn {
return FlowReturn(C.gst_pad_push_list(p.Instance(), bufList.Ref().Instance())) return FlowReturn(C.gst_pad_push_list(p.Instance(), bufList.Ref().Instance()))
} }
@@ -685,11 +805,15 @@ func (p *Pad) PushList(bufList *BufferList) FlowReturn {
// Again, the caller is responsible for both the allocation and deallocation of the query structure. // Again, the caller is responsible for both the allocation and deallocation of the query structure.
// //
// Please also note that some queries might need a running pipeline to work. // Please also note that some queries might need a running pipeline to work.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Query(query *Query) bool { func (p *Pad) Query(query *Query) bool {
return gobool(C.gst_pad_query(p.Instance(), query.Instance())) return gobool(C.gst_pad_query(p.Instance(), query.Instance()))
} }
// QueryAcceptCaps checks if the given pad accepts the caps. // QueryAcceptCaps checks if the given pad accepts the caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) QueryAcceptCaps(caps *Caps) bool { func (p *Pad) QueryAcceptCaps(caps *Caps) bool {
return gobool(C.gst_pad_query_accept_caps(p.Instance(), caps.Instance())) return gobool(C.gst_pad_query_accept_caps(p.Instance(), caps.Instance()))
} }
@@ -702,6 +826,8 @@ func (p *Pad) QueryAcceptCaps(caps *Caps) bool {
// downstream in the preferred order. filter might be NULL but if it is not NULL the returned caps will be a subset of filter. // downstream in the preferred order. filter might be NULL but if it is not NULL the returned caps will be a subset of filter.
// //
// Note that this function does not return writable GstCaps, use gst_caps_make_writable before modifying the caps. // Note that this function does not return writable GstCaps, use gst_caps_make_writable before modifying the caps.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) QueryCaps(filter *Caps) *Caps { func (p *Pad) QueryCaps(filter *Caps) *Caps {
var caps *C.GstCaps var caps *C.GstCaps
if filter == nil { if filter == nil {
@@ -716,6 +842,8 @@ func (p *Pad) QueryCaps(filter *Caps) *Caps {
} }
// QueryConvert queries a pad to convert src_val in src_format to dest_format. // QueryConvert queries a pad to convert src_val in src_format to dest_format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) QueryConvert(srcFormat, destFormat Format, srcVal int64) (bool, int64) { func (p *Pad) QueryConvert(srcFormat, destFormat Format, srcVal int64) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_pad_query_convert(p.Instance(), C.GstFormat(srcFormat), C.gint64(srcVal), C.GstFormat(destFormat), &out) gok := C.gst_pad_query_convert(p.Instance(), C.GstFormat(srcFormat), C.gint64(srcVal), C.GstFormat(destFormat), &out)
@@ -724,11 +852,15 @@ func (p *Pad) QueryConvert(srcFormat, destFormat Format, srcVal int64) (bool, in
// QueryDefault invokes the default query handler for the given pad. The query is sent to all pads internally linked to pad. Note that if there are many possible sink pads that are // QueryDefault invokes the default query handler for the given pad. The query is sent to all pads internally linked to pad. Note that if there are many possible sink pads that are
// internally linked to pad, only one will be sent the query. Multi-sinkpad elements should implement custom query handlers. // internally linked to pad, only one will be sent the query. Multi-sinkpad elements should implement custom query handlers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) QueryDefault(parent *Object, query *Query) bool { func (p *Pad) QueryDefault(parent *Object, query *Query) bool {
return gobool(C.gst_pad_query_default(p.Instance(), parent.Instance(), query.Instance())) return gobool(C.gst_pad_query_default(p.Instance(), parent.Instance(), query.Instance()))
} }
// QueryDuration queries a pad for the total stream duration. // QueryDuration queries a pad for the total stream duration.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) QueryDuration(format Format) (bool, int64) { func (p *Pad) QueryDuration(format Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_pad_query_duration(p.Instance(), C.GstFormat(format), &out) gok := C.gst_pad_query_duration(p.Instance(), C.GstFormat(format), &out)
@@ -736,6 +868,8 @@ func (p *Pad) QueryDuration(format Format) (bool, int64) {
} }
// QueryPosition queries a pad for the stream position. // QueryPosition queries a pad for the stream position.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) QueryPosition(format Format) (bool, int64) { func (p *Pad) QueryPosition(format Format) (bool, int64) {
var out C.gint64 var out C.gint64
gok := C.gst_pad_query_position(p.Instance(), C.GstFormat(format), &out) gok := C.gst_pad_query_position(p.Instance(), C.GstFormat(format), &out)
@@ -743,6 +877,8 @@ func (p *Pad) QueryPosition(format Format) (bool, int64) {
} }
// RemoveProbe removes the probe with id from pad. // RemoveProbe removes the probe with id from pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) RemoveProbe(id uint64) { func (p *Pad) RemoveProbe(id uint64) {
C.gst_pad_remove_probe(p.Instance(), C.gulong(id)) C.gst_pad_remove_probe(p.Instance(), C.gulong(id))
} }
@@ -759,10 +895,14 @@ func (p *Pad) RemoveProbe(id uint64) {
// need to bother itself with this information; the core handles all necessary locks and checks. // need to bother itself with this information; the core handles all necessary locks and checks.
// //
// This function takes ownership of the provided event so you should gst_event_ref it if you want to reuse the event after this call. // This function takes ownership of the provided event so you should gst_event_ref it if you want to reuse the event after this call.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SendEvent(ev *Event) bool { func (p *Pad) SendEvent(ev *Event) bool {
return gobool(C.gst_pad_send_event(p.Instance(), ev.Ref().Instance())) return gobool(C.gst_pad_send_event(p.Instance(), ev.Ref().Instance()))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) registerCallback(f interface{}, fmap PadFuncMap) *C.PadDestroyNotifyInfo { func (p *Pad) registerCallback(f interface{}, fmap PadFuncMap) *C.PadDestroyNotifyInfo {
selfPtr := p.Unsafe() selfPtr := p.Unsafe()
@@ -784,6 +924,8 @@ var padActivateFuncs PadFuncMap = make(PadFuncMap)
// SetActivateFunction sets the given active function on the pad. The activate function will dispatch to ActivateMode to perform // SetActivateFunction sets the given active function on the pad. The activate function will dispatch to ActivateMode to perform
// the actual activation. Only makes sense to set on sink pads. // the actual activation. Only makes sense to set on sink pads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetActivateFunction(f PadActivateFunc) { func (p *Pad) SetActivateFunction(f PadActivateFunc) {
notifyInfo := p.registerCallback(f, padActivateFuncs) notifyInfo := p.registerCallback(f, padActivateFuncs)
C.gst_pad_set_activate_function_full( C.gst_pad_set_activate_function_full(
@@ -801,6 +943,8 @@ var padActivateModeFuncs PadFuncMap = make(PadFuncMap)
// SetActivateModeFunction sets the given activate_mode function for the pad. An activate_mode function prepares // SetActivateModeFunction sets the given activate_mode function for the pad. An activate_mode function prepares
// the element for data passing. // the element for data passing.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetActivateModeFunction(f PadActivateModeFunc) { func (p *Pad) SetActivateModeFunction(f PadActivateModeFunc) {
notifyInfo := p.registerCallback(f, padActivateModeFuncs) notifyInfo := p.registerCallback(f, padActivateModeFuncs)
C.gst_pad_set_activatemode_function_full( C.gst_pad_set_activatemode_function_full(
@@ -817,6 +961,8 @@ func (p *Pad) SetActivateModeFunction(f PadActivateModeFunc) {
// pad's activate function to perform the actual activation. // pad's activate function to perform the actual activation.
// //
// If not active, calls ActivateMode with the pad's current mode and a FALSE argument. // If not active, calls ActivateMode with the pad's current mode and a FALSE argument.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetActive(active bool) bool { func (p *Pad) SetActive(active bool) bool {
return gobool(C.gst_pad_set_active(p.Instance(), gboolean(active))) return gobool(C.gst_pad_set_active(p.Instance(), gboolean(active)))
} }
@@ -835,6 +981,8 @@ type PadChainFunc func(self *Pad, parent *Object, buffer *Buffer) FlowReturn
var padChainFuncs PadFuncMap = make(PadFuncMap) var padChainFuncs PadFuncMap = make(PadFuncMap)
// SetChainFunction sets the given chain function for the pad. The chain function is called to process an input buffer. // SetChainFunction sets the given chain function for the pad. The chain function is called to process an input buffer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetChainFunction(f PadChainFunc) { func (p *Pad) SetChainFunction(f PadChainFunc) {
notifyInfo := p.registerCallback(f, padChainFuncs) notifyInfo := p.registerCallback(f, padChainFuncs)
C.gst_pad_set_chain_function_full( C.gst_pad_set_chain_function_full(
@@ -859,6 +1007,8 @@ type PadChainListFunc func(self *Pad, parent *Object, list *BufferList) FlowRetu
var padChainListFuncs PadFuncMap = make(PadFuncMap) var padChainListFuncs PadFuncMap = make(PadFuncMap)
// SetChainListFunction sets the given chain function for the pad. The chain function is called to process an input buffer list. // SetChainListFunction sets the given chain function for the pad. The chain function is called to process an input buffer list.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetChainListFunction(f PadChainListFunc) { func (p *Pad) SetChainListFunction(f PadChainListFunc) {
notifyInfo := p.registerCallback(f, padChainListFuncs) notifyInfo := p.registerCallback(f, padChainListFuncs)
C.gst_pad_set_chain_list_function_full( C.gst_pad_set_chain_list_function_full(
@@ -871,6 +1021,8 @@ func (p *Pad) SetChainListFunction(f PadChainListFunc) {
// SetElementPrivate sets the given private data pointer on the pad. This function can only be used by the element that owns the pad. // SetElementPrivate sets the given private data pointer on the pad. This function can only be used by the element that owns the pad.
// No locking is performed in this function. // No locking is performed in this function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetElementPrivate(data interface{}) { func (p *Pad) SetElementPrivate(data interface{}) {
ptr := gopointer.Save(data) ptr := gopointer.Save(data)
C.gst_pad_set_element_private(p.Instance(), (C.gpointer)(unsafe.Pointer(ptr))) C.gst_pad_set_element_private(p.Instance(), (C.gpointer)(unsafe.Pointer(ptr)))
@@ -883,6 +1035,8 @@ type PadEventFullFunc func(self *Pad, parent *Object, event *Event) FlowReturn
var padEventFullFuncs PadFuncMap = make(PadFuncMap) var padEventFullFuncs PadFuncMap = make(PadFuncMap)
// SetEventFullFunction sets the given event handler for the pad. // SetEventFullFunction sets the given event handler for the pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetEventFullFunction(f PadEventFullFunc) { func (p *Pad) SetEventFullFunction(f PadEventFullFunc) {
notifyInfo := p.registerCallback(f, padEventFullFuncs) notifyInfo := p.registerCallback(f, padEventFullFuncs)
C.gst_pad_set_event_full_function_full( C.gst_pad_set_event_full_function_full(
@@ -899,6 +1053,8 @@ type PadEventFunc func(self *Pad, parent *Object, event *Event) bool
var padEventFuncs PadFuncMap = make(PadFuncMap) var padEventFuncs PadFuncMap = make(PadFuncMap)
// SetEventFunction sets the given event handler for the pad. // SetEventFunction sets the given event handler for the pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetEventFunction(f PadEventFunc) { func (p *Pad) SetEventFunction(f PadEventFunc) {
notifyInfo := p.registerCallback(f, padEventFuncs) notifyInfo := p.registerCallback(f, padEventFuncs)
C.gst_pad_set_event_function_full( C.gst_pad_set_event_function_full(
@@ -938,6 +1094,8 @@ var padGetRangeFuncs PadFuncMap = make(PadFuncMap)
// SetGetRangeFunction sets the given getrange function for the pad. The getrange function is called to produce a new Buffer // SetGetRangeFunction sets the given getrange function for the pad. The getrange function is called to produce a new Buffer
// to start the processing pipeline. see PadGetRangeFunc for a description of the getrange function. // to start the processing pipeline. see PadGetRangeFunc for a description of the getrange function.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetGetRangeFunction(f PadGetRangeFunc) { func (p *Pad) SetGetRangeFunction(f PadGetRangeFunc) {
notifyInfo := p.registerCallback(f, padGetRangeFuncs) notifyInfo := p.registerCallback(f, padGetRangeFuncs)
C.gst_pad_set_getrange_function_full( C.gst_pad_set_getrange_function_full(
@@ -956,6 +1114,8 @@ type PadIterIntLinkFunc func(self *Pad, parent *Object) []*Pad
var padIterIntLinkFuncs PadFuncMap = make(PadFuncMap) var padIterIntLinkFuncs PadFuncMap = make(PadFuncMap)
// SetIterIntLinkFunction sets the given internal link iterator function for the pad. // SetIterIntLinkFunction sets the given internal link iterator function for the pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetIterIntLinkFunction(f PadIterIntLinkFunc) { func (p *Pad) SetIterIntLinkFunction(f PadIterIntLinkFunc) {
notifyInfo := p.registerCallback(f, padIterIntLinkFuncs) notifyInfo := p.registerCallback(f, padIterIntLinkFuncs)
C.gst_pad_set_iterate_internal_links_function_full( C.gst_pad_set_iterate_internal_links_function_full(
@@ -978,6 +1138,8 @@ var padLinkFuncs PadFuncMap = make(PadFuncMap)
// The return value PadLinkRefused should be used when the connection cannot be made for some reason. // The return value PadLinkRefused should be used when the connection cannot be made for some reason.
// //
// If link is installed on a source pad, it should call the Link of the peer sink pad, if present. // If link is installed on a source pad, it should call the Link of the peer sink pad, if present.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetLinkFunction(f PadLinkFunc) { func (p *Pad) SetLinkFunction(f PadLinkFunc) {
notifyInfo := p.registerCallback(f, padLinkFuncs) notifyInfo := p.registerCallback(f, padLinkFuncs)
C.gst_pad_set_link_function_full( C.gst_pad_set_link_function_full(
@@ -989,6 +1151,8 @@ func (p *Pad) SetLinkFunction(f PadLinkFunc) {
} }
// SetOffset sets the offset that will be applied to the running time of pad. // SetOffset sets the offset that will be applied to the running time of pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetOffset(offset int64) { func (p *Pad) SetOffset(offset int64) {
C.gst_pad_set_offset(p.Instance(), C.gint64(offset)) C.gst_pad_set_offset(p.Instance(), C.gint64(offset))
} }
@@ -999,6 +1163,8 @@ type PadQueryFunc func(self *Pad, parent *Object, query *Query) bool
var padQueryFuncs PadFuncMap = make(PadFuncMap) var padQueryFuncs PadFuncMap = make(PadFuncMap)
// SetQueryFunction sets the query handler for the pad. // SetQueryFunction sets the query handler for the pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetQueryFunction(f PadQueryFunc) { func (p *Pad) SetQueryFunction(f PadQueryFunc) {
notifyInfo := p.registerCallback(f, padQueryFuncs) notifyInfo := p.registerCallback(f, padQueryFuncs)
C.gst_pad_set_query_function_full( C.gst_pad_set_query_function_full(
@@ -1021,6 +1187,8 @@ var padUnlinkFuncs PadFuncMap = make(PadFuncMap)
// //
// Note that the pad's lock is already held when the unlink function is called, so most pad functions cannot be called // Note that the pad's lock is already held when the unlink function is called, so most pad functions cannot be called
// from within the callback. // from within the callback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetUnlinkFunction(f PadUnlinkFunc) { func (p *Pad) SetUnlinkFunction(f PadUnlinkFunc) {
notifyInfo := p.registerCallback(f, padUnlinkFuncs) notifyInfo := p.registerCallback(f, padUnlinkFuncs)
C.gst_pad_set_unlink_function_full( C.gst_pad_set_unlink_function_full(
@@ -1040,6 +1208,8 @@ type StickyEventsForEachFunc func(pad *Pad, event *Event) bool
// StickyEventsForEach iterates all sticky events on pad and calls foreach_func for every event. If foreach_func returns FALSE the iteration is // StickyEventsForEach iterates all sticky events on pad and calls foreach_func for every event. If foreach_func returns FALSE the iteration is
// immediately stopped. // immediately stopped.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) StickyEventsForEach(f StickyEventsForEachFunc) { func (p *Pad) StickyEventsForEach(f StickyEventsForEachFunc) {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -1051,11 +1221,15 @@ func (p *Pad) StickyEventsForEach(f StickyEventsForEachFunc) {
} }
// StoreStickyEvent stores the sticky event on pad // StoreStickyEvent stores the sticky event on pad
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) StoreStickyEvent(ev *Event) FlowReturn { func (p *Pad) StoreStickyEvent(ev *Event) FlowReturn {
return FlowReturn(C.gst_pad_store_sticky_event(p.Instance(), ev.Instance())) return FlowReturn(C.gst_pad_store_sticky_event(p.Instance(), ev.Instance()))
} }
// Unlink unlinks this source pad from the sink pad. Will emit the unlinked signal on both pads. // Unlink unlinks this source pad from the sink pad. Will emit the unlinked signal on both pads.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Unlink(pad *Pad) bool { func (p *Pad) Unlink(pad *Pad) bool {
return gobool(C.gst_pad_unlink(p.Instance(), pad.Instance())) return gobool(C.gst_pad_unlink(p.Instance(), pad.Instance()))
} }
@@ -1065,11 +1239,15 @@ func (p *Pad) Unlink(pad *Pad) bool {
// //
// The negotiated caps are the caps of the last CAPS event that passed on the pad. Use this function on a pad that, once it negotiated to a CAPS, cannot // The negotiated caps are the caps of the last CAPS event that passed on the pad. Use this function on a pad that, once it negotiated to a CAPS, cannot
// be renegotiated to something else. // be renegotiated to something else.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) UseFixedCaps() { C.gst_pad_use_fixed_caps(p.Instance()) } func (p *Pad) UseFixedCaps() { C.gst_pad_use_fixed_caps(p.Instance()) }
// this prevents go pointers in cgo when setting a gst.Pad to a property // this prevents go pointers in cgo when setting a gst.Pad to a property
// see (https://github.com/go-gst/go-gst/issues/117) // see (https://github.com/go-gst/go-gst/issues/117)
// ToGValue implements glib.ValueTransformer. // ToGValue implements glib.ValueTransformer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) ToGValue() (*glib.Value, error) { func (p *Pad) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(glib.Type(C.gst_pad_get_type())) val, err := glib.ValueInit(glib.Type(C.gst_pad_get_type()))
if err != nil { if err != nil {
@@ -1081,41 +1259,59 @@ func (p *Pad) ToGValue() (*glib.Value, error) {
// Has returns true if this pad has the given flags. // Has returns true if this pad has the given flags.
// Non MT safe // Non MT safe
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) Has(flags PadFlags) bool { func (p *Pad) Has(flags PadFlags) bool {
return p.hasFlags(uint32(flags)) return p.hasFlags(uint32(flags))
} }
// Sets pad flags // Sets pad flags
// Non MT safe // Non MT safe
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) SetFlags(flags PadFlags) { func (p *Pad) SetFlags(flags PadFlags) {
p.setFlags(uint32(flags)) p.setFlags(uint32(flags))
} }
// Unsets pad flags // Unsets pad flags
// Non MT safe // Non MT safe
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pad) UnsetFlags(flags PadFlags) { func (p *Pad) UnsetFlags(flags PadFlags) {
p.unsetFlags(uint32(flags)) p.unsetFlags(uint32(flags))
} }
// PadProbeInfo represents the info passed to a PadProbeCallback. // PadProbeInfo represents the info passed to a PadProbeCallback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type PadProbeInfo struct { type PadProbeInfo struct {
ptr *C.GstPadProbeInfo ptr *C.GstPadProbeInfo
} }
// ID returns the id of the probe. // ID returns the id of the probe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) ID() uint32 { return uint32(p.ptr.id) } func (p *PadProbeInfo) ID() uint32 { return uint32(p.ptr.id) }
// Type returns the type of the probe. The type indicates the type of data that can be expected // Type returns the type of the probe. The type indicates the type of data that can be expected
// with the probe. // with the probe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) Type() PadProbeType { return PadProbeType(p.ptr._type) } func (p *PadProbeInfo) Type() PadProbeType { return PadProbeType(p.ptr._type) }
// Offset returns the offset of pull probe, this field is valid when type contains PadProbeTypePull. // Offset returns the offset of pull probe, this field is valid when type contains PadProbeTypePull.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) Offset() uint64 { return uint64(p.ptr.offset) } func (p *PadProbeInfo) Offset() uint64 { return uint64(p.ptr.offset) }
// Size returns the size of pull probe, this field is valid when type contains PadProbeTypePull. // Size returns the size of pull probe, this field is valid when type contains PadProbeTypePull.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) Size() uint64 { return uint64(p.ptr.size) } func (p *PadProbeInfo) Size() uint64 { return uint64(p.ptr.size) }
// GetBuffer returns the buffer, if any, inside this probe info. // GetBuffer returns the buffer, if any, inside this probe info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) GetBuffer() *Buffer { func (p *PadProbeInfo) GetBuffer() *Buffer {
buf := C.gst_pad_probe_info_get_buffer(p.ptr) buf := C.gst_pad_probe_info_get_buffer(p.ptr)
if buf == nil { if buf == nil {
@@ -1125,6 +1321,8 @@ func (p *PadProbeInfo) GetBuffer() *Buffer {
} }
// GetBufferList returns the buffer list, if any, inside this probe info. // GetBufferList returns the buffer list, if any, inside this probe info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) GetBufferList() *BufferList { func (p *PadProbeInfo) GetBufferList() *BufferList {
bufList := C.gst_pad_probe_info_get_buffer_list(p.ptr) bufList := C.gst_pad_probe_info_get_buffer_list(p.ptr)
if bufList == nil { if bufList == nil {
@@ -1134,6 +1332,8 @@ func (p *PadProbeInfo) GetBufferList() *BufferList {
} }
// GetEvent returns the event, if any, inside this probe info. // GetEvent returns the event, if any, inside this probe info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) GetEvent() *Event { func (p *PadProbeInfo) GetEvent() *Event {
ev := C.gst_pad_probe_info_get_event(p.ptr) ev := C.gst_pad_probe_info_get_event(p.ptr)
if ev == nil { if ev == nil {
@@ -1149,6 +1349,8 @@ func (p *PadProbeInfo) GetEvent() *Event {
} }
// GetQuery returns the query, if any, inside this probe info. // GetQuery returns the query, if any, inside this probe info.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadProbeInfo) GetQuery() *Query { func (p *PadProbeInfo) GetQuery() *Query {
q := C.gst_pad_probe_info_get_query(p.ptr) q := C.gst_pad_probe_info_get_query(p.ptr)
if q == nil { if q == nil {
@@ -1157,6 +1359,8 @@ func (p *PadProbeInfo) GetQuery() *Query {
return wrapQuery(q) return wrapQuery(q)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func iteratorToPadSlice(iterator *C.GstIterator) ([]*Pad, error) { func iteratorToPadSlice(iterator *C.GstIterator) ([]*Pad, error) {
pads := make([]*Pad, 0) pads := make([]*Pad, 0)
gval := new(C.GValue) gval := new(C.GValue)

View File

@@ -11,6 +11,8 @@ import (
gopointer "github.com/go-gst/go-pointer" gopointer "github.com/go-gst/go-pointer"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func getParent(parent *C.GstObject) *Object { func getParent(parent *C.GstObject) *Object {
if parent == nil { if parent == nil {
return nil return nil
@@ -19,6 +21,8 @@ func getParent(parent *C.GstObject) *Object {
} }
//export goGstPadFuncDestroyNotify //export goGstPadFuncDestroyNotify
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadFuncDestroyNotify(notifyInfo *C.PadDestroyNotifyInfo) { func goGstPadFuncDestroyNotify(notifyInfo *C.PadDestroyNotifyInfo) {
padPtr := unsafe.Pointer(notifyInfo.pad_ptr) padPtr := unsafe.Pointer(notifyInfo.pad_ptr)
funcMapPtr := unsafe.Pointer(notifyInfo.func_map_ptr) funcMapPtr := unsafe.Pointer(notifyInfo.func_map_ptr)
@@ -33,6 +37,8 @@ func goGstPadFuncDestroyNotify(notifyInfo *C.PadDestroyNotifyInfo) {
} }
//export goGstPadActivateFunction //export goGstPadActivateFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadActivateFunction(pad *C.GstPad, parent *C.GstObject) C.gboolean { func goGstPadActivateFunction(pad *C.GstPad, parent *C.GstObject) C.gboolean {
f := padActivateFuncs.FuncForPad(unsafe.Pointer(pad)).(PadActivateFunc) f := padActivateFuncs.FuncForPad(unsafe.Pointer(pad)).(PadActivateFunc)
return gboolean(f( return gboolean(f(
@@ -42,6 +48,8 @@ func goGstPadActivateFunction(pad *C.GstPad, parent *C.GstObject) C.gboolean {
} }
//export goGstPadActivateModeFunction //export goGstPadActivateModeFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadActivateModeFunction(pad *C.GstPad, parent *C.GstObject, mode C.GstPadMode, active C.gboolean) C.gboolean { func goGstPadActivateModeFunction(pad *C.GstPad, parent *C.GstObject, mode C.GstPadMode, active C.gboolean) C.gboolean {
f := padActivateModeFuncs.FuncForPad(unsafe.Pointer(pad)).(PadActivateModeFunc) f := padActivateModeFuncs.FuncForPad(unsafe.Pointer(pad)).(PadActivateModeFunc)
return gboolean(f( return gboolean(f(
@@ -53,6 +61,8 @@ func goGstPadActivateModeFunction(pad *C.GstPad, parent *C.GstObject, mode C.Gst
} }
//export goGstPadChainFunction //export goGstPadChainFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadChainFunction(pad *C.GstPad, parent *C.GstObject, buffer *C.GstBuffer) C.GstFlowReturn { func goGstPadChainFunction(pad *C.GstPad, parent *C.GstObject, buffer *C.GstBuffer) C.GstFlowReturn {
f := padChainFuncs.FuncForPad(unsafe.Pointer(pad)).(PadChainFunc) f := padChainFuncs.FuncForPad(unsafe.Pointer(pad)).(PadChainFunc)
buf := FromGstBufferUnsafeFull(unsafe.Pointer(buffer)) buf := FromGstBufferUnsafeFull(unsafe.Pointer(buffer))
@@ -65,6 +75,8 @@ func goGstPadChainFunction(pad *C.GstPad, parent *C.GstObject, buffer *C.GstBuff
} }
//export goGstPadChainListFunction //export goGstPadChainListFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadChainListFunction(pad *C.GstPad, parent *C.GstObject, list *C.GstBufferList) C.GstFlowReturn { func goGstPadChainListFunction(pad *C.GstPad, parent *C.GstObject, list *C.GstBufferList) C.GstFlowReturn {
f := padChainListFuncs.FuncForPad(unsafe.Pointer(pad)).(PadChainListFunc) f := padChainListFuncs.FuncForPad(unsafe.Pointer(pad)).(PadChainListFunc)
buflist := FromGstBufferListUnsafeFull(unsafe.Pointer(list)) buflist := FromGstBufferListUnsafeFull(unsafe.Pointer(list))
@@ -77,6 +89,8 @@ func goGstPadChainListFunction(pad *C.GstPad, parent *C.GstObject, list *C.GstBu
} }
//export goGstPadEventFullFunction //export goGstPadEventFullFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadEventFullFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstEvent) C.GstFlowReturn { func goGstPadEventFullFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstEvent) C.GstFlowReturn {
f := padEventFullFuncs.FuncForPad(unsafe.Pointer(pad)).(PadEventFullFunc) f := padEventFullFuncs.FuncForPad(unsafe.Pointer(pad)).(PadEventFullFunc)
ev := FromGstEventUnsafeFull(unsafe.Pointer(event)) ev := FromGstEventUnsafeFull(unsafe.Pointer(event))
@@ -89,6 +103,8 @@ func goGstPadEventFullFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstE
} }
//export goGstPadEventFunction //export goGstPadEventFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadEventFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstEvent) C.gboolean { func goGstPadEventFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstEvent) C.gboolean {
f := padEventFuncs.FuncForPad(unsafe.Pointer(pad)).(PadEventFunc) f := padEventFuncs.FuncForPad(unsafe.Pointer(pad)).(PadEventFunc)
ev := FromGstEventUnsafeFull(unsafe.Pointer(event)) ev := FromGstEventUnsafeFull(unsafe.Pointer(event))
@@ -101,6 +117,8 @@ func goGstPadEventFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstEvent
} }
//export goGstPadGetRangeFunction //export goGstPadGetRangeFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadGetRangeFunction(pad *C.GstPad, parent *C.GstObject, offset C.guint64, length C.guint, buffer **C.GstBuffer) C.GstFlowReturn { func goGstPadGetRangeFunction(pad *C.GstPad, parent *C.GstObject, offset C.guint64, length C.guint, buffer **C.GstBuffer) C.GstFlowReturn {
f := padGetRangeFuncs.FuncForPad(unsafe.Pointer(pad)).(PadGetRangeFunc) f := padGetRangeFuncs.FuncForPad(unsafe.Pointer(pad)).(PadGetRangeFunc)
ret, buf := f( ret, buf := f(
@@ -116,6 +134,8 @@ func goGstPadGetRangeFunction(pad *C.GstPad, parent *C.GstObject, offset C.guint
} }
//export goGstPadIterIntLinkFunction //export goGstPadIterIntLinkFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadIterIntLinkFunction(pad *C.GstPad, parent *C.GstObject) *C.GstIterator { func goGstPadIterIntLinkFunction(pad *C.GstPad, parent *C.GstObject) *C.GstIterator {
f := padIterIntLinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadIterIntLinkFunc) f := padIterIntLinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadIterIntLinkFunc)
pads := f( pads := f(
@@ -137,6 +157,8 @@ func goGstPadIterIntLinkFunction(pad *C.GstPad, parent *C.GstObject) *C.GstItera
} }
//export goGstPadLinkFunction //export goGstPadLinkFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadLinkFunction(pad *C.GstPad, parent *C.GstObject, peer *C.GstPad) C.GstPadLinkReturn { func goGstPadLinkFunction(pad *C.GstPad, parent *C.GstObject, peer *C.GstPad) C.GstPadLinkReturn {
f := padLinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadLinkFunc) f := padLinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadLinkFunc)
return C.GstPadLinkReturn(f( return C.GstPadLinkReturn(f(
@@ -147,6 +169,8 @@ func goGstPadLinkFunction(pad *C.GstPad, parent *C.GstObject, peer *C.GstPad) C.
} }
//export goGstPadQueryFunction //export goGstPadQueryFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadQueryFunction(pad *C.GstPad, parent *C.GstObject, query *C.GstQuery) C.gboolean { func goGstPadQueryFunction(pad *C.GstPad, parent *C.GstObject, query *C.GstQuery) C.gboolean {
f := padQueryFuncs.FuncForPad(unsafe.Pointer(pad)).(PadQueryFunc) f := padQueryFuncs.FuncForPad(unsafe.Pointer(pad)).(PadQueryFunc)
return gboolean(f( return gboolean(f(
@@ -157,6 +181,8 @@ func goGstPadQueryFunction(pad *C.GstPad, parent *C.GstObject, query *C.GstQuery
} }
//export goGstPadUnlinkFunction //export goGstPadUnlinkFunction
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goGstPadUnlinkFunction(pad *C.GstPad, parent *C.GstObject) { func goGstPadUnlinkFunction(pad *C.GstPad, parent *C.GstObject) {
f := padUnlinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadUnlinkFunc) f := padUnlinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadUnlinkFunc)
f( f(

View File

@@ -12,16 +12,22 @@ import (
type PadTemplate struct{ *Object } type PadTemplate struct{ *Object }
// FromGstPadTemplateUnsafeNone wraps the given GstPadTemplate in a ref and a finalizer. // FromGstPadTemplateUnsafeNone wraps the given GstPadTemplate in a ref and a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPadTemplateUnsafeNone(tmpl unsafe.Pointer) *PadTemplate { func FromGstPadTemplateUnsafeNone(tmpl unsafe.Pointer) *PadTemplate {
return &PadTemplate{wrapObject(glib.TransferNone(tmpl))} return &PadTemplate{wrapObject(glib.TransferNone(tmpl))}
} }
// FromGstPadTemplateUnsafeFull wraps the given GstPadTemplate in a finalizer. // FromGstPadTemplateUnsafeFull wraps the given GstPadTemplate in a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPadTemplateUnsafeFull(tmpl unsafe.Pointer) *PadTemplate { func FromGstPadTemplateUnsafeFull(tmpl unsafe.Pointer) *PadTemplate {
return &PadTemplate{wrapObject(glib.TransferFull(tmpl))} return &PadTemplate{wrapObject(glib.TransferFull(tmpl))}
} }
// NewPadTemplate creates a new pad template with a name according to the given template and with the given arguments. // NewPadTemplate creates a new pad template with a name according to the given template and with the given arguments.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps) *PadTemplate { func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps) *PadTemplate {
cName := C.CString(nameTemplate) cName := C.CString(nameTemplate)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -38,6 +44,8 @@ func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPre
} }
// NewPadTemplateWithGType creates a new pad template with a name according to the given template and with the given arguments. // NewPadTemplateWithGType creates a new pad template with a name according to the given template and with the given arguments.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps, gType glib.Type) *PadTemplate { func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps, gType glib.Type) *PadTemplate {
cName := C.CString(nameTemplate) cName := C.CString(nameTemplate)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -55,23 +63,35 @@ func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presen
} }
// Instance returns the underlying C GstPadTemplate. // Instance returns the underlying C GstPadTemplate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadTemplate) Instance() *C.GstPadTemplate { return C.toGstPadTemplate(p.Unsafe()) } func (p *PadTemplate) Instance() *C.GstPadTemplate { return C.toGstPadTemplate(p.Unsafe()) }
// Name returns the name of the pad template. // Name returns the name of the pad template.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadTemplate) Name() string { return C.GoString(p.Instance().name_template) } func (p *PadTemplate) Name() string { return C.GoString(p.Instance().name_template) }
// Direction returns the direction of the pad template. // Direction returns the direction of the pad template.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadTemplate) Direction() PadDirection { return PadDirection(p.Instance().direction) } func (p *PadTemplate) Direction() PadDirection { return PadDirection(p.Instance().direction) }
// Presence returns the presence of the pad template. // Presence returns the presence of the pad template.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadTemplate) Presence() PadPresence { return PadPresence(p.Instance().presence) } func (p *PadTemplate) Presence() PadPresence { return PadPresence(p.Instance().presence) }
// Caps returns the caps of the pad template. // Caps returns the caps of the pad template.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadTemplate) Caps() *Caps { func (p *PadTemplate) Caps() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_template_get_caps(p.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_template_get_caps(p.Instance())))
} }
// PadCreated emits the pad-created signal for this template when created by this pad. // PadCreated emits the pad-created signal for this template when created by this pad.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PadTemplate) PadCreated(pad *Pad) { func (p *PadTemplate) PadCreated(pad *Pad) {
C.gst_pad_template_pad_created(p.Instance(), pad.Instance()) C.gst_pad_template_pad_created(p.Instance(), pad.Instance())
} }

View File

@@ -13,23 +13,31 @@ import (
) )
// Pipeline is a go implementation of a GstPipeline. // Pipeline is a go implementation of a GstPipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Pipeline struct { type Pipeline struct {
*Bin *Bin
bus *Bus bus *Bus
} }
// FromGstPipelineUnsafeFull wraps the given pipeline pointer. // FromGstPipelineUnsafeFull wraps the given pipeline pointer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPipelineUnsafeFull(pipeline unsafe.Pointer) *Pipeline { func FromGstPipelineUnsafeFull(pipeline unsafe.Pointer) *Pipeline {
return &Pipeline{Bin: &Bin{&Element{wrapObject(glib.TransferFull(pipeline))}}} return &Pipeline{Bin: &Bin{&Element{wrapObject(glib.TransferFull(pipeline))}}}
} }
// FromGstPipelineUnsafeNone wraps the given pipeline pointer. // FromGstPipelineUnsafeNone wraps the given pipeline pointer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPipelineUnsafeNone(pipeline unsafe.Pointer) *Pipeline { func FromGstPipelineUnsafeNone(pipeline unsafe.Pointer) *Pipeline {
return &Pipeline{Bin: &Bin{&Element{wrapObject(glib.TransferNone(pipeline))}}} return &Pipeline{Bin: &Bin{&Element{wrapObject(glib.TransferNone(pipeline))}}}
} }
// NewPipeline allocates and returns a new empty pipeline. If name is empty, one // NewPipeline allocates and returns a new empty pipeline. If name is empty, one
// is generated by gstreamer. // is generated by gstreamer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPipeline(name string) (*Pipeline, error) { func NewPipeline(name string) (*Pipeline, error) {
var cChar *C.char var cChar *C.char
if name != "" { if name != "" {
@@ -44,6 +52,8 @@ func NewPipeline(name string) (*Pipeline, error) {
} }
// NewPipelineFromString creates a new gstreamer pipeline from the given launch string. // NewPipelineFromString creates a new gstreamer pipeline from the given launch string.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPipelineFromString(launchv string) (*Pipeline, error) { func NewPipelineFromString(launchv string) (*Pipeline, error) {
if len(strings.Split(launchv, "!")) < 2 { if len(strings.Split(launchv, "!")) < 2 {
return nil, fmt.Errorf("given string is too short for a pipeline: %s", launchv) return nil, fmt.Errorf("given string is too short for a pipeline: %s", launchv)
@@ -61,9 +71,13 @@ func NewPipelineFromString(launchv string) (*Pipeline, error) {
} }
// Instance returns the native GstPipeline instance. // Instance returns the native GstPipeline instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pipeline) Instance() *C.GstPipeline { return C.toGstPipeline(p.Unsafe()) } func (p *Pipeline) Instance() *C.GstPipeline { return C.toGstPipeline(p.Unsafe()) }
// GetPipelineBus returns the message bus for this pipeline. // GetPipelineBus returns the message bus for this pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pipeline) GetPipelineBus() *Bus { func (p *Pipeline) GetPipelineBus() *Bus {
if p.bus == nil { if p.bus == nil {
cBus := C.gst_pipeline_get_bus((*C.GstPipeline)(p.Instance())) cBus := C.gst_pipeline_get_bus((*C.GstPipeline)(p.Instance()))
@@ -73,6 +87,8 @@ func (p *Pipeline) GetPipelineBus() *Bus {
} }
// GetPipelineClock returns the global clock for this pipeline. // GetPipelineClock returns the global clock for this pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pipeline) GetPipelineClock() *Clock { func (p *Pipeline) GetPipelineClock() *Clock {
cClock := C.gst_pipeline_get_pipeline_clock((*C.GstPipeline)(p.Instance())) cClock := C.gst_pipeline_get_pipeline_clock((*C.GstPipeline)(p.Instance()))
return FromGstClockUnsafeFull(unsafe.Pointer(cClock)) return FromGstClockUnsafeFull(unsafe.Pointer(cClock))
@@ -83,6 +99,8 @@ func (p *Pipeline) GetPipelineClock() *Clock {
// If clock is NULL all clocking will be disabled which will make the pipeline run as fast as possible. // If clock is NULL all clocking will be disabled which will make the pipeline run as fast as possible.
// //
// MT safe. // MT safe.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pipeline) ForceClock(clock *Clock) { func (p *Pipeline) ForceClock(clock *Clock) {
C.gst_pipeline_use_clock(p.Instance(), clock.Instance()) C.gst_pipeline_use_clock(p.Instance(), clock.Instance())
} }
@@ -103,11 +121,15 @@ can be dispatched in the main thread. This behavior can be disabled using this f
It is important that all messages on the bus are handled when the automatic flushing It is important that all messages on the bus are handled when the automatic flushing
is disabled else memory leaks will be introduced. is disabled else memory leaks will be introduced.
*/ */
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pipeline) SetAutoFlushBus(b bool) { func (p *Pipeline) SetAutoFlushBus(b bool) {
C.gst_pipeline_set_auto_flush_bus(p.Instance(), gboolean(b)) C.gst_pipeline_set_auto_flush_bus(p.Instance(), gboolean(b))
} }
// Start is the equivalent to calling SetState(StatePlaying) on the underlying GstElement. // Start is the equivalent to calling SetState(StatePlaying) on the underlying GstElement.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Pipeline) Start() error { func (p *Pipeline) Start() error {
return p.SetState(StatePlaying) return p.SetState(StatePlaying)
} }

View File

@@ -59,6 +59,8 @@ import (
// PluginMetadata represents the information to include when registering a new plugin // PluginMetadata represents the information to include when registering a new plugin
// with gstreamer. // with gstreamer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type PluginMetadata struct { type PluginMetadata struct {
// The major version number of the GStreamer core that the plugin was compiled for, you can just use VersionMajor here // The major version number of the GStreamer core that the plugin was compiled for, you can just use VersionMajor here
MajorVersion Version MajorVersion Version
@@ -89,6 +91,8 @@ type PluginMetadata struct {
var globalPluginInit PluginInitFunc var globalPluginInit PluginInitFunc
// Export will export the PluginMetadata to an unsafe pointer to a GstPluginDesc. // Export will export the PluginMetadata to an unsafe pointer to a GstPluginDesc.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PluginMetadata) Export() unsafe.Pointer { func (p *PluginMetadata) Export() unsafe.Pointer {
globalPluginInit = p.Init globalPluginInit = p.Init
desc := C.getPluginMeta( desc := C.getPluginMeta(
@@ -115,11 +119,15 @@ type PluginInitFunc func(*Plugin) bool
type Plugin struct{ *Object } type Plugin struct{ *Object }
// FromGstPluginUnsafeNone wraps the given pointer in a Plugin. // FromGstPluginUnsafeNone wraps the given pointer in a Plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPluginUnsafeNone(plugin unsafe.Pointer) *Plugin { func FromGstPluginUnsafeNone(plugin unsafe.Pointer) *Plugin {
return &Plugin{wrapObject(glib.TransferNone(plugin))} return &Plugin{wrapObject(glib.TransferNone(plugin))}
} }
// FromGstPluginUnsafeFull wraps the given pointer in a Plugin. // FromGstPluginUnsafeFull wraps the given pointer in a Plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstPluginUnsafeFull(plugin unsafe.Pointer) *Plugin { func FromGstPluginUnsafeFull(plugin unsafe.Pointer) *Plugin {
return &Plugin{wrapObject(glib.TransferFull(plugin))} return &Plugin{wrapObject(glib.TransferFull(plugin))}
} }
@@ -127,6 +135,8 @@ func FromGstPluginUnsafeFull(plugin unsafe.Pointer) *Plugin {
// RegisterPlugin will register a static plugin, i.e. a plugin which is private to an application // RegisterPlugin will register a static plugin, i.e. a plugin which is private to an application
// or library and contained within the application or library (as opposed to being shipped as a // or library and contained within the application or library (as opposed to being shipped as a
// separate module file). // separate module file).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func RegisterPlugin(desc *PluginMetadata, initFunc PluginInitFunc) bool { func RegisterPlugin(desc *PluginMetadata, initFunc PluginInitFunc) bool {
cName := C.CString(desc.Name) cName := C.CString(desc.Name)
cDesc := C.CString(desc.Description) cDesc := C.CString(desc.Description)
@@ -153,6 +163,8 @@ func RegisterPlugin(desc *PluginMetadata, initFunc PluginInitFunc) bool {
// LoadPluginByName loads the named plugin and places a ref count on it. The function // LoadPluginByName loads the named plugin and places a ref count on it. The function
// returns nil if the plugin could not be loaded. // returns nil if the plugin could not be loaded.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func LoadPluginByName(name string) *Plugin { func LoadPluginByName(name string) *Plugin {
cstr := C.CString(name) cstr := C.CString(name)
defer C.free(unsafe.Pointer(cstr)) defer C.free(unsafe.Pointer(cstr))
@@ -164,6 +176,8 @@ func LoadPluginByName(name string) *Plugin {
} }
// LoadPluginFile loads the given plugin and refs it. If an error is returned Plugin will be nil. // LoadPluginFile loads the given plugin and refs it. If an error is returned Plugin will be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func LoadPluginFile(fpath string) (*Plugin, error) { func LoadPluginFile(fpath string) (*Plugin, error) {
cstr := C.CString(fpath) cstr := C.CString(fpath)
defer C.free(unsafe.Pointer(cstr)) defer C.free(unsafe.Pointer(cstr))
@@ -177,9 +191,13 @@ func LoadPluginFile(fpath string) (*Plugin, error) {
} }
// Instance returns the underlying GstPlugin instance. // Instance returns the underlying GstPlugin instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Instance() *C.GstPlugin { return C.toGstPlugin(p.Unsafe()) } func (p *Plugin) Instance() *C.GstPlugin { return C.toGstPlugin(p.Unsafe()) }
// Description returns the description for this plugin. // Description returns the description for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Description() string { func (p *Plugin) Description() string {
ret := C.gst_plugin_get_description((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_description((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {
@@ -189,6 +207,8 @@ func (p *Plugin) Description() string {
} }
// Filename returns the filename for this plugin. // Filename returns the filename for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Filename() string { func (p *Plugin) Filename() string {
ret := C.gst_plugin_get_filename((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_filename((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {
@@ -198,6 +218,8 @@ func (p *Plugin) Filename() string {
} }
// Version returns the version for this plugin. // Version returns the version for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Version() string { func (p *Plugin) Version() string {
ret := C.gst_plugin_get_version((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_version((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {
@@ -207,6 +229,8 @@ func (p *Plugin) Version() string {
} }
// License returns the license for this plugin. // License returns the license for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) License() License { func (p *Plugin) License() License {
ret := C.gst_plugin_get_license((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_license((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {
@@ -216,6 +240,8 @@ func (p *Plugin) License() License {
} }
// Source returns the source module for this plugin. // Source returns the source module for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Source() string { func (p *Plugin) Source() string {
ret := C.gst_plugin_get_source((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_source((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {
@@ -225,6 +251,8 @@ func (p *Plugin) Source() string {
} }
// Package returns the binary package for this plugin. // Package returns the binary package for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Package() string { func (p *Plugin) Package() string {
ret := C.gst_plugin_get_package((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_package((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {
@@ -234,6 +262,8 @@ func (p *Plugin) Package() string {
} }
// Origin returns the origin URL for this plugin. // Origin returns the origin URL for this plugin.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Plugin) Origin() string { func (p *Plugin) Origin() string {
ret := C.gst_plugin_get_origin((*C.GstPlugin)(p.Instance())) ret := C.gst_plugin_get_origin((*C.GstPlugin)(p.Instance()))
if ret == nil { if ret == nil {

View File

@@ -11,9 +11,13 @@ import (
type PluginFeature struct{ *Object } type PluginFeature struct{ *Object }
// Instance returns the underlying GstPluginFeature instance // Instance returns the underlying GstPluginFeature instance
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PluginFeature) Instance() *C.GstPluginFeature { return C.toGstPluginFeature(p.Unsafe()) } func (p *PluginFeature) Instance() *C.GstPluginFeature { return C.toGstPluginFeature(p.Unsafe()) }
// GetPlugin returns the plugin that provides this feature or nil. // GetPlugin returns the plugin that provides this feature or nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PluginFeature) GetPlugin() *Plugin { func (p *PluginFeature) GetPlugin() *Plugin {
plugin := C.gst_plugin_feature_get_plugin((*C.GstPluginFeature)(p.Instance())) plugin := C.gst_plugin_feature_get_plugin((*C.GstPluginFeature)(p.Instance()))
if plugin == nil { if plugin == nil {
@@ -23,6 +27,8 @@ func (p *PluginFeature) GetPlugin() *Plugin {
} }
// GetPluginName returns the name of the plugin that provides this feature. // GetPluginName returns the name of the plugin that provides this feature.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PluginFeature) GetPluginName() string { func (p *PluginFeature) GetPluginName() string {
pluginName := C.gst_plugin_feature_get_plugin_name((*C.GstPluginFeature)(p.Instance())) pluginName := C.gst_plugin_feature_get_plugin_name((*C.GstPluginFeature)(p.Instance()))
if pluginName == nil { if pluginName == nil {
@@ -31,10 +37,14 @@ func (p *PluginFeature) GetPluginName() string {
return C.GoString(pluginName) return C.GoString(pluginName)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PluginFeature) SetPluginRank(rank Rank) { func (p *PluginFeature) SetPluginRank(rank Rank) {
C.gst_plugin_feature_set_rank((*C.GstPluginFeature)(p.Instance()), C.guint(rank)) C.gst_plugin_feature_set_rank((*C.GstPluginFeature)(p.Instance()), C.guint(rank))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *PluginFeature) GetPluginRank() int { func (p *PluginFeature) GetPluginRank() int {
rank := C.gst_plugin_feature_get_rank((*C.GstPluginFeature)(p.Instance())) rank := C.gst_plugin_feature_get_rank((*C.GstPluginFeature)(p.Instance()))
return int(rank) return int(rank)

View File

@@ -25,6 +25,8 @@ import (
type PromiseResult int type PromiseResult int
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (pr PromiseResult) String() string { func (pr PromiseResult) String() string {
switch pr { switch pr {
case PromiseResultPending: case PromiseResultPending:
@@ -55,6 +57,8 @@ const (
// See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstpromise.html // See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstpromise.html
// //
// it can be awaited on-blocking using Await, given the promise was constructed in go and not received from FFI. // it can be awaited on-blocking using Await, given the promise was constructed in go and not received from FFI.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Promise struct { type Promise struct {
ptr *C.GstPromise ptr *C.GstPromise
@@ -62,6 +66,8 @@ type Promise struct {
done <-chan struct{} done <-chan struct{}
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPromise() *Promise { func NewPromise() *Promise {
done := make(chan struct{}) done := make(chan struct{})
@@ -87,6 +93,8 @@ func NewPromise() *Promise {
return prom return prom
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Instance() *C.GstPromise { func (p *Promise) Instance() *C.GstPromise {
if p == nil { if p == nil {
return nil return nil
@@ -97,12 +105,16 @@ func (p *Promise) Instance() *C.GstPromise {
// Ref increases the ref count on the promise. Exposed for completeness sake. Should not be called // Ref increases the ref count on the promise. Exposed for completeness sake. Should not be called
// by application code // by application code
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Ref() { func (p *Promise) Ref() {
C.gst_promise_ref(p.ptr) C.gst_promise_ref(p.ptr)
} }
// Unref decreases the ref count on the promise. Exposed for completeness sake. Should not be called // Unref decreases the ref count on the promise. Exposed for completeness sake. Should not be called
// by application code // by application code
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Unref() { func (p *Promise) Unref() {
C.gst_promise_unref(p.ptr) C.gst_promise_unref(p.ptr)
} }
@@ -119,6 +131,8 @@ var ErrCannotAwaitPromise = errors.New("promises received from FFI cannot be awa
// //
// its implementation is preferred over the blocking gst_promise_wait, which would lock a thread until the // its implementation is preferred over the blocking gst_promise_wait, which would lock a thread until the
// promise has changed state. // promise has changed state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Await(ctx context.Context) (*Structure, error) { func (p *Promise) Await(ctx context.Context) (*Structure, error) {
if p.done == nil { if p.done == nil {
return nil, ErrCannotAwaitPromise return nil, ErrCannotAwaitPromise
@@ -147,6 +161,8 @@ func (p *Promise) Await(ctx context.Context) (*Structure, error) {
} }
// GetReply wraps gst_promise_get_reply and returns the structure, which can be nil. // GetReply wraps gst_promise_get_reply and returns the structure, which can be nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) GetReply() *Structure { func (p *Promise) GetReply() *Structure {
cstruct := C.gst_promise_get_reply(p.ptr) cstruct := C.gst_promise_get_reply(p.ptr)
@@ -166,16 +182,22 @@ func (p *Promise) GetReply() *Structure {
} }
// Expire wraps gst_promise_expire // Expire wraps gst_promise_expire
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Expire() { func (p *Promise) Expire() {
C.gst_promise_expire(p.ptr) C.gst_promise_expire(p.ptr)
} }
// Interrupt wraps gst_promise_interrupt // Interrupt wraps gst_promise_interrupt
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Interrupt() { func (p *Promise) Interrupt() {
C.gst_promise_interrupt(p.ptr) C.gst_promise_interrupt(p.ptr)
} }
// Reply wraps gst_promise_reply // Reply wraps gst_promise_reply
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) Reply(answer *Structure) { func (p *Promise) Reply(answer *Structure) {
C.gst_promise_reply(p.ptr, answer.Instance()) C.gst_promise_reply(p.ptr, answer.Instance())
} }
@@ -183,6 +205,8 @@ func (p *Promise) Reply(answer *Structure) {
var TypePromise = glib.Type(C.GST_TYPE_PROMISE) var TypePromise = glib.Type(C.GST_TYPE_PROMISE)
// ToGValue implements glib.ValueTransformer // ToGValue implements glib.ValueTransformer
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (p *Promise) ToGValue() (*glib.Value, error) { func (p *Promise) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(TypePromise) val, err := glib.ValueInit(TypePromise)
if err != nil { if err != nil {
@@ -192,6 +216,8 @@ func (p *Promise) ToGValue() (*glib.Value, error) {
return val, nil return val, nil
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func marshalPromise(p unsafe.Pointer) (interface{}, error) { func marshalPromise(p unsafe.Pointer) (interface{}, error) {
c := C.g_value_get_boxed(toGValue(p)) c := C.g_value_get_boxed(toGValue(p))
obj := (*C.GstPromise)(unsafe.Pointer(c)) obj := (*C.GstPromise)(unsafe.Pointer(c))

View File

@@ -9,6 +9,8 @@ import (
) )
//go:noinline //go:noinline
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func awaitGC() { func awaitGC() {
type tmp struct{ v string } type tmp struct{ v string }
@@ -32,6 +34,8 @@ func awaitGC() {
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TestPromise(t *testing.T) { func TestPromise(t *testing.T) {
Init(nil) Init(nil)
@@ -83,6 +87,8 @@ func TestPromise(t *testing.T) {
awaitGC() awaitGC()
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TestPromiseMarshal(t *testing.T) { func TestPromiseMarshal(t *testing.T) {
Init(nil) Init(nil)

View File

@@ -4,18 +4,24 @@ package gst
import "C" import "C"
// ProtectionMeta is a go wrapper around C GstProtectionMeta. // ProtectionMeta is a go wrapper around C GstProtectionMeta.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type ProtectionMeta struct { type ProtectionMeta struct {
Meta *Meta Meta *Meta
Info *Structure Info *Structure
} }
// GetProtectionMetaInfo retrieves global ProtectionMetaInfo. // GetProtectionMetaInfo retrieves global ProtectionMetaInfo.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func GetProtectionMetaInfo() *MetaInfo { func GetProtectionMetaInfo() *MetaInfo {
return wrapMetaInfo(C.gst_protection_meta_get_info()) return wrapMetaInfo(C.gst_protection_meta_get_info())
} }
// FilterProtectionSystemByDecryptors tterates the supplied list of UUIDs // FilterProtectionSystemByDecryptors tterates the supplied list of UUIDs
// and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs. // and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FilterProtectionSystemByDecryptors(decryptors []string) []string { func FilterProtectionSystemByDecryptors(decryptors []string) []string {
gArr := gcharStrings(decryptors) gArr := gcharStrings(decryptors)
defer C.g_free((C.gpointer)(gArr)) defer C.g_free((C.gpointer)(gArr))
@@ -30,6 +36,8 @@ func FilterProtectionSystemByDecryptors(decryptors []string) []string {
// SelectProtectionSystem iterates the supplied list of UUIDs and checks the GstRegistry for // SelectProtectionSystem iterates the supplied list of UUIDs and checks the GstRegistry for
// an element that supports one of the supplied UUIDs. If more than one element matches, the // an element that supports one of the supplied UUIDs. If more than one element matches, the
// system ID of the highest ranked element is selected. // system ID of the highest ranked element is selected.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func SelectProtectionSystem(decryptors []string) string { func SelectProtectionSystem(decryptors []string) string {
gArr := gcharStrings(decryptors) gArr := gcharStrings(decryptors)
defer C.g_free((C.gpointer)(gArr)) defer C.g_free((C.gpointer)(gArr))

View File

@@ -10,15 +10,21 @@ import (
) )
// Query is a go wrapper around a GstQuery. // Query is a go wrapper around a GstQuery.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Query struct { type Query struct {
ptr *C.GstQuery ptr *C.GstQuery
} }
// Type returns the type of the Query. // Type returns the type of the Query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) Type() QueryType { return QueryType(q.ptr._type) } func (q *Query) Type() QueryType { return QueryType(q.ptr._type) }
// FromGstQueryUnsafeNone wraps the pointer to the given C GstQuery with the go type. // FromGstQueryUnsafeNone wraps the pointer to the given C GstQuery with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstQueryUnsafeNone(query unsafe.Pointer) *Query { func FromGstQueryUnsafeNone(query unsafe.Pointer) *Query {
q := ToGstQuery(query) q := ToGstQuery(query)
q.Ref() q.Ref()
@@ -28,6 +34,8 @@ func FromGstQueryUnsafeNone(query unsafe.Pointer) *Query {
// FromGstQueryUnsafeFull wraps the pointer to the given C GstQuery with the go type. // FromGstQueryUnsafeFull wraps the pointer to the given C GstQuery with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstQueryUnsafeFull(query unsafe.Pointer) *Query { func FromGstQueryUnsafeFull(query unsafe.Pointer) *Query {
q := ToGstQuery(query) q := ToGstQuery(query)
runtime.SetFinalizer(q, (*Query).Unref) runtime.SetFinalizer(q, (*Query).Unref)
@@ -36,14 +44,20 @@ func FromGstQueryUnsafeFull(query unsafe.Pointer) *Query {
// ToGstQuery converts the given pointer into a Message without affecting the ref count or // ToGstQuery converts the given pointer into a Message without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstQuery(query unsafe.Pointer) *Query { return wrapQuery((*C.GstQuery)(query)) } func ToGstQuery(query unsafe.Pointer) *Query { return wrapQuery((*C.GstQuery)(query)) }
// NewAcceptCapsQuery constructs a new query object for querying if caps are accepted. // NewAcceptCapsQuery constructs a new query object for querying if caps are accepted.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAcceptCapsQuery(caps *Caps) *Query { func NewAcceptCapsQuery(caps *Caps) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_accept_caps(caps.Instance()))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_accept_caps(caps.Instance())))
} }
// NewAllocationQuery constructs a new query object for querying the allocation properties. // NewAllocationQuery constructs a new query object for querying the allocation properties.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewAllocationQuery(caps *Caps, needPool bool) *Query { func NewAllocationQuery(caps *Caps, needPool bool) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_allocation( return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_allocation(
caps.Instance(), gboolean(needPool), caps.Instance(), gboolean(needPool),
@@ -51,11 +65,15 @@ func NewAllocationQuery(caps *Caps, needPool bool) *Query {
} }
// NewBitrateQuery constructs a new query object for querying the bitrate. // NewBitrateQuery constructs a new query object for querying the bitrate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBitrateQuery() *Query { func NewBitrateQuery() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_bitrate())) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_bitrate()))
} }
// NewBufferingQuery constructs a new query object for querying the buffering status of a stream. // NewBufferingQuery constructs a new query object for querying the buffering status of a stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewBufferingQuery(format Format) *Query { func NewBufferingQuery(format Format) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_buffering( return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_buffering(
C.GstFormat(format), C.GstFormat(format),
@@ -75,11 +93,15 @@ func NewBufferingQuery(format Format) *Query {
// //
// The filter is used to restrict the result caps, only the caps matching filter should be returned from the CAPS // The filter is used to restrict the result caps, only the caps matching filter should be returned from the CAPS
// query. Specifying a filter might greatly reduce the amount of processing an element needs to do. // query. Specifying a filter might greatly reduce the amount of processing an element needs to do.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCapsQuery(caps *Caps) *Query { func NewCapsQuery(caps *Caps) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_caps(caps.Instance()))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_caps(caps.Instance())))
} }
// NewContextQuery constructs a new query object for querying the pipeline-local context. // NewContextQuery constructs a new query object for querying the pipeline-local context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewContextQuery(ctxType string) *Query { func NewContextQuery(ctxType string) *Query {
cName := C.CString(ctxType) cName := C.CString(ctxType)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -90,6 +112,8 @@ func NewContextQuery(ctxType string) *Query {
// NewConvertQuery constructs a new convert query object. A convert query is used to ask for a conversion between one // NewConvertQuery constructs a new convert query object. A convert query is used to ask for a conversion between one
// format and another. // format and another.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewConvertQuery(srcFormat, destFormat Format, value int64) *Query { func NewConvertQuery(srcFormat, destFormat Format, value int64) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_convert( return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_convert(
C.GstFormat(srcFormat), C.gint64(value), C.GstFormat(destFormat), C.GstFormat(srcFormat), C.gint64(value), C.GstFormat(destFormat),
@@ -97,6 +121,8 @@ func NewConvertQuery(srcFormat, destFormat Format, value int64) *Query {
} }
// NewCustomQuery constructs a new custom query object. // NewCustomQuery constructs a new custom query object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewCustomQuery(queryType QueryType, structure *Structure) *Query { func NewCustomQuery(queryType QueryType, structure *Structure) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_custom( return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_custom(
C.GstQueryType(queryType), C.GstQueryType(queryType),
@@ -105,68 +131,94 @@ func NewCustomQuery(queryType QueryType, structure *Structure) *Query {
} }
// NewDrainQuery constructs a new query object for querying the drain state. // NewDrainQuery constructs a new query object for querying the drain state.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDrainQuery() *Query { func NewDrainQuery() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_drain())) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_drain()))
} }
// NewDurationQuery constructs a new stream duration query object to query in the given format. A duration query will give the // NewDurationQuery constructs a new stream duration query object to query in the given format. A duration query will give the
// total length of the stream. // total length of the stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewDurationQuery(format Format) *Query { func NewDurationQuery(format Format) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_duration(C.GstFormat(format)))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_duration(C.GstFormat(format))))
} }
// NewFormatsQuery constructs a new query object for querying formats of the stream. // NewFormatsQuery constructs a new query object for querying formats of the stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewFormatsQuery() *Query { func NewFormatsQuery() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_formats())) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_formats()))
} }
// NewLatencyQuery constructs a new latency query object. A latency query is usually performed by sinks to compensate for additional // NewLatencyQuery constructs a new latency query object. A latency query is usually performed by sinks to compensate for additional
// latency introduced by elements in the pipeline. // latency introduced by elements in the pipeline.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewLatencyQuery() *Query { func NewLatencyQuery() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_latency())) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_latency()))
} }
// NewPositionQuery constructs a new query stream position query object. A position query is used to query the current position of playback // NewPositionQuery constructs a new query stream position query object. A position query is used to query the current position of playback
// in the streams, in some format. // in the streams, in some format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewPositionQuery(format Format) *Query { func NewPositionQuery(format Format) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_position(C.GstFormat(format)))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_position(C.GstFormat(format))))
} }
// NewSchedulingQuery constructs a new query object for querying the scheduling properties. // NewSchedulingQuery constructs a new query object for querying the scheduling properties.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSchedulingQuery() *Query { func NewSchedulingQuery() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_scheduling())) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_scheduling()))
} }
// NewSeekingQuery constructs a new query object for querying seeking properties of the stream. // NewSeekingQuery constructs a new query object for querying seeking properties of the stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSeekingQuery(format Format) *Query { func NewSeekingQuery(format Format) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_seeking(C.GstFormat(format)))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_seeking(C.GstFormat(format))))
} }
// NewSegmentQuery constructs a new segment query object. A segment query is used to discover information about the currently configured segment // NewSegmentQuery constructs a new segment query object. A segment query is used to discover information about the currently configured segment
// for playback. // for playback.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSegmentQuery(format Format) *Query { func NewSegmentQuery(format Format) *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_segment(C.GstFormat(format)))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_segment(C.GstFormat(format))))
} }
// NewURIQuery constructs a new query URI query object. An URI query is used to query the current URI that is used by the source or sink. // NewURIQuery constructs a new query URI query object. An URI query is used to query the current URI that is used by the source or sink.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewURIQuery() *Query { func NewURIQuery() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_uri())) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_uri()))
} }
// Instance returns the underlying GstQuery instance. // Instance returns the underlying GstQuery instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) Instance() *C.GstQuery { return C.toGstQuery(unsafe.Pointer(q.ptr)) } func (q *Query) Instance() *C.GstQuery { return C.toGstQuery(unsafe.Pointer(q.ptr)) }
// AddAllocationMeta adds api with params as one of the supported metadata API to query. // AddAllocationMeta adds api with params as one of the supported metadata API to query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) AddAllocationMeta(api glib.Type, structure *Structure) { func (q *Query) AddAllocationMeta(api glib.Type, structure *Structure) {
C.gst_query_add_allocation_meta(q.Instance(), (C.GType)(api), structure.Instance()) C.gst_query_add_allocation_meta(q.Instance(), (C.GType)(api), structure.Instance())
} }
// AddAllocationParam adds allocator and its params as a supported memory allocator. // AddAllocationParam adds allocator and its params as a supported memory allocator.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) AddAllocationParam(allocator *Allocator, params *AllocationParams) { func (q *Query) AddAllocationParam(allocator *Allocator, params *AllocationParams) {
C.gst_query_add_allocation_param(q.Instance(), allocator.Instance(), params.Instance()) C.gst_query_add_allocation_param(q.Instance(), allocator.Instance(), params.Instance())
} }
// AddAllocationPool sets the pool parameters in query. // AddAllocationPool sets the pool parameters in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) AddAllocationPool(pool *BufferPool, size, minBuffers, maxBuffers uint) { func (q *Query) AddAllocationPool(pool *BufferPool, size, minBuffers, maxBuffers uint) {
C.gst_query_add_allocation_pool( C.gst_query_add_allocation_pool(
q.Instance(), q.Instance(),
@@ -178,22 +230,30 @@ func (q *Query) AddAllocationPool(pool *BufferPool, size, minBuffers, maxBuffers
} }
// AddBufferingRange sets the buffering-ranges array field in query. The current last start position of the array should be inferior to start. // AddBufferingRange sets the buffering-ranges array field in query. The current last start position of the array should be inferior to start.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) AddBufferingRange(start, stop int64) (ok bool) { func (q *Query) AddBufferingRange(start, stop int64) (ok bool) {
return gobool(C.gst_query_add_buffering_range(q.Instance(), C.gint64(start), C.gint64(stop))) return gobool(C.gst_query_add_buffering_range(q.Instance(), C.gint64(start), C.gint64(stop)))
} }
// AddSchedulingMode adds mode as one of the supported scheduling modes to query. // AddSchedulingMode adds mode as one of the supported scheduling modes to query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) AddSchedulingMode(mode PadMode) { func (q *Query) AddSchedulingMode(mode PadMode) {
C.gst_query_add_scheduling_mode(q.Instance(), C.GstPadMode(mode)) C.gst_query_add_scheduling_mode(q.Instance(), C.GstPadMode(mode))
} }
// Copy copies the given query using the copy function of the parent GstStructure. // Copy copies the given query using the copy function of the parent GstStructure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) Copy() *Query { func (q *Query) Copy() *Query {
return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_copy(q.Instance()))) return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_copy(q.Instance())))
} }
// FindAllocationMeta checks if query has metadata api set. When this function returns TRUE, index will contain the index where the requested // FindAllocationMeta checks if query has metadata api set. When this function returns TRUE, index will contain the index where the requested
// API and the parameters can be found. // API and the parameters can be found.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) FindAllocationMeta(api glib.Type) (ok bool, index uint) { func (q *Query) FindAllocationMeta(api glib.Type) (ok bool, index uint) {
var out C.guint var out C.guint
gok := C.gst_query_find_allocation_meta(q.Instance(), C.GType(api), &out) gok := C.gst_query_find_allocation_meta(q.Instance(), C.GType(api), &out)
@@ -201,6 +261,8 @@ func (q *Query) FindAllocationMeta(api glib.Type) (ok bool, index uint) {
} }
// GetNumAllocationMetas retrieves the number of values currently stored in the meta API array of the query's structure. // GetNumAllocationMetas retrieves the number of values currently stored in the meta API array of the query's structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) GetNumAllocationMetas() uint { func (q *Query) GetNumAllocationMetas() uint {
return uint(C.gst_query_get_n_allocation_metas(q.Instance())) return uint(C.gst_query_get_n_allocation_metas(q.Instance()))
} }
@@ -209,41 +271,57 @@ func (q *Query) GetNumAllocationMetas() uint {
// //
// If no memory allocator is specified, the downstream element can handle the default memory allocator. The first memory allocator in the query // If no memory allocator is specified, the downstream element can handle the default memory allocator. The first memory allocator in the query
// should be generic and allow mapping to system memory, all following allocators should be ordered by preference with the preferred one first. // should be generic and allow mapping to system memory, all following allocators should be ordered by preference with the preferred one first.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) GetNumAllocationParams() uint { func (q *Query) GetNumAllocationParams() uint {
return uint(C.gst_query_get_n_allocation_params(q.Instance())) return uint(C.gst_query_get_n_allocation_params(q.Instance()))
} }
// GetNumAllocationPools retrieves the number of values currently stored in the pool array of the query's structure. // GetNumAllocationPools retrieves the number of values currently stored in the pool array of the query's structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) GetNumAllocationPools() uint { func (q *Query) GetNumAllocationPools() uint {
return uint(C.gst_query_get_n_allocation_pools(q.Instance())) return uint(C.gst_query_get_n_allocation_pools(q.Instance()))
} }
// GetNumBufferingRanges retrieves the number of values currently stored in the buffered-ranges array of the query's structure. // GetNumBufferingRanges retrieves the number of values currently stored in the buffered-ranges array of the query's structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) GetNumBufferingRanges() uint { func (q *Query) GetNumBufferingRanges() uint {
return uint(C.gst_query_get_n_buffering_ranges(q.Instance())) return uint(C.gst_query_get_n_buffering_ranges(q.Instance()))
} }
// GetNumSchedulingModes retrieves the number of values currently stored in the scheduling mode array of the query's structure. // GetNumSchedulingModes retrieves the number of values currently stored in the scheduling mode array of the query's structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) GetNumSchedulingModes() uint { func (q *Query) GetNumSchedulingModes() uint {
return uint(C.gst_query_get_n_scheduling_modes(q.Instance())) return uint(C.gst_query_get_n_scheduling_modes(q.Instance()))
} }
// GetStructure retrieves the structure of a query. // GetStructure retrieves the structure of a query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) GetStructure() *Structure { func (q *Query) GetStructure() *Structure {
return wrapStructure(C.gst_query_get_structure(q.Instance())) return wrapStructure(C.gst_query_get_structure(q.Instance()))
} }
// HasSchedulingMode checks if query has scheduling mode set. // HasSchedulingMode checks if query has scheduling mode set.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) HasSchedulingMode(mode PadMode) bool { func (q *Query) HasSchedulingMode(mode PadMode) bool {
return gobool(C.gst_query_has_scheduling_mode(q.Instance(), C.GstPadMode(mode))) return gobool(C.gst_query_has_scheduling_mode(q.Instance(), C.GstPadMode(mode)))
} }
// HasSchedulingModeWithFlags checks if query has scheduling mode set and flags is set in query scheduling flags. // HasSchedulingModeWithFlags checks if query has scheduling mode set and flags is set in query scheduling flags.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) HasSchedulingModeWithFlags(mode PadMode, flags SchedulingFlags) bool { func (q *Query) HasSchedulingModeWithFlags(mode PadMode, flags SchedulingFlags) bool {
return gobool(C.gst_query_has_scheduling_mode_with_flags(q.Instance(), C.GstPadMode(mode), C.GstSchedulingFlags(flags))) return gobool(C.gst_query_has_scheduling_mode_with_flags(q.Instance(), C.GstPadMode(mode), C.GstSchedulingFlags(flags)))
} }
// ParseAcceptCaps gets the caps from query. The caps remains valid as long as query remains valid. // ParseAcceptCaps gets the caps from query. The caps remains valid as long as query remains valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseAcceptCaps() *Caps { func (q *Query) ParseAcceptCaps() *Caps {
caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps))
C.gst_query_parse_accept_caps(q.Instance(), &caps) C.gst_query_parse_accept_caps(q.Instance(), &caps)
@@ -251,6 +329,8 @@ func (q *Query) ParseAcceptCaps() *Caps {
} }
// ParseAcceptCapsResult parses the result from the caps query. // ParseAcceptCapsResult parses the result from the caps query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseAcceptCapsResult() bool { func (q *Query) ParseAcceptCapsResult() bool {
var out C.gboolean var out C.gboolean
C.gst_query_parse_accept_caps_result(q.Instance(), &out) C.gst_query_parse_accept_caps_result(q.Instance(), &out)
@@ -258,6 +338,8 @@ func (q *Query) ParseAcceptCapsResult() bool {
} }
// ParseAllocation parses an allocation query. // ParseAllocation parses an allocation query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseAllocation() (caps *Caps, needPool bool) { func (q *Query) ParseAllocation() (caps *Caps, needPool bool) {
gcaps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) gcaps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps))
var needz C.gboolean var needz C.gboolean
@@ -266,6 +348,8 @@ func (q *Query) ParseAllocation() (caps *Caps, needPool bool) {
} }
// ParseBitrate gets the results of a bitrate query. See also SetBitrate. // ParseBitrate gets the results of a bitrate query. See also SetBitrate.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseBitrate() uint { func (q *Query) ParseBitrate() uint {
var out C.guint var out C.guint
C.gst_query_parse_bitrate(q.Instance(), &out) C.gst_query_parse_bitrate(q.Instance(), &out)
@@ -274,6 +358,8 @@ func (q *Query) ParseBitrate() uint {
// ParseBufferingPercent gets the percentage of buffered data. This is a value between 0 and 100. The busy indicator is TRUE when // ParseBufferingPercent gets the percentage of buffered data. This is a value between 0 and 100. The busy indicator is TRUE when
// the buffering is in progress. // the buffering is in progress.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseBufferingPercent() (busy bool, percent int) { func (q *Query) ParseBufferingPercent() (busy bool, percent int) {
var gb C.gboolean var gb C.gboolean
var gp C.gint var gp C.gint
@@ -282,6 +368,8 @@ func (q *Query) ParseBufferingPercent() (busy bool, percent int) {
} }
// ParseBufferingRange parses a buffering range query. // ParseBufferingRange parses a buffering range query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseBufferingRange() (format Format, start, stop, estimatedTotal int64) { func (q *Query) ParseBufferingRange() (format Format, start, stop, estimatedTotal int64) {
var gformat C.GstFormat var gformat C.GstFormat
var gstart, gstop, gestimated C.gint64 var gstart, gstop, gestimated C.gint64
@@ -290,6 +378,8 @@ func (q *Query) ParseBufferingRange() (format Format, start, stop, estimatedTota
} }
// ParseBufferingStats extracts the buffering stats values from query. // ParseBufferingStats extracts the buffering stats values from query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseBufferingStats() (mode BufferingMode, avgIn, avgOut int, bufLeft int64) { func (q *Query) ParseBufferingStats() (mode BufferingMode, avgIn, avgOut int, bufLeft int64) {
var gmode C.GstBufferingMode var gmode C.GstBufferingMode
var avgi, avgo C.gint var avgi, avgo C.gint
@@ -299,6 +389,8 @@ func (q *Query) ParseBufferingStats() (mode BufferingMode, avgIn, avgOut int, bu
} }
// ParseCaps gets the filter from the caps query. The caps remains valid as long as query remains valid. // ParseCaps gets the filter from the caps query. The caps remains valid as long as query remains valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseCaps() *Caps { func (q *Query) ParseCaps() *Caps {
caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps))
C.gst_query_parse_caps(q.Instance(), &caps) C.gst_query_parse_caps(q.Instance(), &caps)
@@ -306,6 +398,8 @@ func (q *Query) ParseCaps() *Caps {
} }
// ParseCapsResult gets the caps result from query. The caps remains valid as long as query remains valid. // ParseCapsResult gets the caps result from query. The caps remains valid as long as query remains valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseCapsResult() *Caps { func (q *Query) ParseCapsResult() *Caps {
caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps))
C.gst_query_parse_caps_result(q.Instance(), &caps) C.gst_query_parse_caps_result(q.Instance(), &caps)
@@ -313,6 +407,8 @@ func (q *Query) ParseCapsResult() *Caps {
} }
// ParseContext gets the context from the context query. The context remains valid as long as query remains valid. // ParseContext gets the context from the context query. The context remains valid as long as query remains valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseContext() *Context { func (q *Query) ParseContext() *Context {
var _ctx *C.GstContext var _ctx *C.GstContext
ctx := C.makeContextWritable(_ctx) ctx := C.makeContextWritable(_ctx)
@@ -321,6 +417,8 @@ func (q *Query) ParseContext() *Context {
} }
// ParseContextType parses a context type from an existing GST_QUERY_CONTEXT query. // ParseContextType parses a context type from an existing GST_QUERY_CONTEXT query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseContextType() (ok bool, ctxType string) { func (q *Query) ParseContextType() (ok bool, ctxType string) {
tPtr := C.malloc(C.sizeof_char * 1024) tPtr := C.malloc(C.sizeof_char * 1024)
defer C.free(unsafe.Pointer(tPtr)) defer C.free(unsafe.Pointer(tPtr))
@@ -332,6 +430,8 @@ func (q *Query) ParseContextType() (ok bool, ctxType string) {
} }
// ParseConvert parses a convert query answer. // ParseConvert parses a convert query answer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseConvert() (srcformat, destFormat Format, srcValue, destValue int64) { func (q *Query) ParseConvert() (srcformat, destFormat Format, srcValue, destValue int64) {
var gsrcf, gdestf C.GstFormat var gsrcf, gdestf C.GstFormat
var gsval, gdval C.gint64 var gsval, gdval C.gint64
@@ -340,6 +440,8 @@ func (q *Query) ParseConvert() (srcformat, destFormat Format, srcValue, destValu
} }
// ParseDuration parses a duration query answer. // ParseDuration parses a duration query answer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseDuration() (format Format, duration int64) { func (q *Query) ParseDuration() (format Format, duration int64) {
var gf C.GstFormat var gf C.GstFormat
var gd C.gint64 var gd C.gint64
@@ -348,6 +450,8 @@ func (q *Query) ParseDuration() (format Format, duration int64) {
} }
// ParseLatency parses a latency query answer. // ParseLatency parses a latency query answer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseLatency() (live bool, minLatency, maxLatency ClockTime) { func (q *Query) ParseLatency() (live bool, minLatency, maxLatency ClockTime) {
var min, max C.GstClockTime var min, max C.GstClockTime
var gl C.gboolean var gl C.gboolean
@@ -356,6 +460,8 @@ func (q *Query) ParseLatency() (live bool, minLatency, maxLatency ClockTime) {
} }
// ParseNumFormats parses the number of formats in the formats query. // ParseNumFormats parses the number of formats in the formats query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseNumFormats() uint { func (q *Query) ParseNumFormats() uint {
var out C.guint var out C.guint
C.gst_query_parse_n_formats(q.Instance(), &out) C.gst_query_parse_n_formats(q.Instance(), &out)
@@ -363,6 +469,8 @@ func (q *Query) ParseNumFormats() uint {
} }
// ParseAllocationMetaAt parses an available query and get the metadata API at index of the metadata API array. // ParseAllocationMetaAt parses an available query and get the metadata API at index of the metadata API array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseAllocationMetaAt(idx uint) (api glib.Type, st *Structure) { func (q *Query) ParseAllocationMetaAt(idx uint) (api glib.Type, st *Structure) {
var gs *C.GstStructure var gs *C.GstStructure
gtype := C.gst_query_parse_nth_allocation_meta(q.Instance(), C.guint(idx), &gs) gtype := C.gst_query_parse_nth_allocation_meta(q.Instance(), C.guint(idx), &gs)
@@ -370,6 +478,8 @@ func (q *Query) ParseAllocationMetaAt(idx uint) (api glib.Type, st *Structure) {
} }
// ParseAllocationParamAt parses an available query and get the allocator and its params at index of the allocator array. // ParseAllocationParamAt parses an available query and get the allocator and its params at index of the allocator array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseAllocationParamAt(idx uint) (*Allocator, *AllocationParams) { func (q *Query) ParseAllocationParamAt(idx uint) (*Allocator, *AllocationParams) {
var alloc *C.GstAllocator var alloc *C.GstAllocator
var params C.GstAllocationParams var params C.GstAllocationParams
@@ -378,6 +488,8 @@ func (q *Query) ParseAllocationParamAt(idx uint) (*Allocator, *AllocationParams)
} }
// ParseAllocationPoolAt gets the pool parameters in query. // ParseAllocationPoolAt gets the pool parameters in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseAllocationPoolAt(idx uint) (pool *BufferPool, size, minBuffers, maxBuffers uint) { func (q *Query) ParseAllocationPoolAt(idx uint) (pool *BufferPool, size, minBuffers, maxBuffers uint) {
var gpool *C.GstBufferPool var gpool *C.GstBufferPool
var gs, gmin, gmax C.guint var gs, gmin, gmax C.guint
@@ -386,6 +498,8 @@ func (q *Query) ParseAllocationPoolAt(idx uint) (pool *BufferPool, size, minBuff
} }
// ParseBufferingRangeAt parses an available query and get the start and stop values stored at the index of the buffered ranges array. // ParseBufferingRangeAt parses an available query and get the start and stop values stored at the index of the buffered ranges array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseBufferingRangeAt(idx uint) (start, stop int64) { func (q *Query) ParseBufferingRangeAt(idx uint) (start, stop int64) {
var gstart, gstop C.gint64 var gstart, gstop C.gint64
C.gst_query_parse_nth_buffering_range(q.Instance(), C.guint(idx), &gstart, &gstop) C.gst_query_parse_nth_buffering_range(q.Instance(), C.guint(idx), &gstart, &gstop)
@@ -394,6 +508,8 @@ func (q *Query) ParseBufferingRangeAt(idx uint) (start, stop int64) {
// ParseFormatAt parses the format query and retrieve the nth format from it into format. If the list contains less elements than nth, // ParseFormatAt parses the format query and retrieve the nth format from it into format. If the list contains less elements than nth,
// format will be set to GST_FORMAT_UNDEFINED. // format will be set to GST_FORMAT_UNDEFINED.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseFormatAt(idx uint) Format { func (q *Query) ParseFormatAt(idx uint) Format {
var out C.GstFormat var out C.GstFormat
C.gst_query_parse_nth_format(q.Instance(), C.guint(idx), &out) C.gst_query_parse_nth_format(q.Instance(), C.guint(idx), &out)
@@ -401,11 +517,15 @@ func (q *Query) ParseFormatAt(idx uint) Format {
} }
// ParseSchedulingModeAt parses an available query and get the scheduling mode at index of the scheduling modes array. // ParseSchedulingModeAt parses an available query and get the scheduling mode at index of the scheduling modes array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseSchedulingModeAt(idx uint) PadMode { func (q *Query) ParseSchedulingModeAt(idx uint) PadMode {
return PadMode(C.gst_query_parse_nth_scheduling_mode(q.Instance(), C.guint(idx))) return PadMode(C.gst_query_parse_nth_scheduling_mode(q.Instance(), C.guint(idx)))
} }
// ParsePosition parses a position query, writing the format into format, and the position into cur, if the respective parameters are non-%NULL. // ParsePosition parses a position query, writing the format into format, and the position into cur, if the respective parameters are non-%NULL.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParsePosition() (format Format, cur int64) { func (q *Query) ParsePosition() (format Format, cur int64) {
var gf C.GstFormat var gf C.GstFormat
var out C.gint64 var out C.gint64
@@ -414,6 +534,8 @@ func (q *Query) ParsePosition() (format Format, cur int64) {
} }
// ParseScheduling sets the scheduling properties. // ParseScheduling sets the scheduling properties.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseScheduling() (flags SchedulingFlags, minSize, maxSize, align int) { func (q *Query) ParseScheduling() (flags SchedulingFlags, minSize, maxSize, align int) {
var gf C.GstSchedulingFlags var gf C.GstSchedulingFlags
var gmin, gmax, galign C.gint var gmin, gmax, galign C.gint
@@ -422,6 +544,8 @@ func (q *Query) ParseScheduling() (flags SchedulingFlags, minSize, maxSize, alig
} }
// ParseSeeking parses a seeking query. // ParseSeeking parses a seeking query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseSeeking() (format Format, seekable bool, start, end int64) { func (q *Query) ParseSeeking() (format Format, seekable bool, start, end int64) {
var gs, ge C.gint64 var gs, ge C.gint64
var seek C.gboolean var seek C.gboolean
@@ -431,6 +555,8 @@ func (q *Query) ParseSeeking() (format Format, seekable bool, start, end int64)
} }
// ParseSegment parses a segment query answer. // ParseSegment parses a segment query answer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseSegment() (rate float64, format Format, start, stop int64) { func (q *Query) ParseSegment() (rate float64, format Format, start, stop int64) {
var gs, ge C.gint64 var gs, ge C.gint64
var f C.GstFormat var f C.GstFormat
@@ -440,6 +566,8 @@ func (q *Query) ParseSegment() (rate float64, format Format, start, stop int64)
} }
// ParseURI parses a URI query. // ParseURI parses a URI query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseURI() string { func (q *Query) ParseURI() string {
tPtr := C.malloc(C.sizeof_char * 1024) tPtr := C.malloc(C.sizeof_char * 1024)
defer C.free(unsafe.Pointer(tPtr)) defer C.free(unsafe.Pointer(tPtr))
@@ -448,6 +576,8 @@ func (q *Query) ParseURI() string {
} }
// ParseURIRedirection parses a URI query. // ParseURIRedirection parses a URI query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseURIRedirection() string { func (q *Query) ParseURIRedirection() string {
tPtr := C.malloc(C.sizeof_char * 1024) tPtr := C.malloc(C.sizeof_char * 1024)
defer C.free(unsafe.Pointer(tPtr)) defer C.free(unsafe.Pointer(tPtr))
@@ -458,6 +588,8 @@ func (q *Query) ParseURIRedirection() string {
// ParseURIRedirectionPermanent parses an URI query, and set permanent to TRUE if there is a redirection and it should be considered permanent. // ParseURIRedirectionPermanent parses an URI query, and set permanent to TRUE if there is a redirection and it should be considered permanent.
// If a redirection is permanent, applications should update their internal storage of the URI, otherwise they should make all future requests // If a redirection is permanent, applications should update their internal storage of the URI, otherwise they should make all future requests
// to the original URI. // to the original URI.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) ParseURIRedirectionPermanent() bool { func (q *Query) ParseURIRedirectionPermanent() bool {
var out C.gboolean var out C.gboolean
C.gst_query_parse_uri_redirection_permanent(q.Instance(), &out) C.gst_query_parse_uri_redirection_permanent(q.Instance(), &out)
@@ -465,68 +597,94 @@ func (q *Query) ParseURIRedirectionPermanent() bool {
} }
// RemoveAllocationMetaAt removes the metadata API at index of the metadata API array. // RemoveAllocationMetaAt removes the metadata API at index of the metadata API array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) RemoveAllocationMetaAt(idx uint) { func (q *Query) RemoveAllocationMetaAt(idx uint) {
C.gst_query_remove_nth_allocation_meta(q.Instance(), C.guint(idx)) C.gst_query_remove_nth_allocation_meta(q.Instance(), C.guint(idx))
} }
// RemoveAllocationParamAt removes the allocation param at index of the allocation param array. // RemoveAllocationParamAt removes the allocation param at index of the allocation param array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) RemoveAllocationParamAt(idx uint) { func (q *Query) RemoveAllocationParamAt(idx uint) {
C.gst_query_remove_nth_allocation_param(q.Instance(), C.guint(idx)) C.gst_query_remove_nth_allocation_param(q.Instance(), C.guint(idx))
} }
// RemoveAllocationPoolAt removes the allocation pool at index of the allocation pool array. // RemoveAllocationPoolAt removes the allocation pool at index of the allocation pool array.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) RemoveAllocationPoolAt(idx uint) { func (q *Query) RemoveAllocationPoolAt(idx uint) {
C.gst_query_remove_nth_allocation_pool(q.Instance(), C.guint(idx)) C.gst_query_remove_nth_allocation_pool(q.Instance(), C.guint(idx))
} }
// SetAcceptCapsResult sets result as the result for the query. // SetAcceptCapsResult sets result as the result for the query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetAcceptCapsResult(result bool) { func (q *Query) SetAcceptCapsResult(result bool) {
C.gst_query_set_accept_caps_result(q.Instance(), gboolean(result)) C.gst_query_set_accept_caps_result(q.Instance(), gboolean(result))
} }
// SetBitrate sets the results of a bitrate query. The nominal bitrate is the average bitrate expected over the length of the stream as advertised // SetBitrate sets the results of a bitrate query. The nominal bitrate is the average bitrate expected over the length of the stream as advertised
// in file headers (or similar). // in file headers (or similar).
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetBitrate(nominal uint) { func (q *Query) SetBitrate(nominal uint) {
C.gst_query_set_bitrate(q.Instance(), C.guint(nominal)) C.gst_query_set_bitrate(q.Instance(), C.guint(nominal))
} }
// SetBufferingPercent sets the percentage of buffered data. This is a value between 0 and 100. The busy indicator is TRUE when the buffering is // SetBufferingPercent sets the percentage of buffered data. This is a value between 0 and 100. The busy indicator is TRUE when the buffering is
// in progress. // in progress.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetBufferingPercent(busy bool, percent int) { func (q *Query) SetBufferingPercent(busy bool, percent int) {
C.gst_query_set_buffering_percent(q.Instance(), gboolean(busy), C.gint(percent)) C.gst_query_set_buffering_percent(q.Instance(), gboolean(busy), C.gint(percent))
} }
// SetBufferingRange sets the available query result fields in query. // SetBufferingRange sets the available query result fields in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetBufferingRange(format Format, start, stop, estimatedTotal int64) { func (q *Query) SetBufferingRange(format Format, start, stop, estimatedTotal int64) {
C.gst_query_set_buffering_range(q.Instance(), C.GstFormat(format), C.gint64(start), C.gint64(stop), C.gint64(estimatedTotal)) C.gst_query_set_buffering_range(q.Instance(), C.GstFormat(format), C.gint64(start), C.gint64(stop), C.gint64(estimatedTotal))
} }
// SetBufferingStats configures the buffering stats values in query. // SetBufferingStats configures the buffering stats values in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetBufferingStats(mode BufferingMode, avgIn, avgOut int, bufferingLeft int64) { func (q *Query) SetBufferingStats(mode BufferingMode, avgIn, avgOut int, bufferingLeft int64) {
C.gst_query_set_buffering_stats(q.Instance(), C.GstBufferingMode(mode), C.gint(avgIn), C.gint(avgOut), C.gint64(bufferingLeft)) C.gst_query_set_buffering_stats(q.Instance(), C.GstBufferingMode(mode), C.gint(avgIn), C.gint(avgOut), C.gint64(bufferingLeft))
} }
// SetCapsResult sets the caps result in query. // SetCapsResult sets the caps result in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetCapsResult(caps *Caps) { func (q *Query) SetCapsResult(caps *Caps) {
C.gst_query_set_caps_result(q.Instance(), caps.Instance()) C.gst_query_set_caps_result(q.Instance(), caps.Instance())
} }
// SetContext answers a context query by setting the requested context. // SetContext answers a context query by setting the requested context.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetContext(ctx *Context) { func (q *Query) SetContext(ctx *Context) {
C.gst_query_set_context(q.Instance(), ctx.Instance()) C.gst_query_set_context(q.Instance(), ctx.Instance())
} }
// SetConvert answers a convert query by setting the requested values. // SetConvert answers a convert query by setting the requested values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetConvert(srcFormat, destFormat Format, srcValue, destValue int64) { func (q *Query) SetConvert(srcFormat, destFormat Format, srcValue, destValue int64) {
C.gst_query_set_convert(q.Instance(), C.GstFormat(srcFormat), C.gint64(srcValue), C.GstFormat(destFormat), C.gint64(destValue)) C.gst_query_set_convert(q.Instance(), C.GstFormat(srcFormat), C.gint64(srcValue), C.GstFormat(destFormat), C.gint64(destValue))
} }
// SetDuration answers a duration query by setting the requested value in the given format. // SetDuration answers a duration query by setting the requested value in the given format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetDuration(format Format, duration int64) { func (q *Query) SetDuration(format Format, duration int64) {
C.gst_query_set_duration(q.Instance(), C.GstFormat(format), C.gint64(duration)) C.gst_query_set_duration(q.Instance(), C.GstFormat(format), C.gint64(duration))
} }
// SetFormats sets the formats query result fields in query. The number of formats passed must be equal to n_formats. // SetFormats sets the formats query result fields in query. The number of formats passed must be equal to n_formats.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetFormats(formats ...Format) { func (q *Query) SetFormats(formats ...Format) {
gstFormats := make([]C.GstFormat, len(formats)) gstFormats := make([]C.GstFormat, len(formats))
for _, f := range formats { for _, f := range formats {
@@ -536,31 +694,43 @@ func (q *Query) SetFormats(formats ...Format) {
} }
// SetLatency answers a latency query by setting the requested values in the given format. // SetLatency answers a latency query by setting the requested values in the given format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetLatency(live bool, minLatency, maxLatency ClockTime) { func (q *Query) SetLatency(live bool, minLatency, maxLatency ClockTime) {
C.gst_query_set_latency(q.Instance(), gboolean(live), C.guint64(minLatency), C.guint64(maxLatency)) C.gst_query_set_latency(q.Instance(), gboolean(live), C.guint64(minLatency), C.guint64(maxLatency))
} }
// SetAllocationParamAt sets allocation params in query. // SetAllocationParamAt sets allocation params in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetAllocationParamAt(idx uint, allocator *Allocator, params *AllocationParams) { func (q *Query) SetAllocationParamAt(idx uint, allocator *Allocator, params *AllocationParams) {
C.gst_query_set_nth_allocation_param(q.Instance(), C.guint(idx), allocator.Instance(), params.Instance()) C.gst_query_set_nth_allocation_param(q.Instance(), C.guint(idx), allocator.Instance(), params.Instance())
} }
// SetAllocationPoolAt sets the pool parameters in query. // SetAllocationPoolAt sets the pool parameters in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetAllocationPoolAt(idx uint, pool *BufferPool, size, minBuffers, maxBuffers uint) { func (q *Query) SetAllocationPoolAt(idx uint, pool *BufferPool, size, minBuffers, maxBuffers uint) {
C.gst_query_set_nth_allocation_pool(q.Instance(), C.guint(idx), pool.Instance(), C.guint(size), C.guint(minBuffers), C.guint(maxBuffers)) C.gst_query_set_nth_allocation_pool(q.Instance(), C.guint(idx), pool.Instance(), C.guint(size), C.guint(minBuffers), C.guint(maxBuffers))
} }
// SetPosition answers a position query by setting the requested value in the given format. // SetPosition answers a position query by setting the requested value in the given format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetPosition(format Format, cur int64) { func (q *Query) SetPosition(format Format, cur int64) {
C.gst_query_set_position(q.Instance(), C.GstFormat(format), C.gint64(cur)) C.gst_query_set_position(q.Instance(), C.GstFormat(format), C.gint64(cur))
} }
// SetScheduling sets the scheduling properties. // SetScheduling sets the scheduling properties.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetScheduling(flags SchedulingFlags, minSize, maxSize, align int) { func (q *Query) SetScheduling(flags SchedulingFlags, minSize, maxSize, align int) {
C.gst_query_set_scheduling(q.Instance(), C.GstSchedulingFlags(flags), C.gint(minSize), C.gint(maxSize), C.gint(align)) C.gst_query_set_scheduling(q.Instance(), C.GstSchedulingFlags(flags), C.gint(minSize), C.gint(maxSize), C.gint(align))
} }
// SetSeeking sets the seeking query result fields in query. // SetSeeking sets the seeking query result fields in query.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetSeeking(format Format, seekable bool, segmentStart, segmentEnd int64) { func (q *Query) SetSeeking(format Format, seekable bool, segmentStart, segmentEnd int64) {
C.gst_query_set_seeking(q.Instance(), C.GstFormat(format), gboolean(seekable), C.gint64(segmentStart), C.gint64(segmentEnd)) C.gst_query_set_seeking(q.Instance(), C.GstFormat(format), gboolean(seekable), C.gint64(segmentStart), C.gint64(segmentEnd))
} }
@@ -571,11 +741,15 @@ func (q *Query) SetSeeking(format Format, seekable bool, segmentStart, segmentEn
// start_value and stop_value will respectively contain the configured playback range start and stop values expressed in format. The values are always between // start_value and stop_value will respectively contain the configured playback range start and stop values expressed in format. The values are always between
// 0 and the duration of the media and start_value <= stop_value. rate will contain the playback rate. For negative rates, playback will actually happen from // 0 and the duration of the media and start_value <= stop_value. rate will contain the playback rate. For negative rates, playback will actually happen from
// stop_value to start_value. // stop_value to start_value.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetSegment(rate float64, format Format, startValue, stopValue int64) { func (q *Query) SetSegment(rate float64, format Format, startValue, stopValue int64) {
C.gst_query_set_segment(q.Instance(), C.gdouble(rate), C.GstFormat(format), C.gint64(startValue), C.gint64(stopValue)) C.gst_query_set_segment(q.Instance(), C.gdouble(rate), C.GstFormat(format), C.gint64(startValue), C.gint64(stopValue))
} }
// SetURI answers a URI query by setting the requested URI. // SetURI answers a URI query by setting the requested URI.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetURI(uri string) { func (q *Query) SetURI(uri string) {
curi := C.CString(uri) curi := C.CString(uri)
defer C.free(unsafe.Pointer(curi)) defer C.free(unsafe.Pointer(curi))
@@ -583,6 +757,8 @@ func (q *Query) SetURI(uri string) {
} }
// SetURIRedirection answers a URI query by setting the requested URI redirection. // SetURIRedirection answers a URI query by setting the requested URI redirection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetURIRedirection(uri string) { func (q *Query) SetURIRedirection(uri string) {
curi := C.CString(uri) curi := C.CString(uri)
defer C.free(unsafe.Pointer(curi)) defer C.free(unsafe.Pointer(curi))
@@ -590,22 +766,30 @@ func (q *Query) SetURIRedirection(uri string) {
} }
// SetURIRedirectionPermanent answers a URI query by setting the requested URI redirection to permanent or not. // SetURIRedirectionPermanent answers a URI query by setting the requested URI redirection to permanent or not.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) SetURIRedirectionPermanent(permanent bool) { func (q *Query) SetURIRedirectionPermanent(permanent bool) {
C.gst_query_set_uri_redirection_permanent(q.Instance(), gboolean(permanent)) C.gst_query_set_uri_redirection_permanent(q.Instance(), gboolean(permanent))
} }
// Ref increases the query ref count by one. // Ref increases the query ref count by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) Ref() *Query { func (q *Query) Ref() *Query {
C.gst_query_ref(q.Instance()) C.gst_query_ref(q.Instance())
return q return q
} }
// Unref decreases the refcount of the query. If the refcount reaches 0, the query will be freed. // Unref decreases the refcount of the query. If the refcount reaches 0, the query will be freed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) Unref() { func (q *Query) Unref() {
C.gst_query_unref(q.Instance()) C.gst_query_unref(q.Instance())
} }
// WritableStructure gets the structure of a query. This method should be called with a writable query so that the returned structure is guaranteed to be writable. // WritableStructure gets the structure of a query. This method should be called with a writable query so that the returned structure is guaranteed to be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (q *Query) WritableStructure() *Structure { func (q *Query) WritableStructure() *Structure {
return wrapStructure(C.gst_query_writable_structure(q.Instance())) return wrapStructure(C.gst_query_writable_structure(q.Instance()))
} }

View File

@@ -14,25 +14,35 @@ import (
type Registry struct{ *Object } type Registry struct{ *Object }
// FromGstRegistryUnsafeNone wraps the given GstRegistry pointer. // FromGstRegistryUnsafeNone wraps the given GstRegistry pointer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstRegistryUnsafeNone(registry unsafe.Pointer) *Registry { func FromGstRegistryUnsafeNone(registry unsafe.Pointer) *Registry {
return &Registry{wrapObject(glib.TransferNone(registry))} return &Registry{wrapObject(glib.TransferNone(registry))}
} }
// FromGstRegistryUnsafeFull wraps the given GstRegistry pointer. // FromGstRegistryUnsafeFull wraps the given GstRegistry pointer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstRegistryUnsafeFull(registry unsafe.Pointer) *Registry { func FromGstRegistryUnsafeFull(registry unsafe.Pointer) *Registry {
return &Registry{wrapObject(glib.TransferFull(registry))} return &Registry{wrapObject(glib.TransferFull(registry))}
} }
// GetRegistry returns the default global GstRegistry. // GetRegistry returns the default global GstRegistry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func GetRegistry() *Registry { func GetRegistry() *Registry {
registry := C.gst_registry_get() registry := C.gst_registry_get()
return FromGstRegistryUnsafeNone(unsafe.Pointer(registry)) return FromGstRegistryUnsafeNone(unsafe.Pointer(registry))
} }
// Instance returns the underlying GstRegistry instance. // Instance returns the underlying GstRegistry instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (r *Registry) Instance() *C.GstRegistry { return C.toGstRegistry(r.Unsafe()) } func (r *Registry) Instance() *C.GstRegistry { return C.toGstRegistry(r.Unsafe()) }
// FindPlugin retrieves the plugin by the given name. // FindPlugin retrieves the plugin by the given name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (r *Registry) FindPlugin(name string) (*Plugin, error) { func (r *Registry) FindPlugin(name string) (*Plugin, error) {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -44,6 +54,8 @@ func (r *Registry) FindPlugin(name string) (*Plugin, error) {
} }
// LookupFeature looks up the given plugin feature by name. // LookupFeature looks up the given plugin feature by name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (r *Registry) LookupFeature(name string) (*PluginFeature, error) { func (r *Registry) LookupFeature(name string) (*PluginFeature, error) {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))

View File

@@ -9,12 +9,16 @@ import (
) )
// Sample is a go wrapper around a GstSample object. // Sample is a go wrapper around a GstSample object.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Sample struct { type Sample struct {
sample *C.GstSample sample *C.GstSample
} }
// FromGstSampleUnsafeNone wraps the pointer to the given C GstSample with the go type. // FromGstSampleUnsafeNone wraps the pointer to the given C GstSample with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstSampleUnsafeNone(sample unsafe.Pointer) *Sample { func FromGstSampleUnsafeNone(sample unsafe.Pointer) *Sample {
s := wrapSample(C.toGstSample(sample)) s := wrapSample(C.toGstSample(sample))
s.Ref() s.Ref()
@@ -24,6 +28,8 @@ func FromGstSampleUnsafeNone(sample unsafe.Pointer) *Sample {
// FromGstSampleUnsafeFull wraps the pointer to the given C GstSample with the go type. // FromGstSampleUnsafeFull wraps the pointer to the given C GstSample with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstSampleUnsafeFull(sample unsafe.Pointer) *Sample { func FromGstSampleUnsafeFull(sample unsafe.Pointer) *Sample {
s := wrapSample(C.toGstSample(sample)) s := wrapSample(C.toGstSample(sample))
runtime.SetFinalizer(s, (*Sample).Unref) runtime.SetFinalizer(s, (*Sample).Unref)
@@ -31,61 +37,89 @@ func FromGstSampleUnsafeFull(sample unsafe.Pointer) *Sample {
} }
// Instance returns the underlying *GstSample instance. // Instance returns the underlying *GstSample instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) Instance() *C.GstSample { return C.toGstSample(unsafe.Pointer(s.sample)) } func (s *Sample) Instance() *C.GstSample { return C.toGstSample(unsafe.Pointer(s.sample)) }
// Ref increases the ref count on the sample. // Ref increases the ref count on the sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) Ref() *Sample { func (s *Sample) Ref() *Sample {
return wrapSample(C.gst_sample_ref(s.Instance())) return wrapSample(C.gst_sample_ref(s.Instance()))
} }
// Copy creates a copy of the given sample. This will also make a newly allocated copy of the data // Copy creates a copy of the given sample. This will also make a newly allocated copy of the data
// the source sample contains. // the source sample contains.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) Copy() *Sample { func (s *Sample) Copy() *Sample {
return FromGstSampleUnsafeFull(unsafe.Pointer(C.gst_sample_copy(s.Instance()))) return FromGstSampleUnsafeFull(unsafe.Pointer(C.gst_sample_copy(s.Instance())))
} }
// GetBuffer returns the buffer inside this sample. // GetBuffer returns the buffer inside this sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) GetBuffer() *Buffer { func (s *Sample) GetBuffer() *Buffer {
return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_sample_get_buffer((*C.GstSample)(s.Instance())))) return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_sample_get_buffer((*C.GstSample)(s.Instance()))))
} }
// GetBufferList gets the buffer list associated with this sample. // GetBufferList gets the buffer list associated with this sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) GetBufferList() *BufferList { func (s *Sample) GetBufferList() *BufferList {
return FromGstBufferListUnsafeNone(unsafe.Pointer(C.gst_sample_get_buffer_list(s.Instance()))) return FromGstBufferListUnsafeNone(unsafe.Pointer(C.gst_sample_get_buffer_list(s.Instance())))
} }
// GetCaps returns the caps associated with this sample. Take a ref if you need to hold on to them // GetCaps returns the caps associated with this sample. Take a ref if you need to hold on to them
// longer then the life of the sample. // longer then the life of the sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) GetCaps() *Caps { func (s *Sample) GetCaps() *Caps {
return FromGstCapsUnsafeNone(unsafe.Pointer(C.gst_sample_get_caps(s.Instance()))) return FromGstCapsUnsafeNone(unsafe.Pointer(C.gst_sample_get_caps(s.Instance())))
} }
// GetInfo gets extra information about this sample. The structure remains valid as long as sample is valid. // GetInfo gets extra information about this sample. The structure remains valid as long as sample is valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) GetInfo() *Structure { return wrapStructure(C.gst_sample_get_info(s.Instance())) } func (s *Sample) GetInfo() *Structure { return wrapStructure(C.gst_sample_get_info(s.Instance())) }
// GetSegment gets the segment associated with the sample. The segmenr remains valid as long as sample is valid. // GetSegment gets the segment associated with the sample. The segmenr remains valid as long as sample is valid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) GetSegment() *Segment { return wrapSegment(C.gst_sample_get_segment(s.Instance())) } func (s *Sample) GetSegment() *Segment { return wrapSegment(C.gst_sample_get_segment(s.Instance())) }
// SetBuffer sets the buffer inside this sample. The sample must be writable. // SetBuffer sets the buffer inside this sample. The sample must be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) SetBuffer(buf *Buffer) { C.gst_sample_set_buffer(s.Instance(), buf.Instance()) } func (s *Sample) SetBuffer(buf *Buffer) { C.gst_sample_set_buffer(s.Instance(), buf.Instance()) }
// SetBufferList sets the buffer list for this sample. The sample must be writable. // SetBufferList sets the buffer list for this sample. The sample must be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) SetBufferList(buf *BufferList) { func (s *Sample) SetBufferList(buf *BufferList) {
C.gst_sample_set_buffer_list(s.Instance(), buf.Instance()) C.gst_sample_set_buffer_list(s.Instance(), buf.Instance())
} }
// SetCaps sets the caps on this sample. The sample must be writable. // SetCaps sets the caps on this sample. The sample must be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) SetCaps(caps *Caps) { C.gst_sample_set_caps(s.Instance(), caps.Instance()) } func (s *Sample) SetCaps(caps *Caps) { C.gst_sample_set_caps(s.Instance(), caps.Instance()) }
// SetInfo sets the info on this sample. The sample must be writable. // SetInfo sets the info on this sample. The sample must be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) SetInfo(st *Structure) bool { func (s *Sample) SetInfo(st *Structure) bool {
return gobool(C.gst_sample_set_info(s.Instance(), st.Instance())) return gobool(C.gst_sample_set_info(s.Instance(), st.Instance()))
} }
// SetSegment sets the segment on this sample. The sample must be writable. // SetSegment sets the segment on this sample. The sample must be writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) SetSegment(segment *Segment) { func (s *Sample) SetSegment(segment *Segment) {
C.gst_sample_set_segment(s.Instance(), segment.Instance()) C.gst_sample_set_segment(s.Instance(), segment.Instance())
} }
// Unref calls gst_sample_unref on the sample. // Unref calls gst_sample_unref on the sample.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Sample) Unref() { C.gst_sample_unref((*C.GstSample)(s.Instance())) } func (s *Sample) Unref() { C.gst_sample_unref((*C.GstSample)(s.Instance())) }

View File

@@ -6,27 +6,37 @@ import "unsafe"
// Segment is a go wrapper around a GstSegment. // Segment is a go wrapper around a GstSegment.
// See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstsegment.html?gi-language=c#GstSegment // See: https://gstreamer.freedesktop.org/documentation/gstreamer/gstsegment.html?gi-language=c#GstSegment
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Segment struct { type Segment struct {
ptr *C.GstSegment ptr *C.GstSegment
} }
// FromGstSegmentUnsafe wraps the GstSegment pointer. // FromGstSegmentUnsafe wraps the GstSegment pointer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstSegmentUnsafe(segment unsafe.Pointer) *Segment { func FromGstSegmentUnsafe(segment unsafe.Pointer) *Segment {
return wrapSegment((*C.GstSegment)(segment)) return wrapSegment((*C.GstSegment)(segment))
} }
// ToGstSegment converts the given pointer into a Segment without affecting the ref count or // ToGstSegment converts the given pointer into a Segment without affecting the ref count or
// placing finalizers. // placing finalizers.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ToGstSegment(segment unsafe.Pointer) *Segment { func ToGstSegment(segment unsafe.Pointer) *Segment {
return wrapSegment((*C.GstSegment)(segment)) return wrapSegment((*C.GstSegment)(segment))
} }
// NewSegment allocates and initializes a new Segment. Free when you are finished. // NewSegment allocates and initializes a new Segment. Free when you are finished.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSegment() *Segment { func NewSegment() *Segment {
return wrapSegment(C.gst_segment_new()) return wrapSegment(C.gst_segment_new())
} }
// NewFormattedSegment returns a new Segment with the given format. // NewFormattedSegment returns a new Segment with the given format.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewFormattedSegment(f Format) *Segment { func NewFormattedSegment(f Format) *Segment {
segment := NewSegment() segment := NewSegment()
segment.SetFormat(f) segment.SetFormat(f)
@@ -34,51 +44,83 @@ func NewFormattedSegment(f Format) *Segment {
} }
// Instance returns the underlying GstSegment instance. // Instance returns the underlying GstSegment instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) Instance() *C.GstSegment { return s.ptr } func (s *Segment) Instance() *C.GstSegment { return s.ptr }
// GetFlags returns the flags on this segment. // GetFlags returns the flags on this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetFlags() SegmentFlags { return SegmentFlags(s.Instance().flags) } func (s *Segment) GetFlags() SegmentFlags { return SegmentFlags(s.Instance().flags) }
// SetFlags sets the flags on this segment. // SetFlags sets the flags on this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) SetFlags(flags SegmentFlags) { s.Instance().flags = C.GstSegmentFlags(flags) } func (s *Segment) SetFlags(flags SegmentFlags) { s.Instance().flags = C.GstSegmentFlags(flags) }
// GetRate returns the rate for this segment. // GetRate returns the rate for this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetRate() float64 { return float64(s.Instance().rate) } func (s *Segment) GetRate() float64 { return float64(s.Instance().rate) }
// SetRate sets the rate for this segment. // SetRate sets the rate for this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) SetRate(rate float64) { s.Instance().rate = C.gdouble(rate) } func (s *Segment) SetRate(rate float64) { s.Instance().rate = C.gdouble(rate) }
// GetAppliedRate returns the applied rate for this segment. // GetAppliedRate returns the applied rate for this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetAppliedRate() float64 { return float64(s.Instance().applied_rate) } func (s *Segment) GetAppliedRate() float64 { return float64(s.Instance().applied_rate) }
// SetAppliedRate sets the applied rate for this segment // SetAppliedRate sets the applied rate for this segment
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) SetAppliedRate(rate float64) { s.Instance().applied_rate = C.gdouble(rate) } func (s *Segment) SetAppliedRate(rate float64) { s.Instance().applied_rate = C.gdouble(rate) }
// GetFormat returns the format for this segment. // GetFormat returns the format for this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetFormat() Format { return Format(s.Instance().format) } func (s *Segment) GetFormat() Format { return Format(s.Instance().format) }
// SetFormat sets the format on this segment. // SetFormat sets the format on this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) SetFormat(f Format) { s.Instance().format = C.GstFormat(f) } func (s *Segment) SetFormat(f Format) { s.Instance().format = C.GstFormat(f) }
// GetBase returns the base for this segment. // GetBase returns the base for this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetBase() uint64 { return uint64(s.Instance().base) } func (s *Segment) GetBase() uint64 { return uint64(s.Instance().base) }
// GetOffset returns the offset for this segment. // GetOffset returns the offset for this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetOffset() uint64 { return uint64(s.Instance().offset) } func (s *Segment) GetOffset() uint64 { return uint64(s.Instance().offset) }
// GetStart returns the start of this segment. // GetStart returns the start of this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetStart() uint64 { return uint64(s.Instance().start) } func (s *Segment) GetStart() uint64 { return uint64(s.Instance().start) }
// GetStop returns the stop of this segment. // GetStop returns the stop of this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetStop() uint64 { return uint64(s.Instance().stop) } func (s *Segment) GetStop() uint64 { return uint64(s.Instance().stop) }
// GetTime returns the time of this segment. // GetTime returns the time of this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetTime() uint64 { return uint64(s.Instance().time) } func (s *Segment) GetTime() uint64 { return uint64(s.Instance().time) }
// GetPosition returns the position of this segment. // GetPosition returns the position of this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetPosition() uint64 { return uint64(s.Instance().position) } func (s *Segment) GetPosition() uint64 { return uint64(s.Instance().position) }
// GetDuration gets the duration of this segment. // GetDuration gets the duration of this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) GetDuration() uint64 { return uint64(s.Instance().duration) } func (s *Segment) GetDuration() uint64 { return uint64(s.Instance().duration) }
// Clip clips the given start and stop values to the segment boundaries given in segment. start and stop are compared and clipped // Clip clips the given start and stop values to the segment boundaries given in segment. start and stop are compared and clipped
@@ -90,6 +132,8 @@ func (s *Segment) GetDuration() uint64 { return uint64(s.Instance().duration) }
// respectively, the region fell partially in the segment. // respectively, the region fell partially in the segment.
// //
// Note that when stop is -1, clip_stop will be set to the end of the segment. Depending on the use case, this may or may not be what you want. // Note that when stop is -1, clip_stop will be set to the end of the segment. Depending on the use case, this may or may not be what you want.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) Clip(format Format, start, stop uint64) (ok bool, clipStart, clipStop uint64) { func (s *Segment) Clip(format Format, start, stop uint64) (ok bool, clipStart, clipStop uint64) {
var gclipStart, gclipStop C.guint64 var gclipStart, gclipStop C.guint64
gok := C.gst_segment_clip( gok := C.gst_segment_clip(
@@ -103,9 +147,13 @@ func (s *Segment) Clip(format Format, start, stop uint64) (ok bool, clipStart, c
} }
// Copy creates a copy of this segment. // Copy creates a copy of this segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) Copy() *Segment { return wrapSegment(C.gst_segment_copy(s.Instance())) } func (s *Segment) Copy() *Segment { return wrapSegment(C.gst_segment_copy(s.Instance())) }
// CopyInto copies the contents of this segment into the given one. // CopyInto copies the contents of this segment into the given one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) CopyInto(segment *Segment) { func (s *Segment) CopyInto(segment *Segment) {
C.gst_segment_copy_into(s.Instance(), segment.Instance()) C.gst_segment_copy_into(s.Instance(), segment.Instance())
} }
@@ -129,6 +177,8 @@ func (s *Segment) CopyInto(segment *Segment) {
// //
// update will be set to TRUE if a seek should be performed to the segment position field. This field can be FALSE if, for example, // update will be set to TRUE if a seek should be performed to the segment position field. This field can be FALSE if, for example,
// only the rate has been changed but not the playback position. // only the rate has been changed but not the playback position.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) DoSeek(rate float64, format Format, flags SeekFlags, startType SeekType, start uint64, stopType SeekType, stop uint64) (ok, update bool) { func (s *Segment) DoSeek(rate float64, format Format, flags SeekFlags, startType SeekType, start uint64, stopType SeekType, stop uint64) (ok, update bool) {
var gupdate C.gboolean var gupdate C.gboolean
gok := C.gst_segment_do_seek( gok := C.gst_segment_do_seek(
@@ -146,14 +196,20 @@ func (s *Segment) DoSeek(rate float64, format Format, flags SeekFlags, startType
} }
// Free frees the allocated segment. // Free frees the allocated segment.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) Free() { C.gst_segment_free(s.Instance()) } func (s *Segment) Free() { C.gst_segment_free(s.Instance()) }
// Init reinitializes a segment to its default values. // Init reinitializes a segment to its default values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) Init(format Format) { func (s *Segment) Init(format Format) {
C.gst_segment_init(s.Instance(), C.GstFormat(format)) C.gst_segment_init(s.Instance(), C.GstFormat(format))
} }
// IsEqual checks for two segments being equal. Equality here is defined as perfect equality, including floating point values. // IsEqual checks for two segments being equal. Equality here is defined as perfect equality, including floating point values.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) IsEqual(segment *Segment) bool { func (s *Segment) IsEqual(segment *Segment) bool {
return gobool(C.gst_segment_is_equal( return gobool(C.gst_segment_is_equal(
s.Instance(), segment.Instance(), s.Instance(), segment.Instance(),
@@ -161,6 +217,8 @@ func (s *Segment) IsEqual(segment *Segment) bool {
} }
// OffsetRunningTime adjusts the values in segment so that offset is applied to all future running-time calculations. // OffsetRunningTime adjusts the values in segment so that offset is applied to all future running-time calculations.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) OffsetRunningTime(format Format, offset int64) bool { func (s *Segment) OffsetRunningTime(format Format, offset int64) bool {
return gobool(C.gst_segment_offset_running_time( return gobool(C.gst_segment_offset_running_time(
s.Instance(), s.Instance(),
@@ -171,6 +229,8 @@ func (s *Segment) OffsetRunningTime(format Format, offset int64) bool {
// PositionFromRunningTime converts running_time into a position in the segment so that ToRunningTime with that position returns // PositionFromRunningTime converts running_time into a position in the segment so that ToRunningTime with that position returns
// running_time. The position in the segment for runningTime is returned. // running_time. The position in the segment for runningTime is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) PositionFromRunningTime(format Format, runningTime uint64) uint64 { func (s *Segment) PositionFromRunningTime(format Format, runningTime uint64) uint64 {
return uint64(C.gst_segment_position_from_running_time(s.Instance(), C.GstFormat(format), C.guint64(runningTime))) return uint64(C.gst_segment_position_from_running_time(s.Instance(), C.GstFormat(format), C.guint64(runningTime)))
} }
@@ -181,6 +241,8 @@ func (s *Segment) PositionFromRunningTime(format Format, runningTime uint64) uin
// This function is typically used by elements that need to synchronize buffers against the clock or each other. // This function is typically used by elements that need to synchronize buffers against the clock or each other.
// //
// running_time can be any value and the result of this function for values outside of the segment is extrapolated. // running_time can be any value and the result of this function for values outside of the segment is extrapolated.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) PositionFromRunningTimeFull(format Format, runningTime uint64) int64 { func (s *Segment) PositionFromRunningTimeFull(format Format, runningTime uint64) int64 {
var position C.guint64 var position C.guint64
ret := C.gst_segment_position_from_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(runningTime), &position) ret := C.gst_segment_position_from_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(runningTime), &position)
@@ -191,6 +253,8 @@ func (s *Segment) PositionFromRunningTimeFull(format Format, runningTime uint64)
} }
// PositionFromStreamTime converts stream_time into a position in the segment so that ToStreamTime with that position returns stream_time. // PositionFromStreamTime converts stream_time into a position in the segment so that ToStreamTime with that position returns stream_time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) PositionFromStreamTime(format Format, streamTime uint64) uint64 { func (s *Segment) PositionFromStreamTime(format Format, streamTime uint64) uint64 {
return uint64(C.gst_segment_position_from_stream_time(s.Instance(), C.GstFormat(format), C.guint64(streamTime))) return uint64(C.gst_segment_position_from_stream_time(s.Instance(), C.GstFormat(format), C.guint64(streamTime)))
} }
@@ -201,6 +265,8 @@ func (s *Segment) PositionFromStreamTime(format Format, streamTime uint64) uint6
// This function is typically used by elements that need to synchronize buffers against the clock or each other. // This function is typically used by elements that need to synchronize buffers against the clock or each other.
// //
// stream_time can be any value and the result of this function for values outside of the segment is extrapolated. // stream_time can be any value and the result of this function for values outside of the segment is extrapolated.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) PositionFromStreamTimeFull(format Format, streamTime uint64) int64 { func (s *Segment) PositionFromStreamTimeFull(format Format, streamTime uint64) int64 {
var position C.guint64 var position C.guint64
ret := C.gst_segment_position_from_stream_time_full(s.Instance(), C.GstFormat(format), C.guint64(streamTime), &position) ret := C.gst_segment_position_from_stream_time_full(s.Instance(), C.GstFormat(format), C.guint64(streamTime), &position)
@@ -211,6 +277,8 @@ func (s *Segment) PositionFromStreamTimeFull(format Format, streamTime uint64) i
} }
// SetRunningTime adjusts the start/stop and base values of segment such that the next valid buffer will be one with running_time. // SetRunningTime adjusts the start/stop and base values of segment such that the next valid buffer will be one with running_time.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) SetRunningTime(format Format, runningTime uint64) bool { func (s *Segment) SetRunningTime(format Format, runningTime uint64) bool {
return gobool(C.gst_segment_set_running_time( return gobool(C.gst_segment_set_running_time(
s.Instance(), s.Instance(),
@@ -226,6 +294,8 @@ func (s *Segment) SetRunningTime(format Format, runningTime uint64) bool {
// constantly increasing value starting from 0. When segment Init is called, this value will reset to 0. // constantly increasing value starting from 0. When segment Init is called, this value will reset to 0.
// //
// This function returns -1 if the position is outside of segment start and stop. // This function returns -1 if the position is outside of segment start and stop.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) ToRunningTime(format Format, position uint64) uint64 { func (s *Segment) ToRunningTime(format Format, position uint64) uint64 {
return uint64(C.gst_segment_to_running_time(s.Instance(), C.GstFormat(format), C.guint64(position))) return uint64(C.gst_segment_to_running_time(s.Instance(), C.GstFormat(format), C.guint64(position)))
} }
@@ -236,6 +306,8 @@ func (s *Segment) ToRunningTime(format Format, position uint64) uint64 {
// This function is typically used by elements that need to synchronize buffers against the clock or each other. // This function is typically used by elements that need to synchronize buffers against the clock or each other.
// //
// position can be any value and the result of this function for values outside of the segment is extrapolated. // position can be any value and the result of this function for values outside of the segment is extrapolated.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) ToRunningTimeFull(format Format, position uint64) int64 { func (s *Segment) ToRunningTimeFull(format Format, position uint64) int64 {
var runningTime C.guint64 var runningTime C.guint64
ret := C.gst_segment_to_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(position), &runningTime) ret := C.gst_segment_to_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(position), &runningTime)
@@ -251,6 +323,8 @@ func (s *Segment) ToRunningTimeFull(format Format, position uint64) int64 {
// This function is typically used by elements that need to operate on the stream time of the buffers it receives, such as effect // This function is typically used by elements that need to operate on the stream time of the buffers it receives, such as effect
// plugins. In those use cases, position is typically the buffer timestamp or clock time that one wants to convert to the stream time. // plugins. In those use cases, position is typically the buffer timestamp or clock time that one wants to convert to the stream time.
// The stream time is always between 0 and the total duration of the media stream. // The stream time is always between 0 and the total duration of the media stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) ToStreamTime(format Format, position uint64) uint64 { func (s *Segment) ToStreamTime(format Format, position uint64) uint64 {
return uint64(C.gst_segment_to_stream_time(s.Instance(), C.GstFormat(format), C.guint64(position))) return uint64(C.gst_segment_to_stream_time(s.Instance(), C.GstFormat(format), C.guint64(position)))
} }
@@ -261,6 +335,8 @@ func (s *Segment) ToStreamTime(format Format, position uint64) uint64 {
// This function is typically used by elements that need to synchronize buffers against the clock or each other. // This function is typically used by elements that need to synchronize buffers against the clock or each other.
// //
// position can be any value and the result of this function for values outside of the segment is extrapolated. // position can be any value and the result of this function for values outside of the segment is extrapolated.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Segment) ToStreamTimeFull(format Format, position uint64) int64 { func (s *Segment) ToStreamTimeFull(format Format, position uint64) int64 {
var streamTime C.guint64 var streamTime C.guint64
ret := C.gst_segment_to_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(position), &streamTime) ret := C.gst_segment_to_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(position), &streamTime)

View File

@@ -13,16 +13,22 @@ import (
type Stream struct{ *Object } type Stream struct{ *Object }
// FromGstStreamUnsafeNone captures a pointer with a ref and finalizer. // FromGstStreamUnsafeNone captures a pointer with a ref and finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstStreamUnsafeNone(stream unsafe.Pointer) *Stream { func FromGstStreamUnsafeNone(stream unsafe.Pointer) *Stream {
return &Stream{wrapObject(glib.TransferNone(stream))} return &Stream{wrapObject(glib.TransferNone(stream))}
} }
// FromGstStreamUnsafeFull captures a pointer with just a finalizer. // FromGstStreamUnsafeFull captures a pointer with just a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstStreamUnsafeFull(stream unsafe.Pointer) *Stream { func FromGstStreamUnsafeFull(stream unsafe.Pointer) *Stream {
return &Stream{wrapObject(glib.TransferNone(stream))} return &Stream{wrapObject(glib.TransferNone(stream))}
} }
// NewStream returns a new Stream with the given ID, caps, type, and flags. // NewStream returns a new Stream with the given ID, caps, type, and flags.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStream(id string, caps *Caps, sType StreamType, flags StreamFlags) *Stream { func NewStream(id string, caps *Caps, sType StreamType, flags StreamFlags) *Stream {
cID := C.CString(id) cID := C.CString(id)
defer C.free(unsafe.Pointer(cID)) defer C.free(unsafe.Pointer(cID))
@@ -31,31 +37,43 @@ func NewStream(id string, caps *Caps, sType StreamType, flags StreamFlags) *Stre
} }
// Instance returns the underlying GstStream. // Instance returns the underlying GstStream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) Instance() *C.GstStream { func (s *Stream) Instance() *C.GstStream {
return C.toGstStream(s.Unsafe()) return C.toGstStream(s.Unsafe())
} }
// Caps returns the caps for this stream. // Caps returns the caps for this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) Caps() *Caps { func (s *Stream) Caps() *Caps {
return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_stream_get_caps(s.Instance()))) return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_stream_get_caps(s.Instance())))
} }
// StreamFlags returns the flags for this stream. // StreamFlags returns the flags for this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) StreamFlags() StreamFlags { func (s *Stream) StreamFlags() StreamFlags {
return StreamFlags(C.gst_stream_get_stream_flags(s.Instance())) return StreamFlags(C.gst_stream_get_stream_flags(s.Instance()))
} }
// StreamID returns the id of this stream. // StreamID returns the id of this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) StreamID() string { func (s *Stream) StreamID() string {
return C.GoString(C.gst_stream_get_stream_id(s.Instance())) return C.GoString(C.gst_stream_get_stream_id(s.Instance()))
} }
// StreamType returns the type of this stream. // StreamType returns the type of this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) StreamType() StreamType { func (s *Stream) StreamType() StreamType {
return StreamType(C.gst_stream_get_stream_type(s.Instance())) return StreamType(C.gst_stream_get_stream_type(s.Instance()))
} }
// Tags returns the tag list for this stream. // Tags returns the tag list for this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) Tags() *TagList { func (s *Stream) Tags() *TagList {
tags := C.gst_stream_get_tags(s.Instance()) tags := C.gst_stream_get_tags(s.Instance())
if tags == nil { if tags == nil {
@@ -65,21 +83,29 @@ func (s *Stream) Tags() *TagList {
} }
// SetCaps sets the caps for this stream. // SetCaps sets the caps for this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) SetCaps(caps *Caps) { func (s *Stream) SetCaps(caps *Caps) {
C.gst_stream_set_caps(s.Instance(), caps.Instance()) C.gst_stream_set_caps(s.Instance(), caps.Instance())
} }
// SetStreamFlags sets the flags for this stream. // SetStreamFlags sets the flags for this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) SetStreamFlags(flags StreamFlags) { func (s *Stream) SetStreamFlags(flags StreamFlags) {
C.gst_stream_set_stream_flags(s.Instance(), C.GstStreamFlags(flags)) C.gst_stream_set_stream_flags(s.Instance(), C.GstStreamFlags(flags))
} }
// SetStreamType sets the type of this stream. // SetStreamType sets the type of this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) SetStreamType(sType StreamType) { func (s *Stream) SetStreamType(sType StreamType) {
C.gst_stream_set_stream_type(s.Instance(), C.GstStreamType(sType)) C.gst_stream_set_stream_type(s.Instance(), C.GstStreamType(sType))
} }
// SetTags sets the tags for this stream. // SetTags sets the tags for this stream.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Stream) SetTags(tags *TagList) { func (s *Stream) SetTags(tags *TagList) {
C.gst_stream_set_tags(s.Instance(), tags.Instance()) C.gst_stream_set_tags(s.Instance(), tags.Instance())
} }

View File

@@ -14,17 +14,23 @@ import (
type StreamCollection struct{ *Object } type StreamCollection struct{ *Object }
// FromGstStreamCollectionUnsafeNone captures a pointer with a ref and finalizer. // FromGstStreamCollectionUnsafeNone captures a pointer with a ref and finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstStreamCollectionUnsafeNone(stream unsafe.Pointer) *StreamCollection { func FromGstStreamCollectionUnsafeNone(stream unsafe.Pointer) *StreamCollection {
return &StreamCollection{wrapObject(glib.TransferNone(stream))} return &StreamCollection{wrapObject(glib.TransferNone(stream))}
} }
// FromGstStreamCollectionUnsafeFull captures a pointer with just a finalizer. // FromGstStreamCollectionUnsafeFull captures a pointer with just a finalizer.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstStreamCollectionUnsafeFull(stream unsafe.Pointer) *StreamCollection { func FromGstStreamCollectionUnsafeFull(stream unsafe.Pointer) *StreamCollection {
return &StreamCollection{wrapObject(glib.TransferFull(stream))} return &StreamCollection{wrapObject(glib.TransferFull(stream))}
} }
// NewStreamCollection returns a new StreamCollection with an upstream parent // NewStreamCollection returns a new StreamCollection with an upstream parent
// of the given stream ID. // of the given stream ID.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStreamCollection(upstreamID string) *StreamCollection { func NewStreamCollection(upstreamID string) *StreamCollection {
cID := C.CString(upstreamID) cID := C.CString(upstreamID)
defer C.free(unsafe.Pointer(cID)) defer C.free(unsafe.Pointer(cID))
@@ -33,11 +39,15 @@ func NewStreamCollection(upstreamID string) *StreamCollection {
} }
// Instance returns the underlying GstStreamCollection. // Instance returns the underlying GstStreamCollection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *StreamCollection) Instance() *C.GstStreamCollection { func (s *StreamCollection) Instance() *C.GstStreamCollection {
return C.toGstStreamCollection(s.Unsafe()) return C.toGstStreamCollection(s.Unsafe())
} }
// AddStream adds the given stream to this collection. // AddStream adds the given stream to this collection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *StreamCollection) AddStream(stream *Stream) error { func (s *StreamCollection) AddStream(stream *Stream) error {
if ok := gobool(C.gst_stream_collection_add_stream(s.Instance(), stream.Instance())); !ok { if ok := gobool(C.gst_stream_collection_add_stream(s.Instance(), stream.Instance())); !ok {
return fmt.Errorf("failed to add stream %s to collection", stream.StreamID()) return fmt.Errorf("failed to add stream %s to collection", stream.StreamID())
@@ -46,17 +56,23 @@ func (s *StreamCollection) AddStream(stream *Stream) error {
} }
// GetSize returns the size of this stream collection. // GetSize returns the size of this stream collection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *StreamCollection) GetSize() uint { func (s *StreamCollection) GetSize() uint {
return uint(C.gst_stream_collection_get_size(s.Instance())) return uint(C.gst_stream_collection_get_size(s.Instance()))
} }
// GetStreamAt returns the stream at the given index in this collection. // GetStreamAt returns the stream at the given index in this collection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *StreamCollection) GetStreamAt(idx uint) *Stream { func (s *StreamCollection) GetStreamAt(idx uint) *Stream {
stream := C.gst_stream_collection_get_stream(s.Instance(), C.guint(idx)) stream := C.gst_stream_collection_get_stream(s.Instance(), C.guint(idx))
return FromGstStreamUnsafeNone(unsafe.Pointer(stream)) return FromGstStreamUnsafeNone(unsafe.Pointer(stream))
} }
// GetUpstreamID retrieves the upstream ID for this collection. // GetUpstreamID retrieves the upstream ID for this collection.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *StreamCollection) GetUpstreamID() string { func (s *StreamCollection) GetUpstreamID() string {
return C.GoString(C.gst_stream_collection_get_upstream_id(s.Instance())) return C.GoString(C.gst_stream_collection_get_upstream_id(s.Instance()))
} }

View File

@@ -26,12 +26,16 @@ import (
) )
// Structure is a go implementation of a C GstStructure. // Structure is a go implementation of a C GstStructure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Structure struct { type Structure struct {
ptr unsafe.Pointer ptr unsafe.Pointer
gType glib.Type gType glib.Type
} }
// NewStructure returns a new empty structure with the given name. // NewStructure returns a new empty structure with the given name.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStructure(name string) *Structure { func NewStructure(name string) *Structure {
cName := C.CString(name) cName := C.CString(name)
defer C.free(unsafe.Pointer(cName)) defer C.free(unsafe.Pointer(cName))
@@ -40,6 +44,8 @@ func NewStructure(name string) *Structure {
} }
// NewStructureFromString builds a new GstStructure from the given string. // NewStructureFromString builds a new GstStructure from the given string.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewStructureFromString(stStr string) *Structure { func NewStructureFromString(stStr string) *Structure {
cStr := C.CString(stStr) cStr := C.CString(stStr)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -52,6 +58,8 @@ func NewStructureFromString(stStr string) *Structure {
// MarshalStructure will convert the given go struct into a GstStructure. Currently nested // MarshalStructure will convert the given go struct into a GstStructure. Currently nested
// structs are not supported. // structs are not supported.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func MarshalStructure(data interface{}) *Structure { func MarshalStructure(data interface{}) *Structure {
typeOf := reflect.TypeOf(data) typeOf := reflect.TypeOf(data)
valsOf := reflect.ValueOf(data) valsOf := reflect.ValueOf(data)
@@ -68,12 +76,16 @@ func MarshalStructure(data interface{}) *Structure {
// FromGstStructureUnsafe wraps the given unsafe.Pointer in a Structure. This is meant for internal usage // FromGstStructureUnsafe wraps the given unsafe.Pointer in a Structure. This is meant for internal usage
// and is exported for visibility to other packages. // and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstStructureUnsafe(st unsafe.Pointer) *Structure { func FromGstStructureUnsafe(st unsafe.Pointer) *Structure {
return wrapStructure((*C.GstStructure)(st)) return wrapStructure((*C.GstStructure)(st))
} }
// UnmarshalInto will unmarshal this structure into the given pointer. The object // UnmarshalInto will unmarshal this structure into the given pointer. The object
// reflected by the pointer must be non-nil. // reflected by the pointer must be non-nil.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) UnmarshalInto(data interface{}) error { func (s *Structure) UnmarshalInto(data interface{}) error {
rv := reflect.ValueOf(data) rv := reflect.ValueOf(data)
if rv.Kind() != reflect.Ptr || rv.IsNil() { if rv.Kind() != reflect.Ptr || rv.IsNil() {
@@ -101,6 +113,8 @@ func (s *Structure) UnmarshalInto(data interface{}) error {
} }
// Instance returns the native GstStructure instance. // Instance returns the native GstStructure instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) Instance() *C.GstStructure { func (s *Structure) Instance() *C.GstStructure {
if s == nil { if s == nil {
return nil return nil
@@ -110,9 +124,13 @@ func (s *Structure) Instance() *C.GstStructure {
} }
// Free frees the memory for the underlying GstStructure. // Free frees the memory for the underlying GstStructure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) Free() { C.gst_structure_free(s.Instance()) } func (s *Structure) Free() { C.gst_structure_free(s.Instance()) }
// String implement a stringer on a GstStructure. // String implement a stringer on a GstStructure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) String() string { func (s *Structure) String() string {
str := C.gst_structure_to_string(s.Instance()) str := C.gst_structure_to_string(s.Instance())
defer C.g_free((C.gpointer)(str)) defer C.g_free((C.gpointer)(str))
@@ -120,16 +138,22 @@ func (s *Structure) String() string {
} }
// Name returns the name of this structure. // Name returns the name of this structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) Name() string { func (s *Structure) Name() string {
return C.GoString(C.gst_structure_get_name(s.Instance())) return C.GoString(C.gst_structure_get_name(s.Instance()))
} }
// Size returns the number of fields inside this structure. // Size returns the number of fields inside this structure.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) Size() int { func (s *Structure) Size() int {
return int(C.gst_structure_n_fields(s.Instance())) return int(C.gst_structure_n_fields(s.Instance()))
} }
// SetValue sets the data at key to the given value. // SetValue sets the data at key to the given value.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) SetValue(key string, value interface{}) error { func (s *Structure) SetValue(key string, value interface{}) error {
gVal, err := glib.GValue(value) gVal, err := glib.GValue(value)
if err != nil { if err != nil {
@@ -142,6 +166,8 @@ func (s *Structure) SetValue(key string, value interface{}) error {
} }
// GetValue retrieves the value at key. // GetValue retrieves the value at key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) GetValue(key string) (interface{}, error) { func (s *Structure) GetValue(key string) (interface{}, error) {
cKey := C.CString(key) cKey := C.CString(key)
defer C.free(unsafe.Pointer(cKey)) defer C.free(unsafe.Pointer(cKey))
@@ -154,6 +180,8 @@ func (s *Structure) GetValue(key string) (interface{}, error) {
// RemoveValue removes the value at the given key. If the key does not exist, // RemoveValue removes the value at the given key. If the key does not exist,
// the structure is unchanged. // the structure is unchanged.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) RemoveValue(key string) { func (s *Structure) RemoveValue(key string) {
cKey := C.CString(key) cKey := C.CString(key)
defer C.free(unsafe.Pointer(cKey)) defer C.free(unsafe.Pointer(cKey))
@@ -162,6 +190,8 @@ func (s *Structure) RemoveValue(key string) {
// Values returns a map of all the values inside this structure. If values cannot be // Values returns a map of all the values inside this structure. If values cannot be
// converted to an equivalent go type, they are serialized to a string. // converted to an equivalent go type, they are serialized to a string.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) Values() map[string]interface{} { func (s *Structure) Values() map[string]interface{} {
out := make(map[string]interface{}) out := make(map[string]interface{})
resCh := make(chan interface{}) resCh := make(chan interface{})
@@ -191,11 +221,15 @@ var TypeStructure = glib.Type(C.gst_structure_get_type())
var _ glib.ValueTransformer = &Structure{} var _ glib.ValueTransformer = &Structure{}
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) copy() *C.GstStructure { func (s *Structure) copy() *C.GstStructure {
return C.gst_structure_copy(s.Instance()) return C.gst_structure_copy(s.Instance())
} }
// ToGValue implements a glib.ValueTransformer // ToGValue implements a glib.ValueTransformer
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (s *Structure) ToGValue() (*glib.Value, error) { func (s *Structure) ToGValue() (*glib.Value, error) {
val, err := glib.ValueInit(TypeStructure) val, err := glib.ValueInit(TypeStructure)
if err != nil { if err != nil {
@@ -213,11 +247,15 @@ func (s *Structure) ToGValue() (*glib.Value, error) {
} }
// marshalStructure is used to extract the GstStructure from a GValue. // marshalStructure is used to extract the GstStructure from a GValue.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func marshalStructure(p unsafe.Pointer) (interface{}, error) { func marshalStructure(p unsafe.Pointer) (interface{}, error) {
c := C.gst_value_get_structure(toGValue(p)) c := C.gst_value_get_structure(toGValue(p))
return structureFromGlibNone(c), nil return structureFromGlibNone(c), nil
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func wrapStructure(st *C.GstStructure) *Structure { func wrapStructure(st *C.GstStructure) *Structure {
return &Structure{ return &Structure{
ptr: unsafe.Pointer(st), ptr: unsafe.Pointer(st),
@@ -227,6 +265,8 @@ func wrapStructure(st *C.GstStructure) *Structure {
// structureFromGlibNone wraps a *C.GstStructure in a Structure after copying it. // structureFromGlibNone wraps a *C.GstStructure in a Structure after copying it.
// this is needed when the structure is returned from a function that does not transfer ownership. // this is needed when the structure is returned from a function that does not transfer ownership.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func structureFromGlibNone(st *C.GstStructure) *Structure { func structureFromGlibNone(st *C.GstStructure) *Structure {
copy := C.gst_structure_copy(st) copy := C.gst_structure_copy(st)
@@ -235,6 +275,8 @@ func structureFromGlibNone(st *C.GstStructure) *Structure {
// structureFromGlibFull wraps a *C.GstStructure in a Structure. This is used when the structure // structureFromGlibFull wraps a *C.GstStructure in a Structure. This is used when the structure
// is returned by a function that transfers ownership to the caller. // is returned by a function that transfers ownership to the caller.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func structureFromGlibFull(st *C.GstStructure) *Structure { func structureFromGlibFull(st *C.GstStructure) *Structure {
s := wrapStructure(st) s := wrapStructure(st)

View File

@@ -28,6 +28,8 @@ const (
) )
// ObtainSystemClock returns the default SystemClock. // ObtainSystemClock returns the default SystemClock.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func ObtainSystemClock() *SystemClock { func ObtainSystemClock() *SystemClock {
return &SystemClock{FromGstClockUnsafeFull(unsafe.Pointer(C.gst_system_clock_obtain()))} return &SystemClock{FromGstClockUnsafeFull(unsafe.Pointer(C.gst_system_clock_obtain()))}
} }
@@ -35,6 +37,8 @@ func ObtainSystemClock() *SystemClock {
// NewSystemClock creates a new instance of a SystemClock, with the given clock type parameter // NewSystemClock creates a new instance of a SystemClock, with the given clock type parameter
// //
// This is only a convenience wrapper for glib.NewObjectWithProperties // This is only a convenience wrapper for glib.NewObjectWithProperties
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewSystemClock(clockType ClockType) (*SystemClock, error) { func NewSystemClock(clockType ClockType) (*SystemClock, error) {
clockObj, err := glib.NewObjectWithProperties(TYPE_SYSTEM_CLOCK, map[string]any{ clockObj, err := glib.NewObjectWithProperties(TYPE_SYSTEM_CLOCK, map[string]any{
"clock-type": clockType, "clock-type": clockType,

View File

@@ -24,12 +24,16 @@ import (
// TagList is a go wrapper around a GstTagList. For now, until the rest of the methods are // TagList is a go wrapper around a GstTagList. For now, until the rest of the methods are
// implemnented, this struct is primarily used for retrieving serialized copies of the tags. // implemnented, this struct is primarily used for retrieving serialized copies of the tags.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type TagList struct { type TagList struct {
ptr *C.GstTagList ptr *C.GstTagList
} }
// FromGstTagListUnsafeNone wraps the pointer to the given C GstTagList with the go type. // FromGstTagListUnsafeNone wraps the pointer to the given C GstTagList with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstTagListUnsafeNone(tags unsafe.Pointer) *TagList { func FromGstTagListUnsafeNone(tags unsafe.Pointer) *TagList {
tl := wrapTagList(C.toGstTagList(tags)) tl := wrapTagList(C.toGstTagList(tags))
tl.Ref() tl.Ref()
@@ -39,6 +43,8 @@ func FromGstTagListUnsafeNone(tags unsafe.Pointer) *TagList {
// FromGstTagListUnsafeFull wraps the pointer to the given C GstTagList with the go type. // FromGstTagListUnsafeFull wraps the pointer to the given C GstTagList with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstTagListUnsafeFull(tags unsafe.Pointer) *TagList { func FromGstTagListUnsafeFull(tags unsafe.Pointer) *TagList {
tl := wrapTagList(C.toGstTagList(tags)) tl := wrapTagList(C.toGstTagList(tags))
runtime.SetFinalizer(tl, (*TagList).Unref) runtime.SetFinalizer(tl, (*TagList).Unref)
@@ -50,12 +56,16 @@ func FromGstTagListUnsafeFull(tags unsafe.Pointer) *TagList {
// tagList := gst.NewEmptyTagList() // tagList := gst.NewEmptyTagList()
// fmt.Println(tagList.IsEmpty()) // fmt.Println(tagList.IsEmpty())
// // true // // true
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewEmptyTagList() *TagList { func NewEmptyTagList() *TagList {
return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_new_empty())) return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_new_empty()))
} }
// NewTagListFromString creates a new tag list from the given string. This is the same format produced // NewTagListFromString creates a new tag list from the given string. This is the same format produced
// by the stringer interface on the TagList. // by the stringer interface on the TagList.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTagListFromString(tags string) *TagList { func NewTagListFromString(tags string) *TagList {
ctags := C.CString(tags) ctags := C.CString(tags)
defer C.free(unsafe.Pointer(ctags)) defer C.free(unsafe.Pointer(ctags))
@@ -67,9 +77,13 @@ func NewTagListFromString(tags string) *TagList {
} }
// Instance returns the underlying GstTagList instance. // Instance returns the underlying GstTagList instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) Instance() *C.GstTagList { return C.toGstTagList(unsafe.Pointer(t.ptr)) } func (t *TagList) Instance() *C.GstTagList { return C.toGstTagList(unsafe.Pointer(t.ptr)) }
// String implements a stringer on the TagList and serializes it to a string. // String implements a stringer on the TagList and serializes it to a string.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) String() string { func (t *TagList) String() string {
cStr := C.gst_tag_list_to_string(t.Instance()) cStr := C.gst_tag_list_to_string(t.Instance())
defer C.g_free((C.gpointer)(unsafe.Pointer(cStr))) defer C.g_free((C.gpointer)(unsafe.Pointer(cStr)))
@@ -77,10 +91,14 @@ func (t *TagList) String() string {
} }
// Ref increases the ref count on this TagList by one. // Ref increases the ref count on this TagList by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) Ref() *TagList { return wrapTagList(C.gst_tag_list_ref(t.Instance())) } func (t *TagList) Ref() *TagList { return wrapTagList(C.gst_tag_list_ref(t.Instance())) }
// Unref decreses the ref count on this TagList by one. When the ref count reaches zero, the object // Unref decreses the ref count on this TagList by one. When the ref count reaches zero, the object
// is destroyed. // is destroyed.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) Unref() { C.gst_tag_list_unref(t.Instance()) } func (t *TagList) Unref() { C.gst_tag_list_unref(t.Instance()) }
// AddValue adds a value to a given tag using the given merge mode. If the value provided // AddValue adds a value to a given tag using the given merge mode. If the value provided
@@ -91,6 +109,8 @@ func (t *TagList) Unref() { C.gst_tag_list_unref(t.Instance()) }
// myAlbum, _ := tagList.GetString(gst.TagAlbum) // myAlbum, _ := tagList.GetString(gst.TagAlbum)
// fmt.Println(myAlbum) // fmt.Println(myAlbum)
// // MyNewAlbum // // MyNewAlbum
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) AddValue(mergeMode TagMergeMode, tag Tag, value interface{}) { func (t *TagList) AddValue(mergeMode TagMergeMode, tag Tag, value interface{}) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -108,6 +128,8 @@ func (t *TagList) AddValue(mergeMode TagMergeMode, tag Tag, value interface{}) {
// AddValues can be used to add multiple values to a tag with the given merge mode. // AddValues can be used to add multiple values to a tag with the given merge mode.
// Values that cannot be coerced to C types will be ignored. // Values that cannot be coerced to C types will be ignored.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) AddValues(mergeMode TagMergeMode, tag Tag, vals ...interface{}) { func (t *TagList) AddValues(mergeMode TagMergeMode, tag Tag, vals ...interface{}) {
for _, val := range vals { for _, val := range vals {
t.AddValue(mergeMode, tag, val) t.AddValue(mergeMode, tag, val)
@@ -116,6 +138,8 @@ func (t *TagList) AddValues(mergeMode TagMergeMode, tag Tag, vals ...interface{}
// Copy creates a new TagList as a copy of the old taglist. The new taglist will have a refcount of 1, // Copy creates a new TagList as a copy of the old taglist. The new taglist will have a refcount of 1,
// owned by the caller, and will be writable as a result. // owned by the caller, and will be writable as a result.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) Copy() *TagList { func (t *TagList) Copy() *TagList {
return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_copy(t.Instance()))) return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_copy(t.Instance())))
} }
@@ -138,6 +162,8 @@ type TagListForEachFunc func(tagList *TagList, tag Tag)
// //
// // album-artist : tinyzimmer // // album-artist : tinyzimmer
// // album : GstreamerInGo // // album : GstreamerInGo
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) ForEach(f TagListForEachFunc) { func (t *TagList) ForEach(f TagListForEachFunc) {
ptr := gopointer.Save(f) ptr := gopointer.Save(f)
defer gopointer.Unref(ptr) defer gopointer.Unref(ptr)
@@ -150,6 +176,8 @@ func (t *TagList) ForEach(f TagListForEachFunc) {
// GetBool returns the boolean value at the given tag key. If multiple values are associated with the tag they // GetBool returns the boolean value at the given tag key. If multiple values are associated with the tag they
// are merged. // are merged.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetBool(tag Tag) (value, ok bool) { func (t *TagList) GetBool(tag Tag) (value, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -163,6 +191,8 @@ func (t *TagList) GetBool(tag Tag) (value, ok bool) {
} }
// GetBoolIndex retrieves the bool at the given index in the tag key. // GetBoolIndex retrieves the bool at the given index in the tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetBoolIndex(tag Tag, idx uint) (value, ok bool) { func (t *TagList) GetBoolIndex(tag Tag, idx uint) (value, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -178,6 +208,8 @@ func (t *TagList) GetBoolIndex(tag Tag, idx uint) (value, ok bool) {
// GetDate returns the date stored at the given tag key. If there are multiple values, the first one // GetDate returns the date stored at the given tag key. If there are multiple values, the first one
// is returned. // is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetDate(tag Tag) (value time.Time, ok bool) { func (t *TagList) GetDate(tag Tag) (value time.Time, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -195,6 +227,8 @@ func (t *TagList) GetDate(tag Tag) (value time.Time, ok bool) {
} }
// GetDateIndex returns the date stored at the given index in tag key. // GetDateIndex returns the date stored at the given index in tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetDateIndex(tag Tag, idx uint) (value time.Time, ok bool) { func (t *TagList) GetDateIndex(tag Tag, idx uint) (value time.Time, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -214,6 +248,8 @@ func (t *TagList) GetDateIndex(tag Tag, idx uint) (value time.Time, ok bool) {
// GetDateTime returns the date and time stored at the given tag key. If there are multiple values, the first one // GetDateTime returns the date and time stored at the given tag key. If there are multiple values, the first one
// is returned. // is returned.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetDateTime(tag Tag) (value time.Time, ok bool) { func (t *TagList) GetDateTime(tag Tag) (value time.Time, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -231,6 +267,8 @@ func (t *TagList) GetDateTime(tag Tag) (value time.Time, ok bool) {
} }
// GetDateTimeIndex returns the date and time stored at the given tag key at the given index. // GetDateTimeIndex returns the date and time stored at the given tag key at the given index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetDateTimeIndex(tag Tag, idx uint) (value time.Time, ok bool) { func (t *TagList) GetDateTimeIndex(tag Tag, idx uint) (value time.Time, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -250,6 +288,8 @@ func (t *TagList) GetDateTimeIndex(tag Tag, idx uint) (value time.Time, ok bool)
// GetFloat64 returns the float at the given tag key, merging multiple values into one if multiple values // GetFloat64 returns the float at the given tag key, merging multiple values into one if multiple values
// are associated with the tag. This is the equivalent of a C double stored in the tag. // are associated with the tag. This is the equivalent of a C double stored in the tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetFloat64(tag Tag) (value float64, ok bool) { func (t *TagList) GetFloat64(tag Tag) (value float64, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -263,6 +303,8 @@ func (t *TagList) GetFloat64(tag Tag) (value float64, ok bool) {
} }
// GetFloat64Index returns the float at the index of the given tag key. // GetFloat64Index returns the float at the index of the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetFloat64Index(tag Tag, idx uint) (value float64, ok bool) { func (t *TagList) GetFloat64Index(tag Tag, idx uint) (value float64, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -278,6 +320,8 @@ func (t *TagList) GetFloat64Index(tag Tag, idx uint) (value float64, ok bool) {
// GetFloat32 returns the float at the given tag key, merging multiple values into one if multiple values // GetFloat32 returns the float at the given tag key, merging multiple values into one if multiple values
// are associated with the tag. // are associated with the tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetFloat32(tag Tag) (value float32, ok bool) { func (t *TagList) GetFloat32(tag Tag) (value float32, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -291,6 +335,8 @@ func (t *TagList) GetFloat32(tag Tag) (value float32, ok bool) {
} }
// GetFloat32Index returns the float at the index of the given tag key. // GetFloat32Index returns the float at the index of the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetFloat32Index(tag Tag, idx uint) (value float32, ok bool) { func (t *TagList) GetFloat32Index(tag Tag, idx uint) (value float32, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -306,6 +352,8 @@ func (t *TagList) GetFloat32Index(tag Tag, idx uint) (value float32, ok bool) {
// GetInt32 returns the integer at the given tag key, merging multiple values into one if multiple values // GetInt32 returns the integer at the given tag key, merging multiple values into one if multiple values
// are associated with the tag. // are associated with the tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetInt32(tag Tag) (value int32, ok bool) { func (t *TagList) GetInt32(tag Tag) (value int32, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -319,6 +367,8 @@ func (t *TagList) GetInt32(tag Tag) (value int32, ok bool) {
} }
// GetInt32Index returns the integer at the index of the given tag key. // GetInt32Index returns the integer at the index of the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetInt32Index(tag Tag, idx uint) (value int32, ok bool) { func (t *TagList) GetInt32Index(tag Tag, idx uint) (value int32, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -334,6 +384,8 @@ func (t *TagList) GetInt32Index(tag Tag, idx uint) (value int32, ok bool) {
// GetInt64 returns the integer at the given tag key, merging multiple values into one if multiple values // GetInt64 returns the integer at the given tag key, merging multiple values into one if multiple values
// are associated with the tag. // are associated with the tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetInt64(tag Tag) (value int64, ok bool) { func (t *TagList) GetInt64(tag Tag) (value int64, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -347,6 +399,8 @@ func (t *TagList) GetInt64(tag Tag) (value int64, ok bool) {
} }
// GetInt64Index returns the integer at the index of the given tag key. // GetInt64Index returns the integer at the index of the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetInt64Index(tag Tag, idx uint) (value int64, ok bool) { func (t *TagList) GetInt64Index(tag Tag, idx uint) (value int64, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -361,6 +415,8 @@ func (t *TagList) GetInt64Index(tag Tag, idx uint) (value int64, ok bool) {
} }
// GetPointer returns the C pointer stored at the given tag key, merging values if there are multiple. // GetPointer returns the C pointer stored at the given tag key, merging values if there are multiple.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetPointer(tag Tag) (value unsafe.Pointer, ok bool) { func (t *TagList) GetPointer(tag Tag) (value unsafe.Pointer, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -374,6 +430,8 @@ func (t *TagList) GetPointer(tag Tag) (value unsafe.Pointer, ok bool) {
} }
// GetPointerIndex returns the C pointer stored at the given tag key index. // GetPointerIndex returns the C pointer stored at the given tag key index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetPointerIndex(tag Tag, idx uint) (value unsafe.Pointer, ok bool) { func (t *TagList) GetPointerIndex(tag Tag, idx uint) (value unsafe.Pointer, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -388,6 +446,8 @@ func (t *TagList) GetPointerIndex(tag Tag, idx uint) (value unsafe.Pointer, ok b
} }
// GetSample copies the first sample for the given tag in the taglist. // GetSample copies the first sample for the given tag in the taglist.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetSample(tag Tag) (value *Sample, ok bool) { func (t *TagList) GetSample(tag Tag) (value *Sample, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -404,6 +464,8 @@ func (t *TagList) GetSample(tag Tag) (value *Sample, ok bool) {
} }
// GetSampleIndex copies the sample for the given index in tag in the taglist. // GetSampleIndex copies the sample for the given index in tag in the taglist.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetSampleIndex(tag Tag, idx uint) (value *Sample, ok bool) { func (t *TagList) GetSampleIndex(tag Tag, idx uint) (value *Sample, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -421,6 +483,8 @@ func (t *TagList) GetSampleIndex(tag Tag, idx uint) (value *Sample, ok bool) {
} }
// GetString returns the string for the given tag, possibly merging multiple values into one. // GetString returns the string for the given tag, possibly merging multiple values into one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetString(tag Tag) (value string, ok bool) { func (t *TagList) GetString(tag Tag) (value string, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -435,6 +499,8 @@ func (t *TagList) GetString(tag Tag) (value string, ok bool) {
} }
// GetStringIndex returns the string for the given index in tag. // GetStringIndex returns the string for the given index in tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetStringIndex(tag Tag, idx uint) (value string, ok bool) { func (t *TagList) GetStringIndex(tag Tag, idx uint) (value string, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -451,6 +517,8 @@ func (t *TagList) GetStringIndex(tag Tag, idx uint) (value string, ok bool) {
// GetUint32 returns the unsigned integer at the given tag key, merging multiple values into one if multiple values // GetUint32 returns the unsigned integer at the given tag key, merging multiple values into one if multiple values
// are associated with the tag. // are associated with the tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetUint32(tag Tag) (value uint32, ok bool) { func (t *TagList) GetUint32(tag Tag) (value uint32, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -464,6 +532,8 @@ func (t *TagList) GetUint32(tag Tag) (value uint32, ok bool) {
} }
// GetUint32Index returns the unsigned integer at the index of the given tag key. // GetUint32Index returns the unsigned integer at the index of the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetUint32Index(tag Tag, idx uint) (value uint32, ok bool) { func (t *TagList) GetUint32Index(tag Tag, idx uint) (value uint32, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -479,6 +549,8 @@ func (t *TagList) GetUint32Index(tag Tag, idx uint) (value uint32, ok bool) {
// GetUint64 returns the unsigned integer at the given tag key, merging multiple values into one if multiple values // GetUint64 returns the unsigned integer at the given tag key, merging multiple values into one if multiple values
// are associated with the tag. // are associated with the tag.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetUint64(tag Tag) (value uint64, ok bool) { func (t *TagList) GetUint64(tag Tag) (value uint64, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -492,6 +564,8 @@ func (t *TagList) GetUint64(tag Tag) (value uint64, ok bool) {
} }
// GetUint64Index returns the unsigned integer at the index of the given tag key. // GetUint64Index returns the unsigned integer at the index of the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetUint64Index(tag Tag, idx uint) (value uint64, ok bool) { func (t *TagList) GetUint64Index(tag Tag, idx uint) (value uint64, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -509,6 +583,8 @@ func (t *TagList) GetUint64Index(tag Tag, idx uint) (value uint64, ok bool) {
// Note that this function can also return nil if the stored value cannot be cleanly coerced // Note that this function can also return nil if the stored value cannot be cleanly coerced
// to a go type. It is safer to use the other functions provided when you know the expected // to a go type. It is safer to use the other functions provided when you know the expected
// return type. // return type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetValueIndex(tag Tag, idx uint) interface{} { func (t *TagList) GetValueIndex(tag Tag, idx uint) interface{} {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -522,9 +598,13 @@ func (t *TagList) GetValueIndex(tag Tag, idx uint) interface{} {
} }
// GetScope returns the scope for this TagList. // GetScope returns the scope for this TagList.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetScope() TagScope { return TagScope(C.gst_tag_list_get_scope(t.Instance())) } func (t *TagList) GetScope() TagScope { return TagScope(C.gst_tag_list_get_scope(t.Instance())) }
// GetTagSize returns the number of tag values at the given tag key. // GetTagSize returns the number of tag values at the given tag key.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) GetTagSize(tagKey string) int { func (t *TagList) GetTagSize(tagKey string) int {
cStr := C.CString(tagKey) cStr := C.CString(tagKey)
defer C.free(unsafe.Pointer(cStr)) defer C.free(unsafe.Pointer(cStr))
@@ -532,27 +612,39 @@ func (t *TagList) GetTagSize(tagKey string) int {
} }
// Insert inserts the tags from the provided list using the given merge mode. // Insert inserts the tags from the provided list using the given merge mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) Insert(tagList *TagList, mergeMode TagMergeMode) { func (t *TagList) Insert(tagList *TagList, mergeMode TagMergeMode) {
C.gst_tag_list_insert(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode)) C.gst_tag_list_insert(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode))
} }
// IsEmpty returns true if this tag list is empty. // IsEmpty returns true if this tag list is empty.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) IsEmpty() bool { return gobool(C.gst_tag_list_is_empty(t.Instance())) } func (t *TagList) IsEmpty() bool { return gobool(C.gst_tag_list_is_empty(t.Instance())) }
// IsEqual checks if the two tag lists are equal. // IsEqual checks if the two tag lists are equal.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) IsEqual(tagList *TagList) bool { func (t *TagList) IsEqual(tagList *TagList) bool {
return gobool(C.gst_tag_list_is_equal(t.Instance(), tagList.Instance())) return gobool(C.gst_tag_list_is_equal(t.Instance(), tagList.Instance()))
} }
// IsWritable returns true if this TagList is writable. // IsWritable returns true if this TagList is writable.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) IsWritable() bool { return gobool(C.tagListIsWritable(t.Instance())) } func (t *TagList) IsWritable() bool { return gobool(C.tagListIsWritable(t.Instance())) }
// MakeWritable will return a writable copy of the tag list if it is not already so. // MakeWritable will return a writable copy of the tag list if it is not already so.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) MakeWritable() *TagList { func (t *TagList) MakeWritable() *TagList {
return FromGstTagListUnsafeFull(unsafe.Pointer(C.makeTagListWritable(t.Instance()))) return FromGstTagListUnsafeFull(unsafe.Pointer(C.makeTagListWritable(t.Instance())))
} }
// Merge merges the two tag lists with the given mode. // Merge merges the two tag lists with the given mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) Merge(tagList *TagList, mergeMode TagMergeMode) *TagList { func (t *TagList) Merge(tagList *TagList, mergeMode TagMergeMode) *TagList {
return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_merge( return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_merge(
t.Instance(), t.Instance(),
@@ -562,14 +654,20 @@ func (t *TagList) Merge(tagList *TagList, mergeMode TagMergeMode) *TagList {
} }
// NumTags returns the number of key/value pairs in ths TagList // NumTags returns the number of key/value pairs in ths TagList
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) NumTags() int { return int(C.gst_tag_list_n_tags(t.Instance())) } func (t *TagList) NumTags() int { return int(C.gst_tag_list_n_tags(t.Instance())) }
// TagNameAt returns the tag name at the given index. // TagNameAt returns the tag name at the given index.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) TagNameAt(idx int) string { func (t *TagList) TagNameAt(idx int) string {
return C.GoString(C.gst_tag_list_nth_tag_name(t.Instance(), C.guint(idx))) return C.GoString(C.gst_tag_list_nth_tag_name(t.Instance(), C.guint(idx)))
} }
// PeekStringIndex peeks at the value that is at the given index for the given tag in the given list. // PeekStringIndex peeks at the value that is at the given index for the given tag in the given list.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) PeekStringIndex(tag Tag, idx uint) (value string, ok bool) { func (t *TagList) PeekStringIndex(tag Tag, idx uint) (value string, ok bool) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -585,6 +683,8 @@ func (t *TagList) PeekStringIndex(tag Tag, idx uint) (value string, ok bool) {
} }
// RemoveTag removes the values for the given tag in this list. // RemoveTag removes the values for the given tag in this list.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) RemoveTag(tag Tag) { func (t *TagList) RemoveTag(tag Tag) {
ctag := C.CString(string(tag)) ctag := C.CString(string(tag))
defer C.free(unsafe.Pointer(ctag)) defer C.free(unsafe.Pointer(ctag))
@@ -592,6 +692,8 @@ func (t *TagList) RemoveTag(tag Tag) {
} }
// SetScope sets the scope of this TagList. By default, the scope of a tag list is stream scope. // SetScope sets the scope of this TagList. By default, the scope of a tag list is stream scope.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TagList) SetScope(scope TagScope) { func (t *TagList) SetScope(scope TagScope) {
C.gst_tag_list_set_scope(t.Instance(), C.GstTagScope(scope)) C.gst_tag_list_set_scope(t.Instance(), C.GstTagScope(scope))
} }

View File

@@ -14,10 +14,16 @@ var InterfaceTagSetter glib.Interface = &interfaceTagSetter{}
type interfaceTagSetter struct{} type interfaceTagSetter struct{}
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *interfaceTagSetter) Type() glib.Type { return glib.Type(C.GST_TYPE_TAG_SETTER) } func (i *interfaceTagSetter) Type() glib.Type { return glib.Type(C.GST_TYPE_TAG_SETTER) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *interfaceTagSetter) Init(instance *glib.TypeInstance) {} func (i *interfaceTagSetter) Init(instance *glib.TypeInstance) {}
// TagSetter is an interface that elements can implement to provide Tag writing capabilities. // TagSetter is an interface that elements can implement to provide Tag writing capabilities.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type TagSetter interface { type TagSetter interface {
// Returns the current list of tags the setter uses. The list should not be modified or freed. // Returns the current list of tags the setter uses. The list should not be modified or freed.
GetTagList() *TagList GetTagList() *TagList
@@ -36,13 +42,19 @@ type TagSetter interface {
} }
// gstTocSetter implements a TagSetter that is backed by an Element from the C runtime. // gstTocSetter implements a TagSetter that is backed by an Element from the C runtime.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type gstTagSetter struct { type gstTagSetter struct {
ptr *C.GstElement ptr *C.GstElement
} }
// Instance returns the underlying TagSetter instance. // Instance returns the underlying TagSetter instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) Instance() *C.GstTagSetter { return C.toTagSetter(t.ptr) } func (t *gstTagSetter) Instance() *C.GstTagSetter { return C.toTagSetter(t.ptr) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) GetTagList() *TagList { func (t *gstTagSetter) GetTagList() *TagList {
tagList := C.gst_tag_setter_get_tag_list(t.Instance()) tagList := C.gst_tag_setter_get_tag_list(t.Instance())
if tagList == nil { if tagList == nil {
@@ -51,6 +63,8 @@ func (t *gstTagSetter) GetTagList() *TagList {
return FromGstTagListUnsafeNone(unsafe.Pointer(tagList)) return FromGstTagListUnsafeNone(unsafe.Pointer(tagList))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) AddTagValue(mergeMode TagMergeMode, tagKey Tag, tagValue interface{}) { func (t *gstTagSetter) AddTagValue(mergeMode TagMergeMode, tagKey Tag, tagValue interface{}) {
ckey := C.CString(string(tagKey)) ckey := C.CString(string(tagKey))
defer C.free(unsafe.Pointer(ckey)) defer C.free(unsafe.Pointer(ckey))
@@ -66,18 +80,26 @@ func (t *gstTagSetter) AddTagValue(mergeMode TagMergeMode, tagKey Tag, tagValue
) )
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) MergeTags(tagList *TagList, mergeMode TagMergeMode) { func (t *gstTagSetter) MergeTags(tagList *TagList, mergeMode TagMergeMode) {
C.gst_tag_setter_merge_tags(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode)) C.gst_tag_setter_merge_tags(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) ResetTags() { func (t *gstTagSetter) ResetTags() {
C.gst_tag_setter_reset_tags(t.Instance()) C.gst_tag_setter_reset_tags(t.Instance())
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) GetTagMergeMode() TagMergeMode { func (t *gstTagSetter) GetTagMergeMode() TagMergeMode {
return TagMergeMode(C.gst_tag_setter_get_tag_merge_mode(t.Instance())) return TagMergeMode(C.gst_tag_setter_get_tag_merge_mode(t.Instance()))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *gstTagSetter) SetTagMergeMode(mergeMode TagMergeMode) { func (t *gstTagSetter) SetTagMergeMode(mergeMode TagMergeMode) {
C.gst_tag_setter_set_tag_merge_mode(t.Instance(), C.GstTagMergeMode(mergeMode)) C.gst_tag_setter_set_tag_merge_mode(t.Instance(), C.GstTagMergeMode(mergeMode))
} }

View File

@@ -8,12 +8,16 @@ import (
) )
// TOC is a go representation of a GstToc. // TOC is a go representation of a GstToc.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type TOC struct { type TOC struct {
ptr *C.GstToc ptr *C.GstToc
} }
// FromGstTOCUnsafeNone wraps the pointer to the given C GstToc with the go type. // FromGstTOCUnsafeNone wraps the pointer to the given C GstToc with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstTOCUnsafeNone(toc unsafe.Pointer) *TOC { func FromGstTOCUnsafeNone(toc unsafe.Pointer) *TOC {
gotoc := wrapTOC((*C.GstToc)(toc)) gotoc := wrapTOC((*C.GstToc)(toc))
gotoc.Ref() gotoc.Ref()
@@ -23,6 +27,8 @@ func FromGstTOCUnsafeNone(toc unsafe.Pointer) *TOC {
// FromGstTOCUnsafeFull wraps the pointer to the given C GstToc with the go type. // FromGstTOCUnsafeFull wraps the pointer to the given C GstToc with the go type.
// This is meant for internal usage and is exported for visibility to other packages. // This is meant for internal usage and is exported for visibility to other packages.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstTOCUnsafeFull(toc unsafe.Pointer) *TOC { func FromGstTOCUnsafeFull(toc unsafe.Pointer) *TOC {
gotoc := wrapTOC((*C.GstToc)(toc)) gotoc := wrapTOC((*C.GstToc)(toc))
runtime.SetFinalizer(gotoc, (*TOC).Unref) runtime.SetFinalizer(gotoc, (*TOC).Unref)
@@ -30,6 +36,8 @@ func FromGstTOCUnsafeFull(toc unsafe.Pointer) *TOC {
} }
// NewTOC returns a new TOC with the given scope. // NewTOC returns a new TOC with the given scope.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTOC(scope TOCScope) *TOC { func NewTOC(scope TOCScope) *TOC {
toc := C.gst_toc_new(C.GstTocScope(scope)) toc := C.gst_toc_new(C.GstTocScope(scope))
if toc == nil { if toc == nil {
@@ -39,40 +47,56 @@ func NewTOC(scope TOCScope) *TOC {
} }
// Instance returns the underlying GstToc instance. // Instance returns the underlying GstToc instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) Instance() *C.GstToc { return t.ptr } func (t *TOC) Instance() *C.GstToc { return t.ptr }
// Ref increases the ref count on the TOC by one. // Ref increases the ref count on the TOC by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) Ref() *TOC { func (t *TOC) Ref() *TOC {
C.tocRef(t.Instance()) C.tocRef(t.Instance())
return t return t
} }
// Unref decreases the ref count on the TOC by one. // Unref decreases the ref count on the TOC by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) Unref() { func (t *TOC) Unref() {
C.tocUnref(t.Instance()) C.tocUnref(t.Instance())
} }
// MakeWritable returns a writable copy of the TOC if it isn't already, // MakeWritable returns a writable copy of the TOC if it isn't already,
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) MakeWritable() *TOC { func (t *TOC) MakeWritable() *TOC {
return FromGstTOCUnsafeFull(unsafe.Pointer(C.makeTocWritable(t.Instance()))) return FromGstTOCUnsafeFull(unsafe.Pointer(C.makeTocWritable(t.Instance())))
} }
// Copy creates a copy of the TOC. // Copy creates a copy of the TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) Copy() *TOC { func (t *TOC) Copy() *TOC {
return FromGstTOCUnsafeFull(unsafe.Pointer(C.copyToc(t.Instance()))) return FromGstTOCUnsafeFull(unsafe.Pointer(C.copyToc(t.Instance())))
} }
// AppendEntry appends the given TOCEntry to this TOC. // AppendEntry appends the given TOCEntry to this TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) AppendEntry(entry *TOCEntry) { func (t *TOC) AppendEntry(entry *TOCEntry) {
C.gst_toc_append_entry(t.Instance(), entry.Instance()) C.gst_toc_append_entry(t.Instance(), entry.Instance())
} }
// Dump dumps the TOC. // Dump dumps the TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) Dump() { func (t *TOC) Dump() {
C.gst_toc_dump(t.Instance()) C.gst_toc_dump(t.Instance())
} }
// FindEntry finds the entry with the given uid. // FindEntry finds the entry with the given uid.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) FindEntry(uid string) *TOCEntry { func (t *TOC) FindEntry(uid string) *TOCEntry {
cuid := C.CString(uid) cuid := C.CString(uid)
defer C.free(unsafe.Pointer(cuid)) defer C.free(unsafe.Pointer(cuid))
@@ -84,6 +108,8 @@ func (t *TOC) FindEntry(uid string) *TOCEntry {
} }
// GetEntries returns a list of all TOCEntries. // GetEntries returns a list of all TOCEntries.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) GetEntries() []*TOCEntry { func (t *TOC) GetEntries() []*TOCEntry {
gList := C.gst_toc_get_entries(t.Instance()) gList := C.gst_toc_get_entries(t.Instance())
@@ -101,11 +127,15 @@ func (t *TOC) GetEntries() []*TOCEntry {
} }
// GetScope returns the scope of this TOC. // GetScope returns the scope of this TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) GetScope() TOCScope { func (t *TOC) GetScope() TOCScope {
return TOCScope(C.gst_toc_get_scope(t.Instance())) return TOCScope(C.gst_toc_get_scope(t.Instance()))
} }
// GetTags returns the TagList for this TOC. // GetTags returns the TagList for this TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) GetTags() *TagList { func (t *TOC) GetTags() *TagList {
tagList := C.gst_toc_get_tags(t.Instance()) tagList := C.gst_toc_get_tags(t.Instance())
if tagList == nil { if tagList == nil {
@@ -115,21 +145,29 @@ func (t *TOC) GetTags() *TagList {
} }
// MergeTags merges the given tags into this TOC's TagList. // MergeTags merges the given tags into this TOC's TagList.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) MergeTags(tagList *TagList, mergeMode TagMergeMode) { func (t *TOC) MergeTags(tagList *TagList, mergeMode TagMergeMode) {
C.gst_toc_merge_tags(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode)) C.gst_toc_merge_tags(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode))
} }
// SetTags sets tags for the entire TOC. // SetTags sets tags for the entire TOC.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOC) SetTags(tagList *TagList) { func (t *TOC) SetTags(tagList *TagList) {
C.gst_toc_set_tags(t.Instance(), tagList.Ref().Instance()) C.gst_toc_set_tags(t.Instance(), tagList.Ref().Instance())
} }
// TOCEntry is a go representation of a GstTocEntry, // TOCEntry is a go representation of a GstTocEntry,
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type TOCEntry struct { type TOCEntry struct {
ptr *C.GstTocEntry ptr *C.GstTocEntry
} }
// FromGstTocEntryUnsafeNone wraps the given TOCEntry. // FromGstTocEntryUnsafeNone wraps the given TOCEntry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstTocEntryUnsafeNone(entry unsafe.Pointer) *TOCEntry { func FromGstTocEntryUnsafeNone(entry unsafe.Pointer) *TOCEntry {
t := wrapTOCEntry((*C.GstTocEntry)(entry)) t := wrapTOCEntry((*C.GstTocEntry)(entry))
t.Ref() t.Ref()
@@ -138,6 +176,8 @@ func FromGstTocEntryUnsafeNone(entry unsafe.Pointer) *TOCEntry {
} }
// FromGstTocEntryUnsafeFull wraps the given TOCEntry. // FromGstTocEntryUnsafeFull wraps the given TOCEntry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func FromGstTocEntryUnsafeFull(entry unsafe.Pointer) *TOCEntry { func FromGstTocEntryUnsafeFull(entry unsafe.Pointer) *TOCEntry {
t := wrapTOCEntry((*C.GstTocEntry)(entry)) t := wrapTOCEntry((*C.GstTocEntry)(entry))
runtime.SetFinalizer(t, (*TOCEntry).Unref) runtime.SetFinalizer(t, (*TOCEntry).Unref)
@@ -145,6 +185,8 @@ func FromGstTocEntryUnsafeFull(entry unsafe.Pointer) *TOCEntry {
} }
// NewTOCEntry creates a new TOCEntry with the given UID and type. // NewTOCEntry creates a new TOCEntry with the given UID and type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func NewTOCEntry(entryType TOCEntryType, uid string) *TOCEntry { func NewTOCEntry(entryType TOCEntryType, uid string) *TOCEntry {
cuid := C.CString(uid) cuid := C.CString(uid)
defer C.free(unsafe.Pointer(cuid)) defer C.free(unsafe.Pointer(cuid))
@@ -159,45 +201,63 @@ func NewTOCEntry(entryType TOCEntryType, uid string) *TOCEntry {
} }
// Instance returns the underlying GstTocEntry instance. // Instance returns the underlying GstTocEntry instance.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) Instance() *C.GstTocEntry { return t.ptr } func (t *TOCEntry) Instance() *C.GstTocEntry { return t.ptr }
// Ref increases the ref count on the TOCEntry by one. // Ref increases the ref count on the TOCEntry by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) Ref() *TOCEntry { func (t *TOCEntry) Ref() *TOCEntry {
C.tocEntryRef(t.Instance()) C.tocEntryRef(t.Instance())
return t return t
} }
// Unref decreases the ref count on the TOCEntry by one. // Unref decreases the ref count on the TOCEntry by one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) Unref() { func (t *TOCEntry) Unref() {
C.tocEntryUnref(t.Instance()) C.tocEntryUnref(t.Instance())
} }
// MakeWritable returns a writable copy of the TOCEntry if it is not already so. // MakeWritable returns a writable copy of the TOCEntry if it is not already so.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) MakeWritable() *TOCEntry { func (t *TOCEntry) MakeWritable() *TOCEntry {
return FromGstTocEntryUnsafeFull(unsafe.Pointer(C.makeTocEntryWritable(t.Instance()))) return FromGstTocEntryUnsafeFull(unsafe.Pointer(C.makeTocEntryWritable(t.Instance())))
} }
// Copy creates a copy of the TOCEntry // Copy creates a copy of the TOCEntry
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) Copy() *TOCEntry { func (t *TOCEntry) Copy() *TOCEntry {
return FromGstTocEntryUnsafeFull(unsafe.Pointer(C.copyTocEntry(t.Instance()))) return FromGstTocEntryUnsafeFull(unsafe.Pointer(C.copyTocEntry(t.Instance())))
} }
// AppendSubEntry appends the given entry as a subentry to this one. // AppendSubEntry appends the given entry as a subentry to this one.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) AppendSubEntry(subEntry *TOCEntry) { func (t *TOCEntry) AppendSubEntry(subEntry *TOCEntry) {
C.gst_toc_entry_append_sub_entry(t.Instance(), subEntry.Ref().Instance()) C.gst_toc_entry_append_sub_entry(t.Instance(), subEntry.Ref().Instance())
} }
// GetEntryType returns the type of this TOCEntry // GetEntryType returns the type of this TOCEntry
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetEntryType() TOCEntryType { func (t *TOCEntry) GetEntryType() TOCEntryType {
return TOCEntryType(C.gst_toc_entry_get_entry_type(t.Instance())) return TOCEntryType(C.gst_toc_entry_get_entry_type(t.Instance()))
} }
// GetEntryTypeString returns a string representation of the entry type. // GetEntryTypeString returns a string representation of the entry type.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetEntryTypeString() string { func (t *TOCEntry) GetEntryTypeString() string {
return C.GoString(C.gst_toc_entry_type_get_nick(C.GstTocEntryType(t.GetEntryType()))) return C.GoString(C.gst_toc_entry_type_get_nick(C.GstTocEntryType(t.GetEntryType())))
} }
// GetLoop gets the loop type and repeat count for the TOC entry. // GetLoop gets the loop type and repeat count for the TOC entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetLoop() (bool, TOCLoopType, int) { func (t *TOCEntry) GetLoop() (bool, TOCLoopType, int) {
var loopType C.GstTocLoopType var loopType C.GstTocLoopType
var repeatCount C.gint var repeatCount C.gint
@@ -206,6 +266,8 @@ func (t *TOCEntry) GetLoop() (bool, TOCLoopType, int) {
} }
// GetParent gets the parent of this TOCEntry. // GetParent gets the parent of this TOCEntry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetParent() *TOCEntry { func (t *TOCEntry) GetParent() *TOCEntry {
parent := C.gst_toc_entry_get_parent(t.Instance()) parent := C.gst_toc_entry_get_parent(t.Instance())
if parent == nil { if parent == nil {
@@ -215,6 +277,8 @@ func (t *TOCEntry) GetParent() *TOCEntry {
} }
// GetStartStopTimes gets the start and stop times for the TOCEntry if available. // GetStartStopTimes gets the start and stop times for the TOCEntry if available.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetStartStopTimes() (ok bool, startTime, stopTime int64) { func (t *TOCEntry) GetStartStopTimes() (ok bool, startTime, stopTime int64) {
var start, stop C.gint64 var start, stop C.gint64
gok := C.gst_toc_entry_get_start_stop_times(t.Instance(), &start, &stop) gok := C.gst_toc_entry_get_start_stop_times(t.Instance(), &start, &stop)
@@ -222,6 +286,8 @@ func (t *TOCEntry) GetStartStopTimes() (ok bool, startTime, stopTime int64) {
} }
// GetSubEntries gets all the subentries for this TOCEntry. // GetSubEntries gets all the subentries for this TOCEntry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetSubEntries() []*TOCEntry { func (t *TOCEntry) GetSubEntries() []*TOCEntry {
gList := C.gst_toc_entry_get_sub_entries(t.Instance()) gList := C.gst_toc_entry_get_sub_entries(t.Instance())
@@ -239,6 +305,8 @@ func (t *TOCEntry) GetSubEntries() []*TOCEntry {
} }
// GetTags gets the tags for this entry. // GetTags gets the tags for this entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetTags() *TagList { func (t *TOCEntry) GetTags() *TagList {
tagList := C.gst_toc_entry_get_tags(t.Instance()) tagList := C.gst_toc_entry_get_tags(t.Instance())
if tagList == nil { if tagList == nil {
@@ -248,6 +316,8 @@ func (t *TOCEntry) GetTags() *TagList {
} }
// GetTOC returns the parent TOC of this entry. // GetTOC returns the parent TOC of this entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetTOC() *TOC { func (t *TOCEntry) GetTOC() *TOC {
toc := C.gst_toc_entry_get_toc(t.Instance()) toc := C.gst_toc_entry_get_toc(t.Instance())
if toc == nil { if toc == nil {
@@ -257,21 +327,29 @@ func (t *TOCEntry) GetTOC() *TOC {
} }
// GetUID returns the uid of this entry. // GetUID returns the uid of this entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) GetUID() string { func (t *TOCEntry) GetUID() string {
return C.GoString(C.gst_toc_entry_get_uid(t.Instance())) return C.GoString(C.gst_toc_entry_get_uid(t.Instance()))
} }
// IsAlternative returns true if this is an alternative entry. // IsAlternative returns true if this is an alternative entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) IsAlternative() bool { func (t *TOCEntry) IsAlternative() bool {
return gobool(C.gst_toc_entry_is_alternative(t.Instance())) return gobool(C.gst_toc_entry_is_alternative(t.Instance()))
} }
// IsSequence returns true if this is a sequence entry. // IsSequence returns true if this is a sequence entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) IsSequence() bool { func (t *TOCEntry) IsSequence() bool {
return gobool(C.gst_toc_entry_is_sequence(t.Instance())) return gobool(C.gst_toc_entry_is_sequence(t.Instance()))
} }
// MergeTags merges the given tags with the given mode. // MergeTags merges the given tags with the given mode.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) MergeTags(tagList *TagList, mergeMode TagMergeMode) { func (t *TOCEntry) MergeTags(tagList *TagList, mergeMode TagMergeMode) {
if tagList == nil { if tagList == nil {
C.gst_toc_entry_merge_tags(t.Instance(), nil, C.GstTagMergeMode(mergeMode)) C.gst_toc_entry_merge_tags(t.Instance(), nil, C.GstTagMergeMode(mergeMode))
@@ -281,16 +359,22 @@ func (t *TOCEntry) MergeTags(tagList *TagList, mergeMode TagMergeMode) {
} }
// SetLoop sets the loop type and repeat counts for the entry. // SetLoop sets the loop type and repeat counts for the entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) SetLoop(loopType TOCLoopType, repeatCount int) { func (t *TOCEntry) SetLoop(loopType TOCLoopType, repeatCount int) {
C.gst_toc_entry_set_loop(t.Instance(), C.GstTocLoopType(loopType), C.gint(repeatCount)) C.gst_toc_entry_set_loop(t.Instance(), C.GstTocLoopType(loopType), C.gint(repeatCount))
} }
// SetStartStopTimes sets the start and stop times for the TOC entry. // SetStartStopTimes sets the start and stop times for the TOC entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) SetStartStopTimes(startTime, stopTime int64) { func (t *TOCEntry) SetStartStopTimes(startTime, stopTime int64) {
C.gst_toc_entry_set_start_stop_times(t.Instance(), C.gint64(startTime), C.gint64(stopTime)) C.gst_toc_entry_set_start_stop_times(t.Instance(), C.gint64(startTime), C.gint64(stopTime))
} }
// SetTags sets the tags on the TOC entry. // SetTags sets the tags on the TOC entry.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (t *TOCEntry) SetTags(tagList *TagList) { func (t *TOCEntry) SetTags(tagList *TagList) {
C.gst_toc_entry_set_tags(t.Instance(), tagList.Ref().Instance()) C.gst_toc_entry_set_tags(t.Instance(), tagList.Ref().Instance())
} }

View File

@@ -13,6 +13,8 @@ import (
var InterfaceTOCSetter = glib.Type(C.GST_TYPE_TOC_SETTER) var InterfaceTOCSetter = glib.Type(C.GST_TYPE_TOC_SETTER)
// TOCSetter is an interface that elements can implement to provide TOC writing capabilities. // TOCSetter is an interface that elements can implement to provide TOC writing capabilities.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type TOCSetter interface { type TOCSetter interface {
// Return current TOC the setter uses. The TOC should not be modified without making it writable first. // Return current TOC the setter uses. The TOC should not be modified without making it writable first.
GetTOC() *TOC GetTOC() *TOC
@@ -23,14 +25,20 @@ type TOCSetter interface {
} }
// gstTocSetter implements a TOCSetter that is backed by an Element from the C runtime. // gstTocSetter implements a TOCSetter that is backed by an Element from the C runtime.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type gstTOCSetter struct { type gstTOCSetter struct {
ptr *C.GstElement ptr *C.GstElement
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstTOCSetter) Instance() *C.GstTocSetter { func (g *gstTOCSetter) Instance() *C.GstTocSetter {
return C.toTocSetter(g.ptr) return C.toTocSetter(g.ptr)
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstTOCSetter) GetTOC() *TOC { func (g *gstTOCSetter) GetTOC() *TOC {
toc := C.gst_toc_setter_get_toc(g.Instance()) toc := C.gst_toc_setter_get_toc(g.Instance())
if toc == nil { if toc == nil {
@@ -39,5 +47,9 @@ func (g *gstTOCSetter) GetTOC() *TOC {
return FromGstTOCUnsafeFull(unsafe.Pointer(toc)) return FromGstTOCUnsafeFull(unsafe.Pointer(toc))
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstTOCSetter) SetTOC(toc *TOC) { C.gst_toc_setter_set_toc(g.Instance(), toc.Instance()) } func (g *gstTOCSetter) SetTOC(toc *TOC) { C.gst_toc_setter_set_toc(g.Instance(), toc.Instance()) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstTOCSetter) Reset() { C.gst_toc_setter_reset(g.Instance()) } func (g *gstTOCSetter) Reset() { C.gst_toc_setter_reset(g.Instance()) }

View File

@@ -8,10 +8,14 @@ import (
"github.com/go-gst/go-glib/glib" "github.com/go-gst/go-glib/glib"
) )
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type Tracer struct { type Tracer struct {
*Object *Object
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func TracingGetActiveTracers() []*Tracer { func TracingGetActiveTracers() []*Tracer {
cglist := C.gst_tracing_get_active_tracers() cglist := C.gst_tracing_get_active_tracers()

View File

@@ -35,7 +35,11 @@ var InterfaceURIHandler glib.Interface = &interfaceURIHandler{}
type interfaceURIHandler struct{ glib.Interface } type interfaceURIHandler struct{ glib.Interface }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *interfaceURIHandler) Type() glib.Type { return glib.Type(C.GST_TYPE_URI_HANDLER) } func (i *interfaceURIHandler) Type() glib.Type { return glib.Type(C.GST_TYPE_URI_HANDLER) }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (i *interfaceURIHandler) Init(instance *glib.TypeInstance) { func (i *interfaceURIHandler) Init(instance *glib.TypeInstance) {
globalURIHdlr = instance.GoType.(URIHandler) globalURIHdlr = instance.GoType.(URIHandler)
C.uriHandlerInit((C.gpointer)(instance.GTypeInstance), nil) C.uriHandlerInit((C.gpointer)(instance.GTypeInstance), nil)
@@ -43,6 +47,8 @@ func (i *interfaceURIHandler) Init(instance *glib.TypeInstance) {
// URIHandler represents an interface that elements can implement to provide URI handling // URIHandler represents an interface that elements can implement to provide URI handling
// capabilities. // capabilities.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type URIHandler interface { type URIHandler interface {
// GetURI gets the currently handled URI. // GetURI gets the currently handled URI.
GetURI() string GetURI() string
@@ -55,15 +61,21 @@ type URIHandler interface {
} }
// gstURIHandler implements a URIHandler that is backed by an Element from the C API. // gstURIHandler implements a URIHandler that is backed by an Element from the C API.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
type gstURIHandler struct { type gstURIHandler struct {
ptr *C.GstElement ptr *C.GstElement
} }
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstURIHandler) Instance() *C.GstURIHandler { func (g *gstURIHandler) Instance() *C.GstURIHandler {
return C.toGstURIHandler(unsafe.Pointer(g.ptr)) return C.toGstURIHandler(unsafe.Pointer(g.ptr))
} }
// GetURI gets the currently handled URI. // GetURI gets the currently handled URI.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstURIHandler) GetURI() string { func (g *gstURIHandler) GetURI() string {
ret := C.gst_uri_handler_get_uri(g.Instance()) ret := C.gst_uri_handler_get_uri(g.Instance())
if ret == nil { if ret == nil {
@@ -74,12 +86,16 @@ func (g *gstURIHandler) GetURI() string {
} }
// GetURIType returns the type of URI this element can handle. // GetURIType returns the type of URI this element can handle.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstURIHandler) GetURIType() URIType { func (g *gstURIHandler) GetURIType() URIType {
ty := C.gst_uri_handler_get_uri_type((*C.GstURIHandler)(g.Instance())) ty := C.gst_uri_handler_get_uri_type((*C.GstURIHandler)(g.Instance()))
return URIType(ty) return URIType(ty)
} }
// GetProtocols returns the protocols this element can handle. // GetProtocols returns the protocols this element can handle.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstURIHandler) GetProtocols() []string { func (g *gstURIHandler) GetProtocols() []string {
protocols := C.gst_uri_handler_get_protocols((*C.GstURIHandler)(g.Instance())) protocols := C.gst_uri_handler_get_protocols((*C.GstURIHandler)(g.Instance()))
if protocols == nil { if protocols == nil {
@@ -90,6 +106,8 @@ func (g *gstURIHandler) GetProtocols() []string {
} }
// SetURI tries to set the URI of the given handler. // SetURI tries to set the URI of the given handler.
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (g *gstURIHandler) SetURI(uri string) (bool, error) { func (g *gstURIHandler) SetURI(uri string) (bool, error) {
curi := C.CString(uri) curi := C.CString(uri)
defer C.free(unsafe.Pointer(curi)) defer C.free(unsafe.Pointer(curi))

View File

@@ -13,11 +13,15 @@ import (
) )
//export goURIHdlrGetURIType //export goURIHdlrGetURIType
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goURIHdlrGetURIType(gtype C.GType) C.GstURIType { func goURIHdlrGetURIType(gtype C.GType) C.GstURIType {
return C.GstURIType(globalURIHdlr.GetURIType()) return C.GstURIType(globalURIHdlr.GetURIType())
} }
//export goURIHdlrGetProtocols //export goURIHdlrGetProtocols
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goURIHdlrGetProtocols(gtype C.GType) **C.gchar { func goURIHdlrGetProtocols(gtype C.GType) **C.gchar {
protocols := globalURIHdlr.GetProtocols() protocols := globalURIHdlr.GetProtocols()
size := C.size_t(unsafe.Sizeof((*C.gchar)(nil))) size := C.size_t(unsafe.Sizeof((*C.gchar)(nil)))
@@ -31,6 +35,8 @@ func goURIHdlrGetProtocols(gtype C.GType) **C.gchar {
} }
//export goURIHdlrGetURI //export goURIHdlrGetURI
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goURIHdlrGetURI(hdlr *C.GstURIHandler) *C.gchar { func goURIHdlrGetURI(hdlr *C.GstURIHandler) *C.gchar {
var uri string var uri string
subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(hdlr)) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(hdlr))
@@ -43,6 +49,8 @@ func goURIHdlrGetURI(hdlr *C.GstURIHandler) *C.gchar {
} }
//export goURIHdlrSetURI //export goURIHdlrSetURI
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func goURIHdlrSetURI(hdlr *C.GstURIHandler, uri *C.gchar, gerr **C.GError) C.gboolean { func goURIHdlrSetURI(hdlr *C.GstURIHandler, uri *C.gchar, gerr **C.GError) C.gboolean {
var ok bool var ok bool
var err error var err error

Some files were not shown because too many files have changed in this diff Show More