MCPcopy Create free account
hub / github.com/GStreamer/gst-python / PadFunc

Class PadFunc

gi/overrides/Gst.py:135–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133__all__.append('Caps')
134
135class PadFunc:
136 def __init__(self, func):
137 self.func = func
138
139 def __call__(self, pad, parent, obj):
140 if isinstance(self.func, weakref.WeakMethod):
141 func = self.func()
142 else:
143 func = self.func
144
145 try:
146 res = func(pad, obj)
147 except TypeError:
148 try:
149 res = func(pad, parent, obj)
150 except TypeError:
151 raise TypeError("Invalid method %s, 2 or 3 arguments required"
152 % func)
153
154 return res
155
156class Pad(Gst.Pad):
157 def __init__(self, *args, **kwargs):

Callers 3

set_chain_functionMethod · 0.85
set_event_functionMethod · 0.85
set_query_functionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected