diff --git a/src/freeseer/plugins/audioinput/pulsesrc/__init__.py b/src/freeseer/plugins/audioinput/pulsesrc/__init__.py index a6b7af78..1c2e9daf 100644 --- a/src/freeseer/plugins/audioinput/pulsesrc/__init__.py +++ b/src/freeseer/plugins/audioinput/pulsesrc/__init__.py @@ -71,7 +71,7 @@ def get_default_source(): class PulseSrcConfig(Config): """Default PulseSrc config settings.""" - source = options.StringOption(get_default_source()) + source = options.StringOption('') class PulseSrc(IAudioInput): @@ -84,9 +84,11 @@ def get_audioinput_bin(self): audiosrc = gst.element_factory_make("pulsesrc", "audiosrc") - if self.config.source: - audiosrc.set_property('device', self.config.source) - log.debug('Pulseaudio source is set to %s', audiosrc.get_property('device')) + if not self.config.source: + self.config.source = get_default_source() + + audiosrc.set_property('device', self.config.source) + log.debug('Pulseaudio source is set to %s', audiosrc.get_property('device')) bin.add(audiosrc) diff --git a/src/freeseer/plugins/videoinput/firewiresrc/__init__.py b/src/freeseer/plugins/videoinput/firewiresrc/__init__.py index 4937b52e..2d41d9f4 100644 --- a/src/freeseer/plugins/videoinput/firewiresrc/__init__.py +++ b/src/freeseer/plugins/videoinput/firewiresrc/__init__.py @@ -75,7 +75,7 @@ def get_default_device(): class FirewireSrcConfig(Config): """Config settings for Firewire video source.""" - device = options.StringOption(get_default_device()) + device = options.StringOption('') class FirewireSrc(IVideoInput): @@ -89,6 +89,9 @@ def __init__(self): def get_videoinput_bin(self): bin = gst.Bin() # Do not pass a name so that we can load this input more than once. + if not self.config.device: + self.config.device = get_default_device() + videosrc = gst.element_factory_make("dv1394src", "videosrc") dv1394q1 = gst.element_factory_make('queue', 'dv1394q1') dv1394dvdemux = gst.element_factory_make('dvdemux', 'dv1394dvdemux') diff --git a/src/freeseer/plugins/videoinput/usbsrc/__init__.py b/src/freeseer/plugins/videoinput/usbsrc/__init__.py index 82c67d5f..9e3e7132 100644 --- a/src/freeseer/plugins/videoinput/usbsrc/__init__.py +++ b/src/freeseer/plugins/videoinput/usbsrc/__init__.py @@ -96,7 +96,7 @@ def get_default_device(): class USBSrcConfig(Config): """USBSrc Configuration settings.""" - device = options.StringOption(get_default_device()) + device = options.StringOption('') class USBSrc(IVideoInput): @@ -115,6 +115,9 @@ def get_videoinput_bin(self): videosrc = None + if not self.config.device: + self.config.device = get_default_device() + if sys.platform.startswith("linux"): videosrc = gst.element_factory_make("v4l2src", "videosrc") videosrc.set_property("device", self.config.device)