mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
overrides: make Gst.Pad.link raise Gst.LinkError
This commit is contained in:
parent
73fd67f6d3
commit
ec51f6bfd7
1 changed files with 13 additions and 0 deletions
|
@ -85,6 +85,10 @@ class AddError(Exception):
|
|||
pass
|
||||
__all__.append('AddError')
|
||||
|
||||
class LinkError(Exception):
|
||||
pass
|
||||
__all__.append('LinkError')
|
||||
|
||||
class Iterator(Gst.Iterator):
|
||||
def __iter__(self):
|
||||
while True:
|
||||
|
@ -114,6 +118,15 @@ class ElementFactory(Gst.ElementFactory):
|
|||
return self.get_metadata("klass")
|
||||
|
||||
|
||||
class Pad(Gst.Pad):
|
||||
def link(self, pad):
|
||||
ret = Gst.Pad.link(self, pad)
|
||||
if ret != Gst.PadLinkReturn.OK:
|
||||
raise LinkError(ret)
|
||||
|
||||
Pad = override(Pad)
|
||||
__all__.append('Pad')
|
||||
|
||||
class Pipeline(Gst.Pipeline):
|
||||
def __init__(self, name=None):
|
||||
Gst.Pipeline.__init__(self, name=name)
|
||||
|
|
Loading…
Reference in a new issue