]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/atmo/AtmoTools.cpp
atmo: updated README.txt for Fnordlicht, added author to THANKS
[vlc] / modules / video_filter / atmo / AtmoTools.cpp
index 69e07739ccd2e6a66394e24684b53c4457cff89e..e96bb32315190cff7bde02adf3da776730d4b988 100644 (file)
@@ -13,6 +13,7 @@
 #include "AtmoDmxSerialConnection.h"
 #include "AtmoMultiConnection.h"
 #include "MoMoConnection.h"
+#include "FnordlichtConnection.h"
 #include "AtmoExternalCaptureInput.h"
 #include <math.h>
 
@@ -27,7 +28,6 @@
 #   include "AtmoGdiDisplayCaptureInput.h"
 #endif
 
-
 CAtmoTools::CAtmoTools(void)
 {
 }
@@ -40,7 +40,6 @@ void CAtmoTools::ShowShutdownColor(CAtmoDynData *pDynData)
 {
     pDynData->LockCriticalSection();
 
-
     CAtmoConnection *atmoConnection = pDynData->getAtmoConnection();
     CAtmoConfig *atmoConfig = pDynData->getAtmoConfig();
     if((atmoConnection != NULL) && (atmoConfig!=NULL) && atmoConfig->isSetShutdownColor()) {
@@ -403,6 +402,24 @@ ATMO_BOOL CAtmoTools::RecreateConnection(CAtmoDynData *pDynData)
                return ATMO_TRUE;
            }
 
+           case actFnordlicht: {
+               CFnordlichtConnection *tempConnection = new CFnordlichtConnection( atmoConfig );
+               if(tempConnection->OpenConnection() == ATMO_FALSE) {
+                  pDynData->setAtmoConnection(tempConnection);
+                  pDynData->UnLockCriticalSection();
+                  return ATMO_FALSE;
+               }
+               pDynData->setAtmoConnection(tempConnection);
+               pDynData->ReloadZoneDefinitionBitmaps();
+
+               tempConnection->CreateDefaultMapping( atmoConfig->getChannelAssignment(0) );
+
+               CAtmoTools::SetChannelAssignment(pDynData, atmoConfig->getCurrentChannelAssignment() );
+
+               pDynData->UnLockCriticalSection();
+               return ATMO_TRUE;
+           }
+
            default: {
                pDynData->UnLockCriticalSection();
                return ATMO_FALSE;