mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-06 00:17:00 +08:00
add some more boilerplate interfaces and finish out pad constants
This commit is contained in:
@@ -225,6 +225,55 @@ func (m MessageType) String() string {
|
||||
return C.GoString(C.gst_message_type_get_name((C.GstMessageType)(m)))
|
||||
}
|
||||
|
||||
// PadFlags is a go cast of GstPadFlags
|
||||
type PadFlags int
|
||||
|
||||
// Type casts of PadFlags
|
||||
const (
|
||||
PadFlagBlocked PadFlags = C.GST_PAD_FLAG_BLOCKED // (16) – is dataflow on a pad blocked
|
||||
PadFlagFlushing PadFlags = C.GST_PAD_FLAG_FLUSHING // (32) – is pad flushing
|
||||
PadFlagEOS PadFlags = C.GST_PAD_FLAG_EOS // (64) – is pad in EOS state
|
||||
PadFlagBlocking PadFlags = C.GST_PAD_FLAG_BLOCKING // (128) – is pad currently blocking on a buffer or event
|
||||
PadFlagParent PadFlags = C.GST_PAD_FLAG_NEED_PARENT // (256) – ensure that there is a parent object before calling into the pad callbacks.
|
||||
PadFlagReconfigure PadFlags = C.GST_PAD_FLAG_NEED_RECONFIGURE // (512) – the pad should be reconfigured/renegotiated. The flag has to be unset manually after reconfiguration happened.
|
||||
PadFlagPendingEvents PadFlags = C.GST_PAD_FLAG_PENDING_EVENTS // (1024) – the pad has pending events
|
||||
PadFlagFixedCaps PadFlags = C.GST_PAD_FLAG_FIXED_CAPS // (2048) – the pad is using fixed caps. This means that once the caps are set on the pad, the default caps query function will only return those caps.
|
||||
PadFlagProxyCaps PadFlags = C.GST_PAD_FLAG_PROXY_CAPS // (4096) – the default event and query handler will forward all events and queries to the internally linked pads instead of discarding them.
|
||||
PadFlagProxyAllocation PadFlags = C.GST_PAD_FLAG_PROXY_ALLOCATION // (8192) – the default query handler will forward allocation queries to the internally linked pads instead of discarding them.
|
||||
PadFlagProxyScheduling PadFlags = C.GST_PAD_FLAG_PROXY_SCHEDULING // (16384) – the default query handler will forward scheduling queries to the internally linked pads instead of discarding them.
|
||||
PadFlagAcceptIntersect PadFlags = C.GST_PAD_FLAG_ACCEPT_INTERSECT // (32768) – the default accept-caps handler will check it the caps intersect the query-caps result instead of checking for a subset. This is interesting for parsers that can accept incompletely specified caps.
|
||||
PadFlagAcceptTemplate PadFlags = C.GST_PAD_FLAG_ACCEPT_TEMPLATE // (65536) – the default accept-caps handler will use the template pad caps instead of query caps to compare with the accept caps. Use this in combination with GST_PAD_FLAG_ACCEPT_INTERSECT. (Since: 1.6)
|
||||
PadFlagLast PadFlags = C.GST_PAD_FLAG_LAST // (1048576) – offset to define more flags
|
||||
)
|
||||
|
||||
// PadLinkCheck is a go cast of GstPadLinkCheck
|
||||
type PadLinkCheck int
|
||||
|
||||
// Type casts of PadLinkChecks
|
||||
const (
|
||||
PadLinkCheckNothing PadLinkCheck = C.GST_PAD_LINK_CHECK_NOTHING // (0) – Don't check hierarchy or caps compatibility.
|
||||
PadLinkCheckHierarchy PadLinkCheck = C.GST_PAD_LINK_CHECK_HIERARCHY // (1) – Check the pads have same parents/grandparents. Could be omitted if it is already known that the two elements that own the pads are in the same bin.
|
||||
PadLinkCheckTemplateCaps PadLinkCheck = C.GST_PAD_LINK_CHECK_TEMPLATE_CAPS // (2) – Check if the pads are compatible by using their template caps. This is much faster than GST_PAD_LINK_CHECK_CAPS, but would be unsafe e.g. if one pad has GST_CAPS_ANY.
|
||||
PadLinkCheckCaps PadLinkCheck = C.GST_PAD_LINK_CHECK_CAPS // (4) – Check if the pads are compatible by comparing the caps returned by gst_pad_query_caps.
|
||||
PadLinkCheckNoReconfigure PadLinkCheck = C.GST_PAD_LINK_CHECK_NO_RECONFIGURE // (8) – Disables pushing a reconfigure event when pads are linked.
|
||||
PadLinkCheckDefault PadLinkCheck = C.GST_PAD_LINK_CHECK_DEFAULT // (5) – The default checks done when linking pads (i.e. the ones used by gst_pad_link).
|
||||
)
|
||||
|
||||
// PadMode is a cast of GstPadMode.
|
||||
type PadMode int
|
||||
|
||||
// Type casts of PadModes
|
||||
const (
|
||||
PadModeNone PadMode = C.GST_PAD_MODE_NONE // (0) – Pad will not handle dataflow
|
||||
PadModePush PadMode = C.GST_PAD_MODE_PUSH // (1) – Pad handles dataflow in downstream push mode
|
||||
PadModePull PadMode = C.GST_PAD_MODE_PULL // (2) – Pad handles dataflow in upstream pull mode
|
||||
)
|
||||
|
||||
// String implements a stringer on PadMode
|
||||
func (p PadMode) String() string {
|
||||
return C.GoString(C.gst_pad_mode_get_name(C.GstPadMode(p)))
|
||||
}
|
||||
|
||||
// PadDirection is a cast of GstPadDirection to a go type.
|
||||
type PadDirection int
|
||||
|
||||
@@ -285,6 +334,47 @@ func (p PadPresence) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// PadProbeReturn casts GstPadProbeReturn
|
||||
type PadProbeReturn int
|
||||
|
||||
// Type castings of ProbeReturns
|
||||
const (
|
||||
PadProbeDrop PadProbeReturn = C.GST_PAD_PROBE_DROP // (0) – drop data in data probes. For push mode this means that the data item is not sent downstream. For pull mode, it means that the data item is not passed upstream. In both cases, no other probes are called for this item and GST_FLOW_OK or TRUE is returned to the caller.
|
||||
PadProbeOK PadProbeReturn = C.GST_PAD_PROBE_OK // (1) – normal probe return value. This leaves the probe in place, and defers decisions about dropping or passing data to other probes, if any. If there are no other probes, the default behaviour for the probe type applies ('block' for blocking probes, and 'pass' for non-blocking probes).
|
||||
PadProbeRemove PadProbeReturn = C.GST_PAD_PROBE_REMOVE // (2) – remove this probe.
|
||||
PadProbePass PadProbeReturn = C.GST_PAD_PROBE_PASS // (3) – pass the data item in the block probe and block on the next item.
|
||||
PadProbeUnhandled PadProbeReturn = C.GST_PAD_PROBE_HANDLED // (4) – Data has been handled in the probe and will not be forwarded further. For events and buffers this is the same behaviour as GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer or event yourself). For queries it will also return TRUE to the caller. The probe can also modify the GstFlowReturn value by using the GST_PAD_PROBE_INFO_FLOW_RETURN() accessor. Note that the resulting query must contain valid entries. Since: 1.6
|
||||
)
|
||||
|
||||
// PadProbeType casts GstPadProbeType
|
||||
type PadProbeType int
|
||||
|
||||
// Type castings of PadProbeTypes
|
||||
const (
|
||||
PadProbeTypeInvalid PadProbeType = C.GST_PAD_PROBE_TYPE_INVALID // (0) – invalid probe type
|
||||
PadProbeTypeIdle PadProbeType = C.GST_PAD_PROBE_TYPE_IDLE // (1) – probe idle pads and block while the callback is called
|
||||
PadProbeTypeBlock PadProbeType = C.GST_PAD_PROBE_TYPE_BLOCK // (2) – probe and block pads
|
||||
PadProbeTypeBuffer PadProbeType = C.GST_PAD_PROBE_TYPE_BUFFER // (16) – probe buffers
|
||||
PadProbeTypeBufferList PadProbeType = C.GST_PAD_PROBE_TYPE_BUFFER_LIST // (32) – probe buffer lists
|
||||
PadProbeTypeEventDownstream PadProbeType = C.GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM // (64) – probe downstream events
|
||||
PadProbeTypeEventUpstream PadProbeType = C.GST_PAD_PROBE_TYPE_EVENT_UPSTREAM // (128) – probe upstream events
|
||||
PadProbeTypeEventFlush PadProbeType = C.GST_PAD_PROBE_TYPE_EVENT_FLUSH // (256) – probe flush events. This probe has to be explicitly enabled and is not included in the @GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or @GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types.
|
||||
PadProbeTypeQueryDownstream PadProbeType = C.GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM // (512) – probe downstream queries
|
||||
PadProbeTypeQueryUpstream PadProbeType = C.GST_PAD_PROBE_TYPE_QUERY_UPSTREAM // (1024) – probe upstream queries
|
||||
PadProbeTypePush PadProbeType = C.GST_PAD_PROBE_TYPE_PUSH // (4096) – probe push
|
||||
PadProbeTypePull PadProbeType = C.GST_PAD_PROBE_TYPE_PULL // (8192) – probe pull
|
||||
PadProbeTypeBlocking PadProbeType = C.GST_PAD_PROBE_TYPE_BLOCKING // (3) – probe and block at the next opportunity, at data flow or when idle
|
||||
PadProbeTypeDataDownstream PadProbeType = C.GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM // (112) – probe downstream data (buffers, buffer lists, and events)
|
||||
PadProbeTypeDataUpstream PadProbeType = C.GST_PAD_PROBE_TYPE_DATA_UPSTREAM // (128) – probe upstream data (events)
|
||||
PadProbeTypeDataBoth PadProbeType = C.GST_PAD_PROBE_TYPE_DATA_BOTH // (240) – probe upstream and downstream data (buffers, buffer lists, and events)
|
||||
PadProbeTypeBlockDownstream PadProbeType = C.GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM // (114) – probe and block downstream data (buffers, buffer lists, and events)
|
||||
PadProbeTypeBlockUpstream PadProbeType = C.GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM // (130) – probe and block upstream data (events)
|
||||
PadProbeTypeEventBoth PadProbeType = C.GST_PAD_PROBE_TYPE_EVENT_BOTH // (192) – probe upstream and downstream events
|
||||
PadProbeTypeQueryBoth PadProbeType = C.GST_PAD_PROBE_TYPE_QUERY_BOTH // (1536) – probe upstream and downstream queries
|
||||
PadProbeTypeAllBoth PadProbeType = C.GST_PAD_PROBE_TYPE_ALL_BOTH // (1776) – probe upstream events and queries and downstream buffers, buffer lists, events and queries
|
||||
PadProbeTypeScheduling PadProbeType = C.GST_PAD_PROBE_TYPE_SCHEDULING // (12288) – probe push and pull
|
||||
)
|
||||
|
||||
// State is a type cast of the C GstState
|
||||
type State int
|
||||
|
||||
@@ -378,6 +468,11 @@ const (
|
||||
FlowNotSupported FlowReturn = C.GST_FLOW_NOT_SUPPORTED // The operation is not supported.
|
||||
)
|
||||
|
||||
// String impelements a stringer on FlowReturn
|
||||
func (f FlowReturn) String() string {
|
||||
return C.GoString(C.gst_flow_get_name(C.GstFlowReturn(f)))
|
||||
}
|
||||
|
||||
// MapFlags is a go casting of GstMapFlags
|
||||
type MapFlags int
|
||||
|
||||
|
@@ -20,16 +20,18 @@ inline GstContext * toGstContext (void *p) { return (GST_CON
|
||||
inline GstDevice * toGstDevice (void *p) { return (GST_DEVICE_CAST(p)); }
|
||||
inline GstElementFactory * toGstElementFactory (void *p) { return (GST_ELEMENT_FACTORY(p)); }
|
||||
inline GstElement * toGstElement (void *p) { return (GST_ELEMENT(p)); }
|
||||
inline GstGhostPad * toGstGhostPad (void *p) { return (GST_GHOST_PAD(p)); }
|
||||
inline GstMemory * toGstMemory (void *p) { return (GST_MEMORY_CAST(p)); }
|
||||
inline GstMessage * toGstMessage (void *p) { return (GST_MESSAGE(p)); }
|
||||
inline GstMeta * toGstMeta (void *p) { return (GST_META_CAST(p)); }
|
||||
inline GstMiniObject * toGstMiniObject (void *p) { return (GST_MINI_OBJECT(p)); }
|
||||
inline GstObject * toGstObject (void *p) { return (GST_OBJECT(p)); }
|
||||
inline GstPadTemplate * toGstPadTemplate (void *p) { return (GST_PAD_TEMPLATE(p)); }
|
||||
inline GstPad * toGstPad (void *p) { return (GST_PAD(p)); }
|
||||
inline GstPadTemplate * toGstPadTemplate (void *p) { return (GST_PAD_TEMPLATE(p)); }
|
||||
inline GstPipeline * toGstPipeline (void *p) { return (GST_PIPELINE(p)); }
|
||||
inline GstPluginFeature * toGstPluginFeature (void *p) { return (GST_PLUGIN_FEATURE(p)); }
|
||||
inline GstPlugin * toGstPlugin (void *p) { return (GST_PLUGIN(p)); }
|
||||
inline GstProxyPad * toGstProxyPad (void *p) { return (GST_PROXY_PAD(p)); }
|
||||
inline GstRegistry * toGstRegistry (void *p) { return (GST_REGISTRY(p)); }
|
||||
inline GstSample * toGstSample (void *p) { return (GST_SAMPLE(p)); }
|
||||
inline GstStreamCollection * toGstStreamCollection (void *p) { return (GST_STREAM_COLLECTION_CAST(p)); }
|
||||
|
32
gst/gst_ghost_pad.go
Normal file
32
gst/gst_ghost_pad.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package gst
|
||||
|
||||
// #include "gst.go.h"
|
||||
import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/gotk3/gotk3/glib"
|
||||
)
|
||||
|
||||
// GhostPad is a go representation of a GstGhostPad.
|
||||
type GhostPad struct{ *ProxyPad }
|
||||
|
||||
// NewGhostPad create a new ghostpad with target as the target. The direction will be
|
||||
// taken from the target pad. The target must be unlinked.
|
||||
//
|
||||
// Will ref the target.
|
||||
func NewGhostPad(name string, target *Pad) *GhostPad {
|
||||
cName := C.CString(name)
|
||||
defer C.free(unsafe.Pointer(cName))
|
||||
pad := C.gst_ghost_pad_new(
|
||||
(*C.gchar)(unsafe.Pointer(cName)),
|
||||
target.Instance(),
|
||||
)
|
||||
if pad == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapGhostPad(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(pad))})
|
||||
}
|
||||
|
||||
// ProxyPad is a go representation of a GstProxyPad.
|
||||
type ProxyPad struct{ *Pad }
|
@@ -12,6 +12,37 @@ import (
|
||||
// Pad is a go representation of a GstPad
|
||||
type Pad struct{ *Object }
|
||||
|
||||
// NewPad returns a new pad with the given direction. If name is empty, one will be generated for you.
|
||||
func NewPad(name string, direction PadDirection) *Pad {
|
||||
var cName *C.gchar
|
||||
if name != "" {
|
||||
cStr := C.CString(name)
|
||||
defer C.free(unsafe.Pointer(cStr))
|
||||
cName = (*C.gchar)(unsafe.Pointer(cStr))
|
||||
}
|
||||
pad := C.gst_pad_new(cName, C.GstPadDirection(direction))
|
||||
if pad == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapPad(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(pad))})
|
||||
}
|
||||
|
||||
// NewPadFromTemplate creates a new pad with the given name from the given template. If name is empty, one will
|
||||
// be generated for you.
|
||||
func NewPadFromTemplate(tmpl *PadTemplate, name string) *Pad {
|
||||
var cName *C.gchar
|
||||
if name != "" {
|
||||
cStr := C.CString(name)
|
||||
defer C.free(unsafe.Pointer(cStr))
|
||||
cName = (*C.gchar)(unsafe.Pointer(cStr))
|
||||
}
|
||||
pad := C.gst_pad_new_from_template(tmpl.Instance(), cName)
|
||||
if pad == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapPad(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(pad))})
|
||||
}
|
||||
|
||||
// Instance returns the underlying C GstPad.
|
||||
func (p *Pad) Instance() *C.GstPad { return C.toGstPad(p.Unsafe()) }
|
||||
|
||||
@@ -33,24 +64,3 @@ func (p *Pad) CurrentCaps() *Caps {
|
||||
}
|
||||
return wrapCaps(caps)
|
||||
}
|
||||
|
||||
// PadTemplate is a go representation of a GstPadTemplate
|
||||
type PadTemplate struct{ *Object }
|
||||
|
||||
// Instance returns the underlying C GstPadTemplate.
|
||||
func (p *PadTemplate) Instance() *C.GstPadTemplate { return C.toGstPadTemplate(p.Unsafe()) }
|
||||
|
||||
// Name returns the name of the pad template.
|
||||
func (p *PadTemplate) Name() string { return C.GoString(p.Instance().name_template) }
|
||||
|
||||
// Direction returns the direction of the pad template.
|
||||
func (p *PadTemplate) Direction() PadDirection { return PadDirection(p.Instance().direction) }
|
||||
|
||||
// Presence returns the presence of the pad template.
|
||||
func (p *PadTemplate) Presence() PadPresence { return PadPresence(p.Instance().presence) }
|
||||
|
||||
// Caps returns the caps of the pad template.
|
||||
func (p *PadTemplate) Caps() *Caps { return wrapCaps(p.Instance().caps) }
|
||||
|
||||
// GhostPad is a go representation of a GstGhostPad
|
||||
type GhostPad struct{ *Pad }
|
||||
|
77
gst/gst_pad_template.go
Normal file
77
gst/gst_pad_template.go
Normal file
@@ -0,0 +1,77 @@
|
||||
package gst
|
||||
|
||||
// #include "gst.go.h"
|
||||
import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/gotk3/gotk3/glib"
|
||||
)
|
||||
|
||||
// PadTemplate is a go representation of a GstPadTemplate
|
||||
type PadTemplate struct{ *Object }
|
||||
|
||||
// NewPadTemplate creates a new pad template with a name according to the given template and with the given arguments.
|
||||
func NewPadTemplate(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps) *PadTemplate {
|
||||
cName := C.CString(nameTemplate)
|
||||
defer C.free(unsafe.Pointer(cName))
|
||||
tmpl := C.gst_pad_template_new(
|
||||
(*C.gchar)(cName),
|
||||
C.GstPadDirection(direction),
|
||||
C.GstPadPresence(presence),
|
||||
caps.Instance(),
|
||||
)
|
||||
if tmpl == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapPadTemplate(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(tmpl))})
|
||||
}
|
||||
|
||||
// NewPadTemplateWithGType creates a new pad template with a name according to the given template and with the given arguments.
|
||||
func NewPadTemplateWithGType(nameTemplate string, direction PadDirection, presence PadPresence, caps *Caps, gType glib.Type) *PadTemplate {
|
||||
cName := C.CString(nameTemplate)
|
||||
defer C.free(unsafe.Pointer(cName))
|
||||
tmpl := C.gst_pad_template_new_with_gtype(
|
||||
(*C.gchar)(cName),
|
||||
C.GstPadDirection(direction),
|
||||
C.GstPadPresence(presence),
|
||||
caps.Instance(),
|
||||
(C.GType)(gType),
|
||||
)
|
||||
if tmpl == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapPadTemplate(&glib.Object{GObject: glib.ToGObject(unsafe.Pointer(tmpl))})
|
||||
}
|
||||
|
||||
// Instance returns the underlying C GstPadTemplate.
|
||||
func (p *PadTemplate) Instance() *C.GstPadTemplate { return C.toGstPadTemplate(p.Unsafe()) }
|
||||
|
||||
// Name returns the name of the pad template.
|
||||
func (p *PadTemplate) Name() string { return C.GoString(p.Instance().name_template) }
|
||||
|
||||
// Direction returns the direction of the pad template.
|
||||
func (p *PadTemplate) Direction() PadDirection { return PadDirection(p.Instance().direction) }
|
||||
|
||||
// Presence returns the presence of the pad template.
|
||||
func (p *PadTemplate) Presence() PadPresence { return PadPresence(p.Instance().presence) }
|
||||
|
||||
// Caps returns the caps of the pad template.
|
||||
func (p *PadTemplate) Caps() *Caps { return wrapCaps(C.gst_pad_template_get_caps(p.Instance())) }
|
||||
|
||||
// PadCreated emits the pad-created signal for this template when created by this pad.
|
||||
func (p *PadTemplate) PadCreated(pad *Pad) {
|
||||
C.gst_pad_template_pad_created(p.Instance(), pad.Instance())
|
||||
}
|
||||
|
||||
// GetDocumentationCaps gets the documentation caps for the template. See SetDocumentationCaps for more information.
|
||||
func (p *PadTemplate) GetDocumentationCaps() *Caps {
|
||||
return wrapCaps(C.gst_pad_template_get_documentation_caps(p.Instance()))
|
||||
}
|
||||
|
||||
// SetDocumentationCaps sets caps to be exposed to a user. Certain elements will dynamically construct the caps of
|
||||
// their pad templates. In order not to let environment-specific information into the documentation, element authors
|
||||
// should use this method to expose "stable" caps to the reader.
|
||||
func (p *PadTemplate) SetDocumentationCaps(caps *Caps) {
|
||||
C.gst_pad_template_set_documentation_caps(p.Instance(), caps.Instance())
|
||||
}
|
@@ -73,6 +73,10 @@ func init() {
|
||||
T: glib.Type(C.gst_element_factory_get_type()),
|
||||
F: marshalElementFactory,
|
||||
},
|
||||
{
|
||||
T: glib.Type(C.gst_proxy_pad_get_type()),
|
||||
F: marshalProxyPad,
|
||||
},
|
||||
{
|
||||
T: glib.Type(C.gst_ghost_pad_get_type()),
|
||||
F: marshalGhostPad,
|
||||
@@ -160,7 +164,7 @@ func wrapClock(obj *glib.Object) *Clock { return &Clock{wrapO
|
||||
func wrapContext(ctx *C.GstContext) *Context { return &Context{ptr: ctx} }
|
||||
func wrapDevice(obj *glib.Object) *Device { return &Device{wrapObject(obj)} }
|
||||
func wrapElement(obj *glib.Object) *Element { return &Element{wrapObject(obj)} }
|
||||
func wrapGhostPad(obj *glib.Object) *GhostPad { return &GhostPad{wrapPad(obj)} }
|
||||
func wrapGhostPad(obj *glib.Object) *GhostPad { return &GhostPad{wrapProxyPad(obj)} }
|
||||
func wrapMainContext(ctx *C.GMainContext) *MainContext { return &MainContext{ptr: ctx} }
|
||||
func wrapMainLoop(loop *C.GMainLoop) *MainLoop { return &MainLoop{ptr: loop} }
|
||||
func wrapMemory(mem *C.GstMemory) *Memory { return &Memory{ptr: mem} }
|
||||
@@ -172,6 +176,7 @@ func wrapPadTemplate(obj *glib.Object) *PadTemplate { return &PadTemplate
|
||||
func wrapPipeline(obj *glib.Object) *Pipeline { return &Pipeline{Bin: wrapBin(obj)} }
|
||||
func wrapPluginFeature(obj *glib.Object) *PluginFeature { return &PluginFeature{wrapObject(obj)} }
|
||||
func wrapPlugin(obj *glib.Object) *Plugin { return &Plugin{wrapObject(obj)} }
|
||||
func wrapProxyPad(obj *glib.Object) *ProxyPad { return &ProxyPad{wrapPad(obj)} }
|
||||
func wrapRegistry(obj *glib.Object) *Registry { return &Registry{wrapObject(obj)} }
|
||||
func wrapSample(sample *C.GstSample) *Sample { return &Sample{sample: sample} }
|
||||
func wrapStream(obj *glib.Object) *Stream { return &Stream{wrapObject(obj)} }
|
||||
@@ -255,6 +260,12 @@ func marshalGhostPad(p uintptr) (interface{}, error) {
|
||||
return wrapGhostPad(obj), nil
|
||||
}
|
||||
|
||||
func marshalProxyPad(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_object(uintptrToGVal(p))
|
||||
obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
|
||||
return wrapProxyPad(obj), nil
|
||||
}
|
||||
|
||||
func marshalPad(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_object(uintptrToGVal(p))
|
||||
obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
|
||||
|
Reference in New Issue
Block a user