Merge pull request #25808 from CastagnaIT/fix_url_parse
[xbmc.git] / xbmc / platform / linux / OptionalsReg.cpp
blob3992f2a0d05b0728291fc707e116df7fd90ef5b4
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #include "OptionalsReg.h"
12 //-----------------------------------------------------------------------------
13 // ALSA
14 //-----------------------------------------------------------------------------
16 #ifdef HAS_ALSA
17 #include "cores/AudioEngine/Sinks/AESinkALSA.h"
18 bool OPTIONALS::ALSARegister()
20 CAESinkALSA::Register();
21 return true;
23 #else
24 bool OPTIONALS::ALSARegister()
26 return false;
28 #endif
30 //-----------------------------------------------------------------------------
31 // PulseAudio
32 //-----------------------------------------------------------------------------
34 #ifdef HAS_PULSEAUDIO
35 #include "cores/AudioEngine/Sinks/AESinkPULSE.h"
36 bool OPTIONALS::PulseAudioRegister(bool allowPipeWireCompatServer)
38 bool ret = CAESinkPULSE::Register(allowPipeWireCompatServer);
39 return ret;
41 #else
42 bool OPTIONALS::PulseAudioRegister(bool)
44 return false;
46 #endif
48 //-----------------------------------------------------------------------------
49 // Pipewire
50 //-----------------------------------------------------------------------------
52 #ifdef HAS_PIPEWIRE
53 #include "cores/AudioEngine/Sinks/pipewire/AESinkPipewire.h"
54 bool OPTIONALS::PipewireRegister()
56 bool ret = AE::SINK::CAESinkPipewire::Register();
57 return ret;
59 #else
60 bool OPTIONALS::PipewireRegister()
62 return false;
64 #endif
66 //-----------------------------------------------------------------------------
67 // sndio
68 //-----------------------------------------------------------------------------
70 #ifdef HAS_SNDIO
71 #include "cores/AudioEngine/Sinks/AESinkSNDIO.h"
72 bool OPTIONALS::SndioRegister()
74 CAESinkSNDIO::Register();
75 return true;
77 #else
78 bool OPTIONALS::SndioRegister()
80 return false;
82 #endif
84 //-----------------------------------------------------------------------------
85 // Lirc
86 //-----------------------------------------------------------------------------
88 #ifdef HAS_LIRC
89 #include "platform/linux/input/LIRC.h"
90 #include "ServiceBroker.h"
91 class OPTIONALS::CLircContainer
93 public:
94 CLircContainer()
96 m_lirc.Start();
98 protected:
99 CLirc m_lirc;
101 #else
102 class OPTIONALS::CLircContainer
105 #endif
107 OPTIONALS::CLircContainer* OPTIONALS::LircRegister()
109 return new CLircContainer();
111 void OPTIONALS::delete_CLircContainer::operator()(CLircContainer *p) const
113 delete p;