Add method to determine output name

This commit is contained in:
Thomas Adamcik 2011-05-16 00:14:33 +02:00
parent 743235b09d
commit 3f35e9b391

View File

@ -17,11 +17,19 @@ class BaseOutput(object):
logger.debug('Creating new output: %s', description)
output = gst.parse_bin_from_description(description, True)
output.set_name(self.__class__.__name__)
output.set_name(self.get_name())
self.modify_bin(output)
return output
def get_name(self):
"""
Return name of output in gstreamer context.
Defaults to class name, can be overriden by sub classes if required.
"""
return self.__class__.__name__
def modify_bin(self, output):
"""
Modifies bin before it is installed if needed.