1
# -*- coding: utf-8 -*-
2
# Elisa - Home multimedia server
3
# Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com).
6
# This file is available under one of two license agreements.
8
# This file is licensed under the GPL version 3.
9
# See "LICENSE.GPL" in the root of this distribution including a special
10
# exception to use Elisa with Fluendo's plugins.
12
# The GPL part of Elisa is also available under a commercial licensing
13
# agreement from Fluendo.
14
# See "LICENSE.Elisa" in the root directory of this distribution package
15
# for details on that license.
17
from elisa.plugins.pigment.pigment_controller import PigmentController
19
class BasePlayerController(PigmentController):
22
def is_compatible(self, other_player):
23
""" Check if the player can be used at same time than
24
L{other_player}. Check is based on what each player needs. So
25
if one player needs only AUDIO and another player only needs
26
IMAGE, they are compatible.
28
@param other_player: player to check against ours
29
@type other_player: L{BasePlayerController}
32
intersection = set(self.needs).intersection(set(other_player.needs))
33
return len(intersection) == 0