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:
Nicolas Dufresne 2023-07-06 12:01:21 -04:00 committed by GStreamer Marge Bot
parent 31c1cf0150
commit 60afc6cc95

View file

@ -83,14 +83,14 @@ class Bin(Gst.Bin):
if not Gst.Bin.add(self, 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
'''
elem = Gst.ElementFactory.make(factory_name, instance_name)
elem = Gst.ElementFactory.make(factoryname, name)
if not elem:
raise AddError(
'No such element: {}'.format(factory_name))
'No such element: {}'.format(factoryname))
self.add(elem)
return elem
@ -288,8 +288,8 @@ class ElementFactory(Gst.ElementFactory):
return self.get_metadata("klass")
@classmethod
def make(cls, factory_name, instance_name=None):
return Gst.ElementFactory.make(factory_name, instance_name)
def make(cls, factoryname, name=None):
return Gst.ElementFactory.make(factoryname, name)
class Pipeline(Gst.Pipeline):