mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
python: Fix variable name for gst_element_factory_make
In order to use keyword argument, the names shoudl match the documentation. Both arguments name was changed in the override. Fixes: #2779 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4982>
This commit is contained in:
parent
31c1cf0150
commit
60afc6cc95
1 changed files with 5 additions and 5 deletions
|
@ -83,14 +83,14 @@ class Bin(Gst.Bin):
|
||||||
if not Gst.Bin.add(self, arg):
|
if not Gst.Bin.add(self, arg):
|
||||||
raise AddError(arg)
|
raise AddError(arg)
|
||||||
|
|
||||||
def make_and_add(self, factory_name, instance_name=None):
|
def make_and_add(self, factoryname, name=None):
|
||||||
'''
|
'''
|
||||||
@raises: Gst.AddError
|
@raises: Gst.AddError
|
||||||
'''
|
'''
|
||||||
elem = Gst.ElementFactory.make(factory_name, instance_name)
|
elem = Gst.ElementFactory.make(factoryname, name)
|
||||||
if not elem:
|
if not elem:
|
||||||
raise AddError(
|
raise AddError(
|
||||||
'No such element: {}'.format(factory_name))
|
'No such element: {}'.format(factoryname))
|
||||||
self.add(elem)
|
self.add(elem)
|
||||||
return elem
|
return elem
|
||||||
|
|
||||||
|
@ -288,8 +288,8 @@ class ElementFactory(Gst.ElementFactory):
|
||||||
return self.get_metadata("klass")
|
return self.get_metadata("klass")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def make(cls, factory_name, instance_name=None):
|
def make(cls, factoryname, name=None):
|
||||||
return Gst.ElementFactory.make(factory_name, instance_name)
|
return Gst.ElementFactory.make(factoryname, name)
|
||||||
|
|
||||||
|
|
||||||
class Pipeline(Gst.Pipeline):
|
class Pipeline(Gst.Pipeline):
|
||||||
|
|
Loading…
Reference in a new issue