diff --git a/go.mod b/go.mod index 62adf6a..a56044f 100644 --- a/go.mod +++ b/go.mod @@ -2,13 +2,19 @@ module github.com/go-gst/go-gst 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 ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.10.0 // indirect github.com/mattn/go-colorable v0.1.8 // 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/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect ) diff --git a/go.sum b/go.sum index 0813cad..7e160a1 100644 --- a/go.sum +++ b/go.sum @@ -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/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= 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/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/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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-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/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/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/gst/app/cgo_exports.go b/gst/app/cgo_exports.go index 7a3dcf2..ff460c0 100644 --- a/gst/app/cgo_exports.go +++ b/gst/app/cgo_exports.go @@ -10,6 +10,8 @@ import ( 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 { ptr := gopointer.Restore(unsafe.Pointer(userData)) cbs, ok := ptr.(*SinkCallbacks) @@ -20,6 +22,8 @@ func getSinkCbsFromPtr(userData C.gpointer) *SinkCallbacks { 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 { ptr := gopointer.Restore(unsafe.Pointer(userData)) cbs, ok := ptr.(*SourceCallbacks) @@ -30,6 +34,8 @@ func getSrcCbsFromPtr(userData C.gpointer) *SourceCallbacks { 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 { return wrapAppSink(&gst.Element{ 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 { return wrapAppSrc(&gst.Element{ Object: &gst.Object{ @@ -55,6 +63,8 @@ func wrapCSource(src *C.GstAppSrc) *Source { } //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) { cbs := getSrcCbsFromPtr(userData) if cbs == nil { @@ -69,6 +79,8 @@ func goNeedDataCb(src *C.GstAppSrc, length C.guint, userData C.gpointer) { } //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) { cbs := getSrcCbsFromPtr(userData) if cbs == nil { @@ -82,6 +94,8 @@ func goEnoughDataDb(src *C.GstAppSrc, userData C.gpointer) { } //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 { cbs := getSrcCbsFromPtr(userData) if cbs == nil { @@ -96,6 +110,8 @@ func goSeekDataCb(src *C.GstAppSrc, offset C.guint64, userData C.gpointer) C.gbo } //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) { cbs := getSinkCbsFromPtr(userData) if cbs == nil { @@ -110,6 +126,8 @@ func goSinkEOSCb(sink *C.GstAppSink, userData C.gpointer) { } //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 { cbs := getSinkCbsFromPtr(userData) if cbs == nil { @@ -126,6 +144,8 @@ func goSinkNewPrerollCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn } //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 { cbs := getSinkCbsFromPtr(userData) if cbs == nil { @@ -142,6 +162,8 @@ func goSinkNewSampleCb(sink *C.GstAppSink, userData C.gpointer) C.GstFlowReturn } //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) { gopointer.Unref(unsafe.Pointer(ptr)) } diff --git a/gst/app/gst_app_sink.go b/gst/app/gst_app_sink.go index 24b64ba..7ad27eb 100644 --- a/gst/app/gst_app_sink.go +++ b/gst/app/gst_app_sink.go @@ -28,6 +28,8 @@ import ( ) // 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 { EOSFunc func(appSink *Sink) 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 } // 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) { elem, err := gst.NewElement("appsink") if err != nil { @@ -51,6 +55,8 @@ func NewAppSink() (*Sink, error) { // SinkFromElement checks if the given element is an appsink and if so returns // 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 { if appSink := C.toGstAppSink(elem.Unsafe()); appSink != nil { return wrapAppSink(elem) @@ -59,14 +65,20 @@ func SinkFromElement(elem *gst.Element) *Sink { } // 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()) } // 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 { return gobool(C.gst_app_sink_get_buffer_list_support(a.Instance())) } // 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 { caps := C.gst_app_sink_get_caps(a.Instance()) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Sink) GetDrop() bool { return gobool(C.gst_app_sink_get_drop(a.Instance())) } // 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 { return gobool(C.gst_app_sink_get_emit_signals(a.Instance())) } // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Sink) GetWaitOnEOS() bool { return gobool(C.gst_app_sink_get_wait_on_eos(a.Instance())) } // 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 { 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. // // 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 { smpl := C.gst_app_sink_pull_preroll(a.Instance()) 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. // // 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 { smpl := C.gst_app_sink_pull_sample(a.Instance()) if smpl == nil { @@ -138,6 +164,8 @@ func (a *Sink) PullSample() *gst.Sample { // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Sink) SetBufferListSupport(enabled bool) { 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. // // 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) { ptr := gopointer.Save(cbs) 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, // 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. +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Sink) SetDrop(drop bool) { 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 // 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) { 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, // 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Sink) SetWaitOnEOS(wait bool) { 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. // // 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 { tm := C.GstClockTime(timeout) 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. // // 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 { tm := C.GstClockTime(timeout) smpl := C.gst_app_sink_try_pull_sample(a.Instance(), tm) diff --git a/gst/app/gst_app_src.go b/gst/app/gst_app_src.go index 092323c..f4139e0 100644 --- a/gst/app/gst_app_src.go +++ b/gst/app/gst_app_src.go @@ -26,6 +26,8 @@ import ( ) // 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 { NeedDataFunc func(src *Source, length uint) EnoughDataFunc func(src *Source) @@ -46,6 +48,8 @@ const ( type Source struct{ *base.GstBaseSrc } // 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) { elem, err := gst.NewElement("appsrc") if err != nil { @@ -56,6 +60,8 @@ func NewAppSrc() (*Source, error) { // SrcFromElement checks if the given element is an appsrc and if so returns // 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 { if appSrc := C.toGstAppSrc(elem.Unsafe()); appSrc != nil { return wrapAppSrc(elem) @@ -64,16 +70,22 @@ func SrcFromElement(elem *gst.Element) *Source { } // 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()) } // EndStream signals to the app source that the stream has ended after the last queued // 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 { ret := C.gst_app_src_end_of_stream((*C.GstAppSrc)(a.Instance())) return gst.FlowReturn(ret) } // 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 { caps := C.gst_app_src_get_caps(a.Instance()) if caps == nil { @@ -83,11 +95,15 @@ func (a *Source) GetCaps() *gst.Caps { } // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Source) GetDuration() gst.ClockTime { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Source) GetEmitSignals() bool { return gobool(C.gst_app_src_get_emit_signals(a.Instance())) } // 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) { var gmin, gmax C.guint64 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Source) GetMaxBytes() uint64 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Source) GetSize() int64 { return int64(C.gst_app_src_get_size(a.Instance())) } // 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 { return StreamType(C.gst_app_src_get_stream_type(a.Instance())) } // PushBuffer pushes a buffer to the appsrc. Currently by default this will block // 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 { ret := C.gst_app_src_push_buffer( (*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. // // 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 { return gst.FlowReturn(C.gst_app_src_push_buffer_list( 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. // // 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 { return gst.FlowReturn(C.gst_app_src_push_sample( 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. // // 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) { ptr := gopointer.Save(cbs) 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, // 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) { 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 // 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) { 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 // 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) { 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 // 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) { 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 // 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) { 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 // 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Source) SetStreamType(streamType StreamType) { C.gst_app_src_set_stream_type(a.Instance(), C.GstAppStreamType(streamType)) } diff --git a/gst/app/wrappers.go b/gst/app/wrappers.go index f109e70..8dbe3db 100644 --- a/gst/app/wrappers.go +++ b/gst/app/wrappers.go @@ -8,17 +8,25 @@ import ( "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 { 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 { return &Source{GstBaseSrc: &base.GstBaseSrc{Element: elem}} } // 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 } // 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 { if b { return C.gboolean(1) diff --git a/gst/audio/c_util.go b/gst/audio/c_util.go index 30548e7..95fab80 100644 --- a/gst/audio/c_util.go +++ b/gst/audio/c_util.go @@ -18,17 +18,23 @@ import ( // FramesToClockTime calculates the Clocktime // 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 { ct := C.framesToClockTime(C.gint(frames), C.gint(rate)) return gst.ClockTime(ct) } // 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 { return int(C.clockTimeToFrames(C.GstClockTime(dur), C.gint(rate))) } // 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 { if b { 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. +// +// 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 } +// +// 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 { return (*C.GValue)(p) } diff --git a/gst/audio/gst_audio_buffer.go b/gst/audio/gst_audio_buffer.go index de72039..731bae5 100644 --- a/gst/audio/gst_audio_buffer.go +++ b/gst/audio/gst_audio_buffer.go @@ -23,6 +23,8 @@ import ( // 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. +// +// 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 { buf := C.gst_audio_buffer_clip( (*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 // 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 { return gobool(C.gst_audio_buffer_reorder_channels( (*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 // 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. +// +// 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 { buf := C.gst_audio_buffer_truncate( (*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. // 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. +// +// 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) { var audioBuffer C.GstAudioBuffer 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. // // 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 { ptr *C.GstAudioBuffer } // 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) } // 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) } // 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 { out := make([][]byte, b.NumPlanes()) 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. +// +// 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) { bufdata := C.audioBufferPlaneData(b.ptr, C.gint(idx)) C.memcpy(unsafe.Pointer(bufdata), unsafe.Pointer(&data[0]), C.gsize(len(data))) } // 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) } diff --git a/gst/audio/gst_audio_channels.go b/gst/audio/gst_audio_channels.go index 5ffc7d0..2e14c94 100644 --- a/gst/audio/gst_audio_channels.go +++ b/gst/audio/gst_audio_channels.go @@ -11,6 +11,8 @@ import ( ) // 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 { 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 // 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. +// +// 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 { var out C.GstAudioChannelPosition 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 // 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) { var out C.guint64 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ChannelPositionsToString(positions []ChannelPosition) string { ret := C.gst_audio_channel_positions_to_string( (*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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ChannelPositionsToValidOrder(positions []ChannelPosition) (ok bool) { ok = gobool(C.gst_audio_channel_positions_to_valid_order( (*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 // 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 { return gobool(C.gst_audio_check_valid_channel_positions( (*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) ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c ChannelPosition) String() string { // ugly hack return strings.TrimSuffix(strings.TrimPrefix(ChannelPositionsToString([]ChannelPosition{c}), "[ "), " ]") diff --git a/gst/audio/gst_audio_format.go b/gst/audio/gst_audio_format.go index 526304c..c75537c 100644 --- a/gst/audio/gst_audio_format.go +++ b/gst/audio/gst_audio_format.go @@ -13,6 +13,8 @@ import ( "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() { glib.RegisterGValueMarshalers([]glib.TypeMarshaler{ { @@ -26,37 +28,57 @@ func init() { } // 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 { ptr *C.GstAudioFormatInfo } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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 { return C.GoBytes(unsafe.Pointer(&f.ptr.silence), C.gint(f.Width()/8)) } // 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) } // 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()) // 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) { val, err := glib.ValueInit(TypeFormat) if err != nil { @@ -105,11 +129,15 @@ func (f Format) ToGValue() (*glib.Value, error) { 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 { return C.GoString(C.gst_audio_format_to_string(C.GstAudioFormat(f))) } // 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 { return &FormatInfo{ 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FormatFromString(format string) Format { f := C.CString(format) 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. // 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. +// +// 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 { return Format(C.gst_audio_format_build_integer( gboolean(signed), @@ -142,6 +174,8 @@ func FormatFromInteger(signed bool, endianness, width, depth int) Format { } // 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 { var l C.guint 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 // 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 { var caps *C.GstCaps if formats == nil { diff --git a/gst/audio/gst_audio_info.go b/gst/audio/gst_audio_info.go index 2e3ba18..b254e87 100644 --- a/gst/audio/gst_audio_info.go +++ b/gst/audio/gst_audio_info.go @@ -26,6 +26,8 @@ const ( 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 { info := &Info{ptr} 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 // 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 { ptr *C.GstAudioInfo } // 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()) } // 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) { info := NewInfo() 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. +// +// 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} } // 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) } // 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) } // 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) } // 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)) } // 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) } // 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 { l := i.Channels() out := make([]ChannelPosition, int(l)) @@ -77,14 +99,20 @@ func (i *Info) Positions() []ChannelPosition { } // 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) } // 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) } // 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 // 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) { var out C.gint64 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Copy() *Info { return wrapInfoFull(C.gst_audio_info_copy(i.ptr)) } // 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 { 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. +// +// 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) { C.gst_audio_info_set_format( i.ptr, @@ -119,6 +153,8 @@ func (i *Info) SetFormat(format Format, rate int, positions []ChannelPosition) { } // 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 { return gst.FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_audio_info_to_caps(i.ptr))) } diff --git a/gst/audio/gst_audio_meta.go b/gst/audio/gst_audio_meta.go index 0da1188..184cb7c 100644 --- a/gst/audio/gst_audio_meta.go +++ b/gst/audio/gst_audio_meta.go @@ -16,10 +16,14 @@ import ( type AudioMeta struct{ *glib.Object } // 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 { 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 { // offsets is not yet implemented, always pass `nil` or this will panic if offsets != nil { diff --git a/gst/base/gst_base_sink.go b/gst/base/gst_base_sink.go index b60bd2a..ba2e467 100644 --- a/gst/base/gst_base_sink.go +++ b/gst/base/gst_base_sink.go @@ -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 // 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 { switch obj := obj.(type) { case *gst.Object: @@ -35,6 +37,8 @@ func ToGstBaseSink(obj interface{}) *GstBaseSink { } // 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 { 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 // 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. +// +// 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 { miniobj := getPrerollObj(obj) 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)) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func getPrerollObj(obj interface{}) *C.GstMiniObject { switch obj := obj.(type) { 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. +// +// 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())) } // 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 { 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 // 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 { sample := C.gst_base_sink_get_last_sample(g.Instance()) if sample == nil { @@ -96,26 +110,36 @@ func (g *GstBaseSink) GetLastSample() *gst.Sample { } // 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 { return gst.ClockTime(C.gst_base_sink_get_latency(g.Instance())) } // 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 { return uint64(C.gst_base_sink_get_max_bitrate(g.Instance())) } // 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 { return int64(C.gst_base_sink_get_max_lateness(g.Instance())) } // 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 { return gst.ClockTime(C.gst_base_sink_get_processing_deadline(g.Instance())) } // 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 { 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. +// +// 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())) } // GetThrottleTime gets the time that will be inserted between frames to control maximum buffers // 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 { return uint64(C.gst_base_sink_get_throttle_time(g.Instance())) } // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) IsAsyncEnabled() bool { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) IsLastSampleEnabled() bool { return gobool(C.gst_base_sink_is_last_sample_enabled(g.Instance())) } // 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 { return gobool(C.gst_base_sink_is_qos_enabled(g.Instance())) } // 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 { return gobool(C.baseSinkParentEvent( 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. // // 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) { var glive, gupLive C.gboolean 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, // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) SetAsyncEnabled(enabled bool) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) SetBlocksize(blocksize uint) { C.gst_base_sink_set_blocksize(g.Instance(), C.guint(blocksize)) } // 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) { C.gst_base_sink_set_drop_out_of_segment(g.Instance(), gboolean(drop)) } // 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) SetMaxBitrate(bitrate uint64) { 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) SetMaxLateness(maxLateness int64) { 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. // // 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) { C.gst_base_sink_set_processing_deadline(g.Instance(), C.GstClockTime(deadline)) } // 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) { 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. // // 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) { 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 // 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. +// +// 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)) } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSink) SetThrottleTime(throttle uint64) { 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 // than their timestamp. A positive value will delay rendering. This function can be used to fix playback of // 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) { 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 // 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) { var jit C.GstClockTimeDiff 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 // 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) { var jit C.GstClockTimeDiff 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 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 { return gst.FlowReturn(C.gst_base_sink_wait_preroll(g.Instance())) } diff --git a/gst/base/gst_base_sink_exports.go b/gst/base/gst_base_sink_exports.go index dd24ba7..53fbfec 100644 --- a/gst/base/gst_base_sink_exports.go +++ b/gst/base/gst_base_sink_exports.go @@ -14,6 +14,8 @@ import ( ) //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 { var ret C.gboolean 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 +// +// 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 { var ret C.gboolean 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 +// +// 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 { var fixated *gst.Caps 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 +// +// 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 { var filtered *gst.Caps 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 +// +// 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) { var retStart, retEnd time.Duration 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 +// +// 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 { var ret gst.FlowReturn 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 +// +// 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 { var ret gst.FlowReturn 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 +// +// 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 { var ret gst.FlowReturn 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 +// +// 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 { var ret bool 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 +// +// 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 { var ret bool 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 +// +// 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 { var ret gst.FlowReturn 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 +// +// 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 { var ret gst.FlowReturn 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 +// +// 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 { var ret bool 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 +// +// 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 { var ret bool goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) @@ -217,6 +245,8 @@ func goGstBaseSinkStart(sink *C.GstBaseSink) C.gboolean { } //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 { var ret bool goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) @@ -231,6 +261,8 @@ func goGstBaseSinkStop(sink *C.GstBaseSink) C.gboolean { } //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 { var ret bool goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) @@ -245,6 +277,8 @@ func goGstBaseSinkUnlock(sink *C.GstBaseSink) C.gboolean { } //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 { var ret bool goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) @@ -259,6 +293,8 @@ func goGstBaseSinkUnlockStop(sink *C.GstBaseSink) C.gboolean { } //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 { var ret gst.FlowReturn goBaseSink := ToGstBaseSink(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(sink))}) diff --git a/gst/base/gst_base_sink_impl.go b/gst/base/gst_base_sink_impl.go index 66a0409..96df9dc 100644 --- a/gst/base/gst_base_sink_impl.go +++ b/gst/base/gst_base_sink_impl.go @@ -71,6 +71,8 @@ var ( // 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 // 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 { // 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 @@ -122,10 +124,18 @@ type GstBaseSinkImpl interface { 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()) } +// +// 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) } +// +// 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) } +// +// 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) { e.parent.InitClass(klass, elem) diff --git a/gst/base/gst_base_src.go b/gst/base/gst_base_src.go index 1a91844..28a5cf1 100644 --- a/gst/base/gst_base_src.go +++ b/gst/base/gst_base_src.go @@ -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 // 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 { switch obj := obj.(type) { case *gst.Object: @@ -28,11 +30,15 @@ func ToGstBaseSrc(obj interface{}) *GstBaseSrc { } // 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 { return C.toGstBaseSrc(g.Unsafe()) } // 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) { var allocParams C.GstAllocationParams 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. +// +// 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())) } // 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 { pool := C.gst_base_src_get_buffer_pool(g.Instance()) 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 // 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 { return gobool(C.gst_base_src_get_do_timestamp(g.Instance())) } // 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())) } // 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())) } // 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. // // 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) { var glive C.gboolean 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 // 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. +// +// 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)) } // 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseSrc) SetAutomaticEOS(automaticEOS bool) { 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 // 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) { C.gst_base_src_set_blocksize(g.Instance(), C.guint(size)) } // 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 { 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. // 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) { 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 // 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) { C.gst_base_src_set_dynamic_size(g.Instance(), gboolean(dynamic)) } @@ -147,6 +177,8 @@ func (g *GstBaseSrc) SetDynamicSize(dynamic bool) { // IsSeekable returns TRUE. // // 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) { 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 // 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. +// +// 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)) } // 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 // 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) { C.gst_base_src_start_complete(g.Instance(), C.GstFlowReturn(ret)) } // 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 { 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 // 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) { 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 // 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 { return gst.FlowReturn(C.gst_base_src_wait_playing(g.Instance())) } diff --git a/gst/base/gst_base_src_exports.go b/gst/base/gst_base_src_exports.go index bb655f6..f23d92c 100644 --- a/gst/base/gst_base_src_exports.go +++ b/gst/base/gst_base_src_exports.go @@ -12,6 +12,8 @@ import ( ) //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 { var caps *gst.Caps @@ -30,6 +32,8 @@ func goGstBaseSrcGetCaps(src *C.GstBaseSrc, filter *C.GstCaps) *C.GstCaps { } //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 { var ret bool goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) @@ -44,6 +48,8 @@ func goGstBaseSrcNegotiate(src *C.GstBaseSrc) C.gboolean { } //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 { var caps *gst.Caps 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 +// +// 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 { var ret bool 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 +// +// 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 { var ret bool 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 +// +// 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 { var ret bool goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) @@ -103,6 +115,8 @@ func goGstBaseSrcStart(src *C.GstBaseSrc) C.gboolean { } //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 { var ret bool goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) @@ -117,6 +131,8 @@ func goGstBaseSrcStop(src *C.GstBaseSrc) C.gboolean { } //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) { var gostart, goend time.Duration 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 +// +// 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 { var gosize int64 var ok bool @@ -150,6 +168,8 @@ func goGstBaseSrcGetSize(src *C.GstBaseSrc, size *C.guint64) C.gboolean { } //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 { var ok bool goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) @@ -164,6 +184,8 @@ func goGstBaseSrcIsSeekable(src *C.GstBaseSrc) C.gboolean { } //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 { var ok bool 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 +// +// 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 { var ok bool 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 +// +// 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 { var ok bool goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) @@ -206,6 +232,8 @@ func goGstBaseSrcUnlock(src *C.GstBaseSrc) C.gboolean { } //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 { var ok bool goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) @@ -220,6 +248,8 @@ func goGstBaseSrcUnlockStop(src *C.GstBaseSrc) C.gboolean { } //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 { var ok bool 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 +// +// 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 { var ok bool 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 +// +// 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 { var ret gst.FlowReturn var gobuf *gst.Buffer @@ -266,6 +300,8 @@ func goGstBaseSrcCreate(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf * } //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 { var ret gst.FlowReturn var gobuf *gst.Buffer @@ -284,6 +320,8 @@ func goGstBaseSrcAlloc(src *C.GstBaseSrc, offset C.guint64, size C.guint, buf ** } //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 { var ret gst.FlowReturn goBaseSrc := ToGstBaseSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) diff --git a/gst/base/gst_base_src_impl.go b/gst/base/gst_base_src_impl.go index 78878f4..75d82b1 100644 --- a/gst/base/gst_base_src_impl.go +++ b/gst/base/gst_base_src_impl.go @@ -64,6 +64,8 @@ var ( // 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 // 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 { // GetCaps retrieves the caps for this class. GetCaps(*GstBaseSrc, *gst.Caps) *gst.Caps @@ -112,12 +114,20 @@ type GstBaseSrcImpl interface { 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()) } +// +// 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) } +// +// 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) } // InitClass iterates the methods provided by the element and overrides any provided // 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) { e.parent.InitClass(klass, elem) diff --git a/gst/base/gst_base_transform.go b/gst/base/gst_base_transform.go index 9eeca63..c488bf6 100644 --- a/gst/base/gst_base_transform.go +++ b/gst/base/gst_base_transform.go @@ -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 // 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 { switch obj := obj.(type) { case *gst.Object: @@ -64,11 +66,15 @@ func ToGstBaseTransform(obj interface{}) *GstBaseTransform { } // 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 { return C.toGstBaseTransform(g.Unsafe()) } // 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) { var allocParams C.GstAllocationParams var allocator *C.GstAllocator @@ -80,6 +86,8 @@ func (g *GstBaseTransform) GetAllocator() (*gst.Allocator, *gst.AllocationParams } // 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 { pool := C.gst_base_transform_get_buffer_pool(g.Instance()) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseTransform) IsInPlace() bool { return gobool(C.gst_base_transform_is_in_place(g.Instance())) } // 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 { return gobool(C.gst_base_transform_is_passthrough(g.Instance())) } // 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 { return gobool(C.gst_base_transform_is_qos_enabled(g.Instance())) } // 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 { 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 // 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()) } // 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. +// +// 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()) } // 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 // 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) { 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. // This is always true if no Transform() function is implemented, and always false if ONLY a Transform() function // 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) { 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 // care about negotiation. This is always true for filters which don't implement either a Transform(), TransformIP(), // 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) { C.gst_base_transform_set_passthrough(g.Instance(), gboolean(passthrough)) } // 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) { 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *GstBaseTransform) SetPreferPassthrough(preferPassthrough bool) { C.gst_base_transform_set_prefer_passthrough(g.Instance(), gboolean(preferPassthrough)) } // 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) { 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 // buffer might not be writable. When FALSE, neither Transform() nor TransformIP() will be called in passthrough // 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) { C.setGstBaseTransformTransformIPOnPassthrough(g.Instance(), gboolean(enabled)) } // 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 { return gst.FromGstPadUnsafeNone(unsafe.Pointer(g.Instance().sinkpad)) } // 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 { 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 // 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) { C.gst_base_transform_update_qos( 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 // 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. +// +// 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) { C.gst_base_transform_update_src_caps( 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 { 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) { 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 { 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 { 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 { 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 { 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) { 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) { 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) { 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 { 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 { 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 { panic("not implemented") } // 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 { return gobool(C.gstBaseTransformParentSrcEvent(g.Instance(), (*C.GstEvent)(unsafe.Pointer(event.Instance())))) } // 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 { 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) { 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) { 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 { 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 { 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 { 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 { 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 { 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) { panic("not implemented") } diff --git a/gst/base/gst_base_transform_exports.go b/gst/base/gst_base_transform_exports.go index 602492a..c933075 100644 --- a/gst/base/gst_base_transform_exports.go +++ b/gst/base/gst_base_transform_exports.go @@ -13,6 +13,8 @@ import ( ) //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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -27,6 +29,8 @@ func goGstBaseTransformAcceptCaps(self *C.GstBaseTransform, direction C.GstPadDi } //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) { goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(self)) @@ -38,6 +42,8 @@ func goGstBaseTransformBeforeTransform(self *C.GstBaseTransform, buffer *C.GstBu } //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 { var ret bool 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 +// +// 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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -65,6 +73,8 @@ func goGstBaseTransformDecideAllocation(self *C.GstBaseTransform, query *C.GstQu } //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 { var ret bool 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 +// +// 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 { var ret *gst.Caps goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -96,6 +108,8 @@ func goGstBaseTransformFixateCaps(self *C.GstBaseTransform, direction C.GstPadDi } //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 { var ret gst.FlowReturn var out *gst.Buffer @@ -114,6 +128,8 @@ func goGstBaseTransformGenerateOutput(self *C.GstBaseTransform, buf **C.GstBuffe } //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 { var ret bool var out int64 @@ -132,6 +148,8 @@ func goGstBaseTransformGetUnitSize(self *C.GstBaseTransform, caps *C.GstCaps, si } //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 { var ret gst.FlowReturn var out *gst.Buffer @@ -150,6 +168,8 @@ func goGstBaseTransformPrepareOutputBuffer(self *C.GstBaseTransform, input *C.Gs } //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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -164,6 +184,8 @@ func goGstBaseTransformProposeAllocation(self *C.GstBaseTransform, decide, query } //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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -178,6 +200,8 @@ func goGstBaseTransformQuery(self *C.GstBaseTransform, direction C.GstPadDirecti } //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 { var ret bool 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 +// +// 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 { var ret bool @@ -208,6 +234,8 @@ func goGstBaseTransformSinkEvent(self *C.GstBaseTransform, event *C.GstEvent) C. } //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 { var ret bool @@ -223,6 +251,8 @@ func goGstBaseTransformSrcEvent(self *C.GstBaseTransform, event *C.GstEvent) C.g } //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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -237,6 +267,8 @@ func goGstBaseTransformStart(self *C.GstBaseTransform) C.gboolean { } //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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -251,6 +283,8 @@ func goGstBaseTransformStop(self *C.GstBaseTransform) C.gboolean { } //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 { var ret gst.FlowReturn goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -265,6 +299,8 @@ func goGstBaseTransformSubmitInputBuffer(self *C.GstBaseTransform, isDiscont C.g } //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 { var ret gst.FlowReturn 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 +// +// 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 { var ret *gst.Caps goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -296,6 +334,8 @@ func goGstBaseTransformTransformCaps(self *C.GstBaseTransform, direction C.GstPa } //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 { var ret gst.FlowReturn 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 +// +// 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 { var ret bool goBaseT := ToGstBaseTransform(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(self))}) @@ -324,6 +366,8 @@ func goGstBaseTransformTransformMeta(self *C.GstBaseTransform, outbuf *C.GstBuff } //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 { var ret bool var othersize int64 diff --git a/gst/base/gst_base_transform_impl.go b/gst/base/gst_base_transform_impl.go index 91de4b0..3e6ff6f 100644 --- a/gst/base/gst_base_transform_impl.go +++ b/gst/base/gst_base_transform_impl.go @@ -71,6 +71,8 @@ var ( // // For more information: // 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 { // 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. @@ -153,10 +155,18 @@ type GstBaseTransformImpl interface { 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()) } +// +// 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) } +// +// 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) } +// +// 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) { e.parent.InitClass(klass, elem) diff --git a/gst/base/gst_collect_pads.go b/gst/base/gst_collect_pads.go index 8d6cc88..d8211a0 100644 --- a/gst/base/gst_collect_pads.go +++ b/gst/base/gst_collect_pads.go @@ -109,43 +109,63 @@ type CollectPadsQueryFunc func(self *CollectPads, data *CollectData, query *gst. // CollectData is a structure used by CollectPads. 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} } // 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 } // 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) } // 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)) } // 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 { return gst.FromGstBufferUnsafeNone(unsafe.Pointer(c.ptr.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) } // 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 { return gst.FromGstSegmentUnsafe(unsafe.Pointer(&c.ptr.segment)) } // 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)) } // 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. // For more information see: // 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 { *gst.Object funcMap *collectPadsFuncMap selfPtr unsafe.Pointer } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type collectPadsFuncMap struct { bufferFunc CollectPadsBufferFunc clipFunc CollectPadsClipFunc @@ -157,10 +177,14 @@ type collectPadsFuncMap struct { } // 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 { 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 { collect := &CollectPads{ Object: gst.FromGstObjectUnsafeFull(unsafe.Pointer(ptr)), @@ -170,6 +194,8 @@ func wrapCollectPadsFull(ptr *C.GstCollectPads) *CollectPads { 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 { collect := &CollectPads{ Object: gst.FromGstObjectUnsafeNone(unsafe.Pointer(ptr)), @@ -180,6 +206,8 @@ func wrapCollectPadsNone(ptr *C.GstCollectPads) *CollectPads { } // 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()) } // 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. // // 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 { data := C.gst_collect_pads_add_pad( 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 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())) } // 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. // // 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) { var goutbuf *C.GstBuffer 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 // 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 { return gobool(C.gst_collect_pads_event_default( 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. // // 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 { 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 // a single application, NOT calling this function between starts and stops of your element could lead to // 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) } // 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. +// +// 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 { buf := C.gst_collect_pads_peek(c.Instance(), data.Instance()) 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 // 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 { buf := C.gst_collect_pads_pop(c.Instance(), data.Instance()) 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 // 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 { return gobool(C.gst_collect_pads_query_default( 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. // // 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 { buf := C.gst_collect_pads_read_buffer(c.Instance(), data.Instance(), C.guint(size)) 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. // // 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 { 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, // 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) { c.funcMap.bufferFunc = f 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. // 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) { c.funcMap.clipFunc = f C.gst_collect_pads_set_clip_function( @@ -336,6 +390,8 @@ func (c *CollectPads) SetClipFunction(f CollectPadsClipFunc) { } // 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) { c.funcMap.compareFunc = f 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CollectPads) SetEventFunction(f CollectPadsEventFunc) { c.funcMap.eventFunc = f 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 // 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) { c.funcMap.flushFunc = f 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CollectPads) SetFlushing(flushing bool) { 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CollectPads) SetFunction(f CollectPadsFunc) { c.funcMap.funcFunc = f 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CollectPads) SetQueryFunction(f CollectPadsQueryFunc) { c.funcMap.queryFunc = f C.gst_collect_pads_set_query_function( @@ -409,12 +475,16 @@ func (c *CollectPads) SetQueryFunction(f CollectPadsQueryFunc) { // waiting state, in which case nothing happens. // // 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) { 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 // 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 { return gobool(C.gst_collect_pads_src_event_default( 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. +// +// 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()) } // 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()) } // 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. +// +// 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 { buf := C.gst_collect_pads_take_buffer(c.Instance(), data.Instance(), C.guint(size)) if buf == nil { diff --git a/gst/base/gst_collect_pads_exports.go b/gst/base/gst_collect_pads_exports.go index a986aad..4f3b921 100644 --- a/gst/base/gst_collect_pads_exports.go +++ b/gst/base/gst_collect_pads_exports.go @@ -14,6 +14,8 @@ import ( ) //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 { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) @@ -33,6 +35,8 @@ func goGstCollectPadsBufferFunc(pads *C.GstCollectPads, data *C.GstCollectData, } //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 { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) @@ -50,6 +54,8 @@ func goGstCollectPadsClipFunc(pads *C.GstCollectPads, data *C.GstCollectData, in } //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 { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) @@ -59,6 +65,8 @@ func goGstCollectPadsCompareFunc(pads *C.GstCollectPads, data1 *C.GstCollectData } //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 { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) @@ -68,6 +76,8 @@ func goGstCollectPadsEventFunc(pads *C.GstCollectPads, data *C.GstCollectData, e } //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) { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) @@ -77,6 +87,8 @@ func goGstCollectPadsFlushFunc(pads *C.GstCollectPads, userData C.gpointer) { } //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 { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) @@ -86,6 +98,8 @@ func goGstCollectPadsFunc(pads *C.GstCollectPads, userData C.gpointer) C.GstFlow } //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 { iface := gopointer.Restore(unsafe.Pointer(userData)) collectPads := iface.(*CollectPads) diff --git a/gst/base/gst_flow_combiner.go b/gst/base/gst_flow_combiner.go index 11e5a57..621858f 100644 --- a/gst/base/gst_flow_combiner.go +++ b/gst/base/gst_flow_combiner.go @@ -16,43 +16,63 @@ import ( // For more information see https://gstreamer.freedesktop.org/documentation/base/gstflowcombiner.html?gi-language=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 { return &FlowCombiner{ptr} } // 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 { return wrapFlowCombiner(C.gst_flow_combiner_new()) } // 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 } // 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) { 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. +// +// 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()) } // 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()) } // 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 { return wrapFlowCombiner(C.gst_flow_combiner_ref(f.Instance())) } // 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) { 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. +// +// 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()) } // 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()) } // 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. // 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. +// +// 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 { 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 // 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. +// +// 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 { return gst.FlowReturn(C.gst_flow_combiner_update_pad_flow( f.Instance(), diff --git a/gst/base/gst_push_src.go b/gst/base/gst_push_src.go index 25558ba..d4a2e43 100644 --- a/gst/base/gst_push_src.go +++ b/gst/base/gst_push_src.go @@ -14,6 +14,8 @@ import ( type GstPushSrc struct{ *GstBaseSrc } // 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 { switch obj := obj.(type) { case *gst.Object: @@ -25,6 +27,8 @@ func ToGstPushSrc(obj interface{}) *GstPushSrc { } // 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 { return C.toGstPushSrc(g.Unsafe()) } diff --git a/gst/base/gst_push_src_exports.go b/gst/base/gst_push_src_exports.go index c3797bb..ffe2ad1 100644 --- a/gst/base/gst_push_src_exports.go +++ b/gst/base/gst_push_src_exports.go @@ -13,6 +13,8 @@ import ( ) //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 { var ret gst.FlowReturn var outbuf *gst.Buffer @@ -31,6 +33,8 @@ func goGstPushSrcAlloc(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn { } //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 { var ret gst.FlowReturn var outbuf *gst.Buffer @@ -49,6 +53,8 @@ func goGstPushSrcCreate(src *C.GstPushSrc, buf **C.GstBuffer) C.GstFlowReturn { } //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 { var ret gst.FlowReturn goPushSrc := ToGstPushSrc(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(src))}) diff --git a/gst/base/gst_push_src_impl.go b/gst/base/gst_push_src_impl.go index 207b1b6..4df0e90 100644 --- a/gst/base/gst_push_src_impl.go +++ b/gst/base/gst_push_src_impl.go @@ -30,6 +30,8 @@ var ( // 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 // 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 { // 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. @@ -44,10 +46,18 @@ type GstPushSrcImpl interface { 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()) } +// +// 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) } +// +// 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) } +// +// 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) { e.parent.InitClass(klass, elem) diff --git a/gst/base/gst_type_find.go b/gst/base/gst_type_find.go index ef9c3cd..3c6b7d2 100644 --- a/gst/base/gst_type_find.go +++ b/gst/base/gst_type_find.go @@ -15,6 +15,8 @@ import ( // TypeFindHelper tries to find what type of data is flowing from the given source GstPad. // 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 { caps := C.gst_type_find_helper((*C.GstPad)(unsafe.Pointer(pad.Instance())), C.guint64(size)) if caps == nil { @@ -33,6 +35,8 @@ func TypeFindHelper(pad *gst.Pad, size uint64) *gst.Caps { // not be identified. // // 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) { var prob C.GstTypeFindProbability 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, // 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) { var prob C.GstTypeFindProbability var cobj *C.GstObject @@ -85,6 +91,8 @@ func TypeFindHelperForBufferWithExtension(obj *gst.Object, buffer *gst.Buffer, e // not be identified. // // 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) { var prob C.GstTypeFindProbability 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. // // 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) { var prob C.GstTypeFindProbability var cobj *C.GstObject @@ -135,6 +145,8 @@ func TypeFindHelperForDataWithExtension(obj *gst.Object, data []byte, extension // that can handle extension will be returned. // // 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 { var cobj *C.GstObject if obj != nil { diff --git a/gst/base/util.go b/gst/base/util.go index 891e18e..f1cb592 100644 --- a/gst/base/util.go +++ b/gst/base/util.go @@ -4,6 +4,8 @@ package base import "C" // 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 { if b { 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. +// +// 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 } diff --git a/gst/c_util.go b/gst/c_util.go index bc9a947..59dc61c 100644 --- a/gst/c_util.go +++ b/gst/c_util.go @@ -12,16 +12,22 @@ import ( "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 { return &glib.Object{GObject: glib.ToGObject(data)} } // 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 } // 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 { if b { return C.gboolean(1) @@ -30,6 +36,8 @@ func gboolean(b bool) C.gboolean { } // 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 { // 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) @@ -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, // 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 { dateStr := fmt.Sprintf( "%s %s %d:%d:%d %s %d", @@ -52,6 +62,8 @@ func gstDateTimeToTime(gstdatetime *C.GstDateTime) time.Time { 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 { if offset < 0 { 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. +// +// 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 { length := int(argc) 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 } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func gcharStrings(strs []string) **C.gchar { gcharSlc := make([]*C.gchar, len(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 // 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 { cstr := C.CString(str) defer C.free(unsafe.Pointer(cstr)) @@ -89,10 +107,14 @@ func newQuarkFromString(str string) C.uint { 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 { 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 { var glist C.GList wrapped := glib.WrapList(unsafe.Pointer(&glist)) @@ -102,6 +124,8 @@ func streamSliceToGlist(streams []*Stream) *C.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 { l := glib.WrapList(unsafe.Pointer(&glist)) out := make([]*Stream, 0) @@ -112,6 +136,8 @@ func glistToStreamSlice(glist *C.GList) []*Stream { 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 { l := glib.WrapList(unsafe.Pointer(&glist)) out := make([]*PadTemplate, 0) diff --git a/gst/cgo_exports.go b/gst/cgo_exports.go index 4d9515d..ac06ffa 100644 --- a/gst/cgo_exports.go +++ b/gst/cgo_exports.go @@ -17,6 +17,8 @@ import ( ) //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) { iface := gopointer.Restore(unsafe.Pointer(userData)) f := iface.(func()) @@ -24,6 +26,8 @@ func goElementCallAsync(element *C.GstElement, userData C.gpointer) { } //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 { cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbFunc := cbIface.(StickyEventsForEachFunc) @@ -33,6 +37,8 @@ func goPadStickyEventForEachFunc(gpad *C.GstPad, event **C.GstEvent, userData C. } //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 { cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbFunc := cbIface.(PadProbeCallback) @@ -41,6 +47,8 @@ func goPadProbeFunc(gstPad *C.GstPad, info *C.GstPadProbeInfo, userData C.gpoint } //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 { cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbFunc := cbIface.(PadForwardFunc) @@ -49,6 +57,8 @@ func goPadForwardFunc(gstPad *C.GstPad, userData C.gpointer) C.gboolean { } //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) { cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbFunc := cbIface.(TagListForEachFunc) @@ -56,6 +66,8 @@ func goTagForEachFunc(tagList *C.GstTagList, tag *C.gchar, userData C.gpointer) } //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 { cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbFunc := cbIface.(func(*Buffer, uint) bool) @@ -63,6 +75,8 @@ func goBufferListForEachCb(buf **C.GstBuffer, idx C.guint, userData C.gpointer) } //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 { cbIface := gopointer.Restore(unsafe.Pointer(userData)) cbFunc := cbIface.(func(*Meta) bool) @@ -70,6 +84,8 @@ func goBufferMetaForEachCb(buf *C.GstBuffer, meta **C.GstMeta, userData C.gpoint } //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 { ptr := gopointer.Restore(unsafe.Pointer(chPtr)) resCh := ptr.(chan interface{}) @@ -91,6 +107,8 @@ func structForEachCb(fieldID C.GQuark, val *C.GValue, chPtr C.gpointer) C.gboole } //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 { // wrap the message msg := wrapMessage(cMsg) @@ -108,6 +126,8 @@ func goBusSyncHandler(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C. } //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 { // wrap the message msg := wrapMessage(cMsg) @@ -128,6 +148,8 @@ func goBusFunc(bus *C.GstBus, cMsg *C.GstMessage, userData C.gpointer) C.gboolea 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 { gapi := glib.Type(meta.info.api) gtype := glib.Type(meta.info._type) @@ -139,6 +161,8 @@ func getMetaInfoCbFuncs(meta *C.GstMeta) *MetaInfoCallbackFuncs { } //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) { cbFuncs := getMetaInfoCbFuncs(meta) if cbFuncs != nil && cbFuncs.FreeFunc != nil { @@ -147,6 +171,8 @@ func goMetaFreeFunc(meta *C.GstMeta, buf *C.GstBuffer) { } //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 { cbFuncs := getMetaInfoCbFuncs(meta) 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 +// +// 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 { cbFuncs := getMetaInfoCbFuncs(meta) if cbFuncs != nil && cbFuncs.TransformFunc != nil { @@ -177,6 +205,8 @@ func goMetaTransformFunc(transBuf *C.GstBuffer, meta *C.GstMeta, buffer *C.GstBu } //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) { funcIface := gopointer.Restore(unsafe.Pointer(ptr)) defer gopointer.Unref(unsafe.Pointer(ptr)) @@ -187,6 +217,8 @@ func goGDestroyNotifyFunc(ptr C.gpointer) { } //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) { gopointer.Unref(unsafe.Pointer(ptr)) @@ -194,6 +226,8 @@ func goGDestroyNotifyFuncNoRun(ptr C.gpointer) { } //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 { // retrieve the ptr to the function ptr := unsafe.Pointer(userData) @@ -208,6 +242,8 @@ func goCapsMapFunc(features *C.GstCapsFeatures, structure *C.GstStructure, userD } //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 { // retrieve the ptr to the function ptr := unsafe.Pointer(userData) @@ -223,6 +259,8 @@ func goClockCb(gclock *C.GstClock, clockTime C.GstClockTime, clockID C.GstClockI } //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 { ptr := unsafe.Pointer(userData) defer gopointer.Unref(ptr) @@ -235,11 +273,15 @@ func goPluginInit(plugin *C.GstPlugin, userData C.gpointer) C.gboolean { } //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 { return gboolean(globalPluginInit(wrapPlugin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(plugin))}))) } //export goLogFunction +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func goLogFunction( category *C.GstDebugCategory, 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 // //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) { 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 // //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) { f := gopointer.Restore(unsafe.Pointer(fPtr)).(func()) diff --git a/gst/constants.go b/gst/constants.go index fb0fa5e..998ae03 100644 --- a/gst/constants.go +++ b/gst/constants.go @@ -39,6 +39,8 @@ const ( type ClockTimeDiff int64 // 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 { return time.Duration(ctd) } @@ -153,6 +155,8 @@ const ( ) // 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 { switch b { case BufferingStream: @@ -222,6 +226,8 @@ const ( ) // 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))) } // EventTypeFlags casts GstEventTypeFlags @@ -266,6 +272,8 @@ const ( ) // 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 { switch f { case FormatUndefined: @@ -333,6 +341,8 @@ const ( ) // 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 { return C.GoString(C.gst_message_type_get_name((C.GstMessageType)(m))) } @@ -382,6 +392,8 @@ const ( ) // 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 { return C.GoString(C.gst_pad_mode_get_name(C.GstPadMode(p))) } @@ -397,6 +409,8 @@ const ( ) // 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 { switch p { case PadDirectionUnknown: @@ -424,6 +438,8 @@ const ( ) // 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 { return C.GoString(C.gst_pad_link_get_name(C.GstPadLinkReturn(p))) } @@ -439,6 +455,8 @@ const ( ) // 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 { switch p { case PadPresenceAlways: @@ -525,6 +543,8 @@ const ( ) // 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 { 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 +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s StateChange) String() string { 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 ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s StateChangeReturn) String() string { 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 +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f FlowReturn) String() string { 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 ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s StreamStatusType) String() string { switch s { case StreamStatusCreate: @@ -694,6 +722,8 @@ const ( ) // 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 { switch s { case StructureChangePadLink: @@ -717,6 +747,8 @@ const ( ) // 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 { switch p { case ProgressTypeStart: @@ -746,6 +778,8 @@ const ( ) // 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 { name := C.gst_stream_type_get_name((C.GstStreamType)(s)) defer C.free(unsafe.Pointer(name)) @@ -787,6 +821,8 @@ const ( 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 { switch u { case URIUnknown: @@ -838,6 +874,8 @@ const ( 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))) } // QueryTypeFlags casts GstQueryTypeFlags @@ -874,6 +912,8 @@ const ( ) // 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 { switch t { case TOCScopeGlobal: diff --git a/gst/control_binding.go b/gst/control_binding.go index 28f60cb..112c259 100644 --- a/gst/control_binding.go +++ b/gst/control_binding.go @@ -10,12 +10,16 @@ import ( 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 { return C.toGstControlBinding(cb.Unsafe()) } 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 { cprop := C.CString(prop) defer C.free(unsafe.Pointer(cprop)) diff --git a/gst/control_source.go b/gst/control_source.go index 2e6a997..db6e95a 100644 --- a/gst/control_source.go +++ b/gst/control_source.go @@ -24,10 +24,14 @@ const ( 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 { 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 { 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) { 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 { 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() { C.gst_timed_value_control_source_unset_all(C.toGstTimedValueControlSource(cs.Unsafe())) } diff --git a/gst/deprecate.sh b/gst/deprecate.sh new file mode 100755 index 0000000..8e06b60 --- /dev/null +++ b/gst/deprecate.sh @@ -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 diff --git a/gst/deprecated.go b/gst/deprecated.go new file mode 100644 index 0000000..764c29a --- /dev/null +++ b/gst/deprecated.go @@ -0,0 +1,2 @@ +// Description: This package is superseeded by the autogenerated bindings. +package gst diff --git a/gst/go.mod b/gst/go.mod deleted file mode 100644 index ad641d0..0000000 --- a/gst/go.mod +++ /dev/null @@ -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 diff --git a/gst/go.sum b/gst/go.sum deleted file mode 100644 index 66b8a58..0000000 --- a/gst/go.sum +++ /dev/null @@ -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= diff --git a/gst/gst_allocator.go b/gst/gst_allocator.go index d1283fe..3fe899f 100644 --- a/gst/gst_allocator.go +++ b/gst/gst_allocator.go @@ -11,17 +11,23 @@ import ( ) // 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 { ptr *C.GstAllocationParams } // 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 { return &AllocationParams{ptr: (*C.GstAllocationParams)(alloc)} } // NewAllocationParams initializes a set of allocation params with the default // values. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewAllocationParams() *AllocationParams { params := &AllocationParams{ ptr: &C.GstAllocationParams{}, @@ -32,65 +38,99 @@ func NewAllocationParams() *AllocationParams { } // 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 } // 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) } // 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 { return wrapAllocationParams(C.gst_allocation_params_copy(a.ptr)) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // Allocator is a go representation of a GstAllocator type Allocator struct{ *Object } // 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 { return wrapAllocator(glib.TransferNone(alloc)) } // 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 { return wrapAllocator(glib.TransferFull(alloc)) } // 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 { return wrapAllocator(glib.TransferFull(unsafe.Pointer(C.gst_allocator_find(nil)))) } // 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()) } // 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) } // 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 // 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 { mem := C.gst_allocator_alloc(a.Instance(), C.gsize(size), params.ptr) return FromGstMemoryUnsafeFull(unsafe.Pointer(mem)) } // 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) { C.gst_allocator_free(a.Instance(), mem.Instance()) } diff --git a/gst/gst_bin.go b/gst/gst_bin.go index 772ec57..29c8b40 100644 --- a/gst/gst_bin.go +++ b/gst/gst_bin.go @@ -82,6 +82,8 @@ import ( type Bin struct{ *Element } // 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 { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) @@ -92,6 +94,8 @@ func NewBin(name string) *Bin { // NewBinFromString constructs a bin from a string description. // description - command line describing 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) { cDescription := C.CString(description) 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 // 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 { switch obj := obj.(type) { case *Object: @@ -120,9 +126,13 @@ func ToGstBin(obj interface{}) *Bin { } // 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()) } // 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) { cName := C.CString(name) 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 // 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) { cName := C.CString(name) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Bin) GetElements() ([]*Element, error) { iterator := C.gst_bin_iterate_elements((*C.GstBin)(b.Instance())) 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 // 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) { iterator := C.gst_bin_iterate_recurse((*C.GstBin)(b.Instance())) return iteratorToElementSlice(iterator) } // 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) { iterator := C.gst_bin_iterate_sources((*C.GstBin)(b.Instance())) return iteratorToElementSlice(iterator) } // 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) { iterator := C.gst_bin_iterate_sinks((*C.GstBin)(b.Instance())) 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. // 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) { iterator := C.gst_bin_iterate_sorted((*C.GstBin)(b.Instance())) 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. // If you want all elements that implement the interface, use GetAllByInterface. This function recurses // 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) { elem := C.gst_bin_get_by_interface(b.Instance(), C.GType(iface.Type())) 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 // 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) { iterator := C.gst_bin_iterate_all_by_interface(b.Instance(), C.GType(iface.Type())) return iteratorToElementSlice(iterator) @@ -206,6 +232,8 @@ func (b *Bin) GetAllByInterface(iface glib.Interface) ([]*Element, error) { // } // 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 { 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()) @@ -214,6 +242,8 @@ func (b *Bin) Add(elem *Element) error { } // 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 { for _, elem := range elems { 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. +// +// 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 { 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()) @@ -232,6 +264,8 @@ func (b *Bin) Remove(elem *Element) error { } // 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 { for _, elem := range elems { 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 // 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 { pad := C.gst_bin_find_unlinked_pad(b.Instance(), C.GstPadDirection(direction)) if pad == nil { @@ -252,6 +288,8 @@ func (b *Bin) FindUnlinkedPad(direction PadDirection) *Pad { } // 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 { 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 // propagated when it is added to the bin. When suppressed flags are set, those specified flags // 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) { 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. // 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 { return gobool(C.gst_bin_recalculate_latency(b.Instance())) } // SyncChildrenStates synchronizes the state of every child with the state of this Bin. // 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 { 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. // 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 { ret := C.gst_debug_bin_to_dot_data(b.Instance(), C.GstDebugGraphDetails(details)) 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 // 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) { cname := C.CString(filename) 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 // 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) { cname := C.CString(filename) 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))) } +// +// 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) { elems := make([]*Element, 0) gval := new(C.GValue) @@ -346,41 +398,57 @@ func iteratorToElementSlice(iterator *C.GstIterator) ([]*Element, error) { } // 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 { return gobool(C.binParentAddElement(b.Instance(), element.Instance())) } // 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) { C.binParentDeepElementAdded(b.Instance(), subbin.Instance(), element.Instance()) } // 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) { C.binParentDeepElementRemoved(b.Instance(), subbin.Instance(), element.Instance()) } // 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 { return gobool(C.binParentDoLatency(b.Instance())) } // 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) { C.binParentElementAdded(b.Instance(), element.Instance()) } // 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) { C.binParentElementRemoved(b.Instance(), element.Instance()) } // 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) { C.binParentHandleMessage(b.Instance(), message.Instance()) } // 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 { return gobool(C.binParentRemoveElement(b.Instance(), element.Instance())) } diff --git a/gst/gst_bin_exports.go b/gst/gst_bin_exports.go index 2f0883f..4550c68 100644 --- a/gst/gst_bin_exports.go +++ b/gst/gst_bin_exports.go @@ -11,6 +11,8 @@ import ( ) //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 { var ret bool @@ -28,6 +30,8 @@ func goGstBinAddElement(bin *C.GstBin, child *C.GstElement) C.gboolean { } //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) { 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 +// +// 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) { goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(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 +// +// 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 { var ret bool @@ -72,6 +80,8 @@ func goGstBinDoLatency(bin *C.GstBin) C.gboolean { } //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) { goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) @@ -86,6 +96,8 @@ func goGstBinElementAdded(bin *C.GstBin, child *C.GstElement) { } //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) { goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) @@ -100,6 +112,8 @@ func goGstBinElementRemoved(bin *C.GstBin, child *C.GstElement) { } //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) { goBin := wrapBin(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(bin))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(bin)) @@ -111,6 +125,8 @@ func goGstBinHandleMessage(bin *C.GstBin, message *C.GstMessage) { } //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 { var ret bool diff --git a/gst/gst_bin_impl.go b/gst/gst_bin_impl.go index cca74bb..5b0bbb1 100644 --- a/gst/gst_bin_impl.go +++ b/gst/gst_bin_impl.go @@ -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 // 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 { AddElement(self *Bin, element *Element) bool DeepElementAdded(self *Bin, subbin *Bin, child *Element) @@ -47,10 +49,18 @@ type BinImpl interface { 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()) } +// +// 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) } +// +// 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) } +// +// 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) { e.parent.InitClass(klass, elem) diff --git a/gst/gst_buffer.go b/gst/gst_buffer.go index ee7906b..de62fee 100644 --- a/gst/gst_buffer.go +++ b/gst/gst_buffer.go @@ -30,9 +30,13 @@ import ( ) // 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()) } // 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 { ptr *C.GstBuffer mapInfo *MapInfo @@ -40,6 +44,8 @@ type Buffer struct { // FromGstBufferUnsafeNone wraps the given buffer, sinking any floating references, and places // 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 { if buf == nil { return nil @@ -52,6 +58,8 @@ func FromGstBufferUnsafeNone(buf unsafe.Pointer) *Buffer { } // 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 { if buf == 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 // 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 { return wrapBuffer((*C.GstBuffer)(buf)) } // 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 { return FromGstBufferUnsafeFull(unsafe.Pointer(C.gst_buffer_new())) } // NewBufferWithSize is a convenience wrapped for NewBufferrAllocate with the default allocator // 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 { 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. // // 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 { var gstalloc *C.GstAllocator 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewBufferFromBytes(b []byte) *Buffer { gbytes := C.g_bytes_new((C.gconstpointer)(unsafe.Pointer(&b[0])), C.gsize(len(b))) 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. +// +// 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) { out, err := io.ReadAll(rdr) 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() { // 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 { var notifyData unsafe.Pointer var gnotifyFunc C.GDestroyNotify @@ -153,18 +175,28 @@ func NewBufferFull(flags MemoryFlags, data []byte, maxSize, offset, size int64, } // 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)) } // 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())) } // 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()) } // 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()) } // 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 { mapInfo := b.Map(MapRead) if mapInfo == nil { @@ -177,6 +209,8 @@ func (b *Buffer) Bytes() []byte { // 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 // 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 { pts := b.Instance().pts @@ -184,6 +218,8 @@ func (b *Buffer) PresentationTimestamp() ClockTime { } // 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) { ins := b.Instance() 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 // 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 { 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 // 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 { dur := b.Instance().duration @@ -206,6 +246,8 @@ func (b *Buffer) Duration() ClockTime { } // 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) { ins := b.Instance() 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 // 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. +// +// 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) } // 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) } // 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 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 { meta := C.gst_buffer_add_meta(b.Instance(), info.Instance(), (C.gpointer)(gopointer.Save(params))) if meta == nil { @@ -250,6 +298,8 @@ func (b *Buffer) AddMeta(info *MetaInfo, params interface{}) *Meta { } // 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 { Parent *Meta Buffer *Buffer @@ -257,6 +307,8 @@ type ParentBufferMeta struct { // AddParentMeta adds a ParentBufferMeta to this buffer that holds a parent reference // 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 { meta := C.gst_buffer_add_parent_buffer_meta(b.Instance(), buf.Instance()) return &ParentBufferMeta{ @@ -268,6 +320,8 @@ func (b *Buffer) AddParentMeta(buf *Buffer) *ParentBufferMeta { // AddProtectionMeta attaches ProtectionMeta to this buffer. The structure contains // cryptographic information relating to the sample contained in the buffer. This // 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 { meta := C.gst_buffer_add_protection_meta(b.Instance(), info.Instance()) return &ProtectionMeta{ @@ -277,6 +331,8 @@ func (b *Buffer) AddProtectionMeta(info *Structure) *ProtectionMeta { } // 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 { Parent *Meta Reference *Caps @@ -288,6 +344,8 @@ type ReferenceTimestampMeta struct { // // See the documentation of GstReferenceTimestampMeta for details. // 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 { meta := C.gst_buffer_add_reference_timestamp_meta(b.Instance(), ref.Instance(), C.GstClockTime(timestamp), C.GstClockTime(duration)) 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 // 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 { 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. // // 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) { 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 // buffer will contain a concatenation of the memory of this buffer and the requested region of // 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 { newbuf := C.gst_buffer_append_region(b.Ref().Instance(), buf.Ref().Instance(), C.gssize(offset), C.gssize(size)) 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Buffer) Copy() *Buffer { buf := C.gst_buffer_copy(b.Instance()) 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 // 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 { buf := C.gst_buffer_copy_deep(b.Instance()) 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 // 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 { ok := C.gst_buffer_copy_into( 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 // 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 { newbuf := C.gst_buffer_copy_region( 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 // 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 { dest := C.malloc(C.sizeof_char * C.gsize(size)) 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 // 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 { gbytes := C.g_bytes_new((C.gconstpointer)(unsafe.Pointer(&data[0])), C.gsize(len(data))) 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 // 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. +// +// 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) { var gindex, glength C.uint 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 // 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 { fPtr := gopointer.Save(f) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Buffer) GetAllMemory() *Memory { mem := C.gst_buffer_get_all_memory(b.Instance()) if mem == nil { @@ -434,11 +516,15 @@ func (b *Buffer) GetAllMemory() *Memory { } // 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 { return BufferFlags(C.gst_buffer_get_flags(b.Instance())) } // 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 { mem := C.gst_buffer_get_memory(b.Instance(), C.guint(idx)) 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 // 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 { mem := C.gst_buffer_get_memory_range(b.Instance(), C.guint(idx), C.gint(length)) 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 // first one is returned. To handle multiple metadata with a given API use ForEachMeta instead // 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 { meta := C.gst_buffer_get_meta(b.Instance(), C.GType(api)) 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. +// +// 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 { 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. // // 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 { var meta *C.GstReferenceTimestampMeta if caps == nil { @@ -500,6 +594,8 @@ func (b *Buffer) GetReferenceTimestampMeta(caps *Caps) *ReferenceTimestampMeta { } // 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 { 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, // 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. +// +// 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) { var goffset, gmaxsize C.gsize 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 // 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. +// +// 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) { var goffset, gmaxsize C.gsize 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. +// +// 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 { 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 // 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) { 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. // // 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 { 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. // // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Buffer) IsWritable() bool { 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 // 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 { 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. +// +// 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 { ptr := unsafe.Pointer(meta.Instance()) 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. +// +// 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 { ptr := unsafe.Pointer(meta.Instance()) 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. // // 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 { if b.mapInfo != nil { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Buffer) Unmap() { if b.mapInfo == nil { 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. // // 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 { if b.mapInfo != nil { 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 // 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 { 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. +// +// 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())) } // 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. +// +// 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 { mem := C.gst_buffer_peek_memory(b.Instance(), C.guint(idx)) if mem == nil { @@ -667,34 +795,48 @@ func (b *Buffer) PeekMemory(idx uint) *Memory { // mem and thus doesn't increase its refcount. // // 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) { C.gst_buffer_prepend_memory(b.Instance(), mem.Ref().Instance()) } // 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()) } // 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)) } // RemoveMemoryRange removes length memory blocks in buffer starting from idx. // // 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) { C.gst_buffer_remove_memory_range(b.Instance(), C.guint(idx), C.gint(length)) } // 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 { return gobool(C.gst_buffer_remove_meta(b.Instance(), meta.Instance())) } // 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) { C.gst_buffer_replace_all_memory(b.Instance(), mem.Ref().Instance()) } // 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) { 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. // // 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) { 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. +// +// 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) { 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. +// +// 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 { return gobool(C.gst_buffer_resize_range( 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. +// +// 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 { return gobool(C.gst_buffer_set_flags(b.Instance(), C.GstBufferFlags(flags))) } // 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) { C.gst_buffer_set_size(b.Instance(), C.gssize(size)) } // 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 { return gobool(C.gst_buffer_unset_flags(b.Instance(), C.GstBufferFlags(flags))) } diff --git a/gst/gst_buffer_list.go b/gst/gst_buffer_list.go index 5e7a114..5369c42 100644 --- a/gst/gst_buffer_list.go +++ b/gst/gst_buffer_list.go @@ -19,12 +19,16 @@ import ( ) // 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 { ptr *C.GstBufferList } // NewBufferList returns a new BufferList. The given slice can be nil and the returned // 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 { bufList := FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_new())) if buffers == nil { @@ -37,11 +41,15 @@ func NewBufferList(buffers []*Buffer) *BufferList { } // 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 { return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_new_sized(C.guint(size)))) } // 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 { wrapped := wrapBufferList((*C.GstBufferList)(buf)) wrapped.Ref() @@ -50,6 +58,8 @@ func FromGstBufferListUnsafeNone(buf unsafe.Pointer) *BufferList { } // 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 { wrapped := wrapBufferList((*C.GstBufferList)(buf)) 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 // 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 { return wrapBufferList((*C.GstBufferList)(buf)) } // 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)) } // 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 { 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 // 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 { 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 // 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 { return FromGstBufferListUnsafeFull(unsafe.Pointer(C.gst_buffer_list_copy_deep(b.Instance()))) } // 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 { return gobool(C.bufferListIsWritable(b.Instance())) } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *BufferList) MakeWritable() *BufferList { 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 // 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) { fPtr := gopointer.Save(f) 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. // // 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 { 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. // // 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 { 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. // // 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) { C.gst_buffer_list_insert(b.Instance(), C.gint(idx), buf.Ref().Instance()) } // 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 { 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. // It is important to note that keeping additional references to GstBufferList instances // 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 { C.gst_buffer_list_ref(b.Instance()) return b @@ -145,12 +181,16 @@ func (b *BufferList) Ref() *BufferList { // Remove removes length buffers from the list starting at index. All following buffers // 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) { 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 // 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() { C.gst_buffer_list_unref(b.Instance()) } diff --git a/gst/gst_buffer_pool.go b/gst/gst_buffer_pool.go index 45c4c36..802ab04 100644 --- a/gst/gst_buffer_pool.go +++ b/gst/gst_buffer_pool.go @@ -17,6 +17,8 @@ import ( type BufferPool struct{ *Object } // 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 { pool := C.gst_buffer_pool_new() 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 // 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 { pool := wrapBufferPool(glib.TransferNone(bufferPool)) return pool @@ -36,18 +40,26 @@ func FromGstBufferPoolUnsafeNone(bufferPool unsafe.Pointer) *BufferPool { // FromGstBufferPoolUnsafeFull wraps the given unsafe.Pointer in a BufferPool instance. It just // 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 { pool := wrapBufferPool(glib.TransferFull(bufferPool)) return pool } // 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()) } // 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())) } // 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 { Format Format // format (GstFormat) – the format of start and stop Start int64 // start (gint64) – the start position @@ -56,6 +68,8 @@ type BufferPoolAcquireParams struct { } // 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) { var buf *C.GstBuffer 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 // 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 { st := C.gst_buffer_pool_get_config(b.Instance()) 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 // 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 { opts := C.gst_buffer_pool_get_options(b.Instance()) 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. +// +// 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 { gOpt := C.CString(opt) 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. +// +// 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())) } // ReleaseBuffer releases the given buffer from the pool. The buffer should have previously been // allocated from pool with AcquireBiffer. // // 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) { 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. // // 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) { 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. // // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *BufferPool) SetFlushing(flushing bool) { C.gst_buffer_pool_set_flushing(b.Instance(), gboolean(flushing)) } @@ -154,6 +184,8 @@ type BufferPoolConfig struct{ *Structure } // on the buffers that it allocates. // // 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) { cOpt := C.CString(opt) defer C.free(unsafe.Pointer(cOpt)) @@ -161,6 +193,8 @@ func (b *BufferPoolConfig) AddOption(opt string) { } // 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) { var allocator *C.GstAllocator 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. +// +// 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 { 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. +// +// 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) { var gcaps *C.GstCaps 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. +// +// 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 { cOpt := C.CString(opt) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *BufferPoolConfig) NumOptions() uint { 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. // 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. +// +// 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) { if allocator == nil && params != nil { 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. +// +// 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) { if caps == nil { 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 // options or allocator parameters are still valid, and won't check if size have changed, since changing the size is valid // 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 { return gobool(C.gst_buffer_pool_config_validate_params( b.Instance(), diff --git a/gst/gst_bus.go b/gst/gst_bus.go index d16a686..4a3bc3c 100644 --- a/gst/gst_bus.go +++ b/gst/gst_bus.go @@ -35,6 +35,8 @@ import ( // Bus is a Go wrapper around a GstBus. It provides convenience methods for // 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 { *Object } @@ -69,19 +71,27 @@ type Bus struct { // } // // // > [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 { 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 // 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)) } // FromGstBusUnsafeFull wraps the given unsafe.Pointer in a bus. It does not increase the ref count // 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)) } // 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()) } // 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 // 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()) } // 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 // 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 { 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 // 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 { for { 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 // 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 { fPtr := gopointer.Save(busFunc) return gobool( @@ -157,11 +175,15 @@ func (b *Bus) AddWatch(busFunc BusWatchFunc) bool { // by returning false from a previously installed function. // // 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 { return gobool(C.gst_bus_remove_watch(b.Instance())) } // 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()) } // 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 // 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. +// +// 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()) } // 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. // 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. +// +// 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()) } // PollFd represents the possible values returned from a GetPollFd. On Windows, there will not be // a Fd. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type PollFd struct { Fd int 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 // 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 { var gpollFD C.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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Bus) HavePending() bool { 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' // 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 { msg := C.gst_bus_peek(b.Instance()) 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; // 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 { cTime := C.GstClockTime(timeout) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b *Bus) Pop() *Message { msg := C.gst_bus_pop(b.Instance()) 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 // 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. +// +// 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 { mType := C.GstMessageType(msgTypes) 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. +// +// 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 { 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 // 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)) } // 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. // // 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) { ptr := gopointer.Save(f) 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. // // 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 { msg := C.gst_bus_timed_pop(b.Instance(), C.GstClockTime(dur)) 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 // 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 { msg := C.gst_bus_timed_pop_filtered(b.Instance(), C.GstClockTime(dur), C.GstMessageType(msgTypes)) if msg == nil { diff --git a/gst/gst_caps.go b/gst/gst_caps.go index a185357..53d5c93 100644 --- a/gst/gst_caps.go +++ b/gst/gst_caps.go @@ -27,6 +27,8 @@ var TypeCaps = glib.Type(C.gst_caps_get_type()) var _ glib.ValueTransformer = &Caps{} // 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 { native *C.GstCaps } @@ -34,6 +36,8 @@ type Caps struct { // 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. // 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 { if caps == 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. // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FromGstCapsUnsafeFull(caps unsafe.Pointer) *Caps { if caps == 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 // 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 { return wrapCaps(C.toGstCaps(caps)) } @@ -70,6 +78,8 @@ type CapsMapFunc func(features *CapsFeatures, structure *Structure) bool // caps := gst.NewAnyCaps() // fmt.Println(caps.IsAny()) // // 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())) } // 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() // fmt.Println(caps.IsEmpty()) // // 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())) } // 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") // fmt.Println(caps.String()) // // 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 { cFormat := C.CString(mediaFormat) defer C.free(unsafe.Pointer(cFormat)) @@ -93,6 +107,8 @@ func NewEmptySimpleCaps(mediaFormat string) *Caps { } // 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 { caps := NewEmptyCaps() for _, st := range structures { @@ -106,6 +122,8 @@ func NewFullCaps(structures ...*Structure) *Caps { // caps := gst.NewCapsFromString("audio/x-raw, channels=2") // fmt.Println(caps.String()) // // 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 { cStr := C.CString(capsStr) defer C.free(unsafe.Pointer(cStr)) @@ -117,9 +135,13 @@ func NewCapsFromString(capsStr string) *Caps { } // 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) } // 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) { val, err := glib.ValueInit(glib.Type(C.gst_caps_get_type())) 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 // through the FromGstCapsUnsafe methods, a ref is automatically taken if necessary and a runtime Finalizer // 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 { C.gst_caps_ref(c.Instance()) return c } // 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()) } // 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()) } // 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 { return FromGstCapsUnsafeFull(unsafe.Pointer(C.makeCapsWritable(c.Instance()))) } // 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 { cStr := C.gst_caps_to_string(c.Instance()) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *Caps) AppendStructure(st *Structure) { C.gst_caps_append_structure(c.Instance(), st.Instance()) } // AppendStructureFull appends structure with features to caps. The structure is not copied; // 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) { 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 // 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) { 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. +// +// 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 { 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. // // 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 { 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. +// +// 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 { 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 // // 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) { ptr := gopointer.Save(f) 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. // // 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 { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_fixate(c.Ref().Instance()))) } @@ -248,6 +296,8 @@ func (c *Caps) Fixate() *Caps { // }) // // // 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 { ptr := gopointer.Save(f) 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. +// +// 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())) } // 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 { st := C.gst_caps_get_structure(c.Instance(), C.guint(idx)) 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. +// +// 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 { feats := C.gst_caps_get_features(c.Instance(), C.guint(idx)) 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. // 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 { 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. // 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 { 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 // 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 { return gobool(C.gst_caps_is_always_compatible(c.Instance(), caps.Instance())) } // 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())) } // 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())) } // 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 { 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. +// +// 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 { 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. +// +// 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())) } // 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 { 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. +// +// 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 { return gobool(C.gst_caps_is_subset(c.Instance(), caps.Instance())) } // 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 { 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. +// +// 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 { if features == nil { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *Caps) IsWritable() bool { 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. // In contrast to ForEach, the function may modify, but not delete, the structures and features. // 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 { ptr := gopointer.Save(f) 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. // 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. +// +// 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 { 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. +// +// 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 { 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. +// +// 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 { if features == nil { 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 // 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 { return wrapCaps(C.gst_caps_normalize(c.Instance())) } // 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) { C.gst_caps_remove_structure(c.Instance(), C.guint(idx)) } // 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) { if features == 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *Caps) SetFeaturesSimple(features *CapsFeatures) { if features == 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 // function for calling SetValue on all structures of caps. If the value cannot be coerced to a C type, // 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{}) { gVal, err := glib.GValue(val) 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. // // 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 { 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. // 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 { return wrapStructure(C.gst_caps_steal_structure(c.Instance(), C.guint(idx))) } // 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 { 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 // 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 { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_caps_truncate(c.Ref().Instance()))) } diff --git a/gst/gst_caps_features.go b/gst/gst_caps_features.go index d589fea..6ea5ac0 100644 --- a/gst/gst_caps_features.go +++ b/gst/gst_caps_features.go @@ -15,6 +15,8 @@ var ( ) // 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 { native *C.GstCapsFeatures } @@ -24,6 +26,8 @@ type CapsFeatures struct { // feats := gst.NewCapsFeaturesEmpty() // fmt.Println(feats.GetSize()) // // 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()) } // NewCapsFeaturesAny returns a new ANY CapsFeatures. @@ -31,9 +35,13 @@ func NewCapsFeaturesEmpty() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_f // feats := gst.NewCapsFeaturesAny() // fmt.Println(feats.IsAny()) // // 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()) } // 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 { cStr := C.CString(features) defer C.free(unsafe.Pointer(cStr)) @@ -50,6 +58,8 @@ var TypeCapsFeatures = glib.Type(C.gst_caps_features_get_type()) var _ glib.ValueTransformer = &CapsFeatures{} // 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) { val, err := glib.ValueInit(TypeCapsFeatures) if err != nil { @@ -63,6 +73,8 @@ func (c *CapsFeatures) ToGValue() (*glib.Value, error) { } // 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 { return C.toGstCapsFeatures(unsafe.Pointer(c.native)) } @@ -72,6 +84,8 @@ func (c *CapsFeatures) Instance() *C.GstCapsFeatures { // feats := gst.NewCapsFeaturesAny() // fmt.Println(feats.String()) // // ANY +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CapsFeatures) String() string { return C.GoString(C.gst_caps_features_to_string(c.Instance())) } @@ -92,6 +106,8 @@ func (c *CapsFeatures) String() string { // // 1 // // true // // 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) { cStr := C.CString(feature) 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. +// +// 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 { cStr := C.CString(feature) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CapsFeatures) Copy() *CapsFeatures { return wrapCapsFeatures(C.gst_caps_features_copy(c.Instance())) } // Free frees the memory containing these features. Only call this if you // 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()) } // 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 { feat := C.gst_caps_features_get_nth(c.Instance(), C.guint(idx)) return C.GoString(feat) } // 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 { return uint(C.gst_caps_features_get_size(c.Instance())) } // 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())) } // IsEqual returns true if the given CapsFeatures are equal to the provided ones. // 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 { if feats == nil { return false @@ -144,6 +174,8 @@ func (c *CapsFeatures) IsEqual(feats *CapsFeatures) bool { } // 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) { cStr := C.CString(feature) 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 // 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. +// +// 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 { gcount := C.gint(refCount) return gobool(C.gst_caps_features_set_parent_refcount(c.Instance(), &gcount)) diff --git a/gst/gst_child_proxy.go b/gst/gst_child_proxy.go index 6a88cc6..08020f2 100644 --- a/gst/gst_child_proxy.go +++ b/gst/gst_child_proxy.go @@ -31,7 +31,11 @@ var InterfaceChildProxy glib.Interface = &interfaceChildProxy{} 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) } +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type ChildProxyImpl interface { ChildAdded(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 // 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 { if proxy := C.toGstChildProxy(elem.Unsafe()); proxy != nil { return &ChildProxy{proxy} @@ -95,11 +103,15 @@ func ToChildProxy(elem *Element) *ChildProxy { } // 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 { return C.toGstChildProxy(unsafe.Pointer(c.ptr)) } // 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) { cname := C.CString(name) 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. +// +// 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) { cname := C.CString(name) 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 // 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. +// +// 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 { out := make([]*glib.Value, len(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 // 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 { gobj := C.gst_child_proxy_get_child_by_index(c.Instance(), C.guint(idx)) if gobj == nil { @@ -151,6 +169,8 @@ func (c *ChildProxy) GetChildByIndex(idx uint) *glib.Object { // to be overridden. // // 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 { cname := C.CString(name) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *ChildProxy) GetChildrenCount() uint { 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 // 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. +// +// 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 { value, err := glib.ValueAlloc() 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. // 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) { var gtarget *C.GObject 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. +// +// 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) { for name, value := range values { 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. +// +// 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) { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) diff --git a/gst/gst_child_proxy_exports.go b/gst/gst_child_proxy_exports.go index 33b70ad..1a14de8 100644 --- a/gst/gst_child_proxy_exports.go +++ b/gst/gst_child_proxy_exports.go @@ -10,9 +10,13 @@ import ( "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} } //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) { iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) caller := iface.(interface { @@ -26,6 +30,8 @@ func goGstChildProxyChildAdded(parent *C.GstChildProxy, child *C.GObject, name * } //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) { iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) caller := iface.(interface { @@ -39,6 +45,8 @@ func goGstChildProxyChildRemoved(parent *C.GstChildProxy, child *C.GObject, name } //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 { iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) caller := iface.(interface { @@ -52,6 +60,8 @@ func goGstChildProxyGetChildByIndex(parent *C.GstChildProxy, idx C.guint) *C.GOb } //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 { iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) caller := iface.(interface { @@ -65,6 +75,8 @@ func goGstChildProxyGetChildByName(parent *C.GstChildProxy, name *C.gchar) *C.GO } //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 { iface := glib.FromObjectUnsafePrivate(unsafe.Pointer(parent)) caller := iface.(interface { diff --git a/gst/gst_clock.go b/gst/gst_clock.go index ac75cf5..ed61ac2 100644 --- a/gst/gst_clock.go +++ b/gst/gst_clock.go @@ -31,6 +31,8 @@ import ( 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 { if ct == ClockTimeNone { return "ClockTimeNone" @@ -40,6 +42,8 @@ func (ct ClockTime) String() string { } // 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 { if ct == ClockTimeNone { return nil @@ -51,6 +55,8 @@ func (ct ClockTime) AsDuration() *time.Duration { } // 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 { if ct == ClockTimeNone { return nil @@ -65,32 +71,44 @@ func (ct ClockTime) AsTimestamp() *time.Time { type ClockCallback func(clock *Clock, clockTime ClockTime) bool // 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 { ptr C.GstClockID // which is actually just a casted 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 } // 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 { clk := C.gst_clock_id_get_clock(c.Instance()) return FromGstClockUnsafeFull(unsafe.Pointer(clk)) } // 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 { 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. // 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() { 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 // 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 { 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 // 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. +// +// 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) { var gjitter C.GstClockTimeDiff 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) // // // 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 { ptr := gopointer.Save(f) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *ClockID) Ref() *ClockID { C.gst_clock_id_ref(c.Instance()) return c } // 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() { 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. // 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 { return wrapClock(glib.TransferNone(clock)) } // FromGstClockUnsafeFull takes a pointer to a GstClock and wraps it in a Clock instance. // 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 { return wrapClock(glib.TransferFull(clock)) } // 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 { switch obj := obj.(type) { case *Object: @@ -179,6 +211,8 @@ func ToGstClock(obj interface{}) *Clock { } // 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()) } // 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 // 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) { var out C.gdouble 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. // // 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) { var ginternal, gexternal, grateNum, grateDenom C.GstClockTime 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. // // 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 { 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. // // 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 { return ClockTime(C.gst_clock_adjust_with_calibration( 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. +// +// 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) { var ginternal, gexternal, grateNum, grateDenom C.GstClockTime 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. // 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 { 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 // 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 { 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 // 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 { clock := C.gst_clock_get_master(c.Instance()) 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 // 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 { return ClockTime(C.gst_clock_get_resolution(c.Instance())) } // 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 { return ClockTime(C.gst_clock_get_timeout(c.Instance())) } // 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())) } // 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. +// +// 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 { id := C.gst_clock_new_periodic_id( 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. +// +// 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 { id := C.gst_clock_new_single_shot_id( 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 // / 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 { return gobool(C.gst_clock_periodic_id_reinit( c.Instance(), @@ -322,6 +384,8 @@ func (c *Clock) PeriodicIDReinit(clockID *ClockID, startTime, interval ClockTime // SetCalibration adjusts the rate and time of clock. // 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) { C.gst_clock_set_calibration( 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 // 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 { if master == 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 // 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. +// +// 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 { 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 // 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)) } // 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) { 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. +// +// 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 { 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. // // 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 { 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. // 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 { return ClockTime(C.gst_clock_unadjust_with_calibration( c.Instance(), @@ -396,12 +474,18 @@ func (c *Clock) UnadjustWithCalibration(externalTarget, cinternal, cexternal, cn // 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. +// +// 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 { return gobool(C.gst_clock_wait_for_sync(c.Instance(), C.GstClockTime(timeout))) } // 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()) } // 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()) } diff --git a/gst/gst_context.go b/gst/gst_context.go index efa4d0d..02c096c 100644 --- a/gst/gst_context.go +++ b/gst/gst_context.go @@ -8,11 +8,15 @@ import ( ) // 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 { ptr *C.GstContext } // 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 { wrapped := wrapContext((*C.GstContext)(ctx)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FromGstContextUnsafeNone(ctx unsafe.Pointer) *Context { wrapped := wrapContext((*C.GstContext)(ctx)) wrapped.Ref() @@ -39,6 +45,8 @@ func FromGstContextUnsafeNone(ctx unsafe.Pointer) *Context { // // // false // // 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 { cStr := C.CString(ctxType) defer C.free(unsafe.Pointer(cStr)) @@ -50,6 +58,8 @@ func NewContext(ctxType string, persistent bool) *Context { } // 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)) } // 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()) // // // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *Context) GetStructure() *Structure { st := C.gst_context_get_structure(c.Instance()) if st == nil { @@ -83,6 +97,8 @@ func (c *Context) GetStructure() *Structure { // // // true // // 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 { cStr := C.CString(ctxType) defer C.free(unsafe.Pointer(cStr)) @@ -93,21 +109,29 @@ func (c *Context) HasContextType(ctxType string) bool { } // 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 { return gobool(C.gst_context_is_persistent(c.Instance())) } // 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 { return gobool(C.contextIsWritable(c.Instance())) } // 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 { return FromGstContextUnsafeFull(unsafe.Pointer(C.makeContextWritable(c.Instance()))) } // 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 { st := C.gst_context_writable_structure(c.Instance()) if st == nil { @@ -117,10 +141,14 @@ func (c *Context) WritableStructure() *Structure { } // 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 { ctx := C.gst_context_ref(c.Instance()) return &Context{ptr: ctx} } // 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()) } diff --git a/gst/gst_debug.go b/gst/gst_debug.go index f98b555..4b7213a 100644 --- a/gst/gst_debug.go +++ b/gst/gst_debug.go @@ -111,17 +111,23 @@ const ( ) // 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 { ptr *C.GstDebugCategory } // NewDebugCategory initializes a new DebugCategory with the given properties and set // 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 { cat := C._gst_debug_category_new(C.CString(name), C.guint(color), C.CString(description)) 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) { function, file, line, _ := runtime.Caller(depth) 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 { if len(obj) > 0 { 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 // provide a single object to log the message for. GStreamer will automatically add a newline to the // 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) { d.logDepth(level, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelError, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelWarning, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelInfo, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelDebug, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelLog, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelTrace, message, 2, getLogObj(obj...)) } // 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) { d.logDepth(LevelMemDump, message, 2, getLogObj(obj...)) } // 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 { 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). // // 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 { 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 { 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 { ptr *C.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 { return C.GoString(C.gst_debug_message_get(d.ptr)) } // 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 { 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. // 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) { logFnMu.Lock() defer logFnMu.Unlock() diff --git a/gst/gst_device.go b/gst/gst_device.go index ce59f5c..2783c68 100644 --- a/gst/gst_device.go +++ b/gst/gst_device.go @@ -15,20 +15,28 @@ import ( type Device struct{ *Object } // 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 { return &Device{wrapObject(glib.TransferNone(device))} } // 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 { return &Device{wrapObject(glib.TransferFull(device))} } // 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()) } // CreateElement creates a new element with all the required parameters set to use this device. // 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 { var cName *C.gchar if name != "" { @@ -43,6 +51,8 @@ func (d *Device) CreateElement(name string) *Element { } // 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 { caps := C.gst_device_get_caps(d.Instance()) 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 // represent this device. They are a subset of the classes of the GstDeviceProvider that produced // 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 { class := C.gst_device_get_device_class(d.Instance()) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *Device) GetDisplayName() string { name := C.gst_device_get_display_name(d.Instance()) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *Device) GetProperties() *Structure { st := C.gst_device_get_properties(d.Instance()) if st == nil { @@ -77,6 +93,8 @@ func (d *Device) GetProperties() *Structure { } // 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 { cClasses := C.CString(strings.Join(classes, "/")) 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 // 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 { if ok := gobool(C.gst_device_reconfigure_element(d.Instance(), elem.Instance())); !ok { return fmt.Errorf("failed to reconfigure element %s", elem.GetName()) diff --git a/gst/gst_device_monitor.go b/gst/gst_device_monitor.go index e0372c7..eb11351 100644 --- a/gst/gst_device_monitor.go +++ b/gst/gst_device_monitor.go @@ -10,11 +10,15 @@ import ( ) // 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 { ptr *C.GstDeviceMonitor bus *Bus } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewDeviceMonitor() *DeviceMonitor { monitor := C.gst_device_monitor_new() if monitor == nil { @@ -23,6 +27,8 @@ func NewDeviceMonitor() *DeviceMonitor { 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 { var cClasses *C.gchar if classes != "" { @@ -34,11 +40,15 @@ func (d *DeviceMonitor) AddFilter(classes string, caps *Caps) uint { 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 { return gobool(C.gst_device_monitor_remove_filter(d.ptr, C.guint(filterId))) } // 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 { if d.bus == nil { cBus := C.gst_device_monitor_get_bus(d.ptr) @@ -47,16 +57,22 @@ func (d *DeviceMonitor) GetBus() *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 { return gobool(C.gst_device_monitor_start(d.ptr)) //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() { C.gst_device_monitor_stop(d.ptr) //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 { glist := C.gst_device_monitor_get_devices(d.ptr) if glist == nil { @@ -71,10 +87,14 @@ func (d *DeviceMonitor) GetDevices() []*Device { 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) { 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 { return gobool(C.gst_device_monitor_get_show_all_devices(d.ptr)) } diff --git a/gst/gst_device_provider.go b/gst/gst_device_provider.go index 4565ec7..9e791cd 100644 --- a/gst/gst_device_provider.go +++ b/gst/gst_device_provider.go @@ -13,18 +13,26 @@ import ( type DeviceProvider struct{ *Object } // 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 { return &DeviceProvider{wrapObject(glib.TransferNone(deviceProvider))} } // 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 { return &DeviceProvider{wrapObject(glib.TransferFull(deviceProvider))} } // 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()) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DeviceProvider) GetDevices() []*Device { glist := C.gst_device_provider_get_devices((*C.GstDeviceProvider)(d.Instance())) if glist == nil { @@ -40,16 +48,22 @@ func (d *DeviceProvider) GetDevices() []*Device { } // 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 { cBus := C.gst_device_provider_get_bus((*C.GstDeviceProvider)(d.Instance())) bus := FromGstBusUnsafeFull(unsafe.Pointer(cBus)) 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 { 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() { C.gst_device_provider_stop((*C.GstDeviceProvider)(d.Instance())) } diff --git a/gst/gst_device_provider_factory.go b/gst/gst_device_provider_factory.go index 76fc7f6..961f319 100644 --- a/gst/gst_device_provider_factory.go +++ b/gst/gst_device_provider_factory.go @@ -7,6 +7,8 @@ import ( "unsafe" ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FindDeviceProviderByName(factoryName string) *DeviceProvider { cFactoryName := C.CString(factoryName) defer C.free(unsafe.Pointer(cFactoryName)) diff --git a/gst/gst_element.go b/gst/gst_element.go index 30a5ef1..882b437 100644 --- a/gst/gst_element.go +++ b/gst/gst_element.go @@ -54,6 +54,8 @@ import ( type Element struct{ *Object } // 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 { if elem == nil { return nil @@ -62,6 +64,8 @@ func FromGstElementUnsafeNone(elem unsafe.Pointer) *Element { } // 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 { if elem == 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 // 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 { switch obj := obj.(type) { case *Object: @@ -83,6 +89,8 @@ func ToElement(obj interface{}) *Element { // ElementLinkMany is a go implementation of `gst_element_link_many` to compensate for // 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 { for idx, elem := range elems { 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 // 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) { for idx, elem := range elems { 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. // // 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 { 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. +// +// 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()) } // 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. +// +// 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()) } // 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. // // 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 { 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 +// +// 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 { if err := e.SetState(state); err != nil { 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 // 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()) { ptr := gopointer.Save(f) C.gst_element_call_async( @@ -176,12 +198,16 @@ func (e *Element) CallAsync(f func()) { } // 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 { // 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())) } // 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 { 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). // // 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) { // 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. @@ -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 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 { 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 // RegisterGValueMarshalers before calling Emit. Sub libraries of go-gst (sdp, rtp, webrtc, base, etc.) // 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) { // We are wrapping this for the same reason as Connect. 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 // 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) { function, file, line, _ := runtime.Caller(1) 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 // 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) { function, file, line, _ := runtime.Caller(1) 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. // 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) { function, file, line, _ := runtime.Caller(1) 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 // 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) { function, file, line, _ := runtime.Caller(1) 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 // 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) { var cTxt, cDbg unsafe.Pointer = nil, nil 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 // 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 { bus := C.gst_element_get_bus((*C.GstElement)(e.Instance())) 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. // 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 { cClock := C.gst_element_get_clock((*C.GstElement)(e.Instance())) if cClock == nil { @@ -306,6 +352,8 @@ func (e *Element) GetClock() *Clock { } // 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 { factory := C.gst_element_get_factory((*C.GstElement)(e.Instance())) if factory == nil { @@ -315,6 +363,8 @@ func (e *Element) GetFactory() *ElementFactory { } // 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) { iter := C.gst_element_iterate_pads(e.Instance()) if iter == nil { @@ -324,6 +374,8 @@ func (e *Element) GetPads() ([]*Pad, error) { } // 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) { iter := C.gst_element_iterate_sink_pads(e.Instance()) if iter == nil { @@ -333,6 +385,8 @@ func (e *Element) GetSinkPads() ([]*Pad, error) { } // 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) { iter := C.gst_element_iterate_src_pads(e.Instance()) 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. // 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 { glist := C.gst_element_get_pad_template_list((*C.GstElement)(e.Instance())) 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 // 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. +// +// 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) { pending := C.GstState(state) var curState C.GstState @@ -388,12 +446,16 @@ func (e *Element) GetState(state State, timeout ClockTime) (StateChangeReturn, S // the current state of an element // // 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 { return State(e.Instance().current_state) } // GetStaticPad retrieves a pad from element by name. This version only retrieves // 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 { cname := C.CString(name) 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. // 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 { return e.hasFlags(uint32(flags)) } // Set element flags // 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) { e.setFlags(uint32(flags)) } // Unset element flags // 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) { e.unsetFlags(uint32(flags)) } // 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 { return gobool(C.gstElementIsURIHandler(e.Instance())) } // 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 { 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()) @@ -435,12 +507,16 @@ func (e *Element) Link(elem *Element) error { 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) { 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 // 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 { if filter == nil { 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 // 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 { 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. // 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 +// +// 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 { return gobool(C.elementParentSendEvent(e.Instance(), event.Ref().Instance())) } // ParentPostMessage can be used when extending an element. During a PostMessage, use this method // 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 { 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. // // 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 { return gobool(C.gst_element_query(e.Instance(), q.Instance())) } // 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) { var out C.gint64 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, // 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) { var out C.gint64 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). // 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. +// +// 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) { var out C.gint64 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 // 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 { return gobool(C.gst_element_send_event(e.Instance(), ev.Ref().Instance())) } // 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 { stateRet := C.gst_element_set_state((*C.GstElement)(e.Instance()), C.GstState(state)) 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. +// +// 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 { ret := C.gst_element_set_locked_state((*C.GstElement)(e.Instance()), gboolean(lockedState)) 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 // 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 { 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 // returns nil. Currently this only supports elements built through this package, however, // 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 { if C.toTocSetter(e.Instance()) == 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. // This currently only supports elements built through this package's bindings, however, inner application // 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 { if C.toTagSetter(e.Instance()) == nil { return nil @@ -569,6 +671,8 @@ func (e *Element) TagSetter() TagSetter { // URIHandler returns a URIHandler interface if implemented by this element. Otherwise it // returns nil. Currently this only supports elements built through this package, however, // 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 { if C.toGstURIHandler(e.Unsafe()) == nil { return nil @@ -587,6 +691,8 @@ func (e *Element) URIHandler() URIHandler { // The pad and the element should be unlocked when calling this function. // // 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 { 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 // 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. +// +// 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 { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) @@ -606,6 +714,8 @@ func (e *Element) GetRequestPad(name string) *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) { 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. // // 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) { 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. // Usually the start_time is managed by a toplevel element such as GstPipeline. // 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 { 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 // 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) { 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 // 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 { 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. +// +// 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 { result := C.gst_element_seek_simple(e.Instance(), C.GstFormat(format), C.GstSeekFlags(flag), C.gint64(position)) 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) // // 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 { 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. // 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 { 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 // see (https://github.com/go-gst/go-gst/issues/65) // 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) { val, err := glib.ValueInit(glib.Type(C.GST_TYPE_ELEMENT)) if err != nil { diff --git a/gst/gst_element_class.go b/gst/gst_element_class.go index 2aaaf2c..86ed8fc 100644 --- a/gst/gst_element_class.go +++ b/gst/gst_element_class.go @@ -14,16 +14,22 @@ import ( type ElementClass struct{ *glib.ObjectClass } // 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 { return &ElementClass{klass} } // 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 { return C.toGstElementClass(e.Unsafe()) } // 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) { C.gst_element_class_add_static_metadata( 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. // // 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) { C.gst_element_class_add_pad_template( 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 // 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) { staticTmpl := C.GstStaticPadTemplate{ 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. +// +// 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 { ckey := C.CString(key) 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. // 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 { cname := C.CString(name) 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. // 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 { glist := C.gst_element_class_get_pad_template_list(e.Instance()) 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" // // `author` - Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs " +// +// 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) { C.gst_element_class_set_static_metadata( e.Instance(), diff --git a/gst/gst_element_emit_test.go b/gst/gst_element_emit_test.go index 7a3457d..4bd4618 100644 --- a/gst/gst_element_emit_test.go +++ b/gst/gst_element_emit_test.go @@ -9,6 +9,8 @@ import ( "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) { gst.Init(nil) 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) { 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) { gst.Init(nil) diff --git a/gst/gst_element_exports.go b/gst/gst_element_exports.go index d530e6b..d3667c6 100644 --- a/gst/gst_element_exports.go +++ b/gst/gst_element_exports.go @@ -13,6 +13,8 @@ import ( ) //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 { var ret StateChangeReturn @@ -28,6 +30,8 @@ func goGstElementClassChangeState(elem *C.GstElement, change C.GstStateChange) C } //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 { var ret StateChangeReturn 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 +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func goGstElementClassNoMorePads(elem *C.GstElement) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) @@ -56,6 +62,8 @@ func goGstElementClassNoMorePads(elem *C.GstElement) { } //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) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) @@ -65,6 +73,8 @@ func goGstElementClassPadAdded(elem *C.GstElement, pad *C.GstPad) { } //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) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) @@ -74,6 +84,8 @@ func goGstElementClassPadRemoved(elem *C.GstElement, pad *C.GstPad) { } //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 { var ret C.gboolean 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 +// +// 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 { var clock *Clock goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) @@ -101,6 +115,8 @@ func goGstElementClassProvideClock(elem *C.GstElement) *C.GstClock { } //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 { var ret C.gboolean 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 +// +// 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) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) @@ -122,6 +140,8 @@ func goGstElementClassReleasePad(elem *C.GstElement, pad *C.GstPad) { } //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 { var pad *Pad @@ -145,6 +165,8 @@ func goGstElementClassRequestNewPad(elem *C.GstElement, templ *C.GstPadTemplate, } //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 { var ret C.gboolean @@ -158,6 +180,8 @@ func goGstElementClassSendEvent(elem *C.GstElement, event *C.GstEvent) C.gboolea } //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) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) @@ -167,6 +191,8 @@ func goGstElementClassSetBus(elem *C.GstElement, bus *C.GstBus) { } //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 { var ret C.gboolean @@ -180,6 +206,8 @@ func goGstElementClassSetClock(elem *C.GstElement, clock *C.GstClock) C.gboolean } //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) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) @@ -189,6 +217,8 @@ func goGstElementClassSetContext(elem *C.GstElement, ctx *C.GstContext) { } //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 { var ret C.GstStateChangeReturn @@ -204,6 +234,8 @@ func goGstElementClassSetState(elem *C.GstElement, state C.GstState) C.GstStateC } //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) { goElem := wrapElement(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(elem))}) subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(elem)) diff --git a/gst/gst_element_factory.go b/gst/gst_element_factory.go index 4b257a4..bbcc84f 100644 --- a/gst/gst_element_factory.go +++ b/gst/gst_element_factory.go @@ -12,11 +12,15 @@ import ( ) // 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) { return NewElementWithName(factory, "") } // 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) { elemName := C.CString(factory) 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.: // 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) { props := make([]*C.char, 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewElementMany(elemNames ...string) ([]*Element, error) { elems := make([]*Element, len(elemNames)) for idx, name := range elemNames { @@ -94,6 +102,8 @@ func NewElementMany(elemNames ...string) ([]*Element, error) { type ElementFactory struct{ *PluginFeature } // 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 { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) @@ -105,29 +115,41 @@ func Find(name string) *ElementFactory { } // 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()) } // 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 { 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. +// +// 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 { 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. +// +// 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 { 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. +// +// 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 { 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. +// +// 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 { ckey := C.CString(key) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *ElementFactory) GetMetadataKeys() []string { keys := C.gst_element_factory_get_metadata_keys((*C.GstElementFactory)(e.Instance())) if keys == nil { diff --git a/gst/gst_element_impl.go b/gst/gst_element_impl.go index 7e218cc..01e562d 100644 --- a/gst/gst_element_impl.go +++ b/gst/gst_element_impl.go @@ -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 // 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 { // ChangeState is called by SetState to perform an incremental state change. ChangeState(*Element, StateChange) StateChangeReturn @@ -89,10 +91,18 @@ type ElementImpl interface { 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()) } +// +// 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) } +// +// 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) } +// +// 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) { e.parent.InitClass(klass, elem) diff --git a/gst/gst_errors.go b/gst/gst_errors.go index ddc4a80..f11a228 100644 --- a/gst/gst_errors.go +++ b/gst/gst_errors.go @@ -16,6 +16,8 @@ const ( 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 { switch d { 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 // 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 { errMsg, debugStr string structure *Structure @@ -110,21 +114,33 @@ type GError struct { // Message is an alias to `Error()`. It's for clarity when this object // 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() } // 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 } // 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 } // 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 } // 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 } // 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 { return &GError{ errMsg: err.Error(), diff --git a/gst/gst_event.go b/gst/gst_event.go index 8ee8f14..a0c2c68 100644 --- a/gst/gst_event.go +++ b/gst/gst_event.go @@ -10,6 +10,8 @@ import ( ) // 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 { ptr *C.GstEvent } @@ -19,6 +21,8 @@ type Event struct { // FromGstEventUnsafeNone wraps the pointer to the given C GstEvent with the go type. // 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 { event := ToGstEvent(ev) 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. // 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 { event := ToGstEvent(ev) 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 // 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 { return wrapEvent((*C.GstEvent)(ev)) } // 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)) } // 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) } // 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 { ts := e.Instance().timestamp return time.Duration(uint64(ts)) * time.Nanosecond } // 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 { return uint32(e.Instance().seqnum) } // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) CopySegment(segment *Segment) { 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 // 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 { 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 // 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 { return uint32(C.gst_event_get_seqnum(e.Instance())) } // 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 { 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. +// +// 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 { cName := C.CString(name) 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. +// +// 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) { var gformat C.GstFormat 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseCaps() *Caps { var caps *C.GstCaps 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 // 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) { var gbool C.gboolean 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. +// +// 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) { var ts, dur C.GstClockTime 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. +// +// 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) { var out C.guint 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() {} // 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 { var out C.GstClockTime 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 // 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) { idPtr := 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. // // 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) { var gtype C.GstQOSType var gprop C.gdouble @@ -195,6 +239,8 @@ func (e *Event) ParseQOS() (qTtype QOSType, proportion float64, diff ClockTimeDi } // 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) { var grate C.gdouble 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 // 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) { var out C.GstClockTime 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseSegment() *Segment { var out *C.GstSegment 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseSegmentDone() (Format, int64) { var format C.GstFormat 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseSelectStreams() []*Stream { var outList *C.GList 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseSinkMessage() *Message { var msg *C.GstMessage C.gst_event_parse_sink_message(e.Instance(), &msg) @@ -245,6 +301,8 @@ func (e *Event) ParseSinkMessage() *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) { var gformat C.GstFormat 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseStream() *Stream { var stream *C.GstStream 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseStreamCollection() *StreamCollection { stream := &C.GstStreamCollection{} 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseStreamFlags() StreamFlags { var out C.GstStreamFlags 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseStreamGroupDone() uint { var out C.guint 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseStreamStart() string { idPtr := C.malloc(C.sizeof_char * 1024) 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 // 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 { var out *C.GstTagList 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. +// +// 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) { var out *C.GstToc 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) ParseTOCSelect() string { idPtr := C.malloc(C.sizeof_char * 1024) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) Ref() *Event { C.gst_event_ref(e.Instance()) return e @@ -327,6 +403,8 @@ func (e *Event) Ref() *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 { return uint(C.gst_util_group_id_next()) } @@ -337,17 +415,23 @@ func NextGroupID() uint { // played for example. // // 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *Event) SetRunningTimeOffset(offset int64) { 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 // 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) { 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. // 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) { C.gst_event_set_seqnum(e.Instance(), C.guint32(seqnum)) } // 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) { C.gst_event_set_stream(e.Instance(), stream.Instance()) } // 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) { 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. +// +// 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()) } // 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 { return wrapStructure(C.gst_event_writable_structure(e.Instance())) } diff --git a/gst/gst_event_constructors.go b/gst/gst_event_constructors.go index eb3f7ae..209d0ad 100644 --- a/gst/gst_event_constructors.go +++ b/gst/gst_event_constructors.go @@ -11,6 +11,8 @@ import ( // elements that they should provide a buffer of the specified dimensions. // // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_buffer_size( 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 // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_caps( 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. // // 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())) } // 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. // // 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 { 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. // // 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 { 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewGapEvent(timestamp, duration ClockTime) *Event { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_gap( C.GstClockTime(timestamp), @@ -104,6 +116,8 @@ func NewGapEvent(timestamp, duration ClockTime) *Event { // running time before synchronizing against the clock. // // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewNavigationEvent(structure *Structure) *Event { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_navigation( 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 // 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 { cSystemID := C.CString(systemID) 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. // // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_qos( 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. // 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 { 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 // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_seek( 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: // // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_segment( 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. +// +// 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_segment_done( C.GstFormat(format), C.gint64(position), @@ -249,6 +277,8 @@ func NewSegmentDoneEvent(format Format, position int64) *Event { // EventStreamCollection or MessageStreamCollection. // // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_select_streams( streamSliceToGlist(streams), @@ -259,6 +289,8 @@ func NewSelectStreamsEvent(streams []*Stream) *Event { // synchronized with the stream. // // 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 { cName := C.CString(name) 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 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_step( 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 // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_stream_collection( 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 // 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 { 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. // 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). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewStreamStartEvent(streamID string) *Event { cName := C.CString(streamID) 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 // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_tag( 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. +// +// 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_toc( 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 // 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 { cUID := C.CString(uid) 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 // 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 { return FromGstEventUnsafeFull(unsafe.Pointer(C.gst_event_new_custom( C.GstEventType(eventType), structure.Instance(), diff --git a/gst/gst_ghost_pad.go b/gst/gst_ghost_pad.go index 57f241c..c525317 100644 --- a/gst/gst_ghost_pad.go +++ b/gst/gst_ghost_pad.go @@ -13,11 +13,15 @@ import ( type GhostPad struct{ *ProxyPad } // 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 { return &GhostPad{&ProxyPad{&Pad{wrapObject(glib.TransferNone(pad))}}} } // 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 { return &GhostPad{&ProxyPad{&Pad{wrapObject(glib.TransferFull(pad))}}} @@ -28,6 +32,8 @@ func FromGstGhostPadUnsafeFull(pad unsafe.Pointer) *GhostPad { // selected. // // 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 { var cName *C.gchar if name != "" { @@ -50,6 +56,8 @@ func NewGhostPad(name string, target *Pad) *GhostPad { // selected. // // 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 { var cName *C.gchar 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. // // 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 { var cName *C.gchar 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 // 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 { var cName *C.gchar if name != "" { @@ -109,9 +121,13 @@ func NewGhostPadNoTargetFromTemplate(name string, tmpl *PadTemplate) *GhostPad { } // 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()) } // 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 { pad := C.gst_ghost_pad_get_target(g.Instance()) 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 // 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 { 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. +// +// 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 { if parent == nil { 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. +// +// 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 { if parent == nil { 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 } // 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()) } // 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()) } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *ProxyPad) GetInternal() *ProxyPad { pad := C.gst_proxy_pad_get_internal(p.Instance()) 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. +// +// 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 { 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. +// +// 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 { 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. +// +// 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) { var buf *C.GstBuffer 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. +// +// 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) { iterator := C.gst_proxy_pad_iterate_internal_links_default(p.toPad(), parent.Instance()) return iteratorToPadSlice(iterator) diff --git a/gst/gst_init.go b/gst/gst_init.go index 3b188e2..c67fadd 100644 --- a/gst/gst_init.go +++ b/gst/gst_init.go @@ -25,6 +25,8 @@ var CAT *DebugCategory // The bindings will also set up their own internal DebugCategory for logging // than can be invoked from applications or plugins as well. However, for // 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) { if args != nil { 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(). // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func Deinit() { C.gst_deinit() } diff --git a/gst/gst_mapinfo.go b/gst/gst_mapinfo.go index 189cac2..d1b6d86 100644 --- a/gst/gst_mapinfo.go +++ b/gst/gst_mapinfo.go @@ -34,25 +34,35 @@ import ( ) // 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 { ptr *C.GstMapInfo } // 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 { return m.ptr } // 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 { 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 { mapInfo *MapInfo 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) { if m.wsize+len(p) > int(m.mapInfo.Size()) { 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 // map's memory sequentially. An error will be returned if an attempt is made to write // 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 { return &mapInfoWriter{ mapInfo: m, @@ -73,46 +85,64 @@ func (m *MapInfo) Writer() io.Writer { } // 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) { 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. +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) Memory() *Memory { return wrapMemory(m.ptr.memory) } // 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 { return unsafe.Pointer(m.ptr.data) } // 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 { return MapFlags(m.ptr.flags) } // 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 { return int64(m.ptr.size) } // 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 { return int64(m.ptr.maxsize) } // 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 { return C.GoBytes(m.Data(), (C.int)(m.Size())) } // 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 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsInt16BESlice() []int16 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsInt16LESlice() []int16 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsInt32BESlice() []int32 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsInt32LESlice() []int32 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsInt64BESlice() []int64 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsInt64LESlice() []int64 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint8Slice() []uint8 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint16BESlice() []uint16 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint16LESlice() []uint16 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint32BESlice() []uint32 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint32LESlice() []uint32 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint64BESlice() []uint64 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsUint64LESlice() []uint64 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsFloat32BESlice() []float32 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsFloat32LESlice() []float32 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsFloat64BESlice() []float64 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MapInfo) AsFloat64LESlice() []float64 { br := C.newByteReader(m.Instance().data, C.guint(m.Instance().size)) defer C.freeByteReader(br) diff --git a/gst/gst_memory.go b/gst/gst_memory.go index 61c06b1..0362cb2 100644 --- a/gst/gst_memory.go +++ b/gst/gst_memory.go @@ -17,6 +17,8 @@ import ( // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Memory struct { ptr *C.GstMemory 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 // 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 { wrapped := wrapMemory((*C.GstMemory)(mem)) wrapped.Ref() @@ -32,11 +36,15 @@ func FromGstMemoryUnsafe(mem unsafe.Pointer) *Memory { } // 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 { return FromGstMemoryUnsafe(mem) } // 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 { wrapped := wrapMemory((*C.GstMemory)(mem)) 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 // 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 { mem := C.gst_memory_new_wrapped( C.GstMemoryFlags(flags), @@ -61,40 +71,60 @@ func NewMemoryWrapped(flags MemoryFlags, data []byte, maxSize, offset int64) *Me } // 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)) } // 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 { return wrapMemory(C.gst_memory_ref(m.Instance())) } // Unref decreases the ref count on this memory block 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 (m *Memory) Unref() { C.gst_memory_unref(m.Instance()) } // 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 { return wrapAllocator(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(m.Instance().allocator))}) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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 // 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 { mem := C.gst_memory_copy(m.Instance(), C.gssize(offset), C.gssize(size)) 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. // // 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 { if m.mapInfo != nil { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Memory) Unmap() { if m.mapInfo == nil { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Memory) Bytes() []byte { mapInfo := m.Map(MapRead) if mapInfo == nil { diff --git a/gst/gst_message.go b/gst/gst_message.go index 2606afb..7062373 100644 --- a/gst/gst_message.go +++ b/gst/gst_message.go @@ -14,12 +14,16 @@ import ( // Message is a Go wrapper around a GstMessage. It provides convenience methods for // 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 { msg *C.GstMessage } // FromGstMessageUnsafeNone wraps the given unsafe.Pointer in a message. A ref is taken // 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 { gomsg := ToGstMessage(msg) 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 // 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 { gomsg := ToGstMessage(msg) 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 // 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)) } // 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)) } // 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()) } // 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 // 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 { C.gst_message_ref(m.Instance()) return m } // 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 { newNative := C.gst_message_copy(m.Instance()) return FromGstMessageUnsafeFull(unsafe.Pointer(newNative)) } // 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) } // 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 { return wrapObject(glib.Take(unsafe.Pointer(m.Instance().src))) } // 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 { return MessageType(m.Instance()._type) } // 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 { 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 // 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 { 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 // 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 { var gerr *C.GError 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, // 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 { return m.parseToError() } // ParseWarning is identical to ParseError. The returned types are the same. However, // 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 { return m.parseToError() } // ParseError will return a GError from the contents of this message. This will only work // 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 { return m.parseToError() } // ParseStateChanged will return the old and new states as Go strings. This will only work // 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) { var gOldState, gNewState C.GstState 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) ParseTags() *TagList { var tagList *C.GstTagList 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 // 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) { var gtoc *C.GstToc 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 // 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) { var cElem *C.GstElement 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) ParseAsyncDone() ClockTime { var clockTime C.GstClockTime 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type BufferingStats struct { // The buffering mode BufferingMode BufferingMode @@ -214,6 +260,8 @@ type BufferingStats struct { } // 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 { var cInt C.gint 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) ParseBufferingStats() *BufferingStats { var mode C.GstBufferingMode var avgIn, avgOut C.gint @@ -238,6 +288,8 @@ func (m *Message) ParseBufferingStats() *BufferingStats { } // 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 { Active bool Format Format @@ -248,6 +300,8 @@ type StepStartValues struct { } // 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 { var active, flush, intermediate C.gboolean var amount C.guint64 @@ -268,6 +322,8 @@ func (m *Message) ParseStepStart() *StepStartValues { } // 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 { Format Format Amount uint64 @@ -279,6 +335,8 @@ type StepDoneValues struct { } // 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 { var format C.GstFormat 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 // 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 { var clock *C.GstClock 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. // 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) { var gclock *C.GstClock 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. // 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) { var gElem *C.GstElement 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) ParseSegmentStart() (Format, int64) { var format C.GstFormat var position C.gint64 @@ -344,6 +410,8 @@ func (m *Message) ParseSegmentStart() (Format, int64) { } // 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) { var format C.GstFormat var position C.gint64 @@ -352,6 +420,8 @@ func (m *Message) ParseSegmentDone() (Format, int64) { } // 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 { var state C.GstState 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type QoSValues struct { // If the message was generated by a live element Live bool @@ -375,6 +447,8 @@ type QoSValues struct { // ParseQoS extracts the timestamps and live status from the QoS message. // The values reflect those of the dropped buffer. Values of ClockTimeNone // 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 { var live C.gboolean var runningTime, streamTime, timestamp, duration C.guint64 @@ -392,6 +466,8 @@ func (m *Message) ParseQoS() *QoSValues { } // 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) { codePtr := C.malloc(C.sizeof_char * 1024) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) ParseResetTime() ClockTime { var clockTime C.GstClockTime 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 // produced by GstDeviceProvider or a GstDeviceMonitor. It announces the appearance // 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 { var device *C.GstDevice 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 // is produced by GstDeviceProvider or a GstDeviceMonitor. It announces the disappearance // 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 { var device *C.GstDevice C.gst_message_parse_device_removed(m.Instance(), &device) @@ -439,6 +521,8 @@ func (m *Message) ParseDeviceRemoved() *Device { // have changed. // The first device returned is the updated Device, and the second changedDevice represents // 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) { var gstNewDevice, gstOldDevice *C.GstDevice 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 // 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) { var gstobj *C.GstObject var gval *C.GValue @@ -463,6 +549,8 @@ func (m *Message) ParsePropertyNotify() (obj *Object, propertName string, proper } // 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 { var collection *C.GstStreamCollection C.gst_message_parse_stream_collection( @@ -473,6 +561,8 @@ func (m *Message) ParseStreamCollection() *StreamCollection { } // 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 { var collection *C.GstStreamCollection 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) NumRedirectEntries() int64 { 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 // 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) { locPtr := C.malloc(C.sizeof_char * 1024) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Message) ParseHaveContext() *Context { var ctx *C.GstContext C.gst_message_parse_have_context(m.Instance(), &ctx) diff --git a/gst/gst_message_constructors.go b/gst/gst_message_constructors.go index 53b421b..0ac58f7 100644 --- a/gst/gst_message_constructors.go +++ b/gst/gst_message_constructors.go @@ -10,10 +10,14 @@ import ( // GstObjectHolder interface is used as a go representation of the GLib check // 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 { 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 { if src == 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 // 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 { srcObj := getMessageSourceObj(src) 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. // 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewAsyncStartMessage(src GstObjectHolder) *Message { srcObj := getMessageSourceObj(src) 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 // may only set the pipeline to PLAYING after receiving a message with percent set to 100, which can happen after the pipeline // 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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). // // 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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. // 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 { srcObj := getMessageSourceObj(src) 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. // 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 { srcObj := getMessageSourceObj(src) 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. // 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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 // 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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 // 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) if srcObj == nil { @@ -222,6 +256,8 @@ func NewHaveContextMessage(src GstObjectHolder, ctx *Context) *Message { } // 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 { srcObj := getMessageSourceObj(src) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewLatencyMessage(src GstObjectHolder) *Message { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. // // 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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. // // 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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) { var loc *C.gchar 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. // 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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. // 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) if srcObj == nil { @@ -467,6 +531,8 @@ func NewStateDirtyMessage(src GstObjectHolder) *Message { // complete step operation. // // 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 { srcObj := getMessageSourceObj(src) 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. // 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. // 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 { srcObj := getMessageSourceObj(src) 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 // 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 { srcObj := getMessageSourceObj(src) 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. // // 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 { srcObj := getMessageSourceObj(src) if srcObj == nil { @@ -550,16 +626,22 @@ func NewStreamSelectedMessage(src GstObjectHolder, collection *StreamCollection) } // 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) { C.gst_message_streams_selected_add(m.Instance(), stream.Instance()) } // 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 { return uint(C.gst_message_streams_selected_get_size(m.Instance())) } // 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 { stream := C.gst_message_streams_selected_get_stream(m.Instance(), C.guint(index)) 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. // // 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) 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. +// +// 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 { srcObj := getMessageSourceObj(src) if srcObj == nil { diff --git a/gst/gst_message_stringer.go b/gst/gst_message_stringer.go index 0615e27..eb0c18d 100644 --- a/gst/gst_message_stringer.go +++ b/gst/gst_message_stringer.go @@ -14,6 +14,8 @@ import ( // 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 // 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 { msg := fmt.Sprintf("[%s] %s - ", m.Source(), strings.ToUpper(m.TypeName())) switch m.Type() { diff --git a/gst/gst_meta.go b/gst/gst_meta.go index 04e0ebb..c755cea 100644 --- a/gst/gst_meta.go +++ b/gst/gst_meta.go @@ -31,35 +31,53 @@ import ( ) // 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 { ptr *C.GstMeta } // 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. +// +// 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)) } // 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)) } // 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) } // 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) } // 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) } // 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() } // 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 { ptr *C.GstMetaInfo } // 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 { if ptr == 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. +// +// 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 { cTags := gcharStrings(tags) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func GetAPIInfo(name string) *MetaInfo { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) @@ -85,12 +107,16 @@ func GetAPIInfo(name string) *MetaInfo { } // 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 { tags := C.gst_meta_api_type_get_tags(C.GType(apiType)) return goStrings(C.sizeOfGCharArray(tags), tags) } // 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 { q := newQuarkFromString(tag) 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 // 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 { // true if only region is copied Region bool @@ -119,6 +147,8 @@ type MetaTransformCopy struct { // MetaInfoCallbackFuncs represents callback functions to include when registering a new // meta type. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type MetaInfoCallbackFuncs struct { InitFunc MetaInitFunc 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 // 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 { cName := C.CString(name) 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. +// +// 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 } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } diff --git a/gst/gst_mini_object.go b/gst/gst_mini_object.go index 8de5267..8a0ee7b 100644 --- a/gst/gst_mini_object.go +++ b/gst/gst_mini_object.go @@ -12,6 +12,8 @@ import ( // MiniObject is an opaque struct meant to form the base of gstreamer // classes extending the GstMiniObject. // 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 { ptr unsafe.Pointer parent *MiniObject @@ -20,6 +22,8 @@ type MiniObject struct { // NewMiniObject initializes a new mini object with the desired flags, types, and callbacks. // If you don't need any callbacks you can specify nil. // 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 { var cMiniObj C.GstMiniObject 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. +// +// 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 } // 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 } // 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()) } // 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()) } // 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()) } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *MiniObject) AddParent(parent *MiniObject) { C.gst_mini_object_add_parent(m.Instance(), parent.Instance()) } // 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 { return wrapMiniObject(C.gst_mini_object_copy(m.Instance())) } // 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 { return glib.Type(m.Instance()._type) } // GetData returns the userdata pointer associated with this object at the given key, // 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 { data := C.gst_mini_object_get_qdata(m.Instance(), newQuarkFromString(name)) 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, // 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) { 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 { return &MiniObject{ptr: unsafe.Pointer(p)} } diff --git a/gst/gst_object.go b/gst/gst_object.go index 353a5eb..0cb1a36 100644 --- a/gst/gst_object.go +++ b/gst/gst_object.go @@ -14,25 +14,39 @@ type Object struct{ *glib.InitiallyUnowned } // FromGstObjectUnsafeNone returns an Object wrapping the given pointer. It meant for internal // 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)) } // FromGstObjectUnsafeFull returns an Object wrapping the given pointer. It meant for internal // 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)) } // 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()) } // 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 } // 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()) } // 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 } // 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 { cName := C.gst_object_get_name((*C.GstObject)(o.Instance())) //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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (o *Object) GetParent() *Object { 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. +// +// 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 { cprop := C.CString(property) 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. +// +// 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 { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) @@ -64,6 +84,8 @@ func (o *Object) SetName(name string) bool { } // 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 { 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 // if object has no property named name or when value cannot be converted to the type for this // 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) { cName := C.CString(name) 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 // 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) { 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 // the the function does nothing. Otherwise the reference count is decreased and the pointer // 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() { if ptr := o.Unsafe(); ptr != nil { 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 // 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 { C.gst_object_ref((C.gpointer)(o.Unsafe())) 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. // 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() { 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) { 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) { 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 // 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 { return gobool(C.gstObjectFlagIsSet(o.Instance(), C.guint32(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) { C.gstObjectFlagSet(o.Instance(), C.guint32(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) { C.gstObjectFlagUnset(o.Instance(), C.guint32(flags)) } diff --git a/gst/gst_pad.go b/gst/gst_pad.go index 98fcf1e..2099a34 100644 --- a/gst/gst_pad.go +++ b/gst/gst_pad.go @@ -94,6 +94,8 @@ import ( type PadFuncMap map[unsafe.Pointer]interface{} // 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{} { for k, v := range p { 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. +// +// 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) { for k := range p { if gobool(C.padsAreEqual(k, pad)) { @@ -116,16 +120,22 @@ func (p PadFuncMap) RemoveFuncForPad(pad unsafe.Pointer) { type Pad struct{ *Object } // 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 { return &Pad{wrapObject(glib.TransferFull(pad))} } // 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 { 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. +// +// 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 { var cName *C.gchar 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 // 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 { var cName *C.gchar if name != "" { @@ -157,19 +169,27 @@ func NewPadFromTemplate(tmpl *PadTemplate, name string) *Pad { } // 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()) } // 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 { return PadDirection(C.gst_pad_get_direction((*C.GstPad)(p.Instance()))) } // 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 { return wrapPadTemplate(toGObject(unsafe.Pointer(p.Instance().padtemplate))) } // 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 { caps := C.gst_pad_get_current_caps((*C.GstPad)(p.Instance())) if caps == nil { @@ -182,6 +202,8 @@ func (p *Pad) CurrentCaps() *Caps { // For use from within pad activation functions only. // // 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) { 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. // // 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 { 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. +// +// 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 { 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. // // 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 { 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. // // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) CheckReconfigure() bool { 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 // 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 { var gstreamID *C.gchar 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 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 { if parent == nil { 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. // // 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 { ptr := gopointer.Save(f) 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 // 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 { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_get_allowed_caps( p.Instance(), @@ -315,6 +355,8 @@ func (p *Pad) GetAllowedCaps() *Caps { } // 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 { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_pad_get_current_caps( 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) GetDirection() PadDirection { return PadDirection(C.gst_pad_get_direction(p.Instance())) } // 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{} { ptr := C.gst_pad_get_element_private(p.Instance()) return gopointer.Restore(unsafe.Pointer(ptr)) } // 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 { return FlowReturn(C.gst_pad_get_last_flow_return( 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) GetOffset() int64 { return int64(C.gst_pad_get_offset(p.Instance())) } // 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 { tmpl := C.gst_pad_get_pad_template(p.Instance()) if tmpl == nil { @@ -354,6 +406,8 @@ func (p *Pad) GetPadTemplate() *PadTemplate { } // 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 { caps := C.gst_pad_get_pad_template_caps(p.Instance()) 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 // 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 { elem := C.gst_pad_get_parent_element(p.Instance()) if elem == nil { @@ -373,6 +429,8 @@ func (p *Pad) GetParentElement() *Element { } // 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 { peer := C.gst_pad_get_peer(p.Instance()) 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. // // 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) { var buf *C.GstBuffer 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. +// +// 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 { ev := C.gst_pad_get_sticky_event(p.Instance(), C.GstEventType(eventType), C.guint(idx)) if ev == nil { @@ -426,6 +488,8 @@ func (p *Pad) GetStickyEvent(eventType EventType, idx uint) *Event { // stream-start event yet. // // 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 { st := C.gst_pad_get_stream(p.Instance()) 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. // // 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 { id := C.gst_pad_get_stream_id(p.Instance()) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) GetTaskState() TaskState { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) HasCurrentCaps() bool { return gobool(C.gst_pad_has_current_caps(p.Instance())) } // 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 { 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 // 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 { 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 // 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 { return gobool(C.gst_pad_is_blocking(p.Instance())) } // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) GetInternalLinks() ([]*Pad, error) { iterator := C.gst_pad_iterate_internal_links(p.Instance()) 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 // 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) { iterator := C.gst_pad_iterate_internal_links_default(p.Instance(), parent.Instance()) if iterator == nil { @@ -501,6 +583,8 @@ func (p *Pad) GetInternalLinksDefault(parent *Object) ([]*Pad, error) { } // 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 { 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 // 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. +// +// 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 { 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. // // 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 { 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. // // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) MarkReconfigure() { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) NeedsReconfigure() bool { 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 // 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 { 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. // // 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 { 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. +// +// 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 { 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 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. +// +// 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 { var caps *C.GstCaps 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. +// +// 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) { var out C.gint64 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. +// +// 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) { var out C.gint64 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. +// +// 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) { var out C.gint64 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 // 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 { 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 // 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 { 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. // 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) { var buf *C.GstBuffer 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. // // 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 { 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. // // 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 { return gobool(C.gst_pad_push_event(p.Instance(), ev.Ref().Instance())) } @@ -675,6 +793,8 @@ func (p *Pad) PushEvent(ev *Event) bool { // Chain. // // 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 { 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. // // 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 { return gobool(C.gst_pad_query(p.Instance(), query.Instance())) } // 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 { 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. // // 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 { var caps *C.GstCaps 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. +// +// 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) { var out C.gint64 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 // 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 { return gobool(C.gst_pad_query_default(p.Instance(), parent.Instance(), query.Instance())) } // 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) { var out C.gint64 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. +// +// 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) { var out C.gint64 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) RemoveProbe(id uint64) { 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. // // 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 { 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 { 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 // 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) { notifyInfo := p.registerCallback(f, padActivateFuncs) 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 // 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) { notifyInfo := p.registerCallback(f, padActivateModeFuncs) 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. // // 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 { 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) // 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) { notifyInfo := p.registerCallback(f, padChainFuncs) 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) // 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) { notifyInfo := p.registerCallback(f, padChainListFuncs) 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. // 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{}) { ptr := gopointer.Save(data) 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) // 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) { notifyInfo := p.registerCallback(f, padEventFullFuncs) 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) // 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) { notifyInfo := p.registerCallback(f, padEventFuncs) 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 // 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) { notifyInfo := p.registerCallback(f, padGetRangeFuncs) C.gst_pad_set_getrange_function_full( @@ -956,6 +1114,8 @@ type PadIterIntLinkFunc func(self *Pad, parent *Object) []*Pad var padIterIntLinkFuncs PadFuncMap = make(PadFuncMap) // 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) { notifyInfo := p.registerCallback(f, padIterIntLinkFuncs) 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. // // 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) { notifyInfo := p.registerCallback(f, padLinkFuncs) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pad) SetOffset(offset int64) { 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) // 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) { notifyInfo := p.registerCallback(f, padQueryFuncs) 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 // 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) { notifyInfo := p.registerCallback(f, padUnlinkFuncs) 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 // 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) { ptr := gopointer.Save(f) defer gopointer.Unref(ptr) @@ -1051,11 +1221,15 @@ func (p *Pad) StickyEventsForEach(f StickyEventsForEachFunc) { } // 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 { 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. +// +// 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 { 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 // 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()) } // this prevents go pointers in cgo when setting a gst.Pad to a property // see (https://github.com/go-gst/go-gst/issues/117) // 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) { val, err := glib.ValueInit(glib.Type(C.gst_pad_get_type())) if err != nil { @@ -1081,41 +1259,59 @@ func (p *Pad) ToGValue() (*glib.Value, error) { // Has returns true if this pad has the given flags. // 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 { return p.hasFlags(uint32(flags)) } // Sets pad flags // 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) { p.setFlags(uint32(flags)) } // Unsets pad flags // 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) { p.unsetFlags(uint32(flags)) } // 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 { ptr *C.GstPadProbeInfo } // 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) } // Type returns the type of the probe. The type indicates the type of data that can be expected // 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) } // 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) } // 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) } // 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 { buf := C.gst_pad_probe_info_get_buffer(p.ptr) if buf == nil { @@ -1125,6 +1321,8 @@ func (p *PadProbeInfo) GetBuffer() *Buffer { } // 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 { bufList := C.gst_pad_probe_info_get_buffer_list(p.ptr) if bufList == nil { @@ -1134,6 +1332,8 @@ func (p *PadProbeInfo) GetBufferList() *BufferList { } // 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 { ev := C.gst_pad_probe_info_get_event(p.ptr) if ev == nil { @@ -1149,6 +1349,8 @@ func (p *PadProbeInfo) GetEvent() *Event { } // 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 { q := C.gst_pad_probe_info_get_query(p.ptr) if q == nil { @@ -1157,6 +1359,8 @@ func (p *PadProbeInfo) GetQuery() *Query { 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) { pads := make([]*Pad, 0) gval := new(C.GValue) diff --git a/gst/gst_pad_exports.go b/gst/gst_pad_exports.go index 0a123ea..7364a59 100644 --- a/gst/gst_pad_exports.go +++ b/gst/gst_pad_exports.go @@ -11,6 +11,8 @@ import ( 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 { if parent == nil { return nil @@ -19,6 +21,8 @@ func getParent(parent *C.GstObject) *Object { } //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) { padPtr := unsafe.Pointer(notifyInfo.pad_ptr) funcMapPtr := unsafe.Pointer(notifyInfo.func_map_ptr) @@ -33,6 +37,8 @@ func goGstPadFuncDestroyNotify(notifyInfo *C.PadDestroyNotifyInfo) { } //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 { f := padActivateFuncs.FuncForPad(unsafe.Pointer(pad)).(PadActivateFunc) return gboolean(f( @@ -42,6 +48,8 @@ func goGstPadActivateFunction(pad *C.GstPad, parent *C.GstObject) C.gboolean { } //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 { f := padActivateModeFuncs.FuncForPad(unsafe.Pointer(pad)).(PadActivateModeFunc) return gboolean(f( @@ -53,6 +61,8 @@ func goGstPadActivateModeFunction(pad *C.GstPad, parent *C.GstObject, mode C.Gst } //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 { f := padChainFuncs.FuncForPad(unsafe.Pointer(pad)).(PadChainFunc) buf := FromGstBufferUnsafeFull(unsafe.Pointer(buffer)) @@ -65,6 +75,8 @@ func goGstPadChainFunction(pad *C.GstPad, parent *C.GstObject, buffer *C.GstBuff } //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 { f := padChainListFuncs.FuncForPad(unsafe.Pointer(pad)).(PadChainListFunc) buflist := FromGstBufferListUnsafeFull(unsafe.Pointer(list)) @@ -77,6 +89,8 @@ func goGstPadChainListFunction(pad *C.GstPad, parent *C.GstObject, list *C.GstBu } //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 { f := padEventFullFuncs.FuncForPad(unsafe.Pointer(pad)).(PadEventFullFunc) ev := FromGstEventUnsafeFull(unsafe.Pointer(event)) @@ -89,6 +103,8 @@ func goGstPadEventFullFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstE } //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 { f := padEventFuncs.FuncForPad(unsafe.Pointer(pad)).(PadEventFunc) ev := FromGstEventUnsafeFull(unsafe.Pointer(event)) @@ -101,6 +117,8 @@ func goGstPadEventFunction(pad *C.GstPad, parent *C.GstObject, event *C.GstEvent } //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 { f := padGetRangeFuncs.FuncForPad(unsafe.Pointer(pad)).(PadGetRangeFunc) ret, buf := f( @@ -116,6 +134,8 @@ func goGstPadGetRangeFunction(pad *C.GstPad, parent *C.GstObject, offset C.guint } //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 { f := padIterIntLinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadIterIntLinkFunc) pads := f( @@ -137,6 +157,8 @@ func goGstPadIterIntLinkFunction(pad *C.GstPad, parent *C.GstObject) *C.GstItera } //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 { f := padLinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadLinkFunc) return C.GstPadLinkReturn(f( @@ -147,6 +169,8 @@ func goGstPadLinkFunction(pad *C.GstPad, parent *C.GstObject, peer *C.GstPad) C. } //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 { f := padQueryFuncs.FuncForPad(unsafe.Pointer(pad)).(PadQueryFunc) return gboolean(f( @@ -157,6 +181,8 @@ func goGstPadQueryFunction(pad *C.GstPad, parent *C.GstObject, query *C.GstQuery } //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) { f := padUnlinkFuncs.FuncForPad(unsafe.Pointer(pad)).(PadUnlinkFunc) f( diff --git a/gst/gst_pad_template.go b/gst/gst_pad_template.go index 5f3a5ae..f5fe66d 100644 --- a/gst/gst_pad_template.go +++ b/gst/gst_pad_template.go @@ -12,16 +12,22 @@ import ( type PadTemplate struct{ *Object } // 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 { return &PadTemplate{wrapObject(glib.TransferNone(tmpl))} } // 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 { 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. +// +// 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 { cName := C.CString(nameTemplate) 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. +// +// 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 { cName := C.CString(nameTemplate) defer C.free(unsafe.Pointer(cName)) @@ -55,23 +63,35 @@ func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presen } // 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()) } // 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) } // 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) } // 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) } // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *PadTemplate) PadCreated(pad *Pad) { C.gst_pad_template_pad_created(p.Instance(), pad.Instance()) } diff --git a/gst/gst_pipeline.go b/gst/gst_pipeline.go index 8d0d81f..4a06411 100644 --- a/gst/gst_pipeline.go +++ b/gst/gst_pipeline.go @@ -13,23 +13,31 @@ import ( ) // 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 { *Bin bus *Bus } // 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 { return &Pipeline{Bin: &Bin{&Element{wrapObject(glib.TransferFull(pipeline))}}} } // 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 { return &Pipeline{Bin: &Bin{&Element{wrapObject(glib.TransferNone(pipeline))}}} } // NewPipeline allocates and returns a new empty pipeline. If name is empty, one // 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) { var cChar *C.char if name != "" { @@ -44,6 +52,8 @@ func NewPipeline(name string) (*Pipeline, error) { } // 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) { if len(strings.Split(launchv, "!")) < 2 { 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. +// +// 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()) } // 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 { if p.bus == nil { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Pipeline) GetPipelineClock() *Clock { cClock := C.gst_pipeline_get_pipeline_clock((*C.GstPipeline)(p.Instance())) 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. // // 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) { 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 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) { C.gst_pipeline_set_auto_flush_bus(p.Instance(), gboolean(b)) } // 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 { return p.SetState(StatePlaying) } diff --git a/gst/gst_plugin.go b/gst/gst_plugin.go index 6328926..47068c0 100644 --- a/gst/gst_plugin.go +++ b/gst/gst_plugin.go @@ -59,6 +59,8 @@ import ( // PluginMetadata represents the information to include when registering a new plugin // with gstreamer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type PluginMetadata struct { // The major version number of the GStreamer core that the plugin was compiled for, you can just use VersionMajor here MajorVersion Version @@ -89,6 +91,8 @@ type PluginMetadata struct { var globalPluginInit PluginInitFunc // 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 { globalPluginInit = p.Init desc := C.getPluginMeta( @@ -115,11 +119,15 @@ type PluginInitFunc func(*Plugin) bool type Plugin struct{ *Object } // 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 { return &Plugin{wrapObject(glib.TransferNone(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 { 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 // or library and contained within the application or library (as opposed to being shipped as a // 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 { cName := C.CString(desc.Name) 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 // 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 { cstr := C.CString(name) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func LoadPluginFile(fpath string) (*Plugin, error) { cstr := C.CString(fpath) defer C.free(unsafe.Pointer(cstr)) @@ -177,9 +191,13 @@ func LoadPluginFile(fpath string) (*Plugin, error) { } // 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()) } // 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 { ret := C.gst_plugin_get_description((*C.GstPlugin)(p.Instance())) if ret == nil { @@ -189,6 +207,8 @@ func (p *Plugin) Description() string { } // 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 { ret := C.gst_plugin_get_filename((*C.GstPlugin)(p.Instance())) if ret == nil { @@ -198,6 +218,8 @@ func (p *Plugin) Filename() string { } // 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 { ret := C.gst_plugin_get_version((*C.GstPlugin)(p.Instance())) if ret == nil { @@ -207,6 +229,8 @@ func (p *Plugin) Version() string { } // 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 { ret := C.gst_plugin_get_license((*C.GstPlugin)(p.Instance())) if ret == nil { @@ -216,6 +240,8 @@ func (p *Plugin) License() License { } // 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 { ret := C.gst_plugin_get_source((*C.GstPlugin)(p.Instance())) if ret == nil { @@ -225,6 +251,8 @@ func (p *Plugin) Source() string { } // 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 { ret := C.gst_plugin_get_package((*C.GstPlugin)(p.Instance())) if ret == nil { @@ -234,6 +262,8 @@ func (p *Plugin) Package() string { } // 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 { ret := C.gst_plugin_get_origin((*C.GstPlugin)(p.Instance())) if ret == nil { diff --git a/gst/gst_plugin_feature.go b/gst/gst_plugin_feature.go index cd763c4..7b2516d 100644 --- a/gst/gst_plugin_feature.go +++ b/gst/gst_plugin_feature.go @@ -11,9 +11,13 @@ import ( type PluginFeature struct{ *Object } // 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()) } // 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 { plugin := C.gst_plugin_feature_get_plugin((*C.GstPluginFeature)(p.Instance())) if plugin == nil { @@ -23,6 +27,8 @@ func (p *PluginFeature) GetPlugin() *Plugin { } // 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 { pluginName := C.gst_plugin_feature_get_plugin_name((*C.GstPluginFeature)(p.Instance())) if pluginName == nil { @@ -31,10 +37,14 @@ func (p *PluginFeature) GetPluginName() string { 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) { 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 { rank := C.gst_plugin_feature_get_rank((*C.GstPluginFeature)(p.Instance())) return int(rank) diff --git a/gst/gst_promise.go b/gst/gst_promise.go index 05129a1..df31716 100644 --- a/gst/gst_promise.go +++ b/gst/gst_promise.go @@ -25,6 +25,8 @@ import ( 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 { switch pr { case PromiseResultPending: @@ -55,6 +57,8 @@ const ( // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Promise struct { ptr *C.GstPromise @@ -62,6 +66,8 @@ type Promise 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 { done := make(chan struct{}) @@ -87,6 +93,8 @@ func NewPromise() *Promise { 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 { if p == 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 // 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() { C.gst_promise_ref(p.ptr) } // Unref decreases the ref count on the promise. Exposed for completeness sake. Should not be called // 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() { 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 // 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) { if p.done == nil { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (p *Promise) GetReply() *Structure { cstruct := C.gst_promise_get_reply(p.ptr) @@ -166,16 +182,22 @@ func (p *Promise) GetReply() *Structure { } // 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() { C.gst_promise_expire(p.ptr) } // 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() { C.gst_promise_interrupt(p.ptr) } // 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) { 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) // 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) { val, err := glib.ValueInit(TypePromise) if err != nil { @@ -192,6 +216,8 @@ func (p *Promise) ToGValue() (*glib.Value, error) { 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) { c := C.g_value_get_boxed(toGValue(p)) obj := (*C.GstPromise)(unsafe.Pointer(c)) diff --git a/gst/gst_promise_test.go b/gst/gst_promise_test.go index bc3baa8..607d409 100644 --- a/gst/gst_promise_test.go +++ b/gst/gst_promise_test.go @@ -9,6 +9,8 @@ import ( ) //go:noinline +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func awaitGC() { type tmp struct{ v string } @@ -32,6 +34,8 @@ func awaitGC() { 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) { Init(nil) @@ -83,6 +87,8 @@ func TestPromise(t *testing.T) { awaitGC() } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func TestPromiseMarshal(t *testing.T) { Init(nil) diff --git a/gst/gst_protection.go b/gst/gst_protection.go index fa8dca2..37ca372 100644 --- a/gst/gst_protection.go +++ b/gst/gst_protection.go @@ -4,18 +4,24 @@ package gst import "C" // 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 { Meta *Meta Info *Structure } // 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 { return wrapMetaInfo(C.gst_protection_meta_get_info()) } // FilterProtectionSystemByDecryptors tterates the supplied list of 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 { gArr := gcharStrings(decryptors) 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 // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func SelectProtectionSystem(decryptors []string) string { gArr := gcharStrings(decryptors) defer C.g_free((C.gpointer)(gArr)) diff --git a/gst/gst_query.go b/gst/gst_query.go index 9111429..04c0e0a 100644 --- a/gst/gst_query.go +++ b/gst/gst_query.go @@ -10,15 +10,21 @@ import ( ) // 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 { ptr *C.GstQuery } // 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) } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FromGstQueryUnsafeNone(query unsafe.Pointer) *Query { q := ToGstQuery(query) 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. // 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 { q := ToGstQuery(query) 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 // 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)) } // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_accept_caps(caps.Instance()))) } // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_allocation( 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewBitrateQuery() *Query { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_bitrate())) } // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_buffering( 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 // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_caps(caps.Instance()))) } // 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 { cName := C.CString(ctxType) 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 // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_convert( 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. +// +// 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_custom( 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewDrainQuery() *Query { 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 // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_duration(C.GstFormat(format)))) } // 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 { 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 // 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 { 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 // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_position(C.GstFormat(format)))) } // 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 { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_scheduling())) } // 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 { 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 // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewURIQuery() *Query { return FromGstQueryUnsafeFull(unsafe.Pointer(C.gst_query_new_uri())) } // 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)) } // 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) { C.gst_query_add_allocation_meta(q.Instance(), (C.GType)(api), structure.Instance()) } // 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) { C.gst_query_add_allocation_param(q.Instance(), allocator.Instance(), params.Instance()) } // 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) { C.gst_query_add_allocation_pool( 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. +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) AddSchedulingMode(mode PadMode) { C.gst_query_add_scheduling_mode(q.Instance(), C.GstPadMode(mode)) } // 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 { 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 // 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) { var out C.guint 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) GetNumAllocationMetas() uint { 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 // 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) GetNumAllocationPools() uint { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) GetNumBufferingRanges() uint { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) GetNumSchedulingModes() uint { return uint(C.gst_query_get_n_scheduling_modes(q.Instance())) } // 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 { return wrapStructure(C.gst_query_get_structure(q.Instance())) } // 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 { 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. +// +// 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 { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseAcceptCaps() *Caps { caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseAcceptCapsResult() bool { var out C.gboolean C.gst_query_parse_accept_caps_result(q.Instance(), &out) @@ -258,6 +338,8 @@ func (q *Query) ParseAcceptCapsResult() bool { } // 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) { gcaps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseBitrate() uint { var out C.guint 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 // 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) { var gb C.gboolean var gp C.gint @@ -282,6 +368,8 @@ func (q *Query) ParseBufferingPercent() (busy bool, percent int) { } // 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) { var gformat C.GstFormat 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. +// +// 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) { var gmode C.GstBufferingMode 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseCaps() *Caps { caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseCapsResult() *Caps { caps := (*C.GstCaps)(C.malloc(C.sizeof_GstCaps)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseContext() *Context { var _ctx *C.GstContext 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. +// +// 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) { tPtr := C.malloc(C.sizeof_char * 1024) defer C.free(unsafe.Pointer(tPtr)) @@ -332,6 +430,8 @@ func (q *Query) ParseContextType() (ok bool, ctxType string) { } // 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) { var gsrcf, gdestf C.GstFormat var gsval, gdval C.gint64 @@ -340,6 +440,8 @@ func (q *Query) ParseConvert() (srcformat, destFormat Format, srcValue, destValu } // 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) { var gf C.GstFormat var gd C.gint64 @@ -348,6 +450,8 @@ func (q *Query) ParseDuration() (format Format, duration int64) { } // 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) { var min, max C.GstClockTime 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseNumFormats() uint { var out C.guint 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. +// +// 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) { var gs *C.GstStructure 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. +// +// 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) { var alloc *C.GstAllocator var params C.GstAllocationParams @@ -378,6 +488,8 @@ func (q *Query) ParseAllocationParamAt(idx uint) (*Allocator, *AllocationParams) } // 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) { var gpool *C.GstBufferPool 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. +// +// 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) { var gstart, gstop C.gint64 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, // 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 { var out C.GstFormat 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. +// +// 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 { 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. +// +// 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) { var gf C.GstFormat var out C.gint64 @@ -414,6 +534,8 @@ func (q *Query) ParsePosition() (format Format, cur int64) { } // 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) { var gf C.GstSchedulingFlags var gmin, gmax, galign C.gint @@ -422,6 +544,8 @@ func (q *Query) ParseScheduling() (flags SchedulingFlags, minSize, maxSize, alig } // 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) { var gs, ge C.gint64 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. +// +// 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) { var gs, ge C.gint64 var f C.GstFormat @@ -440,6 +566,8 @@ func (q *Query) ParseSegment() (rate float64, format Format, start, stop int64) } // 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 { tPtr := C.malloc(C.sizeof_char * 1024) defer C.free(unsafe.Pointer(tPtr)) @@ -448,6 +576,8 @@ func (q *Query) ParseURI() string { } // 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 { tPtr := C.malloc(C.sizeof_char * 1024) 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. // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) ParseURIRedirectionPermanent() bool { var out C.gboolean 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) RemoveAllocationMetaAt(idx uint) { C.gst_query_remove_nth_allocation_meta(q.Instance(), C.guint(idx)) } // 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) { C.gst_query_remove_nth_allocation_param(q.Instance(), C.guint(idx)) } // 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) { C.gst_query_remove_nth_allocation_pool(q.Instance(), C.guint(idx)) } // 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) { 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 // 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) { 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 // 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) { C.gst_query_set_buffering_percent(q.Instance(), gboolean(busy), C.gint(percent)) } // 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) { 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. +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) SetCapsResult(caps *Caps) { C.gst_query_set_caps_result(q.Instance(), caps.Instance()) } // 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) { C.gst_query_set_context(q.Instance(), ctx.Instance()) } // 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) { 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. +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) SetFormats(formats ...Format) { gstFormats := make([]C.GstFormat, len(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. +// +// 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) { C.gst_query_set_latency(q.Instance(), gboolean(live), C.guint64(minLatency), C.guint64(maxLatency)) } // 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) { C.gst_query_set_nth_allocation_param(q.Instance(), C.guint(idx), allocator.Instance(), params.Instance()) } // 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) { 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. +// +// 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) { C.gst_query_set_position(q.Instance(), C.GstFormat(format), C.gint64(cur)) } // 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) { 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. +// +// 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) { 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 // 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. +// +// 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) { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) SetURI(uri string) { curi := C.CString(uri) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) SetURIRedirection(uri string) { curi := C.CString(uri) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) SetURIRedirectionPermanent(permanent bool) { C.gst_query_set_uri_redirection_permanent(q.Instance(), gboolean(permanent)) } // 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 { C.gst_query_ref(q.Instance()) return q } // 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() { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *Query) WritableStructure() *Structure { return wrapStructure(C.gst_query_writable_structure(q.Instance())) } diff --git a/gst/gst_registry.go b/gst/gst_registry.go index 964aa2c..d161035 100644 --- a/gst/gst_registry.go +++ b/gst/gst_registry.go @@ -14,25 +14,35 @@ import ( type Registry struct{ *Object } // 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 { return &Registry{wrapObject(glib.TransferNone(registry))} } // 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 { return &Registry{wrapObject(glib.TransferFull(registry))} } // 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 { registry := C.gst_registry_get() return FromGstRegistryUnsafeNone(unsafe.Pointer(registry)) } // 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()) } // 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) { cName := C.CString(name) 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. +// +// 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) { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) diff --git a/gst/gst_sample.go b/gst/gst_sample.go index fb135ce..0c7bf82 100644 --- a/gst/gst_sample.go +++ b/gst/gst_sample.go @@ -9,12 +9,16 @@ import ( ) // 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 { sample *C.GstSample } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FromGstSampleUnsafeNone(sample unsafe.Pointer) *Sample { s := wrapSample(C.toGstSample(sample)) 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. // 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 { s := wrapSample(C.toGstSample(sample)) runtime.SetFinalizer(s, (*Sample).Unref) @@ -31,61 +37,89 @@ func FromGstSampleUnsafeFull(sample unsafe.Pointer) *Sample { } // 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)) } // 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 { 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 // 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 { return FromGstSampleUnsafeFull(unsafe.Pointer(C.gst_sample_copy(s.Instance()))) } // 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 { return FromGstBufferUnsafeNone(unsafe.Pointer(C.gst_sample_get_buffer((*C.GstSample)(s.Instance())))) } // 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 { 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 // 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 { 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. +// +// 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())) } // 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())) } // 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()) } // 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) { C.gst_sample_set_buffer_list(s.Instance(), buf.Instance()) } // 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()) } // 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 { return gobool(C.gst_sample_set_info(s.Instance(), st.Instance())) } // 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) { C.gst_sample_set_segment(s.Instance(), segment.Instance()) } // 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())) } diff --git a/gst/gst_segment.go b/gst/gst_segment.go index db72f04..da37041 100644 --- a/gst/gst_segment.go +++ b/gst/gst_segment.go @@ -6,27 +6,37 @@ import "unsafe" // Segment is a go wrapper around a 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 { ptr *C.GstSegment } // 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 { return wrapSegment((*C.GstSegment)(segment)) } // ToGstSegment converts the given pointer into a Segment without affecting the ref count or // 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 { return wrapSegment((*C.GstSegment)(segment)) } // 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 { return wrapSegment(C.gst_segment_new()) } // 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 { segment := NewSegment() segment.SetFormat(f) @@ -34,51 +44,83 @@ func NewFormattedSegment(f Format) *Segment { } // 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 } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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) } // 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. // // 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) { var gclipStart, gclipStop C.guint64 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. +// +// 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())) } // 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) { 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, // 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) { var gupdate C.gboolean 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. +// +// 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()) } // 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) { 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. +// +// 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 { return gobool(C.gst_segment_is_equal( 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. +// +// 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 { return gobool(C.gst_segment_offset_running_time( 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 // 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 { 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. // // 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 { var position C.guint64 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. +// +// 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 { 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. // // 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 { var position C.guint64 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. +// +// 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 { return gobool(C.gst_segment_set_running_time( 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. // // 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 { 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. // // 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 { var runningTime C.guint64 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 // 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. +// +// 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 { 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. // // 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 { var streamTime C.guint64 ret := C.gst_segment_to_running_time_full(s.Instance(), C.GstFormat(format), C.guint64(position), &streamTime) diff --git a/gst/gst_stream.go b/gst/gst_stream.go index 6c486c2..8b1f9f1 100644 --- a/gst/gst_stream.go +++ b/gst/gst_stream.go @@ -13,16 +13,22 @@ import ( type Stream struct{ *Object } // 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 { return &Stream{wrapObject(glib.TransferNone(stream))} } // 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 { return &Stream{wrapObject(glib.TransferNone(stream))} } // 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 { cID := C.CString(id) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s *Stream) Instance() *C.GstStream { return C.toGstStream(s.Unsafe()) } // 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 { return FromGstCapsUnsafeFull(unsafe.Pointer(C.gst_stream_get_caps(s.Instance()))) } // 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 { return StreamFlags(C.gst_stream_get_stream_flags(s.Instance())) } // 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 { return C.GoString(C.gst_stream_get_stream_id(s.Instance())) } // 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 { return StreamType(C.gst_stream_get_stream_type(s.Instance())) } // 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 { tags := C.gst_stream_get_tags(s.Instance()) if tags == nil { @@ -65,21 +83,29 @@ func (s *Stream) Tags() *TagList { } // 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) { C.gst_stream_set_caps(s.Instance(), caps.Instance()) } // 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) { C.gst_stream_set_stream_flags(s.Instance(), C.GstStreamFlags(flags)) } // 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) { C.gst_stream_set_stream_type(s.Instance(), C.GstStreamType(sType)) } // 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) { C.gst_stream_set_tags(s.Instance(), tags.Instance()) } diff --git a/gst/gst_stream_collection.go b/gst/gst_stream_collection.go index 387109c..20e56a8 100644 --- a/gst/gst_stream_collection.go +++ b/gst/gst_stream_collection.go @@ -14,17 +14,23 @@ import ( type StreamCollection struct{ *Object } // 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 { return &StreamCollection{wrapObject(glib.TransferNone(stream))} } // 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 { return &StreamCollection{wrapObject(glib.TransferFull(stream))} } // NewStreamCollection returns a new StreamCollection with an upstream parent // 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 { cID := C.CString(upstreamID) defer C.free(unsafe.Pointer(cID)) @@ -33,11 +39,15 @@ func NewStreamCollection(upstreamID string) *StreamCollection { } // 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 { return C.toGstStreamCollection(s.Unsafe()) } // 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 { 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()) @@ -46,17 +56,23 @@ func (s *StreamCollection) AddStream(stream *Stream) error { } // 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 { return uint(C.gst_stream_collection_get_size(s.Instance())) } // 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 { stream := C.gst_stream_collection_get_stream(s.Instance(), C.guint(idx)) return FromGstStreamUnsafeNone(unsafe.Pointer(stream)) } // 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 { return C.GoString(C.gst_stream_collection_get_upstream_id(s.Instance())) } diff --git a/gst/gst_structure.go b/gst/gst_structure.go index 05f6c3f..d0ea9ec 100644 --- a/gst/gst_structure.go +++ b/gst/gst_structure.go @@ -26,12 +26,16 @@ import ( ) // 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 { ptr unsafe.Pointer gType glib.Type } // 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 { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) @@ -40,6 +44,8 @@ func NewStructure(name string) *Structure { } // 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 { cStr := C.CString(stStr) 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 // 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 { typeOf := reflect.TypeOf(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 // 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 { return wrapStructure((*C.GstStructure)(st)) } // UnmarshalInto will unmarshal this structure into the given pointer. The object // 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 { rv := reflect.ValueOf(data) if rv.Kind() != reflect.Ptr || rv.IsNil() { @@ -101,6 +113,8 @@ func (s *Structure) UnmarshalInto(data interface{}) error { } // 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 { if s == nil { return nil @@ -110,9 +124,13 @@ func (s *Structure) Instance() *C.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()) } // 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 { str := C.gst_structure_to_string(s.Instance()) defer C.g_free((C.gpointer)(str)) @@ -120,16 +138,22 @@ func (s *Structure) String() string { } // 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 { return C.GoString(C.gst_structure_get_name(s.Instance())) } // 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 { return int(C.gst_structure_n_fields(s.Instance())) } // 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 { gVal, err := glib.GValue(value) if err != nil { @@ -142,6 +166,8 @@ func (s *Structure) SetValue(key string, value interface{}) error { } // 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) { cKey := C.CString(key) 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, // 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) { cKey := C.CString(key) 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 // 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{} { out := make(map[string]interface{}) resCh := make(chan interface{}) @@ -191,11 +221,15 @@ var TypeStructure = glib.Type(C.gst_structure_get_type()) 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 { return C.gst_structure_copy(s.Instance()) } // 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) { val, err := glib.ValueInit(TypeStructure) if err != nil { @@ -213,11 +247,15 @@ func (s *Structure) ToGValue() (*glib.Value, error) { } // 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) { c := C.gst_value_get_structure(toGValue(p)) 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 { return &Structure{ 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. // 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 { 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 // 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 { s := wrapStructure(st) diff --git a/gst/gst_system_clock.go b/gst/gst_system_clock.go index 66f7514..f51c24e 100644 --- a/gst/gst_system_clock.go +++ b/gst/gst_system_clock.go @@ -28,6 +28,8 @@ const ( ) // 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 { 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 // // 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) { clockObj, err := glib.NewObjectWithProperties(TYPE_SYSTEM_CLOCK, map[string]any{ "clock-type": clockType, diff --git a/gst/gst_tag_list.go b/gst/gst_tag_list.go index a30389a..dfe5054 100644 --- a/gst/gst_tag_list.go +++ b/gst/gst_tag_list.go @@ -24,12 +24,16 @@ import ( // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type TagList struct { ptr *C.GstTagList } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FromGstTagListUnsafeNone(tags unsafe.Pointer) *TagList { tl := wrapTagList(C.toGstTagList(tags)) 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. // 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 { tl := wrapTagList(C.toGstTagList(tags)) runtime.SetFinalizer(tl, (*TagList).Unref) @@ -50,12 +56,16 @@ func FromGstTagListUnsafeFull(tags unsafe.Pointer) *TagList { // tagList := gst.NewEmptyTagList() // fmt.Println(tagList.IsEmpty()) // // true +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewEmptyTagList() *TagList { 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 // 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 { ctags := C.CString(tags) defer C.free(unsafe.Pointer(ctags)) @@ -67,9 +77,13 @@ func NewTagListFromString(tags string) *TagList { } // 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)) } // 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 { cStr := C.gst_tag_list_to_string(t.Instance()) 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. +// +// 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())) } // Unref decreses the ref count on this TagList by one. When the ref count reaches zero, the object // 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()) } // 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) // fmt.Println(myAlbum) // // 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{}) { ctag := C.CString(string(tag)) 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. // 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{}) { for _, val := range vals { 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, // 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 { 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 : 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) { ptr := gopointer.Save(f) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // 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) { ctag := C.CString(string(tag)) 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. +// +// 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) { ctag := C.CString(string(tag)) 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 // to a go type. It is safer to use the other functions provided when you know the expected // 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{} { ctag := C.CString(string(tag)) 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. +// +// 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())) } // 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 { cStr := C.CString(tagKey) 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. +// +// 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) { C.gst_tag_list_insert(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode)) } // 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())) } // 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 { return gobool(C.gst_tag_list_is_equal(t.Instance(), tagList.Instance())) } // 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())) } // 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 { return FromGstTagListUnsafeFull(unsafe.Pointer(C.makeTagListWritable(t.Instance()))) } // 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 { return FromGstTagListUnsafeFull(unsafe.Pointer(C.gst_tag_list_merge( 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 +// +// 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())) } // 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 { 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. +// +// 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) { ctag := C.CString(string(tag)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (t *TagList) RemoveTag(tag Tag) { ctag := C.CString(string(tag)) 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (t *TagList) SetScope(scope TagScope) { C.gst_tag_list_set_scope(t.Instance(), C.GstTagScope(scope)) } diff --git a/gst/gst_tag_setter.go b/gst/gst_tag_setter.go index 6d1c15e..8dcb6f8 100644 --- a/gst/gst_tag_setter.go +++ b/gst/gst_tag_setter.go @@ -14,10 +14,16 @@ var InterfaceTagSetter glib.Interface = &interfaceTagSetter{} 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) } +// +// 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) {} // 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 { // Returns the current list of tags the setter uses. The list should not be modified or freed. GetTagList() *TagList @@ -36,13 +42,19 @@ type TagSetter interface { } // 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 { ptr *C.GstElement } // 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) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (t *gstTagSetter) GetTagList() *TagList { tagList := C.gst_tag_setter_get_tag_list(t.Instance()) if tagList == nil { @@ -51,6 +63,8 @@ func (t *gstTagSetter) GetTagList() *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{}) { ckey := C.CString(string(tagKey)) 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) { 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() { 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 { 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) { C.gst_tag_setter_set_tag_merge_mode(t.Instance(), C.GstTagMergeMode(mergeMode)) } diff --git a/gst/gst_toc.go b/gst/gst_toc.go index fb14452..1e36f4c 100644 --- a/gst/gst_toc.go +++ b/gst/gst_toc.go @@ -8,12 +8,16 @@ import ( ) // 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 { ptr *C.GstToc } // 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FromGstTOCUnsafeNone(toc unsafe.Pointer) *TOC { gotoc := wrapTOC((*C.GstToc)(toc)) 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. // 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 { gotoc := wrapTOC((*C.GstToc)(toc)) runtime.SetFinalizer(gotoc, (*TOC).Unref) @@ -30,6 +36,8 @@ func FromGstTOCUnsafeFull(toc unsafe.Pointer) *TOC { } // 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 { toc := C.gst_toc_new(C.GstTocScope(scope)) if toc == nil { @@ -39,40 +47,56 @@ func NewTOC(scope TOCScope) *TOC { } // 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 } // 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 { C.tocRef(t.Instance()) return t } // 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() { C.tocUnref(t.Instance()) } // 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 { return FromGstTOCUnsafeFull(unsafe.Pointer(C.makeTocWritable(t.Instance()))) } // 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 { return FromGstTOCUnsafeFull(unsafe.Pointer(C.copyToc(t.Instance()))) } // 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) { C.gst_toc_append_entry(t.Instance(), entry.Instance()) } // 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() { C.gst_toc_dump(t.Instance()) } // 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 { cuid := C.CString(uid) defer C.free(unsafe.Pointer(cuid)) @@ -84,6 +108,8 @@ func (t *TOC) FindEntry(uid string) *TOCEntry { } // 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 { gList := C.gst_toc_get_entries(t.Instance()) @@ -101,11 +127,15 @@ func (t *TOC) GetEntries() []*TOCEntry { } // 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 { return TOCScope(C.gst_toc_get_scope(t.Instance())) } // 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 { tagList := C.gst_toc_get_tags(t.Instance()) if tagList == nil { @@ -115,21 +145,29 @@ func (t *TOC) GetTags() *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) { C.gst_toc_merge_tags(t.Instance(), tagList.Instance(), C.GstTagMergeMode(mergeMode)) } // 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) { C.gst_toc_set_tags(t.Instance(), tagList.Ref().Instance()) } // 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 { ptr *C.GstTocEntry } // 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 { t := wrapTOCEntry((*C.GstTocEntry)(entry)) t.Ref() @@ -138,6 +176,8 @@ func FromGstTocEntryUnsafeNone(entry unsafe.Pointer) *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 { t := wrapTOCEntry((*C.GstTocEntry)(entry)) 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. +// +// 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 { cuid := C.CString(uid) defer C.free(unsafe.Pointer(cuid)) @@ -159,45 +201,63 @@ func NewTOCEntry(entryType TOCEntryType, uid string) *TOCEntry { } // 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 } // 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 { C.tocEntryRef(t.Instance()) return t } // 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() { C.tocEntryUnref(t.Instance()) } // 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 { return FromGstTocEntryUnsafeFull(unsafe.Pointer(C.makeTocEntryWritable(t.Instance()))) } // 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 { return FromGstTocEntryUnsafeFull(unsafe.Pointer(C.copyTocEntry(t.Instance()))) } // 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) { C.gst_toc_entry_append_sub_entry(t.Instance(), subEntry.Ref().Instance()) } // 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 { return TOCEntryType(C.gst_toc_entry_get_entry_type(t.Instance())) } // 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 { 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. +// +// 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) { var loopType C.GstTocLoopType var repeatCount C.gint @@ -206,6 +266,8 @@ func (t *TOCEntry) GetLoop() (bool, TOCLoopType, int) { } // 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 { parent := C.gst_toc_entry_get_parent(t.Instance()) if parent == nil { @@ -215,6 +277,8 @@ func (t *TOCEntry) GetParent() *TOCEntry { } // 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) { var start, stop C.gint64 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (t *TOCEntry) GetSubEntries() []*TOCEntry { 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. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (t *TOCEntry) GetTags() *TagList { tagList := C.gst_toc_entry_get_tags(t.Instance()) if tagList == nil { @@ -248,6 +316,8 @@ func (t *TOCEntry) GetTags() *TagList { } // 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 { toc := C.gst_toc_entry_get_toc(t.Instance()) if toc == nil { @@ -257,21 +327,29 @@ func (t *TOCEntry) GetTOC() *TOC { } // 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 { return C.GoString(C.gst_toc_entry_get_uid(t.Instance())) } // 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 { return gobool(C.gst_toc_entry_is_alternative(t.Instance())) } // 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 { return gobool(C.gst_toc_entry_is_sequence(t.Instance())) } // 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) { if tagList == nil { 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. +// +// 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) { 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. +// +// 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) { C.gst_toc_entry_set_start_stop_times(t.Instance(), C.gint64(startTime), C.gint64(stopTime)) } // 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) { C.gst_toc_entry_set_tags(t.Instance(), tagList.Ref().Instance()) } diff --git a/gst/gst_toc_setter.go b/gst/gst_toc_setter.go index 1251c14..b3b1bf0 100644 --- a/gst/gst_toc_setter.go +++ b/gst/gst_toc_setter.go @@ -13,6 +13,8 @@ import ( var InterfaceTOCSetter = glib.Type(C.GST_TYPE_TOC_SETTER) // 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 { // Return current TOC the setter uses. The TOC should not be modified without making it writable first. GetTOC() *TOC @@ -23,14 +25,20 @@ type TOCSetter interface { } // 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 { 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 { 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 { toc := C.gst_toc_setter_get_toc(g.Instance()) if toc == nil { @@ -39,5 +47,9 @@ func (g *gstTOCSetter) GetTOC() *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()) } +// +// 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()) } diff --git a/gst/gst_tracer.go b/gst/gst_tracer.go index 7eab022..09c1535 100644 --- a/gst/gst_tracer.go +++ b/gst/gst_tracer.go @@ -8,10 +8,14 @@ import ( "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 { *Object } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func TracingGetActiveTracers() []*Tracer { cglist := C.gst_tracing_get_active_tracers() diff --git a/gst/gst_uri_handler.go b/gst/gst_uri_handler.go index 1642414..f232676 100644 --- a/gst/gst_uri_handler.go +++ b/gst/gst_uri_handler.go @@ -35,7 +35,11 @@ var InterfaceURIHandler glib.Interface = &interfaceURIHandler{} 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) } +// +// 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) { globalURIHdlr = instance.GoType.(URIHandler) 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 // capabilities. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type URIHandler interface { // GetURI gets the currently handled URI. GetURI() string @@ -55,15 +61,21 @@ type URIHandler interface { } // 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 { 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 { return C.toGstURIHandler(unsafe.Pointer(g.ptr)) } // 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 { ret := C.gst_uri_handler_get_uri(g.Instance()) if ret == nil { @@ -74,12 +86,16 @@ func (g *gstURIHandler) GetURI() string { } // 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 { ty := C.gst_uri_handler_get_uri_type((*C.GstURIHandler)(g.Instance())) return URIType(ty) } // 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 { protocols := C.gst_uri_handler_get_protocols((*C.GstURIHandler)(g.Instance())) if protocols == nil { @@ -90,6 +106,8 @@ func (g *gstURIHandler) GetProtocols() []string { } // 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) { curi := C.CString(uri) defer C.free(unsafe.Pointer(curi)) diff --git a/gst/gst_uri_handler_exports.go b/gst/gst_uri_handler_exports.go index 7826540..33cd60a 100644 --- a/gst/gst_uri_handler_exports.go +++ b/gst/gst_uri_handler_exports.go @@ -13,11 +13,15 @@ import ( ) //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 { return C.GstURIType(globalURIHdlr.GetURIType()) } //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 { protocols := globalURIHdlr.GetProtocols() size := C.size_t(unsafe.Sizeof((*C.gchar)(nil))) @@ -31,6 +35,8 @@ func goURIHdlrGetProtocols(gtype C.GType) **C.gchar { } //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 { var uri string subclass := glib.FromObjectUnsafePrivate(unsafe.Pointer(hdlr)) @@ -43,6 +49,8 @@ func goURIHdlrGetURI(hdlr *C.GstURIHandler) *C.gchar { } //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 { var ok bool var err error diff --git a/gst/gst_values.go b/gst/gst_values.go index 20013cb..44a84d1 100644 --- a/gst/gst_values.go +++ b/gst/gst_values.go @@ -31,6 +31,8 @@ import ( ) // ValuesCanCompare determines if val1 and val2 can be compared. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValuesCanCompare(val1, val2 *glib.Value) bool { return gobool(C.gst_value_can_compare( (*C.GValue)(unsafe.Pointer(val1.GValue)), @@ -41,6 +43,8 @@ func ValuesCanCompare(val1, val2 *glib.Value) bool { // ValuesCanIntersect determines if intersecting two values will return // a valid result. Two values will produce a valid intersection if they // are the same type. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValuesCanIntersect(val1, val2 *glib.Value) bool { return gobool(C.gst_value_can_intersect( (*C.GValue)(unsafe.Pointer(val1.GValue)), @@ -49,6 +53,8 @@ func ValuesCanIntersect(val1, val2 *glib.Value) bool { } // ValuesCanSubtract checks if it's possible to subtract subtrahend from minuend. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValuesCanSubtract(minuend, subtrahend *glib.Value) bool { return gobool(C.gst_value_can_intersect( (*C.GValue)(unsafe.Pointer(minuend.GValue)), @@ -62,6 +68,8 @@ func ValuesCanSubtract(minuend, subtrahend *glib.Value) bool { // integer range and an integer can be unioned if the integer is a subset of the // integer range. If there is the possibility that two values can be unioned, this // function returns TRUE. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValuesCanUnion(val1, val2 *glib.Value) bool { return gobool(C.gst_value_can_union( (*C.GValue)(unsafe.Pointer(val1.GValue)), @@ -84,6 +92,8 @@ const ( // ValueCompare compares value1 and value2. If value1 and value2 cannot be compared, the function // returns ValueUnordered. Otherwise, if value1 is greater than value2, ValueGreaterThan is returned. // If value1 is less than value2, ValueLessThan is returned. If the values are equal, ValueEqual is returned. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueCompare(value1, value2 *glib.Value) ValueCmp { return ValueCmp(C.gst_value_compare( (*C.GValue)(unsafe.Pointer(value1.GValue)), @@ -93,6 +103,8 @@ func ValueCompare(value1, value2 *glib.Value) ValueCmp { // ValueDeserialize tries to deserialize a string into a glib.Value of the type specified. If the operation succeeds, // TRUE is returned, FALSE otherwise. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueDeserialize(data string, t glib.Type) (value *glib.Value, ok bool) { value, err := glib.ValueInit(t) if err != nil { @@ -108,6 +120,8 @@ func ValueDeserialize(data string, t glib.Type) (value *glib.Value, ok bool) { // ValueFixate fixates src into a new value dest. For ranges, the first element is taken. For lists and arrays, the first item // is fixated and returned. If src is already fixed, this function returns FALSE. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueFixate(src *glib.Value, dest *glib.Value) (ok bool) { return gobool(C.gst_value_fixate( (*C.GValue)(unsafe.Pointer(dest.GValue)), @@ -117,6 +131,8 @@ func ValueFixate(src *glib.Value, dest *glib.Value) (ok bool) { // ValueFractionMultiply multiplies the two GValue items containing a TypeFraction and returns the product. // This function can return false if any error occurs, such as in memory allocation or an integer overflow. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueFractionMultiply(factor1, factor2 *glib.Value) (product *glib.Value, ok bool) { out, err := glib.ValueInit(TypeFraction) if err != nil { @@ -131,6 +147,8 @@ func ValueFractionMultiply(factor1, factor2 *glib.Value) (product *glib.Value, o // ValueFractionSubtract subtracts the subtrahend from the minuend containing a TypeFraction and returns the result. // This function can return false if any error occurs, such as in memory allocation or an integer overflow. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueFractionSubtract(minuend, subtrahend *glib.Value) (result *glib.Value, ok bool) { out, err := glib.ValueInit(TypeFraction) if err != nil { @@ -144,6 +162,8 @@ func ValueFractionSubtract(minuend, subtrahend *glib.Value) (result *glib.Value, } // ValueGetCaps gets the caps from the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetCaps(value *glib.Value) *Caps { caps := C.gst_value_get_caps((*C.GValue)(unsafe.Pointer(value.GValue))) if caps == nil { @@ -153,6 +173,8 @@ func ValueGetCaps(value *glib.Value) *Caps { } // ValueGetCapsFeatures gets the caps features from the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetCapsFeatures(value *glib.Value) *CapsFeatures { feats := C.gst_value_get_caps_features((*C.GValue)(unsafe.Pointer(value.GValue))) if feats == nil { @@ -164,6 +186,8 @@ func ValueGetCapsFeatures(value *glib.Value) *CapsFeatures { // ValueIntersect calculates the intersection of two values. If the values have a non-empty intersection, // the value representing the intersection isreturned. Otherwise this function returns false. This function // can also return false for any allocation errors. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueIntersect(value1, value2 *glib.Value) (*glib.Value, bool) { out, err := glib.ValueAlloc() if err != nil { @@ -178,11 +202,15 @@ func ValueIntersect(value1, value2 *glib.Value) (*glib.Value, bool) { // ValueIsFixed tests if the given GValue, if available in a Structure (or any other container) contains a "fixed" // (which means: one value) or an "unfixed" (which means: multiple possible values, such as data lists or data ranges) value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueIsFixed(value *glib.Value) bool { return gobool(C.gst_value_is_fixed((*C.GValue)(unsafe.Pointer(value.GValue)))) } // ValueIsSubset checks that value1 is a subset of value2. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueIsSubset(value1, value2 *glib.Value) bool { return gobool(C.gst_value_is_subset( (*C.GValue)(unsafe.Pointer(value1.GValue)), @@ -192,6 +220,8 @@ func ValueIsSubset(value1, value2 *glib.Value) bool { // ValueSerialize attempts to serialize the given value into a string. An empty string is returned if // no serializer exists. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueSerialize(value *glib.Value) string { str := C.gst_value_serialize(((*C.GValue)(unsafe.Pointer(value.GValue)))) if str == nil { @@ -204,6 +234,8 @@ func ValueSerialize(value *glib.Value) string { // ValueSubtract subtracts subtrahend from minuend and returns the resule. Note that this means subtraction // as in sets, not as in mathematics. This function can return false if the subtraction is empty or any error // occurs. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueSubtract(minuend, subtrahend *glib.Value) (*glib.Value, bool) { out, err := glib.ValueAlloc() if err != nil { @@ -217,6 +249,8 @@ func ValueSubtract(minuend, subtrahend *glib.Value) (*glib.Value, bool) { } // ValueUnion creates a GValue corresponding to the union of value1 and value2. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueUnion(value1, value2 *glib.Value) (*glib.Value, bool) { out, err := glib.ValueAlloc() if err != nil { @@ -236,11 +270,15 @@ var TypeBitmask = glib.Type(C.gst_bitmask_get_type()) type Bitmask uint64 // ValueGetBitmask gets the bitmask from the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetBitmask(value *glib.Value) Bitmask { return Bitmask(C.gst_value_get_bitmask((*C.GValue)(unsafe.Pointer(value.GValue)))) } // ToGValue implements a glib.ValueTransformer +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (b Bitmask) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(TypeBitmask) if err != nil { @@ -257,6 +295,8 @@ func (b Bitmask) ToGValue() (*glib.Value, error) { var TypeFraction = glib.Type(C.gst_fraction_get_type()) // FractionValue is a helper structure for building fractions for functions that require them. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type FractionValue struct { num, denom int } @@ -264,11 +304,15 @@ type FractionValue struct { var _ glib.ValueTransformer = &FractionValue{} // Fraction returns a new GFraction with the given numerator and denominator. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func Fraction(numerator, denominator int) *FractionValue { return &FractionValue{num: numerator, denom: denominator} } // ValueGetFraction returns the fraction inside the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetFraction(value *glib.Value) *FractionValue { return &FractionValue{ num: int(C.gst_value_get_fraction_numerator((*C.GValue)(unsafe.Pointer(value.GValue)))), @@ -277,15 +321,23 @@ func ValueGetFraction(value *glib.Value) *FractionValue { } // Num returns the fraction's numerator. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionValue) Num() int { return g.num } // Denom returns the fraction's denominator. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionValue) Denom() int { return g.denom } // String returns a string representation of the fraction. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionValue) String() string { return fmt.Sprintf("%d/%d", g.num, g.denom) } // ToGValue implements a glib.ValueTransformer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionValue) ToGValue() (*glib.Value, error) { v, err := glib.ValueInit(TypeFraction) if err != nil { @@ -302,6 +354,8 @@ func (g *FractionValue) ToGValue() (*glib.Value, error) { var TypeFractionRange = glib.Type(C.gst_fraction_range_get_type()) // FractionRangeValue represents a GstFractionRange. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type FractionRangeValue struct { start, end *FractionValue } @@ -309,11 +363,15 @@ type FractionRangeValue struct { var _ glib.ValueTransformer = &FractionRangeValue{} // FractionRange returns a new GstFractionRange. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func FractionRange(start, end *FractionValue) *FractionRangeValue { return &FractionRangeValue{start: start, end: end} } // ValueGetFractionRange returns the range inside the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetFractionRange(value *glib.Value) *FractionRangeValue { start := C.gst_value_get_fraction_range_min((*C.GValue)(unsafe.Pointer(value.GValue))) end := C.gst_value_get_fraction_range_max((*C.GValue)(unsafe.Pointer(value.GValue))) @@ -324,17 +382,25 @@ func ValueGetFractionRange(value *glib.Value) *FractionRangeValue { } // Start returns the start of the range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionRangeValue) Start() *FractionValue { return g.start } // End returns the end of the range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionRangeValue) End() *FractionValue { return g.end } // String returns a string representation of the range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionRangeValue) String() string { return fmt.Sprintf("%s - %s", g.Start().String(), g.End().String()) } // ToGValue implements a glib.ValueTransformer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (g *FractionRangeValue) ToGValue() (*glib.Value, error) { v, err := glib.ValueInit(TypeFractionRange) if err != nil { @@ -353,6 +419,8 @@ func (g *FractionRangeValue) ToGValue() (*glib.Value, error) { var TypeFloat64Range = glib.Type(C.gst_double_range_get_type()) // Float64RangeValue is the go wrapper around a GstDoubleRange value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Float64RangeValue struct { start, end float64 } @@ -360,6 +428,8 @@ type Float64RangeValue struct { var _ glib.ValueTransformer = &Float64RangeValue{} // ValueGetFloat64Range returns the range from inside this value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetFloat64Range(value *glib.Value) *Float64RangeValue { return &Float64RangeValue{ start: float64(C.gst_value_get_double_range_min((*C.GValue)(unsafe.Pointer(value.GValue)))), @@ -368,20 +438,30 @@ func ValueGetFloat64Range(value *glib.Value) *Float64RangeValue { } // Float64Range returns a new Float64RangeValue. This is the equivalent of a double range value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func Float64Range(start, end float64) *Float64RangeValue { return &Float64RangeValue{start: start, end: end} } // Start returns the start for this range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *Float64RangeValue) Start() float64 { return f.start } // End returns the end for this range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *Float64RangeValue) End() float64 { return f.end } // String returns a string representation of the range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *Float64RangeValue) String() string { return fmt.Sprintf("%v - %v", f.Start(), f.End()) } // 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 *Float64RangeValue) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(TypeFloat64Range) if err != nil { @@ -399,6 +479,8 @@ func (f *Float64RangeValue) ToGValue() (*glib.Value, error) { var TypeFlagset = glib.Type(C.gst_flagset_get_type()) // FlagsetValue is the go wrapper around a GstFlagSet value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type FlagsetValue struct { flags, mask uint } @@ -406,6 +488,8 @@ type FlagsetValue struct { var _ glib.ValueTransformer = &FlagsetValue{} // ValueGetFlagset returns the flagset inside his value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetFlagset(value *glib.Value) *FlagsetValue { return &FlagsetValue{ flags: uint(C.gst_value_get_flagset_flags((*C.GValue)(unsafe.Pointer(value.GValue)))), @@ -415,17 +499,25 @@ func ValueGetFlagset(value *glib.Value) *FlagsetValue { // Flagset returns a new FlagsetValue. The flags value indicates the values of flags, // the mask represents which bits in the flag value have been set, and which are "don't care". +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func Flagset(flags, mask uint) *FlagsetValue { return &FlagsetValue{flags: flags, mask: mask} } // Flags returns the flags for this flagset. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FlagsetValue) Flags() uint { return f.flags } // Mask returns the mask for this flagset. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FlagsetValue) Mask() uint { return f.mask } // 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 *FlagsetValue) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(TypeFlagset) if err != nil { @@ -443,6 +535,8 @@ func (f *FlagsetValue) ToGValue() (*glib.Value, error) { var TypeInt64Range = glib.Type(C.gst_int64_range_get_type()) // Int64RangeValue represents a GstInt64Range. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Int64RangeValue struct { start, end, step int64 } @@ -450,6 +544,8 @@ type Int64RangeValue struct { var _ glib.ValueTransformer = &Int64RangeValue{} // Int64Range returns a new Int64RangeValue. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func Int64Range(start, end, step int64) *Int64RangeValue { return &Int64RangeValue{ start: start, end: end, step: step, @@ -457,6 +553,8 @@ func Int64Range(start, end, step int64) *Int64RangeValue { } // ValueGetInt64Range gets the int64 range from the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetInt64Range(value *glib.Value) *Int64RangeValue { return &Int64RangeValue{ start: int64(C.gst_value_get_int64_range_min((*C.GValue)(unsafe.Pointer(value.GValue)))), @@ -466,20 +564,30 @@ func ValueGetInt64Range(value *glib.Value) *Int64RangeValue { } // Start returns the start of the range +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Int64RangeValue) Start() int64 { return i.start } // End returns the end of the range +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Int64RangeValue) End() int64 { return i.end } // Step returns the step of the range +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Int64RangeValue) Step() int64 { return i.step } // String implements a Stringer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Int64RangeValue) String() string { return fmt.Sprintf("%d - %d (%d)", i.Start(), i.End(), i.Step()) } // ToGValue implements a glib.ValueTransformer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Int64RangeValue) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(TypeInt64Range) if err != nil { @@ -498,6 +606,8 @@ func (i *Int64RangeValue) ToGValue() (*glib.Value, error) { var TypeIntRange = glib.Type(C.gst_int_range_get_type()) // IntRangeValue represents a GstIntRange. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type IntRangeValue struct { start, end, step int } @@ -505,6 +615,8 @@ type IntRangeValue struct { var _ glib.ValueTransformer = &Int64RangeValue{} // IntRange returns a new IntRangeValue. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func IntRange(start, end, step int) *IntRangeValue { return &IntRangeValue{ start: start, end: end, step: step, @@ -512,6 +624,8 @@ func IntRange(start, end, step int) *IntRangeValue { } // ValueGetIntRange gets the int range from the given value. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueGetIntRange(value *glib.Value) *IntRangeValue { return &IntRangeValue{ start: int(C.gst_value_get_int_range_min((*C.GValue)(unsafe.Pointer(value.GValue)))), @@ -521,20 +635,30 @@ func ValueGetIntRange(value *glib.Value) *IntRangeValue { } // Start returns the start of the range +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *IntRangeValue) Start() int { return i.start } // End returns the end of the range +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *IntRangeValue) End() int { return i.end } // Step returns the step of the range +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *IntRangeValue) Step() int { return i.step } // String implements a Stringer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *IntRangeValue) String() string { return fmt.Sprintf("%d - %d (%d)", i.Start(), i.End(), i.Step()) } // ToGValue implements a glib.ValueTransformer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *IntRangeValue) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(TypeIntRange) if err != nil { @@ -557,6 +681,8 @@ type ValueArrayValue glib.Value // ValueArray converts the given slice of Go types into a ValueArrayValue. // This function can return nil on any conversion or memory allocation errors. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueArray(ss []interface{}) *ValueArrayValue { v, err := glib.ValueAlloc() if err != nil { @@ -581,11 +707,15 @@ func ValueArray(ss []interface{}) *ValueArrayValue { } // Size returns the size of the array. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueArrayValue) Size() uint { return uint(C.gst_value_array_get_size((*C.GValue)(unsafe.Pointer(v.GValue)))) } // ValueAt returns the value at the index in the array, or nil on any error. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueArrayValue) ValueAt(idx uint) interface{} { gval := C.gst_value_array_get_value( (*C.GValue)(unsafe.Pointer(v.GValue)), @@ -602,6 +732,8 @@ func (v *ValueArrayValue) ValueAt(idx uint) interface{} { } // ToGValue implements a glib.ValueTransformer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueArrayValue) ToGValue() (*glib.Value, error) { out := glib.Value(*v) return &out, nil @@ -615,6 +747,8 @@ type ValueListValue glib.Value // ValueList converts the given slice of Go types into a ValueListValue. // This function can return nil on any conversion or memory allocation errors. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ValueList(ss []interface{}) *ValueListValue { v, err := glib.ValueAlloc() if err != nil { @@ -638,11 +772,15 @@ func ValueList(ss []interface{}) *ValueListValue { } // Size returns the size of the list. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueListValue) Size() uint { return uint(C.gst_value_list_get_size((*C.GValue)(unsafe.Pointer(v.GValue)))) } // ValueAt returns the value at the index in the lise, or nil on any error. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueListValue) ValueAt(idx uint) interface{} { gval := C.gst_value_list_get_value( (*C.GValue)(unsafe.Pointer(v.GValue)), @@ -661,6 +799,8 @@ func (v *ValueListValue) ValueAt(idx uint) interface{} { // Concat concatenates copies of this list and value into a new list. Values that are not of type // TypeValueList are treated as if they were lists of length 1. dest will be initialized to the type // TypeValueList. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueListValue) Concat(value *ValueListValue) *ValueListValue { out, err := glib.ValueAlloc() if err != nil { @@ -680,6 +820,8 @@ func (v *ValueListValue) Concat(value *ValueListValue) *ValueListValue { // // The result will be put into a new value and will either be a list that will not contain any duplicates, // or a non-list type (if the lists were equal). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueListValue) Merge(value *ValueListValue) *ValueListValue { out, err := glib.ValueAlloc() if err != nil { @@ -695,6 +837,8 @@ func (v *ValueListValue) Merge(value *ValueListValue) *ValueListValue { } // ToGValue implements a glib.ValueTransformer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (v *ValueListValue) ToGValue() (*glib.Value, error) { val := (*glib.Value)(v) return val.Copy() diff --git a/gst/gst_wrappers.go b/gst/gst_wrappers.go index fa20121..9980de8 100644 --- a/gst/gst_wrappers.go +++ b/gst/gst_wrappers.go @@ -11,59 +11,131 @@ import ( "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 init() { registerMarshalers() } // Object wrappers +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapAllocator(obj *glib.Object) *Allocator { return &Allocator{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapBin(obj *glib.Object) *Bin { return &Bin{wrapElement(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapBuffer(buf *C.GstBuffer) *Buffer { return &Buffer{ptr: buf} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapBufferList(bufList *C.GstBufferList) *BufferList { return &BufferList{ptr: bufList} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapBufferPool(obj *glib.Object) *BufferPool { return &BufferPool{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapBus(obj *glib.Object) *Bus { return &Bus{Object: wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapCaps(caps *C.GstCaps) *Caps { return &Caps{native: caps} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapClock(obj *glib.Object) *Clock { return &Clock{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapContext(ctx *C.GstContext) *Context { return &Context{ptr: ctx} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapElement(obj *glib.Object) *Element { return &Element{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapEvent(ev *C.GstEvent) *Event { return &Event{ptr: ev} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapGhostPad(obj *glib.Object) *GhostPad { return &GhostPad{wrapProxyPad(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapMapInfo(mapInfo *C.GstMapInfo) *MapInfo { return &MapInfo{ptr: mapInfo} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapMemory(mem *C.GstMemory) *Memory { return &Memory{ptr: mem} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapMessage(msg *C.GstMessage) *Message { return &Message{msg: msg} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapMeta(meta *C.GstMeta) *Meta { return &Meta{ptr: meta} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapMetaInfo(info *C.GstMetaInfo) *MetaInfo { return &MetaInfo{ptr: info} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapPad(obj *glib.Object) *Pad { return &Pad{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapPadTemplate(obj *glib.Object) *PadTemplate { return &PadTemplate{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapPipeline(obj *glib.Object) *Pipeline { return &Pipeline{Bin: wrapBin(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapPluginFeature(obj *glib.Object) *PluginFeature { return &PluginFeature{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapPlugin(obj *glib.Object) *Plugin { return &Plugin{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapProxyPad(obj *glib.Object) *ProxyPad { return &ProxyPad{wrapPad(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapQuery(query *C.GstQuery) *Query { return &Query{ptr: query} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapSample(sample *C.GstSample) *Sample { return &Sample{sample: sample} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapSegment(segment *C.GstSegment) *Segment { return &Segment{ptr: segment} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapStream(obj *glib.Object) *Stream { return &Stream{wrapObject(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapTagList(tagList *C.GstTagList) *TagList { return &TagList{ptr: tagList} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapTOC(toc *C.GstToc) *TOC { return &TOC{ptr: toc} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapTOCEntry(toc *C.GstTocEntry) *TOCEntry { return &TOCEntry{ptr: toc} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapCapsFeatures(features *C.GstCapsFeatures) *CapsFeatures { return &CapsFeatures{native: features} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapObject(obj *glib.Object) *Object { return &Object{InitiallyUnowned: &glib.InitiallyUnowned{Object: obj}} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapElementFactory(obj *glib.Object) *ElementFactory { return &ElementFactory{wrapPluginFeature(obj)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapAllocationParams(obj *C.GstAllocationParams) *AllocationParams { return &AllocationParams{ptr: obj} } // Marshallers +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func registerMarshalers() { tm := []glib.TypeMarshaler{ { @@ -247,16 +319,22 @@ func registerMarshalers() { glib.RegisterGValueMarshalers(tm) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func toGValue(p unsafe.Pointer) *C.GValue { return (*C.GValue)(p) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalValueArray(p unsafe.Pointer) (interface{}, error) { val := toGValue(p) out := ValueArrayValue(*glib.ValueFromNative(unsafe.Pointer(val))) return &out, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalValueList(p unsafe.Pointer) (interface{}, error) { value := glib.ValueFromNative(p) @@ -270,6 +348,8 @@ func marshalValueList(p unsafe.Pointer) (interface{}, error) { return (*ValueListValue)(out), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalInt64Range(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) return &Int64RangeValue{ @@ -279,6 +359,8 @@ func marshalInt64Range(p unsafe.Pointer) (interface{}, error) { }, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalIntRange(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) return &IntRangeValue{ @@ -288,11 +370,15 @@ func marshalIntRange(p unsafe.Pointer) (interface{}, error) { }, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalBitmask(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) return Bitmask(C.gst_value_get_bitmask(v)), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalFlagset(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) return &FlagsetValue{ @@ -301,6 +387,8 @@ func marshalFlagset(p unsafe.Pointer) (interface{}, error) { }, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalDoubleRange(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) return &Float64RangeValue{ @@ -309,6 +397,8 @@ func marshalDoubleRange(p unsafe.Pointer) (interface{}, error) { }, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalFraction(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) out := &FractionValue{ @@ -318,6 +408,8 @@ func marshalFraction(p unsafe.Pointer) (interface{}, error) { return out, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalFractionRange(p unsafe.Pointer) (interface{}, error) { v := toGValue(p) start := C.gst_value_get_fraction_range_min(v) @@ -328,188 +420,254 @@ func marshalFractionRange(p unsafe.Pointer) (interface{}, error) { }, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalBufferingMode(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return BufferingMode(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalFormat(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return Format(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalMessageType(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return MessageType(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalPadLinkReturn(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return PadLinkReturn(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalState(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return State(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalSeekFlags(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return SeekFlags(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalSeekType(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return SeekType(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalStateChangeReturn(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_enum(toGValue(p)) return StateChangeReturn(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalGhostPad(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapGhostPad(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalProxyPad(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapProxyPad(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalPad(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapPad(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalMessage(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_boxed(toGValue(p)) return &Message{(*C.GstMessage)(unsafe.Pointer(c))}, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalObject(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapObject(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalBus(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapBus(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalElementFactory(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapElementFactory(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalPipeline(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapPipeline(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalPluginFeature(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapPluginFeature(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalElement(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapElement(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalBin(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))} return wrapBin(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalAllocationParams(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstAllocationParams)(unsafe.Pointer(c)) return wrapAllocationParams(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalMemory(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstMemory)(unsafe.Pointer(c)) return wrapMemory(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalBuffer(p unsafe.Pointer) (interface{}, error) { c := C.getBufferValue(toGValue(p)) return wrapBuffer(c), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalBufferList(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstBufferList)(unsafe.Pointer(c)) return wrapBufferList(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalCaps(p unsafe.Pointer) (interface{}, error) { c := C.gst_value_get_caps(toGValue(p)) obj := (*C.GstCaps)(unsafe.Pointer(c)) return wrapCaps(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalCapsFeatures(p unsafe.Pointer) (interface{}, error) { c := C.gst_value_get_caps_features(toGValue(p)) obj := (*C.GstCapsFeatures)(unsafe.Pointer(c)) return wrapCapsFeatures(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalContext(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstContext)(unsafe.Pointer(c)) return wrapContext(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalTOC(p unsafe.Pointer) (interface{}, error) { c := C.gst_value_get_structure(toGValue(p)) obj := (*C.GstToc)(unsafe.Pointer(c)) return wrapTOC(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalTOCEntry(p unsafe.Pointer) (interface{}, error) { c := C.gst_value_get_structure(toGValue(p)) obj := (*C.GstTocEntry)(unsafe.Pointer(c)) return wrapTOCEntry(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marsalTagList(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstTagList)(unsafe.Pointer(c)) return wrapTagList(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalEvent(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstEvent)(unsafe.Pointer(c)) return wrapEvent(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalSegment(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstSegment)(unsafe.Pointer(c)) return wrapSegment(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalQuery(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object(toGValue(p)) obj := (*C.GstQuery)(unsafe.Pointer(c)) return wrapQuery(obj), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalSample(p unsafe.Pointer) (interface{}, error) { c := C.getSampleValue(toGValue(p)) return FromGstSampleUnsafeNone(unsafe.Pointer(c)), nil diff --git a/gst/gstnet/gst_ntp_clock.go b/gst/gstnet/gst_ntp_clock.go index 9cc58d4..3e01aac 100644 --- a/gst/gstnet/gst_ntp_clock.go +++ b/gst/gstnet/gst_ntp_clock.go @@ -18,6 +18,8 @@ const NTPTimeToUnixEpoch = gst.ClockTime(2208988800 * time.Second) type NTPClock struct{ *gst.Clock } // ObtainNTPClock returns the default NTPClock. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ObtainNTPClock(ctx context.Context, name, address string, port int) (*NTPClock, error) { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) @@ -45,6 +47,8 @@ func ObtainNTPClock(ctx context.Context, name, address string, port int) (*NTPCl // get the current time of the clock // // if you want to access the clocks actual time value, use the underlying NTPClock.Clock.GetTime() instead +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (ntp *NTPClock) GetTime() time.Time { // nanos since 1. Jan 1900 ntpNanos := NTPClockTime(ntp.Clock.GetTime()) @@ -54,10 +58,14 @@ func (ntp *NTPClock) GetTime() time.Time { type NTPClockTime gst.ClockTime +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (ct NTPClockTime) ToDate() time.Time { return time.Unix(0, int64(ct)-int64(NTPTimeToUnixEpoch)) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewNTPClockTime(t time.Time) NTPClockTime { return NTPClockTime(t.UnixNano() + int64(NTPTimeToUnixEpoch)) } diff --git a/gst/gstnet/net_address_meta.go b/gst/gstnet/net_address_meta.go index f82b524..37d5f29 100644 --- a/gst/gstnet/net_address_meta.go +++ b/gst/gstnet/net_address_meta.go @@ -14,6 +14,8 @@ import ( type NetAddressMeta struct{ ptr *C.GstNetAddressMeta } // AddNetAddressMeta attaches the given address to a NetAddressMeta on the buffer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func AddNetAddressMeta(buffer *gst.Buffer, address string, port int) *NetAddressMeta { caddr := C.CString(address) defer C.free(unsafe.Pointer(caddr)) @@ -26,6 +28,8 @@ func AddNetAddressMeta(buffer *gst.Buffer, address string, port int) *NetAddress } // GetNetAddressMeta retrieves the NetAddressMeta from the given buffer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func GetNetAddressMeta(buffer *gst.Buffer) *NetAddressMeta { meta := C.gst_buffer_get_net_address_meta((*C.GstBuffer)(unsafe.Pointer(buffer.Instance()))) if meta == nil { @@ -35,9 +39,13 @@ func GetNetAddressMeta(buffer *gst.Buffer) *NetAddressMeta { } // Meta returns the underlying gst.Meta instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *NetAddressMeta) Meta() *gst.Meta { return gst.FromGstMetaUnsafe(unsafe.Pointer(&n.ptr.meta)) } // Addr returns the address included in the meta. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *NetAddressMeta) Addr() string { iaddr := C.g_inet_socket_address_get_address((*C.GInetSocketAddress)(unsafe.Pointer(n.ptr.addr))) iaddrstr := C.g_inet_address_to_string(iaddr) @@ -46,6 +54,8 @@ func (n *NetAddressMeta) Addr() string { } // Port returns the port included in the meta. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *NetAddressMeta) Port() int { iport := C.g_inet_socket_address_get_port((*C.GInetSocketAddress)(unsafe.Pointer(n.ptr.addr))) return int(iport) diff --git a/gst/gstsdp/media.go b/gst/gstsdp/media.go index e5cc17e..3166b97 100644 --- a/gst/gstsdp/media.go +++ b/gst/gstsdp/media.go @@ -10,20 +10,28 @@ import ( "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. type Media struct { ptr *C.GstSDPMedia } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Media) FormatsLen() int { return int(C.gst_sdp_media_formats_len(m.ptr)) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Media) Format(idx int) string { cstr := C.gst_sdp_media_get_format(m.ptr, C.guint(idx)) return C.GoString(cstr) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Media) Formats() iter.Seq2[int, string] { return func(yield func(int, string) bool) { for i := 0; i < m.FormatsLen(); i++ { @@ -36,6 +44,8 @@ func (m *Media) Formats() iter.Seq2[int, string] { var ErrCouldNotGetCaps = errors.New("could not get caps") +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *Media) GetCaps(pt int) (*gst.Caps, error) { ccaps := C.gst_sdp_media_get_caps_from_media(m.ptr, C.gint(pt)) diff --git a/gst/gstsdp/message.go b/gst/gstsdp/message.go index 4e0a013..5a4f880 100644 --- a/gst/gstsdp/message.go +++ b/gst/gstsdp/message.go @@ -16,10 +16,14 @@ const ( SDPEinval SDPResult = C.GST_SDP_EINVAL ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Message struct { ptr *C.GstSDPMessage } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapSDPMessageAndFinalize(sdp *C.GstSDPMessage) *Message { msg := &Message{ ptr: sdp, @@ -34,6 +38,8 @@ func wrapSDPMessageAndFinalize(sdp *C.GstSDPMessage) *Message { } // NewMessage creates a new empty SDP message +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewMessage() (*Message, error) { var msg *C.GstSDPMessage @@ -47,6 +53,8 @@ func NewMessage() (*Message, error) { } // NewMessageFromUnsafe creates a new SDP message from a pointer and does not finalize it +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewMessageFromUnsafe(ptr unsafe.Pointer) *Message { return &Message{ ptr: (*C.GstSDPMessage)(ptr), @@ -55,6 +63,8 @@ func NewMessageFromUnsafe(ptr unsafe.Pointer) *Message { var ErrSDPInvalid = errors.New("invalid SDP") +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ParseSDPMessage(sdp string) (*Message, error) { cstr := C.CString(sdp) defer C.free(unsafe.Pointer(cstr)) @@ -70,6 +80,8 @@ func ParseSDPMessage(sdp string) (*Message, error) { return wrapSDPMessageAndFinalize(msg), nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) String() string { cstr := C.gst_sdp_message_as_text(msg.native()) defer C.free(unsafe.Pointer(cstr)) @@ -82,6 +94,8 @@ func (msg *Message) String() string { // this is needed to pass the message back to C where C takes ownership of the message // // the returned SDP message will leak memory if not freed manually +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) UnownedCopy() *Message { if msg == nil { return nil @@ -102,6 +116,8 @@ func (msg *Message) UnownedCopy() *Message { // Free frees the SDP message. // // This is called automatically when the object is garbage collected. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) Free() { if msg == nil || msg.ptr == nil { return @@ -110,6 +126,8 @@ func (msg *Message) Free() { msg.ptr = nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) native() *C.GstSDPMessage { if msg == nil { return nil @@ -118,14 +136,20 @@ func (msg *Message) native() *C.GstSDPMessage { return msg.ptr } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) Instance() unsafe.Pointer { return unsafe.Pointer(msg.native()) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) MediasLen() int { return int(C.gst_sdp_message_medias_len(msg.native())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) Media(i int) *Media { cmedia := C.gst_sdp_message_get_media(msg.native(), C.uint(i)) @@ -145,6 +169,8 @@ func (msg *Message) Media(i int) *Media { return media } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (msg *Message) Medias() iter.Seq2[int, *Media] { return func(yield func(int, *Media) bool) { for i := 0; i < msg.MediasLen(); i++ { diff --git a/gst/gstsdp/message_test.go b/gst/gstsdp/message_test.go index 6fd2bca..ccf96ed 100644 --- a/gst/gstsdp/message_test.go +++ b/gst/gstsdp/message_test.go @@ -10,6 +10,8 @@ import ( "github.com/go-gst/go-gst/gst/gstsdp" ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func TestSessionDescription(t *testing.T) { gst.Init(nil) diff --git a/gst/gstwebrtc/data_channel.go b/gst/gstwebrtc/data_channel.go index 1d496cf..bd91eec 100644 --- a/gst/gstwebrtc/data_channel.go +++ b/gst/gstwebrtc/data_channel.go @@ -9,6 +9,8 @@ import ( "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 init() { tm := []glib.TypeMarshaler{ @@ -21,14 +23,20 @@ func init() { // DataChannel is a representation of GstWebRTCDataChannel. See https://gstreamer.freedesktop.org/documentation/webrtclib/gstwebrtc-datachannel.html?gi-language=c // // there is no constructor for DataChannel, you can get it from webrtcbin signals +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type DataChannel struct { *glib.Object } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (dc *DataChannel) Close() { C.gst_webrtc_data_channel_close((*C.GstWebRTCDataChannel)(dc.Native())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (dc *DataChannel) SendData(data []byte) error { var gerr *C.GError @@ -49,6 +57,8 @@ func (dc *DataChannel) SendData(data []byte) error { } // ToGValue implements glib.ValueTransformer +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (dc *DataChannel) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(glib.Type(C.GST_TYPE_WEBRTC_DATA_CHANNEL)) if err != nil { @@ -58,6 +68,8 @@ func (dc *DataChannel) ToGValue() (*glib.Value, error) { return val, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalDataChannel(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object((*C.GValue)(p)) diff --git a/gst/gstwebrtc/data_channel_test.go b/gst/gstwebrtc/data_channel_test.go index 2035f2c..3d1f618 100644 --- a/gst/gstwebrtc/data_channel_test.go +++ b/gst/gstwebrtc/data_channel_test.go @@ -6,6 +6,8 @@ import ( "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 TestDataChannelMarshal(t *testing.T) { gst.Init(nil) diff --git a/gst/gstwebrtc/enums.go b/gst/gstwebrtc/enums.go index b463106..b3464af 100644 --- a/gst/gstwebrtc/enums.go +++ b/gst/gstwebrtc/enums.go @@ -12,6 +12,8 @@ const ( BUNDLE_POLICY_MAX_BUNDLE BundlePolicy = C.GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE // max-bundle ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e BundlePolicy) String() string { switch e { case C.GST_WEBRTC_BUNDLE_POLICY_NONE: @@ -35,6 +37,8 @@ const ( DTLS_SETUP_PASSIVE DTLSSetup = C.GST_WEBRTC_DTLS_SETUP_PASSIVE // recvonly ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e DTLSSetup) String() string { switch e { case C.GST_WEBRTC_DTLS_SETUP_NONE: @@ -59,6 +63,8 @@ const ( DTLS_TRANSPORT_STATE_CONNECTED DTLSTransportState = C.GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED // connected ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e DTLSTransportState) String() string { switch e { case C.GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW: @@ -84,6 +90,8 @@ const ( DATA_CHANNEL_STATE_CLOSED DataChannelState = C.GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED // closed ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e DataChannelState) String() string { switch e { case C.GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING: @@ -114,6 +122,8 @@ const ( ERROR_TYPE_ERROR Error = C.GST_WEBRTC_ERROR_TYPE_ERROR // type-error ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e Error) String() string { switch e { case C.GST_WEBRTC_ERROR_DATA_CHANNEL_FAILURE: @@ -149,6 +159,8 @@ const ( FEC_TYPE_ULP_RED FECType = C.GST_WEBRTC_FEC_TYPE_ULP_RED // ulpfec + red ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e FECType) String() string { switch e { case C.GST_WEBRTC_FEC_TYPE_NONE: @@ -169,6 +181,8 @@ const ( ICE_COMPONENT_RTCP ICEComponent = C.GST_WEBRTC_ICE_COMPONENT_RTCP // RTCP component ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e ICEComponent) String() string { switch e { case C.GST_WEBRTC_ICE_COMPONENT_RTP: @@ -191,6 +205,8 @@ const ( ICE_CONNECTION_STATE_CLOSED ICEConnectionState = C.GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED // closed ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e ICEConnectionState) String() string { switch e { case C.GST_WEBRTC_ICE_CONNECTION_STATE_NEW: @@ -219,6 +235,8 @@ const ( ICE_GATHERING_STATE_COMPLETE ICEGatheringState = C.GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE // complete ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e ICEGatheringState) String() string { switch e { case C.GST_WEBRTC_ICE_GATHERING_STATE_NEW: @@ -238,6 +256,8 @@ const ( ICE_ROLE_CONTROLLING ICERole = C.GST_WEBRTC_ICE_ROLE_CONTROLLING // controlling ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e ICERole) String() string { switch e { case C.GST_WEBRTC_ICE_ROLE_CONTROLLED: @@ -255,6 +275,8 @@ const ( ICE_TRANSPORT_POLICY_RELAY ICETransportPolicy = C.GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY // relay ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e ICETransportPolicy) String() string { switch e { case C.GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL: @@ -273,6 +295,8 @@ const ( VIDEO Kind = C.GST_WEBRTC_KIND_VIDEO // video ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e Kind) String() string { switch e { case C.GST_WEBRTC_KIND_UNKNOWN: @@ -303,6 +327,8 @@ const ( PEER_CONNECTION_STATE_CLOSED PeerConnectionState = C.GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED // closed ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e PeerConnectionState) String() string { switch e { case C.GST_WEBRTC_PEER_CONNECTION_STATE_NEW: @@ -330,6 +356,8 @@ const ( PRIORITY_TYPE_HIGH PriorityType = C.GST_WEBRTC_PRIORITY_TYPE_HIGH // high ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e PriorityType) String() string { switch e { case C.GST_WEBRTC_PRIORITY_TYPE_VERY_LOW: @@ -354,6 +382,8 @@ const ( RTP_TRANSCEIVER_DIRECTION_SENDRECV RTPTransceiverDirection = C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV // sendrecv ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e RTPTransceiverDirection) String() string { switch e { case C.GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE: @@ -379,6 +409,8 @@ const ( SCTP_TRANSPORT_STATE_CLOSED SCTPTransportState = C.GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED // closed ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e SCTPTransportState) String() string { switch e { case C.GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW: @@ -402,6 +434,8 @@ const ( SDP_TYPE_ROLLBACK SDPType = C.GST_WEBRTC_SDP_TYPE_ROLLBACK // rollback ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e SDPType) String() string { // returned string is const gchar* and must not be freed cstring := C.gst_webrtc_sdp_type_to_string(C.GstWebRTCSDPType(e)) @@ -409,6 +443,8 @@ func (e SDPType) String() string { return C.GoString(cstring) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func SDPTypeFromString(s string) SDPType { switch s { case "offer": @@ -435,6 +471,8 @@ const ( SIGNALING_STATE_HAVE_REMOTE_PRANSWER SignalingState = C.GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER // have-remote-pranswer ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e SignalingState) String() string { switch e { case C.GST_WEBRTC_SIGNALING_STATE_STABLE: @@ -472,6 +510,8 @@ const ( STATS_CERTIFICATE StatsType = C.GST_WEBRTC_STATS_CERTIFICATE // certificate ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e StatsType) String() string { switch e { case C.GST_WEBRTC_STATS_CODEC: diff --git a/gst/gstwebrtc/rtp_transceiver.go b/gst/gstwebrtc/rtp_transceiver.go index 34dabc4..d0ca16b 100644 --- a/gst/gstwebrtc/rtp_transceiver.go +++ b/gst/gstwebrtc/rtp_transceiver.go @@ -9,6 +9,8 @@ import ( "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() { tm := []glib.TypeMarshaler{ @@ -18,11 +20,15 @@ func init() { glib.RegisterGValueMarshalers(tm) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type RTPTransceiver struct { *gst.Object } // ToGValue implements glib.ValueTransformer +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (tc *RTPTransceiver) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(glib.Type(C.GST_TYPE_WEBRTC_RTP_TRANSCEIVER)) if err != nil { @@ -32,12 +38,16 @@ func (tc *RTPTransceiver) ToGValue() (*glib.Value, error) { return val, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapRTPTransceiver(p unsafe.Pointer) *RTPTransceiver { return &RTPTransceiver{ Object: gst.FromGstObjectUnsafeNone(p), } } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalRTPTransceiver(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_object((*C.GValue)(p)) diff --git a/gst/gstwebrtc/rtp_transceiver_test.go b/gst/gstwebrtc/rtp_transceiver_test.go index 0db8142..0fd7ccc 100644 --- a/gst/gstwebrtc/rtp_transceiver_test.go +++ b/gst/gstwebrtc/rtp_transceiver_test.go @@ -4,6 +4,8 @@ import ( "testing" ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func TestRTPTransceiverGValueMarshal(t *testing.T) { t.Skip("Not implemented, because we don't have a constructor for RTPTransceiver") } diff --git a/gst/gstwebrtc/session_description.go b/gst/gstwebrtc/session_description.go index 46c998d..5c1c7e8 100644 --- a/gst/gstwebrtc/session_description.go +++ b/gst/gstwebrtc/session_description.go @@ -10,6 +10,8 @@ import ( "github.com/go-gst/go-gst/gst/gstsdp" ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func init() { tm := []glib.TypeMarshaler{ @@ -19,10 +21,14 @@ func init() { glib.RegisterGValueMarshalers(tm) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type SessionDescription struct { ptr *C.GstWebRTCSessionDescription } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewSessionDescription(t SDPType, sdp *gstsdp.Message) *SessionDescription { sd := C.gst_webrtc_session_description_new( C.GstWebRTCSDPType(t), @@ -32,6 +38,8 @@ func NewSessionDescription(t SDPType, sdp *gstsdp.Message) *SessionDescription { return wrapSessionDescriptionAndFinalize(sd) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapSessionDescriptionAndFinalize(sdp *C.GstWebRTCSessionDescription) *SessionDescription { sd := &SessionDescription{ ptr: sdp, @@ -51,12 +59,16 @@ func wrapSessionDescriptionAndFinalize(sdp *C.GstWebRTCSessionDescription) *Sess // the finalizer would run and free the memory, because the value would have to be copied. // // it complies with the WebRTC spec for SessionDescription, see https://www.w3.org/TR/webrtc/#rtcsessiondescription-class +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type W3RTCSessionDescription struct { Type string `json:"type"` Sdp string `json:"sdp"` } // ToGstSDP converts a W3RTCSessionDescription to a SessionDescription +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (w3SDP *W3RTCSessionDescription) ToGstSDP() (*SessionDescription, error) { sdp, err := gstsdp.ParseSDPMessage(w3SDP.Sdp) if err != nil { @@ -67,6 +79,8 @@ func (w3SDP *W3RTCSessionDescription) ToGstSDP() (*SessionDescription, error) { } // ToW3SDP returns a W3RTCSessionDescription that can be marshaled to JSON +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (sd *SessionDescription) ToW3SDP() W3RTCSessionDescription { jsonSDP := W3RTCSessionDescription{ Type: SDPType(sd.ptr._type).String(), @@ -76,6 +90,8 @@ func (sd *SessionDescription) ToW3SDP() W3RTCSessionDescription { return jsonSDP } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (sd *SessionDescription) Free() { C.gst_webrtc_session_description_free(sd.ptr) } @@ -85,6 +101,8 @@ func (sd *SessionDescription) Free() { // this is needed for passing the SessionDescription to other functions that will take ownership of it. // // used in the bindings, should not be called by application code +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (sd *SessionDescription) UnownedCopy() *SessionDescription { newSD := C.gst_webrtc_session_description_copy(sd.ptr) @@ -94,11 +112,15 @@ func (sd *SessionDescription) UnownedCopy() *SessionDescription { } // Copy creates a new copy of the SessionDescription +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (sd *SessionDescription) Copy() *SessionDescription { return wrapSessionDescriptionAndFinalize(sd.UnownedCopy().ptr) } // ToGValue implements glib.ValueTransformer +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (sd *SessionDescription) ToGValue() (*glib.Value, error) { val, err := glib.ValueInit(glib.Type(C.GST_TYPE_WEBRTC_SESSION_DESCRIPTION)) if err != nil { @@ -112,6 +134,8 @@ func (sd *SessionDescription) ToGValue() (*glib.Value, error) { return val, nil } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func marshalSessionDescription(p unsafe.Pointer) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(p)) @@ -124,6 +148,8 @@ func marshalSessionDescription(p unsafe.Pointer) (interface{}, error) { } // SDP returns the sdp message from the SessionDescription object +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (sd *SessionDescription) SDP() *gstsdp.Message { sdp := gstsdp.NewMessageFromUnsafe(unsafe.Pointer(sd.ptr.sdp)) diff --git a/gst/gstwebrtc/session_description_test.go b/gst/gstwebrtc/session_description_test.go index 8092294..a817242 100644 --- a/gst/gstwebrtc/session_description_test.go +++ b/gst/gstwebrtc/session_description_test.go @@ -7,6 +7,8 @@ import ( "github.com/go-gst/go-gst/gst/gstwebrtc" ) +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func TestSessionDescriptionGValueMarshal(t *testing.T) { sdp, err := gstsdp.ParseSDPMessage("v=0\nm=audio 4000 RTP/AVP 111\na=rtpmap:111 OPUS/48000/2\nm=video 4000 RTP/AVP 96\na=rtpmap:96 VP8/90000\na=my-sdp-value") @@ -37,6 +39,8 @@ func TestSessionDescriptionGValueMarshal(t *testing.T) { _ = sd } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func TestSessionDescriptionJSONMarshal(t *testing.T) { sdp, err := gstsdp.ParseSDPMessage("v=0\nm=audio 4000 RTP/AVP 111\na=rtpmap:111 OPUS/48000/2\nm=video 4000 RTP/AVP 96\na=rtpmap:96 VP8/90000\na=my-sdp-value") diff --git a/gst/pbutils/c_util.go b/gst/pbutils/c_util.go index 7ba0ac6..22e6d8b 100644 --- a/gst/pbutils/c_util.go +++ b/gst/pbutils/c_util.go @@ -4,11 +4,17 @@ package pbutils import "C" import "errors" +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func initPbUtils() { C.gst_pb_utils_init() } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapGerr(gerr *C.GError) error { defer C.g_error_free(gerr) return errors.New(C.GoString(gerr.message)) } +// +// 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 } diff --git a/gst/pbutils/discoverer.go b/gst/pbutils/discoverer.go index e59cea6..83140f1 100644 --- a/gst/pbutils/discoverer.go +++ b/gst/pbutils/discoverer.go @@ -12,6 +12,8 @@ import ( "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() { tm := []glib.TypeMarshaler{ { @@ -67,20 +69,28 @@ func init() { glib.RegisterGValueMarshalers(tm) } +// +// 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 { return (*C.GValue)(p) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func toGObject(o unsafe.Pointer) *glib.Object { return &glib.Object{GObject: glib.ToGObject(o)} } // Discoverer represents a GstDiscoverer type Discoverer struct{ *glib.Object } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapDiscovererFull(d *C.GstDiscoverer) *Discoverer { return &Discoverer{glib.TransferFull(unsafe.Pointer(d))} } // NewDiscoverer creates a new Discoverer with the provided timeout. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewDiscoverer(timeout gst.ClockTime) (*Discoverer, error) { initPbUtils() var gerr *C.GError @@ -92,11 +102,15 @@ func NewDiscoverer(timeout gst.ClockTime) (*Discoverer, error) { } // Instance returns the underlying GstDiscoverer instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *Discoverer) Instance() *C.GstDiscoverer { return (*C.GstDiscoverer)(unsafe.Pointer(d.GObject)) } // DiscoverURI synchronously discovers the given uri. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *Discoverer) DiscoverURI(uri string) (*DiscovererInfo, error) { curi := C.CString(uri) defer C.free(unsafe.Pointer(curi)) @@ -111,21 +125,29 @@ func (d *Discoverer) DiscoverURI(uri string) (*DiscovererInfo, error) { // DiscovererInfo represents a GstDiscovererInfo type DiscovererInfo struct{ *glib.Object } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapDiscovererInfoFull(d *C.GstDiscovererInfo) *DiscovererInfo { return &DiscovererInfo{glib.TransferFull(unsafe.Pointer(d))} } // Instance returns the underlying GstDiscovererInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) Instance() *C.GstDiscovererInfo { return (*C.GstDiscovererInfo)(unsafe.Pointer(d.GObject)) } // Copy creates a copy of this instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) Copy() *DiscovererInfo { return wrapDiscovererInfoFull(C.gst_discoverer_info_copy(d.Instance())) } // GetAudioStreams finds all the DiscovererAudioInfo contained in info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetAudioStreams() []*DiscovererAudioInfo { gList := C.gst_discoverer_info_get_audio_streams(d.Instance()) if gList == nil { @@ -135,6 +157,8 @@ func (d *DiscovererInfo) GetAudioStreams() []*DiscovererAudioInfo { } // GetContainerStreams finds all the DiscovererContainerInfo contained in info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetContainerStreams() []*DiscovererContainerInfo { gList := C.gst_discoverer_info_get_container_streams(d.Instance()) if gList == nil { @@ -144,27 +168,37 @@ func (d *DiscovererInfo) GetContainerStreams() []*DiscovererContainerInfo { } // GetDuration returns the duration of the stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetDuration() gst.ClockTime { dur := C.gst_discoverer_info_get_duration(d.Instance()) return gst.ClockTime(uint64(dur)) } // GetLive returns whether this is a live stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetLive() bool { return gobool(C.gst_discoverer_info_get_live(d.Instance())) } // GetResult returns the result type. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetResult() DiscovererResult { return DiscovererResult(C.gst_discoverer_info_get_result(d.Instance())) } // GetSeekable returns whether the stream is seekable. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetSeekable() bool { return gobool(C.gst_discoverer_info_get_seekable(d.Instance())) } // GetStreamInfo returns the topology of the URI. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetStreamInfo() *DiscovererStreamInfo { info := C.gst_discoverer_info_get_stream_info(d.Instance()) if info == nil { @@ -174,6 +208,8 @@ func (d *DiscovererInfo) GetStreamInfo() *DiscovererStreamInfo { } // GetStreamList returns the list of all streams contained in the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetStreamList() []*DiscovererStreamInfo { gList := C.gst_discoverer_info_get_stream_list(d.Instance()) if gList == nil { @@ -183,6 +219,8 @@ func (d *DiscovererInfo) GetStreamList() []*DiscovererStreamInfo { } // GetSubtitleStreams returns the info about subtitle streams. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetSubtitleStreams() []*DiscovererSubtitleInfo { gList := C.gst_discoverer_info_get_subtitle_streams(d.Instance()) if gList == nil { @@ -192,6 +230,8 @@ func (d *DiscovererInfo) GetSubtitleStreams() []*DiscovererSubtitleInfo { } // GetTags retrieves the tag list for the URI stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetTags() *gst.TagList { tagList := C.gst_discoverer_info_get_tags(d.Instance()) if tagList == nil { @@ -201,6 +241,8 @@ func (d *DiscovererInfo) GetTags() *gst.TagList { } // GetTOC returns the TOC for the URI stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetTOC() *gst.TOC { toc := C.gst_discoverer_info_get_toc(d.Instance()) if toc == nil { @@ -210,11 +252,15 @@ func (d *DiscovererInfo) GetTOC() *gst.TOC { } // GetURI returns the URI for this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetURI() string { return C.GoString(C.gst_discoverer_info_get_uri(d.Instance())) } // GetVideoStreams finds all the DiscovererVideoInfo contained in info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererInfo) GetVideoStreams() []*DiscovererVideoInfo { gList := C.gst_discoverer_info_get_video_streams(d.Instance()) if gList == nil { @@ -226,16 +272,22 @@ func (d *DiscovererInfo) GetVideoStreams() []*DiscovererVideoInfo { // DiscovererStreamInfo is the base structure for information concerning a media stream. type DiscovererStreamInfo struct{ *glib.Object } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapDiscovererStreamInfo(d *C.GstDiscovererStreamInfo) *DiscovererStreamInfo { return &DiscovererStreamInfo{toGObject(unsafe.Pointer(d))} } // Instance returns the underlying GstDiscovererStreamInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererStreamInfo) Instance() *C.GstDiscovererStreamInfo { return (*C.GstDiscovererStreamInfo)(unsafe.Pointer(d.GObject)) } // GetCaps returns the caps from the stream info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererStreamInfo) GetCaps() *gst.Caps { caps := C.gst_discoverer_stream_info_get_caps(d.Instance()) if caps == nil { @@ -245,16 +297,22 @@ func (d *DiscovererStreamInfo) GetCaps() *gst.Caps { } // GetStreamID returns the stream ID of this stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererStreamInfo) GetStreamID() string { return C.GoString(C.gst_discoverer_stream_info_get_stream_id(d.Instance())) } // GetStreamTypeNick returns a human readable name for the stream type +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererStreamInfo) GetStreamTypeNick() string { return C.GoString(C.gst_discoverer_stream_info_get_stream_type_nick(d.Instance())) } // GetTags gets the tags contained in this stream +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererStreamInfo) GetTags() *gst.TagList { tagList := C.gst_discoverer_stream_info_get_tags(d.Instance()) if tagList == nil { @@ -264,6 +322,8 @@ func (d *DiscovererStreamInfo) GetTags() *gst.TagList { } // GetTOC gets the TOC contained in this stream +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererStreamInfo) GetTOC() *gst.TOC { toc := C.gst_discoverer_stream_info_get_toc(d.Instance()) if toc == nil { @@ -276,31 +336,43 @@ func (d *DiscovererStreamInfo) GetTOC() *gst.TOC { type DiscovererAudioInfo struct{ *DiscovererStreamInfo } // Instance returns the underlying GstDiscovererAudioInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) Instance() *C.GstDiscovererAudioInfo { return (*C.GstDiscovererAudioInfo)(unsafe.Pointer(d.GObject)) } // GetBitate returns the bitrate for the audio stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetBitate() uint { return uint(C.gst_discoverer_audio_info_get_bitrate(d.Instance())) } // GetChannelMask returns the channel mask for the audio stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetChannelMask() uint64 { return uint64(C.gst_discoverer_audio_info_get_channel_mask(d.Instance())) } // GetChannels returns the number of channels in the stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetChannels() uint { return uint(C.gst_discoverer_audio_info_get_channels(d.Instance())) } // GetDepth returns the number of bits used per sample in each channel. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetDepth() uint { return uint(C.gst_discoverer_audio_info_get_depth(d.Instance())) } // GetLanguage returns the language of the stream, or an empty string if unknown. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetLanguage() string { lang := C.gst_discoverer_audio_info_get_language(d.Instance()) if lang == nil { @@ -310,11 +382,15 @@ func (d *DiscovererAudioInfo) GetLanguage() string { } // GetMaxBitrate returns the maximum bitrate of the stream in bits/second. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetMaxBitrate() uint { return uint(C.gst_discoverer_audio_info_get_max_bitrate(d.Instance())) } // GetSampleRate returns the sample rate of the stream in Hertz. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererAudioInfo) GetSampleRate() uint { return uint(C.gst_discoverer_audio_info_get_sample_rate(d.Instance())) } @@ -323,61 +399,85 @@ func (d *DiscovererAudioInfo) GetSampleRate() uint { type DiscovererVideoInfo struct{ *DiscovererStreamInfo } // Instance returns the underlying GstDiscovererVideoInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) Instance() *C.GstDiscovererVideoInfo { return (*C.GstDiscovererVideoInfo)(unsafe.Pointer(d.GObject)) } // GetBitrate returns the average or nominal bitrate of the video stream in bits/second. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetBitrate() uint { return uint(C.gst_discoverer_video_info_get_bitrate(d.Instance())) } // GetDepth returns the depth in bits of the video stream. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetDepth() uint { return uint(C.gst_discoverer_video_info_get_depth(d.Instance())) } // GetFramerateDenom returns the framerate of the video stream (denominator). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetFramerateDenom() uint { return uint(C.gst_discoverer_video_info_get_framerate_denom(d.Instance())) } // GetFramerateNum returns the framerate of the video stream (numerator). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetFramerateNum() uint { return uint(C.gst_discoverer_video_info_get_framerate_num(d.Instance())) } // GetHeight returns the height of the video stream in pixels. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetHeight() uint { return uint(C.gst_discoverer_video_info_get_height(d.Instance())) } // GetMaxBitrate returns the maximum bitrate of the video stream in bits/second. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetMaxBitrate() uint { return uint(C.gst_discoverer_video_info_get_max_bitrate(d.Instance())) } // GetPARDenom returns the Pixel Aspect Ratio (PAR) of the video stream (denominator). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetPARDenom() uint { return uint(C.gst_discoverer_video_info_get_par_denom(d.Instance())) } // GetPARNum returns the Pixel Aspect Ratio (PAR) of the video stream (numerator). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetPARNum() uint { return uint(C.gst_discoverer_video_info_get_par_num(d.Instance())) } // GetWidth returns the width of the video stream in pixels. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) GetWidth() uint { return uint(C.gst_discoverer_video_info_get_width(d.Instance())) } // IsImage returns TRUE if the video stream corresponds to an image (i.e. only contains one frame). +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) IsImage() bool { return gobool(C.gst_discoverer_video_info_is_image(d.Instance())) } // IsInterlaced returns TRUE if the stream is interlaced. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererVideoInfo) IsInterlaced() bool { return gobool(C.gst_discoverer_video_info_is_interlaced(d.Instance())) } @@ -386,11 +486,15 @@ func (d *DiscovererVideoInfo) IsInterlaced() bool { type DiscovererContainerInfo struct{ *DiscovererStreamInfo } // Instance returns the underlying GstDiscovererContainerInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererContainerInfo) Instance() *C.GstDiscovererContainerInfo { return (*C.GstDiscovererContainerInfo)(unsafe.Pointer(d.GObject)) } // GetStreams returns the list of streams inside this container. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererContainerInfo) GetStreams() []*DiscovererStreamInfo { streams := C.gst_discoverer_container_info_get_streams(d.Instance()) if streams == nil { @@ -403,11 +507,15 @@ func (d *DiscovererContainerInfo) GetStreams() []*DiscovererStreamInfo { type DiscovererSubtitleInfo struct{ *DiscovererStreamInfo } // Instance returns the underlying GstDiscovererSubtitleInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererSubtitleInfo) Instance() *C.GstDiscovererSubtitleInfo { return (*C.GstDiscovererSubtitleInfo)(unsafe.Pointer(d.GObject)) } // GetLanguage returns the language of the subtitles. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (d *DiscovererSubtitleInfo) GetLanguage() string { lang := C.gst_discoverer_subtitle_info_get_language(d.Instance()) if lang == nil { @@ -416,6 +524,8 @@ func (d *DiscovererSubtitleInfo) GetLanguage() string { return C.GoString(lang) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func glistToStreamInfoSlice(glist *C.GList) []*DiscovererStreamInfo { defer C.gst_discoverer_stream_info_list_free(glist) l := C.g_list_length(glist) @@ -430,6 +540,8 @@ func glistToStreamInfoSlice(glist *C.GList) []*DiscovererStreamInfo { return out } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func glistToAudioInfoSlice(glist *C.GList) []*DiscovererAudioInfo { defer C.gst_discoverer_stream_info_list_free(glist) l := C.g_list_length(glist) @@ -444,6 +556,8 @@ func glistToAudioInfoSlice(glist *C.GList) []*DiscovererAudioInfo { return out } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func glistToVideoInfoSlice(glist *C.GList) []*DiscovererVideoInfo { defer C.gst_discoverer_stream_info_list_free(glist) l := C.g_list_length(glist) @@ -458,6 +572,8 @@ func glistToVideoInfoSlice(glist *C.GList) []*DiscovererVideoInfo { return out } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func glistToContainerInfoSlice(glist *C.GList) []*DiscovererContainerInfo { defer C.gst_discoverer_stream_info_list_free(glist) l := C.g_list_length(glist) @@ -472,6 +588,8 @@ func glistToContainerInfoSlice(glist *C.GList) []*DiscovererContainerInfo { return out } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func glistToSubtitleInfoSlice(glist *C.GList) []*DiscovererSubtitleInfo { defer C.gst_discoverer_stream_info_list_free(glist) l := C.g_list_length(glist) diff --git a/gst/rtp/c_util.go b/gst/rtp/c_util.go index 701f0d4..b06bdd7 100644 --- a/gst/rtp/c_util.go +++ b/gst/rtp/c_util.go @@ -14,6 +14,8 @@ import "C" // } // 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 } diff --git a/gst/rtp/gst_rtp_meta.go b/gst/rtp/gst_rtp_meta.go index 5710fca..dd6cb98 100644 --- a/gst/rtp/gst_rtp_meta.go +++ b/gst/rtp/gst_rtp_meta.go @@ -16,21 +16,29 @@ import ( const MaxCSRCCount uint = C.GST_RTP_SOURCE_META_MAX_CSRC_COUNT // 15 // SourceMeta is a wrapper around GstRTPSourceMeta. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type SourceMeta struct { ptr *C.GstRTPSourceMeta } // SourceMetaAPIType returns the GType for GstRTPSourceMeta. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func SourceMetaAPIType() glib.Type { return glib.Type(C.gst_rtp_source_meta_api_get_type()) } // SourceMetaInfo returns the MetaInfo for GstRTPSourceMeta. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func SourceMetaInfo() *gst.MetaInfo { return gst.FromGstMetaInfoUnsafe(unsafe.Pointer(C.gst_rtp_source_meta_get_info())) } // AppendCSRC appends the given CSRC to the list of contributing sources in meta. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s *SourceMeta) AppendCSRC(csrc []uint32) bool { return gobool(C.gst_rtp_source_meta_append_csrc( s.ptr, @@ -40,6 +48,8 @@ func (s *SourceMeta) AppendCSRC(csrc []uint32) bool { } // GetSourceMeta retrieves the SourceMeta from the given buffer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func GetSourceMeta(buffer *gst.Buffer) *SourceMeta { meta := C.gst_buffer_get_rtp_source_meta((*C.GstBuffer)(unsafe.Pointer(buffer.Instance()))) if meta == nil { @@ -49,6 +59,8 @@ func GetSourceMeta(buffer *gst.Buffer) *SourceMeta { } // AddSourceMeta attaches the given RTP source information to the buffer. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func AddSourceMeta(buffer *gst.Buffer, ssrc *uint32, csrc []uint32) *SourceMeta { var meta *C.GstRTPSourceMeta if ssrc == nil && csrc == nil { @@ -82,11 +94,15 @@ func AddSourceMeta(buffer *gst.Buffer, ssrc *uint32, csrc []uint32) *SourceMeta } // GetSourceCount returns the total number of RTP sources found in this meta, both SSRC and CSRC. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s *SourceMeta) GetSourceCount() uint { return uint(C.gst_rtp_source_meta_get_source_count(s.ptr)) } // SetSSRC sets the SSRC on meta. If ssrc is nil, the SSRC of meta will be unset. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (s *SourceMeta) SetSSRC(ssrc *uint32) bool { if ssrc == nil { return gobool(C.gst_rtp_source_meta_set_ssrc(s.ptr, nil)) diff --git a/gst/trace.go b/gst/trace.go index b68a518..a4d7bdb 100644 --- a/gst/trace.go +++ b/gst/trace.go @@ -4,6 +4,8 @@ import "runtime/pprof" var padprobesProfile *pprof.Profile +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func init() { padprobes := "go-gst-active-pad-probes" padprobesProfile = pprof.Lookup(padprobes) diff --git a/gst/video/c_util.go b/gst/video/c_util.go index 1f01702..a2805ae 100644 --- a/gst/video/c_util.go +++ b/gst/video/c_util.go @@ -12,41 +12,61 @@ import ( "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 wrapGerr(gerr *C.GError) error { defer C.g_error_free(gerr) return errors.New(C.GoString(gerr.message)) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreCaps(caps *gst.Caps) *C.GstCaps { return (*C.GstCaps)(unsafe.Pointer(caps.Instance())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreCapsFeatures(feats *gst.CapsFeatures) *C.GstCapsFeatures { return (*C.GstCapsFeatures)(unsafe.Pointer(feats.Instance())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreElement(elem *gst.Element) *C.GstElement { return (*C.GstElement)(unsafe.Pointer(elem.Instance())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreEvent(event *gst.Event) *C.GstEvent { return (*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 fromCoreMessage(msg *gst.Message) *C.GstMessage { return (*C.GstMessage)(unsafe.Pointer(msg.Instance())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreQuery(query *gst.Query) *C.GstQuery { return (*C.GstQuery)(unsafe.Pointer(query.Instance())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreSample(sample *gst.Sample) *C.GstSample { return (*C.GstSample)(unsafe.Pointer(sample.Instance())) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func fromCoreStructure(structure *gst.Structure) *C.GstStructure { return (*C.GstStructure)(unsafe.Pointer(structure.Instance())) } +// +// 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 } diff --git a/gst/video/cgo_exports.go b/gst/video/cgo_exports.go index 8c7bfb5..0dd50ab 100644 --- a/gst/video/cgo_exports.go +++ b/gst/video/cgo_exports.go @@ -13,11 +13,15 @@ import ( ) //export goVideoGDestroyNotifyFunc +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func goVideoGDestroyNotifyFunc(ptr C.gpointer) { gopointer.Unref(unsafe.Pointer(ptr)) } //export goVideoConvertSampleCb +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func goVideoConvertSampleCb(gsample *C.GstSample, gerr *C.GError, userData C.gpointer) { var sample *gst.Sample var err error diff --git a/gst/video/convert_frame.go b/gst/video/convert_frame.go index 25ba36b..cbcc250 100644 --- a/gst/video/convert_frame.go +++ b/gst/video/convert_frame.go @@ -34,6 +34,8 @@ type ConvertSampleCallback func(*gst.Sample, error) // The output caps can be any raw video formats or any image formats (jpeg, png, ...). // // The width, height and pixel-aspect-ratio can also be specified in the output caps. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ConvertSample(sample *gst.Sample, toCaps *gst.Caps, timeout gst.ClockTime) (*gst.Sample, error) { var gerr *C.GError ret := C.gst_video_convert_sample( @@ -59,6 +61,8 @@ func ConvertSample(sample *gst.Sample, toCaps *gst.Caps, timeout gst.ClockTime) // // The callback will be called after conversion, when an error occurred or if conversion // didn't finish after timeout. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ConvertSampleAsync(sample *gst.Sample, toCaps *gst.Caps, timeout gst.ClockTime, cb ConvertSampleCallback) { ptr := gopointer.Save(cb) C.gst_video_convert_sample_async( diff --git a/gst/video/gst_color_balance.go b/gst/video/gst_color_balance.go index ec1295e..1b1b78f 100644 --- a/gst/video/gst_color_balance.go +++ b/gst/video/gst_color_balance.go @@ -31,6 +31,8 @@ const ( // ColorBalanceChannel represents parameters for modifying the color balance implemented by // an element providing the GstColorBalance interface. For example, Hue or Saturation. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type ColorBalanceChannel struct { // A string containing a descriptive name for this channel Label string @@ -45,6 +47,8 @@ type ColorBalanceChannel struct { // hue or saturation. // // Example elements are 'xvimagesink' and 'colorbalance' +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type ColorBalance interface { // Get the ColorBalanceType of this implementation. GetBalanceType() ColorBalanceType @@ -60,6 +64,8 @@ type ColorBalance interface { // ColorBalanceFromElement checks if the given element implements the ColorBalance interface, // and if so, returns a usable interface. This currently only supports elements created from the // C runtime. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ColorBalanceFromElement(element *gst.Element) ColorBalance { if C.toGstColorBalance(fromCoreElement(element)) == nil { return nil @@ -72,16 +78,22 @@ func ColorBalanceFromElement(element *gst.Element) ColorBalance { type gstColorBalance struct{ elem *C.GstElement } // Instance returns the C GstColorBalance interface. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *gstColorBalance) Instance() *C.GstColorBalance { return C.toGstColorBalance(c.elem) } // GetBalanceType gets the ColorBalanceType of this implementation. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *gstColorBalance) GetBalanceType() ColorBalanceType { return ColorBalanceType(C.gst_color_balance_get_balance_type(c.Instance())) } // GetValue retrieve the current value of the indicated channel, between MinValue and MaxValue. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *gstColorBalance) GetValue(channel *ColorBalanceChannel) int { cLabel := C.CString(channel.Label) defer C.free(unsafe.Pointer(cLabel)) @@ -95,6 +107,8 @@ func (c *gstColorBalance) GetValue(channel *ColorBalanceChannel) int { } // ListChannels retrieves a list of the available channels. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *gstColorBalance) ListChannels() []*ColorBalanceChannel { gList := C.gst_color_balance_list_channels(c.Instance()) if gList == nil { @@ -116,6 +130,8 @@ func (c *gstColorBalance) ListChannels() []*ColorBalanceChannel { // SetValue sets the current value of the channel to the passed value, which must be between MinValue // and MaxValue. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *gstColorBalance) SetValue(channel *ColorBalanceChannel, value int) { cLabel := C.CString(channel.Label) defer C.free(unsafe.Pointer(cLabel)) diff --git a/gst/video/gst_meta.go b/gst/video/gst_meta.go index c129b78..8bed6a3 100644 --- a/gst/video/gst_meta.go +++ b/gst/video/gst_meta.go @@ -13,35 +13,51 @@ import ( ) // CropMetaInfo contains extra buffer metadata describing image cropping. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type CropMetaInfo struct { ptr *C.GstVideoCropMeta } // GetCropMetaInfo returns the default CropMetaInfo. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func GetCropMetaInfo() *CropMetaInfo { meta := C.gst_video_crop_meta_get_info() return &CropMetaInfo{(*C.GstVideoCropMeta)(unsafe.Pointer(meta))} } // Instance returns the underlying C GstVideoCropMeta instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CropMetaInfo) Instance() *C.GstVideoCropMeta { return c.ptr } // Meta returns the parent Meta instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CropMetaInfo) Meta() *gst.Meta { meta := c.Instance().meta return gst.FromGstMetaUnsafe(unsafe.Pointer(&meta)) } // X returns the horizontal offset. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CropMetaInfo) X() uint { return uint(c.Instance().x) } // Y returns the vertical offset. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CropMetaInfo) Y() uint { return uint(c.Instance().y) } // Width returns the cropped width. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CropMetaInfo) Width() uint { return uint(c.Instance().width) } // Height returns the cropped height. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *CropMetaInfo) Height() uint { return uint(c.Instance().height) } diff --git a/gst/video/gst_navigation.go b/gst/video/gst_navigation.go index e937b38..30ce0f4 100644 --- a/gst/video/gst_navigation.go +++ b/gst/video/gst_navigation.go @@ -131,6 +131,8 @@ events. One main use-case is DVD menu navigation. The Navigation message functions provide functions for creating and parsing custom bus messages for signaling GstNavigation changes. */ +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Navigation interface { // Sends the indicated command to the navigation interface. SendCommand(NavigationCommand) @@ -153,6 +155,8 @@ type Navigation interface { // NavigationFromElement checks if the given element implements the Navigation interface. If it does, // a useable interface is returned. Otherwise, it returns nil. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NavigationFromElement(element *gst.Element) Navigation { if C.toGstNavigation(fromCoreElement(element)) == nil { return nil @@ -160,22 +164,32 @@ func NavigationFromElement(element *gst.Element) Navigation { return &gstNavigation{fromCoreElement(element)} } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type gstNavigation struct { elem *C.GstElement } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *gstNavigation) instance() *C.GstNavigation { return C.toGstNavigation(n.elem) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *gstNavigation) SendCommand(cmd NavigationCommand) { C.gst_navigation_send_command(n.instance(), C.GstNavigationCommand(cmd)) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *gstNavigation) SendEvent(structure *gst.Structure) { C.gst_navigation_send_event(n.instance(), fromCoreStructure(structure)) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *gstNavigation) SendKeyEvent(event KeyEvent, key string) { cEvent := C.CString(string(event)) cKey := C.CString(key) @@ -188,6 +202,8 @@ func (n *gstNavigation) SendKeyEvent(event KeyEvent, key string) { ) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *gstNavigation) SendMouseEvent(event MouseEvent, button int, x, y float64) { cEvent := C.CString(string(event)) defer C.free(unsafe.Pointer(cEvent)) @@ -198,6 +214,8 @@ func (n *gstNavigation) SendMouseEvent(event MouseEvent, button int, x, y float6 ) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (n *gstNavigation) SendMouseScrollEvent(x, y, dX, dY float64) { C.gst_navigation_send_mouse_scroll_event( n.instance(), @@ -213,6 +231,8 @@ type NavigationEvent struct{ *gst.Event } // ToNavigationEvent checks if the given event is a NavigationEvent, and if so, returrns // a NavigationEvent instance wrapping the event. If the event is not a NavigationEvent // this function returns nil. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ToNavigationEvent(event *gst.Event) *NavigationEvent { evType := NavigationEventType(C.gst_navigation_event_get_type(fromCoreEvent(event))) if evType == NavigationEventInvalid { @@ -222,11 +242,15 @@ func ToNavigationEvent(event *gst.Event) *NavigationEvent { } // GetType returns the type of this event. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (e *NavigationEvent) GetType() NavigationEventType { return NavigationEventType(C.gst_navigation_event_get_type(e.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 *NavigationEvent) instance() *C.GstEvent { return fromCoreEvent(e.Event) } // NavigationMessage extends the Event from the core library and is used by elements @@ -237,6 +261,8 @@ type NavigationMessage struct{ *gst.Message } // ToNavigationMessage checks if the given message is a NavigationMessage, and if so, // returns a NavigatonMessage instance wrapping the message. If the message is not a // NavigationMessage, this function returns nil. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ToNavigationMessage(msg *gst.Message) *NavigationMessage { msgType := NavigationMessageType(C.gst_navigation_message_get_type(fromCoreMessage(msg))) if msgType == NavigationMessageInvalid { @@ -246,9 +272,13 @@ func ToNavigationMessage(msg *gst.Message) *NavigationMessage { } // instance returns the underlying GstMessage instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *NavigationMessage) instance() *C.GstMessage { return fromCoreMessage(m.Message) } // GetType returns the type of this message. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (m *NavigationMessage) GetType() NavigationMessageType { return NavigationMessageType(C.gst_navigation_message_get_type(m.instance())) } @@ -261,6 +291,8 @@ type NavigationQuery struct{ *gst.Query } // ToNavigationQuery checks if the given query is a NavigationQuery, and if so, returns // a NavigationQuery instance wrapping the query. If the query is not a NavigationQuery, // this function returns nil. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func ToNavigationQuery(query *gst.Query) *NavigationQuery { qType := NavigationQueryType(C.gst_navigation_query_get_type(fromCoreQuery(query))) if qType == NavigationQueryInvalid { @@ -270,9 +302,13 @@ func ToNavigationQuery(query *gst.Query) *NavigationQuery { } // 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 *NavigationQuery) instance() *C.GstQuery { return fromCoreQuery(q.Query) } // GetType returns the type of this query. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (q *NavigationQuery) GetType() NavigationQueryType { return NavigationQueryType(C.gst_navigation_query_get_type(q.instance())) } diff --git a/gst/video/gst_video.go b/gst/video/gst_video.go index f264979..49e8e9f 100644 --- a/gst/video/gst_video.go +++ b/gst/video/gst_video.go @@ -37,6 +37,8 @@ const ( // Alignment represents parameters for the memory of video buffers. This structure is // usually used to configure the bufferpool if it supports the BufferPoolOptionVideoAlignment. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Alignment struct { // extra pixels on the top PaddingTop uint @@ -48,6 +50,8 @@ type Alignment struct { PaddingRight uint } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (a *Alignment) instance() *C.GstVideoAlignment { g := &C.GstVideoAlignment{ padding_top: C.guint(a.PaddingTop), @@ -64,6 +68,8 @@ func (a *Alignment) instance() *C.GstVideoAlignment { // video will be rendered with. // // See https://gstreamer.freedesktop.org/documentation/video/gstvideo.html?gi-language=c#gst_video_calculate_display_ratio +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func CalculateDisplayRatio(videoWidth, videoHeight, videoParNum, videoParDenom, displayParNum, displayParDenom uint) (darNum, darDenom uint, ok bool) { var gNum, gDenom C.guint gok := C.gst_video_calculate_display_ratio( @@ -81,6 +87,8 @@ func CalculateDisplayRatio(videoWidth, videoHeight, videoParNum, videoParDenom, // It will calculate an arbitrary framerate if no close match was found, and return FALSE. // // It returns FALSE if a duration of 0 is passed. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func GuessFramerate(dur gst.ClockTime) (destNum, destDenom int, ok bool) { var num, denom C.gint gok := C.gst_video_guess_framerate(C.GstClockTime(dur), &num, &denom) diff --git a/gst/video/gst_video_chroma_resample.go b/gst/video/gst_video_chroma_resample.go index a160ac6..f2c0ecf 100644 --- a/gst/video/gst_video_chroma_resample.go +++ b/gst/video/gst_video_chroma_resample.go @@ -42,6 +42,8 @@ const ( ) // String implements a stringer on ChromaSite. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c ChromaSite) String() string { out := C.gst_video_chroma_to_string(C.GstVideoChromaSite(c)) defer C.g_free((C.gpointer)(unsafe.Pointer(out))) @@ -49,12 +51,16 @@ func (c ChromaSite) String() string { } // ChromaResample is a utility object for resampling chroma planes and converting between different chroma sampling sitings. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type ChromaResample struct { ptr *C.GstVideoChromaResample } // NewChromaResample creates a new resampler object for the given parameters. When h_factor or v_factor is > 0, // upsampling will be used, otherwise subsampling is performed. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewChromaResample(method ChromaMethod, site ChromaSite, flags ChromaFlags, format Format, hFactor, vFactor int) *ChromaResample { resample := C.gst_video_chroma_resample_new( C.GstVideoChromaMethod(method), @@ -71,10 +77,14 @@ func NewChromaResample(method ChromaMethod, site ChromaSite, flags ChromaFlags, return goResample } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *ChromaResample) instance() *C.GstVideoChromaResample { return c.ptr } // GetInfo returns the info about the Resample. The resampler must be fed n_lines at a time. The first line // should be at offset. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (c *ChromaResample) GetInfo() (nLines uint, offset int) { var lines C.guint var off C.gint diff --git a/gst/video/gst_video_color.go b/gst/video/gst_video_color.go index 2b7bb11..4e2d6ac 100644 --- a/gst/video/gst_video_color.go +++ b/gst/video/gst_video_color.go @@ -88,6 +88,8 @@ const ( // ColorPrimariesInfo is a structure describing the chromaticity coordinates of an RGB system. // These values can be used to construct a matrix to transform RGB to and from the XYZ colorspace. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type ColorPrimariesInfo struct { Primaries ColorPrimaries Wx, Wy float64 // Reference white coordinates @@ -113,6 +115,8 @@ type ColorPrimariesInfo struct { // } // Colorimetry is a structure describing the color info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Colorimetry struct { // The color range. This is the valid range for the samples. It is used to convert the samples to Y'PbPr values. Range ColorRange @@ -135,6 +139,8 @@ type Colorimetry struct { // return i // } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func colorimetryFromInstance(c C.GstVideoColorimetry) *Colorimetry { return &Colorimetry{ Range: ColorRange(c._range), diff --git a/gst/video/gst_video_format.go b/gst/video/gst_video_format.go index d789f0a..da1bd25 100644 --- a/gst/video/gst_video_format.go +++ b/gst/video/gst_video_format.go @@ -40,6 +40,8 @@ import ( "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() { glib.RegisterGValueMarshalers([]glib.TypeMarshaler{ { @@ -160,6 +162,8 @@ const ( // AllFormats is a convenience function for retrieving all formats for inspection purposes. // This is not really intended for use in an application, and more so for debugging. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func AllFormats() []Format { return []Format{ FormatI420, @@ -263,6 +267,8 @@ func AllFormats() []Format { } // RawFormats returns a slice of all the raw video 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 { var size C.guint formats := C.gst_video_formats_raw(&size) @@ -275,6 +281,8 @@ func RawFormats() []Format { // MakeRawCaps returns a generic raw video caps for formats defined in formats. If formats is empty or nil, returns a caps for // all the supported raw video formats, see RawFormats. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func MakeRawCaps(formats []Format) *gst.Caps { var caps *C.GstCaps if len(formats) == 0 { @@ -290,6 +298,8 @@ func MakeRawCaps(formats []Format) *gst.Caps { // MakeRawCapsWithFeatures returns a generic raw video caps for formats defined in formats with features. If formats is // empty or nil, returns a caps for all the supported video formats, see RawFormats. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func MakeRawCapsWithFeatures(formats []Format, features *gst.CapsFeatures) *gst.Caps { var caps *C.GstCaps if len(formats) == 0 { @@ -308,6 +318,8 @@ func MakeRawCapsWithFeatures(formats []Format, features *gst.CapsFeatures) *gst. var TypeFormat = glib.Type(C.gst_video_format_get_type()) // 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) { val, err := glib.ValueInit(TypeFormat) if err != nil { @@ -318,6 +330,8 @@ func (f Format) ToGValue() (*glib.Value, error) { } // Info returns the FormatInfo for this video format. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f Format) Info() *FormatInfo { finfo := C.gst_video_format_get_info(C.GstVideoFormat(f)) info := &FormatInfo{ptr: finfo} @@ -327,6 +341,8 @@ func (f Format) Info() *FormatInfo { // Palette returns the color palette for this format, or nil if the format does not have one. // At time of writing, RGB8P appears to be the only format with it's own palette. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f Format) Palette() color.Palette { var size C.gsize ptr := C.gst_video_format_get_palette(C.GstVideoFormat(f), &size) @@ -340,6 +356,8 @@ func (f Format) Palette() color.Palette { return bytesToColorPalette(paletteBytes) } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func bytesToColorPalette(in []uint8) color.Palette { palette := make([]color.Color, len(in)/4) for i := 0; i < len(in); i += 4 { @@ -349,12 +367,16 @@ func bytesToColorPalette(in []uint8) color.Palette { } // String implements a stringer on a Format. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f Format) String() string { return C.GoString(C.gst_video_format_to_string(C.GstVideoFormat(f))) } // FOURCC converts this format value into the corresponding FOURCC. Only a few YUV formats have corresponding // FOURCC values. If format has no corresponding FOURCC value, 0 is returned. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f Format) FOURCC() uint32 { return uint32(C.gst_video_format_to_fourcc(C.GstVideoFormat(f))) } @@ -386,89 +408,139 @@ const ( ) // FormatInfo contains information for a video format. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type FormatInfo struct { ptr *C.GstVideoFormatInfo } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) instance() *C.GstVideoFormatInfo { return f.ptr } // Bits returns the number of bits used to pack data items. This can be less than 8 when // multiple pixels are stored in a byte. for values > 8 multiple bytes should be read // according to the endianness flag before applying the shift and mask. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) Bits() uint { return uint(C.formatInfoBits(f.instance())) } // ComponentDepth returns the depth in bits for the given component. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) ComponentDepth(component uint) uint { return uint(C.formatInfoDepth(f.instance(), C.guint(component))) } // ComponentHSub returns the subsampling factor of the height for the component. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) ComponentHSub(component uint) uint { return uint(C.formatInfoHSub(f.instance(), C.guint(component))) } // ComponentWSub returns the subsampling factor of the width for the component. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) ComponentWSub(n uint) uint { return uint(C.formatInfoWSub(f.instance(), C.guint(n))) } // 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(C.formatInfoFlags(f.instance())) } // 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(C.formatInfoFormat(f.instance())) } // HasAlpha returns true if the alpha flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) HasAlpha() bool { return gobool(C.formatInfoHasAlpha(f.instance())) } // HasPalette returns true if this info has a palette. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) HasPalette() bool { return gobool(C.formatInfoHasPalette(f.instance())) } // IsComplex returns true if the complex flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) IsComplex() bool { return gobool(C.formatInfoIsComplex(f.instance())) } // IsGray returns true if the gray flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) IsGray() bool { return gobool(C.formatInfoIsGray(f.instance())) } // IsLE returns true if the LE flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) IsLE() bool { return gobool(C.formatInfoIsLE(f.instance())) } // IsRGB returns true if the RGB flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) IsRGB() bool { return gobool(C.formatInfoIsRGB(f.instance())) } // IsTiled returns true if the tiled flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) IsTiled() bool { return gobool(C.formatInfoIsTiled(f.instance())) } // IsYUV returns true if the YUV flag is set. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) IsYUV() bool { return gobool(C.formatInfoIsYUV(f.instance())) } // Name returns a human readable 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(C.formatInfoName(f.instance())) } // NumComponents returns the number of components in this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) NumComponents() uint { return uint(C.formatInfoNComponent(f.instance())) } // NumPlanes returns the number of planes in this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) NumPlanes() uint { return uint(C.formatInfoNPlanes(f.instance())) } // Plane returns the given plane index. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) Plane(n uint) uint { return uint(C.formatInfoPlane(f.instance(), C.guint(n))) } // PlaneOffset returns the offset for the given plane. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) PlaneOffset(n uint) uint { return uint(C.formatInfoPOffset(f.instance(), C.guint(n))) } // PlaneStride returns the stride for the given plane. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) PlaneStride(n uint) uint { return uint(C.formatInfoPStride(f.instance(), C.guint(n))) } // TileHS returns the height of a tile, in bytes, represented as a shift. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) TileHS() uint { return uint(C.formatInfoTileHS(f.instance())) } // TileMode returns the tiling mode. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) TileMode() TileMode { return TileMode(C.formatInfoTileMode(f.instance())) } // TileWS returns the width of a tile, in bytes, represented as a shift. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f *FormatInfo) TileWS() uint { return uint(C.formatInfoTileWS(f.instance())) } diff --git a/gst/video/gst_video_info.go b/gst/video/gst_video_info.go index 02deb74..c877b7f 100644 --- a/gst/video/gst_video_info.go +++ b/gst/video/gst_video_info.go @@ -64,6 +64,8 @@ const ( ) // String implements a stringer on FieldOrder +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (f FieldOrder) String() string { cStr := C.gst_video_field_order_to_string(C.GstVideoFieldOrder(f)) return C.GoString(cStr) @@ -92,6 +94,8 @@ const ( ) // String implements a stringer on interlace mode +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i InterlaceMode) String() string { return C.GoString(C.gst_video_interlace_mode_to_string(C.GstVideoInterlaceMode(i))) } @@ -158,10 +162,14 @@ const ( // Info describes image properties. This information can be filled in from GstCaps with // InfoFromCaps. The information is also used to store the specific video info when mapping // a video frame with FrameMap. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. type Info struct { ptr *C.GstVideoInfo } +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func wrapInfo(vinfo *C.GstVideoInfo) *Info { info := &Info{vinfo} runtime.SetFinalizer(info, (*Info).Free) @@ -169,20 +177,28 @@ func wrapInfo(vinfo *C.GstVideoInfo) *Info { } // Free will free this video info +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Free() { C.gst_video_info_free(i.instance()) } // instance returns the underlying GstVideoInfo instance. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) instance() *C.GstVideoInfo { return i.ptr } // NewInfo returns a new Info instance. You can populate it by chaining builders // to this constructor. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func NewInfo() *Info { return wrapInfo(C.gst_video_info_new()) } // FromCaps parses the caps and updates this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FromCaps(caps *gst.Caps) *Info { C.gst_video_info_from_caps(i.instance(), fromCoreCaps(caps)) return i @@ -191,6 +207,8 @@ func (i *Info) FromCaps(caps *gst.Caps) *Info { // Convert converts among various gst.Format types. This function handles gst.FormatBytes, gst.FormatTime, // and gst.FormatDefault. For raw video, gst.FormatDefault corresponds to video frames. This function can // be used to handle pad queries of the type gst.QueryTypeConvert. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Convert(srcFormat, destFormat gst.Format, srcValue int64) (out int64, ok bool) { var gout C.gint64 gok := C.gst_video_info_convert(i.instance(), C.GstFormat(srcFormat), C.gint64(srcValue), C.GstFormat(destFormat), &gout) @@ -198,47 +216,65 @@ func (i *Info) Convert(srcFormat, destFormat gst.Format, srcValue int64) (out in } // IsEqual compares two GstVideoInfo and returns whether they are equal or not. +// +// 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 { return gobool(C.gst_video_info_is_equal(i.instance(), info.instance())) } // ChromaSite returns the ChromaSite for this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) ChromaSite() ChromaSite { return ChromaSite(C.infoChromaSite(i.instance())) } // Colorimetry returns the colorimetry for this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Colorimetry() *Colorimetry { return colorimetryFromInstance(C.infoColorimetry(i.instance())) } // FieldHeight returns the field height for this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FieldHeight() int { return int(C.infoFieldHeight(i.instance())) } // FieldOrder returns the field order for this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FieldOrder() FieldOrder { return FieldOrder(C.infoFieldOrder(i.instance())) } // FieldRateN returns the rate numerator depending on the interlace mode. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FieldRateN() int { return int(C.infoFieldRateN(i.instance())) } // 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 (i *Info) Flags() Flags { return Flags(C.infoFlags(i.instance())) } // FlagIsSet returns true if the given flag(s) are set on the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FlagIsSet(f Flags) bool { return gobool(C.infoFlagIsSet(i.instance(), C.GstVideoFlags(f))) } // FlagSet sets the given flag(s) on the info. The underlying info is returned // for chaining builders. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FlagSet(f Flags) *Info { C.infoFlagSet(i.instance(), C.GstVideoFlags(f)) return i @@ -246,6 +282,8 @@ func (i *Info) FlagSet(f Flags) *Info { // FlagUnset unsets the given flag(s) on the info. The underlying info is returned // for chaining builders. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FlagUnset(f Flags) *Info { C.infoFlagUnset(i.instance(), C.GstVideoFlags(f)) return i @@ -253,11 +291,15 @@ func (i *Info) FlagUnset(f Flags) *Info { // Format returns the format for the info. You can call Info() on the return value // to inspect the properties further. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Format() Format { return Format(C.infoFormat(i.instance())) } // FPS returns the frames-per-second value for the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) FPS() *gst.FractionValue { return gst.Fraction( int(C.infoFPSn(i.instance())), @@ -266,58 +308,84 @@ func (i *Info) FPS() *gst.FractionValue { } // HasAlpha returns true if the alpha flag is set on the format info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) HasAlpha() bool { return gobool(C.infoHasAlpha(i.instance())) } // Height returns the height of the video. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Height() int { return int(C.infoHeight(i.instance())) } // InterlaceMode returns the interlace mode of this Info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) InterlaceMode() InterlaceMode { return InterlaceMode(C.infoInterlaceMode(i.instance())) } // IsInterlaced returns true if the interlace mode is not Progressive. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) IsInterlaced() bool { return gobool(C.infoIsInterlaced(i.instance())) } // IsGray returns if the format is grayscale. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) IsGray() bool { return gobool(C.infoIsGray(i.instance())) } // IsRGB returns if the format is RGB. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) IsRGB() bool { return gobool(C.infoIsRGB(i.instance())) } // IsYUV returns if the format is YUV. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) IsYUV() bool { return gobool(C.infoIsYUV(i.instance())) } // MultiviewFlags returns the MultiviewFlags on the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) MultiviewFlags() MultiviewFlags { return MultiviewFlags(C.infoMultiviewFlags(i.instance())) } // MultiviewMode returns the MultiviewMode on thee info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) MultiviewMode() MultiviewMode { return MultiviewMode(C.infoMultiviewMode(i.instance())) } // Name returns a human readable name forr the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Name() string { return C.GoString(C.infoName(i.instance())) } // NumComponents returns the number of components in the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) NumComponents() uint { return uint(C.infoNComponents(i.instance())) } // NumPlanes returns the number of planes in the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) NumPlanes() uint { return uint(C.infoNPlanes(i.instance())) } // PAR returns the pixel-aspect-ration value for the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) PAR() *gst.FractionValue { return gst.Fraction( int(C.infoPARn(i.instance())), @@ -326,16 +394,22 @@ func (i *Info) PAR() *gst.FractionValue { } // Size returns the size of the info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Size() int64 { return int64(C.infoSize(i.instance())) } // Views returns the number of views. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Views() int { return int(C.infoViews(i.instance())) } // Width returns the width of the video. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) Width() int { return int(C.infoWidth(i.instance())) } // WithAlign adjusts the offset and stride fields in info so that the padding and stride alignment in @@ -343,6 +417,8 @@ func (i *Info) Width() int { return int(C.infoWidth(i.instance())) } // // Extra padding will be added to the right side when stride alignment padding is required and align // will be updated with the new padding values. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) WithAlign(align *Alignment) *Info { C.gst_video_info_align(i.instance(), align.instance()) return i @@ -354,12 +430,16 @@ func (i *Info) WithAlign(align *Alignment) *Info { // correctly for interlaced vertically subsampled formats. If the format is invalid (e.g. because the // size of a frame can't be represented as a 32 bit integer), nothing will happen. This is is for // convenience in chaining, but may be changed in the future. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) WithFormat(format Format, width, height uint) *Info { C.gst_video_info_set_format(i.instance(), C.GstVideoFormat(format), C.guint(width), C.guint(height)) return i } // WithInterlacedFormat is the same as WithFormat but also allows to set the interlaced mode. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) WithInterlacedFormat(format Format, interlaceMode InterlaceMode, width, height uint) *Info { C.gst_video_info_set_interlaced_format( i.instance(), @@ -371,6 +451,8 @@ func (i *Info) WithInterlacedFormat(format Format, interlaceMode InterlaceMode, } // WithFPS sets the FPS on this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) WithFPS(f *gst.FractionValue) *Info { i.instance().fps_d = C.gint(f.Denom()) i.instance().fps_n = C.gint(f.Num()) @@ -378,6 +460,8 @@ func (i *Info) WithFPS(f *gst.FractionValue) *Info { } // WithPAR sets the FPS on this info. +// +// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead. func (i *Info) WithPAR(f *gst.FractionValue) *Info { i.instance().par_d = C.gint(f.Denom()) i.instance().par_n = C.gint(f.Num()) @@ -385,6 +469,8 @@ func (i *Info) WithPAR(f *gst.FractionValue) *Info { } // ToCaps returns the caps representation of this video 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 { caps := C.gst_video_info_to_caps(i.instance()) return gst.FromGstCapsUnsafeFull(unsafe.Pointer(caps))