Files
go-gst/gst/gst_plugin_feature.go
2025-09-16 22:36:07 +02:00

52 lines
1.8 KiB
Go

package gst
// #include "gst.go.h"
import "C"
import (
"unsafe"
)
// PluginFeature wraps the C GstPluginFeature.
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 {
return nil
}
return FromGstPluginUnsafeFull(unsafe.Pointer(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 {
return ""
}
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)
}