| 133 | __all__.append('Caps') |
| 134 | |
| 135 | class 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 | |
| 156 | class Pad(Gst.Pad): |
| 157 | def __init__(self, *args, **kwargs): |
no outgoing calls
no test coverage detected