deprecate old gst functions and types

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

View File

@@ -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 <joe.blogs at foo.com>"
//
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
func (e *ElementClass) SetMetadata(longname, classification, description, author string) {
C.gst_element_class_set_static_metadata(
e.Instance(),