[vlc-devel] [PATCH 1/2] Fnordlicht support added. Fnordlicht-Class is based on the MoMo-Class. The Fnordlicht-Class implements oly parts of the fnordlicht-protocol: sync, stop and fade_rgb Have a look at http://github.com/fd0/fnordlicht/raw/master/doc/PROTOCOL for more details.

Kai Lauterbach lauterbach.kai at web.de
Thu May 13 13:21:25 CEST 2010


---
 modules/video_filter/Modules.am                    |    1 +
 modules/video_filter/atmo/AtmoConfig.cpp           |    3 +
 modules/video_filter/atmo/AtmoConfig.h             |    6 +
 modules/video_filter/atmo/AtmoDefs.h               |    9 +-
 modules/video_filter/atmo/AtmoTools.cpp            |   19 +
 modules/video_filter/atmo/FnordlichtConnection.cpp |  358 ++++++++++++++++++++
 modules/video_filter/atmo/FnordlichtConnection.h   |   69 ++++
 modules/video_filter/atmo/atmo.cpp                 |   29 ++-
 8 files changed, 487 insertions(+), 7 deletions(-)
 create mode 100644 modules/video_filter/atmo/FnordlichtConnection.cpp
 create mode 100644 modules/video_filter/atmo/FnordlichtConnection.h

diff --git a/modules/video_filter/Modules.am b/modules/video_filter/Modules.am
index b6c1377..ea46c31 100644
--- a/modules/video_filter/Modules.am
+++ b/modules/video_filter/Modules.am
@@ -71,6 +71,7 @@ SOURCES_atmo = atmo/atmo.cpp \
 	atmo/DmxTools.cpp atmo/DmxTools.h \
 	atmo/AtmoMultiConnection.cpp atmo/AtmoMultiConnection.h \
 	atmo/MoMoConnection.cpp atmo/MoMoConnection.h \
+	atmo/FnordlichtConnection.cpp atmo/FnordlichtConnection.h \
 	atmo/AtmoPacketQueue.cpp atmo/AtmoPacketQueue.h
 SOURCES_gradfun = gradfun.c gradfun.h
 noinst_HEADERS = filter_picture.h
diff --git a/modules/video_filter/atmo/AtmoConfig.cpp b/modules/video_filter/atmo/AtmoConfig.cpp
index ec6c519..7e404ad 100644
--- a/modules/video_filter/atmo/AtmoConfig.cpp
+++ b/modules/video_filter/atmo/AtmoConfig.cpp
@@ -161,6 +161,7 @@ void CAtmoConfig::LoadDefaults() {
     m_DMX_RGB_Channels        = 5; // so wie atmolight
 
     m_MoMo_Channels           = 3; // default momo, there exists also a 4 ch version!
+    m_Fnordlicht_Amount       = 2; // default fnordlicht, there are 2 fnordlicht's!
 
     m_ZonesTopCount            = 1;
     m_ZonesBottomCount         = 1;
@@ -255,6 +256,8 @@ void CAtmoConfig::Assign(CAtmoConfig *pAtmoConfigSrc) {
 
     this->m_MoMo_Channels            = pAtmoConfigSrc->m_MoMo_Channels;
 
+    this->m_Fnordlicht_Amount        = pAtmoConfigSrc->m_Fnordlicht_Amount;
+
     this->m_CurrentChannelAssignment = pAtmoConfigSrc->m_CurrentChannelAssignment;
 
     clearChannelMappings();
diff --git a/modules/video_filter/atmo/AtmoConfig.h b/modules/video_filter/atmo/AtmoConfig.h
index 656c20e..e454b6b 100644
--- a/modules/video_filter/atmo/AtmoConfig.h
+++ b/modules/video_filter/atmo/AtmoConfig.h
@@ -155,6 +155,9 @@ class CAtmoConfig {
          int m_MoMo_Channels;
 
     protected:
+         int m_Fnordlicht_Amount;
+
+    protected:
          AtmoGammaCorrect m_Software_gamma_mode;
 
          int m_Software_gamma_red;
@@ -359,6 +362,9 @@ class CAtmoConfig {
         int getMoMo_Channels() { return m_MoMo_Channels; }
         void setMoMo_Channels(int chCount) { m_MoMo_Channels = chCount; }
 
+        int getFnordlicht_Amount() { return m_Fnordlicht_Amount; }
+        void setFnordlicht_Amount(int fnordlichtAmount) { m_Fnordlicht_Amount = fnordlichtAmount; }
+
 };
 
 #endif
diff --git a/modules/video_filter/atmo/AtmoDefs.h b/modules/video_filter/atmo/AtmoDefs.h
index ed48e88..551a528 100644
--- a/modules/video_filter/atmo/AtmoDefs.h
+++ b/modules/video_filter/atmo/AtmoDefs.h
@@ -114,7 +114,8 @@ enum AtmoConnectionType
       actNUL = 3,
       actMultiAtmo = 4,
       actMondolight = 5,
-      actMoMoLight  = 6
+      actMoMoLight  = 6,
+      actFnordlicht  = 7
 };
 static const char *AtmoDeviceTypes[] = {
       "Atmo-Classic",
@@ -123,10 +124,10 @@ static const char *AtmoDeviceTypes[] = {
       "Nul-Device",
       "Multi-Atmo",
       "Mondolight",
-      "MoMoLight"
-
+      "MoMoLight",
+      "FnordlichtLight"
   };
-#define ATMO_DEVICE_COUNT 7
+#define ATMO_DEVICE_COUNT 8
 
 #if defined(_ATMO_VLC_PLUGIN_)
 enum EffectMode {
diff --git a/modules/video_filter/atmo/AtmoTools.cpp b/modules/video_filter/atmo/AtmoTools.cpp
index 69e0773..cb6a2a7 100644
--- a/modules/video_filter/atmo/AtmoTools.cpp
+++ b/modules/video_filter/atmo/AtmoTools.cpp
@@ -13,6 +13,7 @@
 #include "AtmoDmxSerialConnection.h"
 #include "AtmoMultiConnection.h"
 #include "MoMoConnection.h"
+#include "FnordlichtConnection.h"
 #include "AtmoExternalCaptureInput.h"
 #include <math.h>
 
@@ -403,6 +404,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;
diff --git a/modules/video_filter/atmo/FnordlichtConnection.cpp b/modules/video_filter/atmo/FnordlichtConnection.cpp
new file mode 100644
index 0000000..c27c05a
--- /dev/null
+++ b/modules/video_filter/atmo/FnordlichtConnection.cpp
@@ -0,0 +1,358 @@
+/*
+ * FnordlichtConnection.h: class to access a FnordlichtLight Hardware - the description could be found
+ * here: http://github.com/fd0/fnordlicht/raw/master/doc/PROTOCOL
+ *
+ * (C) Kai Lauterbach (klaute at gmail.com)
+ *
+ * $Id$
+ */
+
+
+#include "AtmoDefs.h"
+#include "FnordlichtConnection.h"
+
+#if !defined(_ATMO_VLC_PLUGIN_)
+# include "FnordlichtConfigDialog.h"
+#endif
+
+#include <stdio.h>
+#include <fcntl.h>
+
+#if !defined(WIN32)
+#include <termios.h>
+#include <unistd.h>
+#endif
+
+// TO REMOVE
+#include <iostream>
+using namespace std;
+
+CFnordlichtConnection::CFnordlichtConnection(CAtmoConfig *cfg) : CAtmoConnection(cfg) {
+    m_hComport = INVALID_HANDLE_VALUE;
+}
+
+CFnordlichtConnection::~CFnordlichtConnection() {
+}
+
+ATMO_BOOL CFnordlichtConnection::OpenConnection() {
+#if defined(_ATMO_VLC_PLUGIN_)
+     char *serdevice = m_pAtmoConfig->getSerialDevice();
+     if(!serdevice)
+        return ATMO_FALSE;
+#else
+     int portNummer = m_pAtmoConfig->getComport();
+     m_dwLastWin32Error = 0;
+	 if(portNummer < 1) return ATMO_FALSE; // make no real sense;-)
+#endif
+
+	 CloseConnection();
+
+#if !defined(_ATMO_VLC_PLUGIN_)
+     char serdevice[16];  // com4294967295
+     sprintf(serdevice,"com%d",portNummer);
+#endif
+
+#if defined(WIN32)
+
+     m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+     if(m_hComport == INVALID_HANDLE_VALUE) {
+//      we have a problem here can't open com port... somebody else may use it?
+//	    m_dwLastWin32Error = GetLastError();
+	    return ATMO_FALSE;
+     }
+     /* change serial settings (Speed, stopbits etc.) */
+     DCB dcb; // für comport-parameter
+     dcb.DCBlength = sizeof(DCB);
+     GetCommState (m_hComport, &dcb); // ger current serialport settings
+     dcb.BaudRate  = 19200;        // set speed
+     dcb.ByteSize  = 8;            // set databits
+     dcb.Parity    = NOPARITY;     // set parity
+     dcb.StopBits  = ONESTOPBIT;   // set one stop bit
+     SetCommState (m_hComport, &dcb);    // apply settings
+
+#else
+
+     int bconst = B19200;
+     m_hComport = open(serdevice,O_RDWR |O_NOCTTY);
+     if(m_hComport < 0) {
+	    return ATMO_FALSE;
+     }
+
+     struct termios tio;
+     memset(&tio,0,sizeof(tio));
+     tio.c_cflag = (CS8 | CREAD | HUPCL | CLOCAL);
+     tio.c_iflag = (INPCK | BRKINT);
+     cfsetispeed(&tio, bconst);
+     cfsetospeed(&tio, bconst);
+     if(!tcsetattr(m_hComport, TCSANOW, &tio))
+	 {
+         tcflush(m_hComport, TCIOFLUSH);
+     } else {
+         // can't change parms
+        close(m_hComport);
+        m_hComport = -1;
+        return false;
+     }
+
+#endif
+
+	 // sync fnordlicht
+	 if ( sync() )
+	 	// stop fading on all devices
+	 	if ( stop(255) )
+			return true; // fnordlicht initialized...
+
+     return false; // something is going wrong...
+}
+
+void CFnordlichtConnection::CloseConnection() {
+  if(m_hComport!=INVALID_HANDLE_VALUE) {
+#if defined(WIN32)
+     CloseHandle(m_hComport);
+#else
+     close(m_hComport);
+#endif
+	 m_hComport = INVALID_HANDLE_VALUE;
+  }
+}
+
+ATMO_BOOL CFnordlichtConnection::isOpen(void) {
+	 return (m_hComport != INVALID_HANDLE_VALUE);
+}
+
+ATMO_BOOL CFnordlichtConnection::HardwareWhiteAdjust(int global_gamma,
+                                                     int global_contrast,
+                                                     int contrast_red,
+                                                     int contrast_green,
+                                                     int contrast_blue,
+                                                     int gamma_red,
+                                                     int gamma_green,
+                                                     int gamma_blue,
+                                                     ATMO_BOOL storeToEeprom) {
+    return ATMO_FALSE; //no hardware adjust required
+}
+
+/*
+    def fade_rgb(addr, r, g, b, step, delay)
+        $dev.write addr.chr
+        $dev.write "\x01"
+        $dev.write step.chr
+        $dev.write delay.chr
+        $dev.write r.chr
+        $dev.write g.chr
+        $dev.write b.chr
+        $dev.write "\x00\x00\x00\x00\x00"
+        $dev.write "\x00\x00\x00"
+        $dev.flush
+    end
+*/
+ATMO_BOOL CFnordlichtConnection::SendData(pColorPacket data) {
+   	if(m_hComport == INVALID_HANDLE_VALUE)
+	  return ATMO_FALSE;
+
+   	int amount = getAmountFnordlichter();
+   	DWORD bufSize = 15;
+   	unsigned char *buffer = new unsigned char[ bufSize ];
+   	DWORD iBytesWritten;
+
+   	Lock();
+
+	buffer[1] = 0x01; // fade to rgb color
+	buffer[2] = 0x80; // in two steps
+	buffer[3] = 0x01; // 1ms pause between steps
+	for ( int j = 7; j <= 14; j++ )
+		buffer[j] = 0x00; // fill with zero bytes
+
+	for(unsigned char i=0; i < amount; i++) // send all packages to all fnordlicht's
+	{
+		int idx;
+		if(m_ChannelAssignment && (i < m_NumAssignedChannels))
+			idx = m_ChannelAssignment[i];
+		else
+			idx = -1; // no channel assigned to fnordlicht[i] 
+
+		if( idx >= 0 && idx <= data->numColors )
+		{
+			// fnordlicht address equals to a MoMo Channel
+			buffer[0] = i; // fnordlicht address (0..254, 255 = broadcast)
+			buffer[4] = data->zone[idx].r;
+			buffer[5] = data->zone[idx].g;
+			buffer[6] = data->zone[idx].b;
+			cout << "f[" << i << "]=" << idx << "; r=" << buffer[4] << "; g=" << buffer[5] << "; b=" << buffer[6] << endl;
+		}
+
+#if defined(WIN32)
+   		WriteFile(m_hComport, buffer, bufSize, &iBytesWritten, NULL); // send to COM-Port
+#else
+ 		iBytesWritten = write(m_hComport, buffer, bufSize);
+		tcflush(m_hComport, TCIOFLUSH);
+   		tcdrain(m_hComport);
+#endif
+
+		if (iBytesWritten != bufSize)
+		{
+			delete []buffer;
+			Unlock();
+			return ATMO_FALSE; // shouldn't be...
+		}
+
+   }
+
+   delete []buffer;
+
+   Unlock();
+
+   return ATMO_TRUE;
+}
+
+
+ATMO_BOOL CFnordlichtConnection::CreateDefaultMapping(CAtmoChannelAssignment *ca)
+{
+   if(!ca) return ATMO_FALSE;
+   ca->setSize( getAmountFnordlichter() );  // oder 4 ? depending on config!
+   ca->setZoneIndex(0, 0); // Zone 5
+   ca->setZoneIndex(1, 1);
+   ca->setZoneIndex(2, 2);
+   ca->setZoneIndex(3, 3);
+   return ATMO_TRUE;
+}
+
+int CFnordlichtConnection::getAmountFnordlichter()
+{
+   return m_pAtmoConfig->getFnordlicht_Amount();
+}
+
+/*
+    def sync(addr = 0)
+        1.upto(15) do
+            $dev.write "\e"
+        end
+        $dev.write addr.chr
+        $dev.flush
+    end
+*/
+ATMO_BOOL CFnordlichtConnection::sync(void)
+{
+	if(m_hComport == INVALID_HANDLE_VALUE)
+		return ATMO_FALSE;
+
+	DWORD bufSize = 16; // the sync package length is 16 bytes
+	unsigned char *buffer = new unsigned char[ bufSize ];
+	DWORD iBytesWritten;
+
+	Lock();
+
+	cout << "sync..." << endl;
+
+	for(int i=0; i < bufSize-1; i++) // 0 to 14 = 15 elements
+	{
+		buffer[i] = 0x1b; // send escape 15 times
+		cout << "i=" << i+1 << endl;
+	}
+
+	buffer[bufSize-1] = 0x00; // append one zero byte
+
+#if defined(WIN32)
+	WriteFile(m_hComport, buffer, bufSize, &iBytesWritten, NULL); // send to COM-Port
+#else
+	iBytesWritten = write(m_hComport, buffer, bufSize);
+	tcflush(m_hComport, TCIOFLUSH);
+	tcdrain(m_hComport);
+#endif
+
+	delete []buffer;
+
+	Unlock();
+
+	return (iBytesWritten == bufSize) ? ATMO_TRUE : ATMO_FALSE;
+
+}
+
+/*
+    def stop(addr, fading = 1)
+        $dev.write addr.chr
+        $dev.write "\x08"
+        $dev.write fading.chr
+        $dev.write "\x00\x00\x00\x00"
+        $dev.write "\x00\x00\x00\x00\x00"
+        $dev.write "\x00\x00\x00"
+        $dev.flush
+    end
+*/
+ATMO_BOOL CFnordlichtConnection::stop(unsigned char addr)
+{
+	if(m_hComport == INVALID_HANDLE_VALUE)
+		return ATMO_FALSE;
+
+	DWORD bufSize = 15; // command package length is 15 bytes
+	unsigned char *buffer = new unsigned char[ bufSize ];
+	DWORD iBytesWritten;
+
+	Lock();
+
+	buffer[0] = addr; // fnordlicht address (255 = broadcast)
+	buffer[1] = 0x08; // stop command
+	buffer[2] = 1;    // fading
+
+	for ( int i = 3; i < bufSize; i++ )
+		buffer[i] = 0x00; // fill with zero Bytes...
+
+#if defined(WIN32)
+	WriteFile(m_hComport, buffer, bufSize, &iBytesWritten, NULL); // send to COM-Port
+#else
+	iBytesWritten = write(m_hComport, buffer, bufSize);
+	tcflush(m_hComport, TCIOFLUSH);
+	tcdrain(m_hComport);
+#endif
+
+	delete []buffer;
+
+	Unlock();
+
+	return (iBytesWritten == bufSize) ? ATMO_TRUE : ATMO_FALSE;
+
+}
+
+#if !defined(_ATMO_VLC_PLUGIN_)
+
+char *CFnordlichtConnection::getChannelName(int ch)
+{
+  if(ch < 0) return NULL;
+  char buf[30];
+
+  switch(ch) {
+      case 0:
+          sprintf(buf,"Number [%d]",ch);
+          break;
+      case 1:
+          sprintf(buf,"Number [%d]",ch);
+          break;
+      case 2:
+          sprintf(buf,"Number [%d]",ch);
+          break;
+      case 3:
+          sprintf(buf,"Number [%d]",ch);
+          break;
+      default:
+          sprintf(buf,"Number [%d]",ch);
+          break;
+  }
+
+  return strdup(buf);
+}
+
+ATMO_BOOL CFnordlichtConnection::ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg)
+{
+    CFnordlichtConfigDialog *dlg = new CFnordlichtConfigDialog(hInst, parent, cfg);
+
+    INT_PTR result = dlg->ShowModal();
+
+    delete dlg;
+
+    if(result == IDOK)
+      return ATMO_TRUE;
+    else
+      return ATMO_FALSE;
+}
+
+#endif
diff --git a/modules/video_filter/atmo/FnordlichtConnection.h b/modules/video_filter/atmo/FnordlichtConnection.h
new file mode 100644
index 0000000..b3497c6
--- /dev/null
+++ b/modules/video_filter/atmo/FnordlichtConnection.h
@@ -0,0 +1,69 @@
+/*
+ * FnordlichtConnection.h: class to access a FnordlichtLight Hardware - the description could be found
+ * here: http://github.com/fd0/fnordlicht/raw/master/doc/PROTOCOL
+ *
+ * (C) Kai Lauterbach (klaute at gmail.com)
+ *
+ * $Id$
+ */
+#ifndef _FnordlichtConnection_h_
+#define _FnordlichtConnection_h_
+
+#include "AtmoDefs.h"
+#include "AtmoConnection.h"
+#include "AtmoConfig.h"
+
+#if defined(WIN32)
+#   include <windows.h>
+#endif
+
+
+class CFnordlichtConnection : public CAtmoConnection {
+    private:
+        HANDLE m_hComport;
+
+		ATMO_BOOL sync(void);
+		ATMO_BOOL stop(unsigned char addr);
+
+#if defined(WIN32)
+        DWORD  m_dwLastWin32Error;
+    public:
+        DWORD getLastError() { return m_dwLastWin32Error; }
+#endif
+
+    public:
+       CFnordlichtConnection (CAtmoConfig *cfg);
+       virtual ~CFnordlichtConnection (void);
+
+       virtual ATMO_BOOL OpenConnection();
+
+       virtual void CloseConnection();
+
+       virtual ATMO_BOOL isOpen(void);
+
+       virtual ATMO_BOOL SendData(pColorPacket data);
+
+       virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
+                                             int global_contrast,
+                                             int contrast_red,
+                                             int contrast_green,
+                                             int contrast_blue,
+                                             int gamma_red,
+                                             int gamma_green,
+                                             int gamma_blue,
+                                             ATMO_BOOL storeToEeprom);
+
+       virtual int getAmountFnordlichter();
+
+
+       virtual const char *getDevicePath() { return "fnordlicht"; }
+
+#if !defined(_ATMO_VLC_PLUGIN_)
+       virtual char *getChannelName(int ch);
+       virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
+#endif
+
+       virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca);
+};
+
+#endif
diff --git a/modules/video_filter/atmo/atmo.cpp b/modules/video_filter/atmo/atmo.cpp
index addb87c..0fe4a55 100644
--- a/modules/video_filter/atmo/atmo.cpp
+++ b/modules/video_filter/atmo/atmo.cpp
@@ -139,7 +139,8 @@ static const int pi_device_type_values[] = {
      1, /* AtmoLight classic */
      2, /* Quattro AtmoLight */
      3, /* DMX Device */
-     4  /* MoMoLight device */
+     4, /* MoMoLight device */
+	 5  /* fnordlicht */
 };
 static const char *const ppsz_device_type_descriptions[] = {
 #if defined( WIN32 )
@@ -148,7 +149,8 @@ static const char *const ppsz_device_type_descriptions[] = {
         N_("Classic AtmoLight"),
         N_("Quattro AtmoLight"),
         N_("DMX"),
-        N_("MoMoLight")
+        N_("MoMoLight"),
+        N_("fnordlicht")
 };
 
 #define DMX_CHANNELS_TEXT      N_("Count of AtmoLight channels")
@@ -162,6 +164,10 @@ static const char *const ppsz_device_type_descriptions[] = {
 #define MOMO_CHANNELS_LONGTEXT  N_("Depending on your MoMoLight hardware " \
                                    "choose 3 or 4 channels")
 
+#define FNORDLICHT_AMOUNT_TEXT      N_("Count of fnordlichter's")
+#define FNORDLICHT_AMOUNT_LONGTEXT  N_("Depending on the amount your fnordlicht hardware " \
+                                   "choose 1 to 4 channels")
+
 #if defined( WIN32 )
 #  define DEFAULT_DEVICE   0
 #else
@@ -376,7 +382,7 @@ add_string(CFG_PREFIX "serialdev", "COM1", NULL,
 add_file(CFG_PREFIX "atmowinexe", NULL, NULL,
          ATMOWINEXE_TEXT, ATMOWINEXE_LONGTEXT, false )
 #else
-add_string(CFG_PREFIX "serialdev", "/dev/ttyS01", NULL,
+add_string(CFG_PREFIX "serialdev", "/dev/ttyUSB0", NULL,
            SERIALDEV_TEXT, SERIALDEV_LONGTEXT, false )
 #endif
 
@@ -421,6 +427,10 @@ set_section( N_("MoMoLight options" ), 0 )
 add_integer_with_range(CFG_PREFIX "momo-channels",   3, 3, 4, NULL,
                        MOMO_CHANNELS_TEXT, MOMO_CHANNELS_LONGTEXT, false)
 
+// 2,2,4 means 2 is the default value, 1 minimum amount, 4 maximum amount
+set_section( N_("fnordlicht options" ), 0 )
+add_integer_with_range(CFG_PREFIX "fnordlicht-amount",   2, 1, 4, NULL,
+                       FNORDLICHT_AMOUNT_TEXT, FNORDLICHT_AMOUNT_LONGTEXT, false)
 
 
 /*
@@ -652,6 +662,7 @@ static const char *const ppsz_filter_options[] = {
         "dmx-channels",
         "dmx-chbase",
         "momo-channels",
+        "fnordlicht-amount",
 
 #if defined(WIN32 )
         "atmowinexe",
@@ -1523,6 +1534,14 @@ static void Atmo_SetupConfig(filter_t *p_filter, CAtmoConfig *p_atmo_config)
     p_atmo_config->setMoMo_Channels(
         var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "momo-channels")
        );
+
+    /*
+      fnordlicht options
+    */
+    p_atmo_config->setFnordlicht_Amount(
+        var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "fnordlicht-amount")
+       );
+
 }
 
 
@@ -1684,6 +1703,10 @@ static void Atmo_SetupParameters(filter_t *p_filter)
                 p_sys->p_atmo_config->setConnectionType( actMoMoLight );
                 break;
 
+            case 5:
+                p_sys->p_atmo_config->setConnectionType( actFnordlicht );
+                break;
+
             default:
                 msg_Warn( p_filter, "invalid device type %d found",
                                     p_sys->i_device_type );
-- 
1.6.3.3




More information about the vlc-devel mailing list