|
25 | 25 | #include "host.hpp"
|
26 | 26 | #include "UtilsgetRFCConfig.h"
|
27 | 27 |
|
28 |
| -#include "dsRpc.h" |
29 | 28 | #include "dsDisplay.h"
|
30 | 29 | #include "videoOutputPort.hpp"
|
31 | 30 | #include "manager.hpp"
|
@@ -792,7 +791,17 @@ namespace WPEFramework
|
792 | 791 | }
|
793 | 792 | }
|
794 | 793 |
|
795 |
| - m_numofHdmiInput = device::HdmiInput::getInstance().getNumberOfInputs(); |
| 794 | + try |
| 795 | + { |
| 796 | + m_numofHdmiInput = device::HdmiInput::getInstance().getNumberOfInputs(); |
| 797 | + LOGINFO("HdmiCecSink plugin m_numofHdmiInput %d", m_numofHdmiInput); |
| 798 | + } |
| 799 | + catch(const device::Exception& err) |
| 800 | + { |
| 801 | + LOGINFO("HdmiCecSink plugin device::HdmiInput::getInstance().getNumberOfInputs failed"); |
| 802 | + m_numofHdmiInput = 3; |
| 803 | + LOG_DEVICE_EXCEPTION0(); |
| 804 | + } |
796 | 805 |
|
797 | 806 | LOGINFO("initalize inputs \n");
|
798 | 807 |
|
@@ -826,76 +835,76 @@ namespace WPEFramework
|
826 | 835 |
|
827 | 836 | void HdmiCecSink::Deinitialize(PluginHost::IShell* /* service */)
|
828 | 837 | {
|
829 |
| - if(_powerManagerPlugin) |
830 |
| - { |
831 |
| - _powerManagerPlugin->Unregister(_pwrMgrNotification.baseInterface<Exchange::IPowerManager::IModeChangedNotification>()); |
832 |
| - _powerManagerPlugin.Reset(); |
833 |
| - } |
834 |
| - _registeredEventHandlers = false; |
| 838 | + if(_powerManagerPlugin) |
| 839 | + { |
| 840 | + _powerManagerPlugin->Unregister(_pwrMgrNotification.baseInterface<Exchange::IPowerManager::IModeChangedNotification>()); |
| 841 | + _powerManagerPlugin.Reset(); |
| 842 | + } |
| 843 | + _registeredEventHandlers = false; |
835 | 844 |
|
836 |
| - profileType = searchRdkProfile(); |
| 845 | + profileType = searchRdkProfile(); |
837 | 846 |
|
838 |
| - if (profileType == STB || profileType == NOT_FOUND) |
839 |
| - { |
840 |
| - LOGINFO("Invalid profile type for TV \n"); |
841 |
| - return ; |
842 |
| - } |
| 847 | + if (profileType == STB || profileType == NOT_FOUND) |
| 848 | + { |
| 849 | + LOGINFO("Invalid profile type for TV \n"); |
| 850 | + return ; |
| 851 | + } |
843 | 852 |
|
844 |
| - CECDisable(); |
845 |
| - m_currentArcRoutingState = ARC_STATE_ARC_EXIT; |
| 853 | + CECDisable(); |
| 854 | + m_currentArcRoutingState = ARC_STATE_ARC_EXIT; |
846 | 855 |
|
847 |
| - m_semSignaltoArcRoutingThread.release(); |
| 856 | + m_semSignaltoArcRoutingThread.release(); |
848 | 857 |
|
849 |
| - try |
850 |
| - { |
851 |
| - if (m_arcRoutingThread.joinable()) |
852 |
| - m_arcRoutingThread.join(); |
853 |
| - } |
854 |
| - catch(const std::system_error& e) |
855 |
| - { |
856 |
| - LOGERR("system_error exception in thread join %s", e.what()); |
857 |
| - } |
858 |
| - catch(const std::exception& e) |
859 |
| - { |
860 |
| - LOGERR("exception in thread join %s", e.what()); |
861 |
| - } |
| 858 | + try |
| 859 | + { |
| 860 | + if (m_arcRoutingThread.joinable()) |
| 861 | + m_arcRoutingThread.join(); |
| 862 | + } |
| 863 | + catch(const std::system_error& e) |
| 864 | + { |
| 865 | + LOGERR("system_error exception in thread join %s", e.what()); |
| 866 | + } |
| 867 | + catch(const std::exception& e) |
| 868 | + { |
| 869 | + LOGERR("exception in thread join %s", e.what()); |
| 870 | + } |
862 | 871 |
|
863 |
| - { |
864 |
| - m_sendKeyEventThreadExit = true; |
865 |
| - std::unique_lock<std::mutex> lk(m_sendKeyEventMutex); |
866 |
| - m_sendKeyEventThreadRun = true; |
867 |
| - m_sendKeyCV.notify_one(); |
868 |
| - } |
| 872 | + { |
| 873 | + m_sendKeyEventThreadExit = true; |
| 874 | + std::unique_lock<std::mutex> lk(m_sendKeyEventMutex); |
| 875 | + m_sendKeyEventThreadRun = true; |
| 876 | + m_sendKeyCV.notify_one(); |
| 877 | + } |
869 | 878 |
|
870 |
| - try |
871 |
| - { |
872 |
| - if (m_sendKeyEventThread.joinable()) |
873 |
| - m_sendKeyEventThread.join(); |
874 |
| - } |
875 |
| - catch(const std::system_error& e) |
876 |
| - { |
877 |
| - LOGERR("system_error exception in thread join %s", e.what()); |
878 |
| - } |
879 |
| - catch(const std::exception& e) |
880 |
| - { |
881 |
| - LOGERR("exception in thread join %s", e.what()); |
882 |
| - } |
| 879 | + try |
| 880 | + { |
| 881 | + if (m_sendKeyEventThread.joinable()) |
| 882 | + m_sendKeyEventThread.join(); |
| 883 | + } |
| 884 | + catch(const std::system_error& e) |
| 885 | + { |
| 886 | + LOGERR("system_error exception in thread join %s", e.what()); |
| 887 | + } |
| 888 | + catch(const std::exception& e) |
| 889 | + { |
| 890 | + LOGERR("exception in thread join %s", e.what()); |
| 891 | + } |
883 | 892 |
|
884 |
| - HdmiCecSink::_instance = nullptr; |
885 |
| - device::Host::getInstance().UnRegister(baseInterface<device::Host::IHdmiInEvents>()); |
| 893 | + HdmiCecSink::_instance = nullptr; |
| 894 | + device::Host::getInstance().UnRegister(baseInterface<device::Host::IHdmiInEvents>()); |
886 | 895 |
|
887 |
| - try |
888 |
| - { |
889 |
| - device::Manager::DeInitialize(); |
890 |
| - LOGINFO("HdmiCecSink plugin device::Manager::DeInitialize success"); |
891 |
| - } |
892 |
| - catch(const device::Exception& err) |
893 |
| - { |
894 |
| - LOGINFO("HdmiCecSink plugin device::Manager::DeInitialize failed"); |
895 |
| - LOG_DEVICE_EXCEPTION0(); |
896 |
| - } |
| 896 | + try |
| 897 | + { |
| 898 | + device::Manager::DeInitialize(); |
| 899 | + LOGINFO("HdmiCecSink plugin device::Manager::DeInitialize success"); |
| 900 | + } |
| 901 | + catch(const device::Exception& err) |
| 902 | + { |
| 903 | + LOGINFO("HdmiCecSink plugin device::Manager::DeInitialize failed"); |
| 904 | + LOG_DEVICE_EXCEPTION0(); |
| 905 | + } |
897 | 906 |
|
898 |
| - LOGWARN(" HdmiCecSink Deinitialize() Done"); |
| 907 | + LOGWARN(" HdmiCecSink Deinitialize() Done"); |
899 | 908 | }
|
900 | 909 |
|
901 | 910 | void HdmiCecSink::InitializePowerManager(PluginHost::IShell *service)
|
|
0 commit comments