Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Mixer instances fix #320

Merged
merged 2 commits into from
Apr 4, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/freeseer/framework/multimedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ def load_backend(self, presentation):
audiomixer_inputs = []

audioinputs = audiomixer.get_inputs()
for i in audioinputs:
logging.debug("Loading Audio Mixer Input: %s", i)
audio_input = self.plugman.get_plugin_by_name(i, "AudioInput").plugin_object
for name, instance in audioinputs:
logging.debug("Loading Audio Mixer Input: %s-%d", name, instance)
audio_input = self.plugman.get_plugin_by_name(name, "AudioInput").plugin_object
audio_input.set_instance(instance)
audio_input.load_config(self.plugman)
audiomixer_inputs.append(audio_input.get_audioinput_bin())

Expand All @@ -353,9 +354,10 @@ def load_backend(self, presentation):
videomixer_inputs = []

videoinputs = videomixer.get_inputs()
for i in videoinputs:
logging.debug("Loading Video Mixer Input: %s", i)
video_input = self.plugman.get_plugin_by_name(i, "VideoInput").plugin_object
for name, instance in videoinputs:
logging.debug("Loading Video Mixer Input: %s-%d", name, instance)
video_input = self.plugman.get_plugin_by_name(name, "VideoInput").plugin_object
video_input.set_instance(instance)
video_input.load_config(self.plugman)
videomixer_inputs.append(video_input.get_videoinput_bin())

Expand Down
4 changes: 2 additions & 2 deletions src/freeseer/framework/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def get_audiomixer_bin(self):

def get_inputs(self):
"""
Returns a list of inputs the that the audio mixer needs
Returns a list of tuples containing the input name and instance number that the audio mixer needs
in order to initialize it's pipelines.

This should be used so that the code that calls it can
Expand Down Expand Up @@ -403,7 +403,7 @@ def get_videomixer_bin(self):

def get_inputs(self):
"""
Returns a list of inputs the that the video mixer needs
Returns a list of tuples containing the input name and instance number that the video mixer needs
in order to initialize it's pipelines.

This should be used so that the code that calls it can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_audiomixer_bin(self):
return bin

def get_inputs(self):
inputs = [self.input1]
inputs = [(self.input1, 0)]
return inputs

def load_inputs(self, player, mixer, inputs):
Expand Down
2 changes: 1 addition & 1 deletion src/freeseer/plugins/videomixer/pip/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_videomixer_bin(self):
return bin

def get_inputs(self):
inputs = [self.input1, self.input2]
inputs = [(self.input1, 0), (self.input2, 1)]
return inputs

def load_inputs(self, player, mixer, inputs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_videomixer_bin(self):
return bin

def get_inputs(self):
inputs = [self.input1]
inputs = [(self.input1, 0)]
return inputs

def load_inputs(self, player, mixer, inputs):
Expand Down