18
18
**/
19
19
20
20
#include " AVInput.h"
21
- // #include "dsMgr.h"
21
+
22
22
#include " hdmiIn.hpp"
23
23
#include " compositeIn.hpp"
24
- #include " manager.hpp"
25
24
26
25
#include " UtilsJsonRpc.h"
27
26
#include " UtilsIarm.h"
28
- #include " host.hpp"
29
27
30
28
#include " exception.hpp"
31
29
#include < vector>
@@ -129,29 +127,6 @@ AVInput::~AVInput()
129
127
const string AVInput::Initialize (PluginHost::IShell * /* service */ )
130
128
{
131
129
AVInput::_instance = this ;
132
- InitializeDeviceManager ();
133
-
134
- return (string ());
135
- }
136
-
137
- void AVInput::Deinitialize (PluginHost::IShell * /* service */ )
138
- {
139
-
140
- device::Host::getInstance ().UnRegister (m_HdmiInEventsNotification);
141
- device::Host::getInstance ().UnRegister (m_CompositeInEventsNotification);
142
- _registeredDsEventHandlers = false ;
143
- DeInitializeDeviceManager ();
144
-
145
- AVInput::_instance = nullptr ;
146
- }
147
-
148
- string AVInput::Information () const
149
- {
150
- return (string ());
151
- }
152
-
153
- void AVInput::InitializeDeviceManager ()
154
- {
155
130
try
156
131
{
157
132
device::Manager::Initialize ();
@@ -161,13 +136,18 @@ void AVInput::InitializeDeviceManager()
161
136
catch (...)
162
137
{
163
138
LOGINFO (" device::Manager::Initialize failed" );
139
+ LOG_DEVICE_EXCEPTION0 ();
164
140
}
165
-
141
+
142
+ return (string ());
166
143
}
167
144
168
- void AVInput::DeInitializeDeviceManager ( )
145
+ void AVInput::Deinitialize (PluginHost::IShell * /* service */ )
169
146
{
170
147
148
+ device::Host::getInstance ().UnRegister (baseInterface<device::Host::IHdmiInEvents>());
149
+ device::Host::getInstance ().UnRegister (baseInterface<device::Host::ICompositeInEvents>());
150
+ _registeredDsEventHandlers = false ;
171
151
try
172
152
{
173
153
device::Manager::DeInitialize ();
@@ -177,6 +157,14 @@ void AVInput::DeInitializeDeviceManager()
177
157
{
178
158
LOGINFO (" device::Manager::DeInitialize failed" );
179
159
}
160
+ DeInitializeDeviceManager ();
161
+
162
+ AVInput::_instance = nullptr ;
163
+ }
164
+
165
+ string AVInput::Information () const
166
+ {
167
+ return (string ());
180
168
}
181
169
182
170
void AVInput::RegisterAll ()
@@ -1749,8 +1737,8 @@ void AVInput::registerDsEventHandlers()
1749
1737
if (!_registeredDsEventHandlers)
1750
1738
{
1751
1739
_registeredDsEventHandlers = true ;
1752
- device::Host::getInstance ().Register (m_HdmiInEventsNotification );
1753
- device::Host::getInstance ().Register (m_CompositeInEventsNotification );
1740
+ device::Host::getInstance ().Register (baseInterface<device::Host::IHdmiInEvents>() );
1741
+ device::Host::getInstance ().Register (baseInterface<device::Host::ICompositeInEvents>() );
1754
1742
}
1755
1743
}
1756
1744
0 commit comments