4 * Copyright (C) 2005-2008 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, write to
19 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 * http://www.gnu.org/copyleft/gpl.html
24 #include "../IPlayer.h"
26 /*----------------------------------------------------------------------
28 +---------------------------------------------------------------------*/
30 class CPlayerCoreConfig;
31 class CPlayerSelectionRule;
33 // do not remove mplayer - will break scripts
43 typedef unsigned int PLAYERCOREID;
44 typedef std::vector<PLAYERCOREID> VECPLAYERCORES;
45 const PLAYERCOREID PCID_NONE = 0;
46 const PLAYERCOREID PCID_DVDPLAYER = 1;
47 const PLAYERCOREID PCID_MPLAYER = 2;
48 const PLAYERCOREID PCID_PAPLAYER = 3;
50 class CPlayerCoreFactory
54 virtual ~CPlayerCoreFactory();
56 IPlayer* CreatePlayer(const CStdString& strCore, IPlayerCallback& callback) const;
58 static PLAYERCOREID GetPlayerCore(const CStdString& strCoreName);
59 static CPlayerCoreConfig* GetPlayerConfig(const CStdString& strCoreName);
60 static CStdString GetPlayerName(const PLAYERCOREID eCore);
62 static IPlayer* CreatePlayer(const PLAYERCOREID eCore, IPlayerCallback& callback);
63 static void GetPlayers( const CFileItem& item, VECPLAYERCORES &vecCores); //Players supporting the specified file
64 static void GetPlayers( VECPLAYERCORES &vecCores, bool audio, bool video ); //All audio players and/or video players
65 static void GetPlayers( VECPLAYERCORES &vecCores ); //All players
67 static PLAYERCOREID GetDefaultPlayer( const CFileItem& item );
69 static PLAYERCOREID SelectPlayerDialog(VECPLAYERCORES &vecCores, float posX = 0, float posY = 0);
70 static PLAYERCOREID SelectPlayerDialog(float posX, float posY);
72 static bool LoadConfiguration(TiXmlElement* pConfig, bool clear);
75 static std::vector<CPlayerCoreConfig *> s_vecCoreConfigs;
76 static std::vector<CPlayerSelectionRule *> s_vecCoreSelectionRules;