Commit 3cfc015c authored by André Weber's avatar André Weber

Revert "atmo: add support for new device fnordlicht"

source contained tabs, will commit again later (sorry for any trouble)

This reverts commit 1af1e3b1.
parent ffb2a1bb
......@@ -71,7 +71,6 @@ 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
......
......@@ -44,10 +44,6 @@ CAtmoConfig::CAtmoConfig()
m_AtmoZoneDefCount = -1;
m_DMX_BaseChannels = NULL;
m_chWhiteAdj_Red = NULL;
m_chWhiteAdj_Green = NULL;
m_chWhiteAdj_Blue = NULL;
LoadDefaults();
}
......@@ -63,10 +59,6 @@ CAtmoConfig::~CAtmoConfig() {
m_ZoneDefinitions = NULL;
}
delete []m_chWhiteAdj_Red;
delete []m_chWhiteAdj_Green;
delete []m_chWhiteAdj_Blue;
free( m_DMX_BaseChannels );
#if defined (_ATMO_VLC_PLUGIN_)
......@@ -107,6 +99,8 @@ void CAtmoConfig::LoadDefaults() {
m_UpdateEdgeWeightningFlag = 0;
m_Software_gamma_mode = agcNone;
m_Software_gamma_red = 10;
m_Software_gamma_green = 10;
......@@ -118,17 +112,6 @@ void CAtmoConfig::LoadDefaults() {
m_WhiteAdjustment_Blue = 255;
m_UseSoftwareWhiteAdj = 1;
m_WhiteAdjPerChannel = ATMO_FALSE;
m_chWhiteAdj_Count = 0;
delete []m_chWhiteAdj_Red;
delete []m_chWhiteAdj_Green;
delete []m_chWhiteAdj_Blue;
m_chWhiteAdj_Red = NULL;
m_chWhiteAdj_Green = NULL;
m_chWhiteAdj_Blue = NULL;
m_ColorChanger_iSteps = 50;
m_ColorChanger_iDelay = 25;
......@@ -162,7 +145,6 @@ void CAtmoConfig::LoadDefaults() {
m_LiveView_DisplayNr = 0;
m_LiveView_FrameDelay = 30;
m_LiveView_GDI_FrameRate = 25;
m_LiveView_RowsPerFrame = 0;
m_Hardware_global_gamma = 128;
......@@ -179,7 +161,6 @@ 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;
......@@ -187,6 +168,7 @@ void CAtmoConfig::LoadDefaults() {
m_ZoneSummary = ATMO_FALSE;
UpdateZoneCount();
clearAllChannelMappings();
m_CurrentChannelAssignment = 0;
CAtmoChannelAssignment *temp = new CAtmoChannelAssignment();
......@@ -219,25 +201,6 @@ void CAtmoConfig::Assign(CAtmoConfig *pAtmoConfigSrc) {
this->m_WhiteAdjustment_Blue = pAtmoConfigSrc->m_WhiteAdjustment_Blue;
this->m_UseSoftwareWhiteAdj = pAtmoConfigSrc->m_UseSoftwareWhiteAdj;
this->m_WhiteAdjPerChannel = pAtmoConfigSrc->m_WhiteAdjPerChannel;
this->m_chWhiteAdj_Count = pAtmoConfigSrc->m_chWhiteAdj_Count;
delete []m_chWhiteAdj_Red;
delete []m_chWhiteAdj_Green;
delete []m_chWhiteAdj_Blue;
if(m_chWhiteAdj_Count > 0)
{
m_chWhiteAdj_Red = new int[ m_chWhiteAdj_Count ];
m_chWhiteAdj_Green = new int[ m_chWhiteAdj_Count ];
m_chWhiteAdj_Blue = new int[ m_chWhiteAdj_Count ];
memcpy(m_chWhiteAdj_Red, pAtmoConfigSrc->m_chWhiteAdj_Red, sizeof(int) * m_chWhiteAdj_Count);
memcpy(m_chWhiteAdj_Green, pAtmoConfigSrc->m_chWhiteAdj_Green, sizeof(int) * m_chWhiteAdj_Count);
memcpy(m_chWhiteAdj_Blue, pAtmoConfigSrc->m_chWhiteAdj_Blue, sizeof(int) * m_chWhiteAdj_Count);
} else {
m_chWhiteAdj_Red = NULL;
m_chWhiteAdj_Green = NULL;
m_chWhiteAdj_Blue = NULL;
}
this->m_IsSetShutdownColor = pAtmoConfigSrc->m_IsSetShutdownColor;
this->m_ShutdownColor_Red = pAtmoConfigSrc->m_ShutdownColor_Red;
this->m_ShutdownColor_Green = pAtmoConfigSrc->m_ShutdownColor_Green;
......@@ -260,6 +223,7 @@ void CAtmoConfig::Assign(CAtmoConfig *pAtmoConfigSrc) {
this->m_show_statistics = pAtmoConfigSrc->m_show_statistics;
this->m_LiveView_EdgeWeighting = pAtmoConfigSrc->m_LiveView_EdgeWeighting;
this->m_LiveView_BrightCorrect = pAtmoConfigSrc->m_LiveView_BrightCorrect;
this->m_LiveView_DarknessLimit = pAtmoConfigSrc->m_LiveView_DarknessLimit;
......@@ -272,7 +236,6 @@ void CAtmoConfig::Assign(CAtmoConfig *pAtmoConfigSrc) {
this->m_LiveView_DisplayNr = pAtmoConfigSrc->m_LiveView_DisplayNr;
this->m_LiveView_FrameDelay = pAtmoConfigSrc->m_LiveView_FrameDelay;
this->m_LiveView_GDI_FrameRate = pAtmoConfigSrc->m_LiveView_GDI_FrameRate;
this->m_LiveView_RowsPerFrame = pAtmoConfigSrc->m_LiveView_RowsPerFrame;
this->m_ZonesTopCount = pAtmoConfigSrc->m_ZonesTopCount;
this->m_ZonesBottomCount = pAtmoConfigSrc->m_ZonesBottomCount;
......@@ -292,8 +255,6 @@ 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();
......@@ -317,6 +278,8 @@ void CAtmoConfig::Assign(CAtmoConfig *pAtmoConfigSrc) {
UpdateZoneDefinitionCount();
}
int CAtmoConfig::getNumChannelAssignments() {
int z=0;
for(int i=0;i<10;i++)
......@@ -373,6 +336,8 @@ void CAtmoConfig::UpdateZoneCount()
m_computed_zones_count++;
}
int CAtmoConfig::getZoneCount()
{
return(m_computed_zones_count);
......@@ -458,50 +423,3 @@ void CAtmoConfig::setDMX_BaseChannels(char *channels)
m_DMX_BaseChannels = strdup(channels);
}
void CAtmoConfig::getChannelWhiteAdj(int channel,int &red,int &green,int &blue)
{
if(channel >= m_chWhiteAdj_Count)
{
red = 256;
green = 256;
blue = 256;
} else {
red = m_chWhiteAdj_Red[ channel ];
green = m_chWhiteAdj_Green[ channel ];
blue = m_chWhiteAdj_Blue[ channel ];
}
}
void CAtmoConfig::setChannelWhiteAdj(int channel,int red,int green,int blue)
{
if(channel >= m_chWhiteAdj_Count)
{
int *tmp = new int[channel+1];
if(m_chWhiteAdj_Red)
memcpy( tmp, m_chWhiteAdj_Red, m_chWhiteAdj_Count * sizeof(int) );
delete []m_chWhiteAdj_Red;
m_chWhiteAdj_Red = tmp;
tmp = new int[channel + 1];
if(m_chWhiteAdj_Green)
memcpy( tmp, m_chWhiteAdj_Green, m_chWhiteAdj_Count * sizeof(int) );
delete []m_chWhiteAdj_Green;
m_chWhiteAdj_Green = tmp;
tmp = new int[channel + 1];
if(m_chWhiteAdj_Blue)
memcpy( tmp, m_chWhiteAdj_Blue, m_chWhiteAdj_Count * sizeof(int) );
delete []m_chWhiteAdj_Blue;
m_chWhiteAdj_Blue = tmp;
m_chWhiteAdj_Count = channel + 1;
}
m_chWhiteAdj_Red[channel] = red;
m_chWhiteAdj_Green[channel] = green;
m_chWhiteAdj_Blue[channel] = blue;
}
......@@ -19,10 +19,11 @@
# include <string.h>
#endif
class CAtmoConfig {
protected:
int m_IsShowConfigDialog;
int m_IsShowConfigDialog;
#if defined(_ATMO_VLC_PLUGIN_)
char *m_devicename;
char *m_devicenames[3]; // additional Devices ?
......@@ -41,12 +42,6 @@ class CAtmoConfig {
int m_WhiteAdjustment_Green;
int m_WhiteAdjustment_Blue;
ATMO_BOOL m_WhiteAdjPerChannel;
int m_chWhiteAdj_Count;
int *m_chWhiteAdj_Red;
int *m_chWhiteAdj_Green;
int *m_chWhiteAdj_Blue;
protected:
int m_IsSetShutdownColor;
int m_ShutdownColor_Red;
......@@ -81,6 +76,7 @@ class CAtmoConfig {
CAtmoZoneDefinition **m_ZoneDefinitions;
int m_AtmoZoneDefCount;
/*
zone layout description for generating the default Zone weightning
*/
......@@ -98,6 +94,7 @@ class CAtmoConfig {
public:
int getZoneCount();
protected:
/* Live View Parameters (most interesting) */
AtmoFilterMode m_LiveViewFilterMode;
......@@ -107,9 +104,6 @@ class CAtmoConfig {
ATMO_BOOL m_show_statistics;
// number of rows to process each frame
int m_LiveView_RowsPerFrame;
// weighting of distance to edge
int m_LiveView_EdgeWeighting; // = 8;
// brightness correction
......@@ -160,9 +154,6 @@ class CAtmoConfig {
protected:
int m_MoMo_Channels;
protected:
int m_Fnordlicht_Amount;
protected:
AtmoGammaCorrect m_Software_gamma_mode;
......@@ -174,6 +165,7 @@ class CAtmoConfig {
public:
volatile int m_UpdateEdgeWeightningFlag;
public:
CAtmoConfig();
virtual ~CAtmoConfig();
......@@ -218,13 +210,6 @@ class CAtmoConfig {
ATMO_BOOL isUseSoftwareWhiteAdj() { return m_UseSoftwareWhiteAdj; }
void setUseSoftwareWhiteAdj(ATMO_BOOL value) { m_UseSoftwareWhiteAdj = value; }
/* White ADJ per Channel settings */
ATMO_BOOL isWhiteAdjPerChannel() { return m_WhiteAdjPerChannel; }
void setWhiteAdjPerChannel( ATMO_BOOL value) { m_WhiteAdjPerChannel = value; }
void setChannelWhiteAdj(int channel,int red,int green,int blue);
void getChannelWhiteAdj(int channel,int &red,int &green,int &blue);
int isSetShutdownColor() { return m_IsSetShutdownColor; }
void SetSetShutdownColor(int value) { m_IsSetShutdownColor = value; }
int getShutdownColor_Red() { return m_ShutdownColor_Red; }
......@@ -251,6 +236,7 @@ class CAtmoConfig {
int getStaticColor_Blue() { return m_StaticColor_Blue; }
void setStaticColor_Blue(int value) { m_StaticColor_Blue=value; }
AtmoConnectionType getConnectionType() { return m_eAtmoConnectionType; }
void setConnectionType(AtmoConnectionType value) { m_eAtmoConnectionType = value; }
......@@ -272,10 +258,7 @@ class CAtmoConfig {
int getLiveView_EdgeWeighting() { return m_LiveView_EdgeWeighting; }
void setLiveView_EdgeWeighting(int value) { m_LiveView_EdgeWeighting=value; }
int getLiveView_RowsPerFrame() { return m_LiveView_RowsPerFrame; }
void setLiveView_RowsPerFrame(int value) { m_LiveView_RowsPerFrame=value; }
int getLiveView_BrightCorrect() { return m_LiveView_BrightCorrect; }
int getLiveView_BrightCorrect() { return m_LiveView_BrightCorrect; }
void setLiveView_BrightCorrect(int value) { m_LiveView_BrightCorrect=value; }
int getLiveView_DarknessLimit() { return m_LiveView_DarknessLimit; }
......@@ -329,6 +312,7 @@ class CAtmoConfig {
int getHardware_gamma_blue() { return m_Hardware_gamma_blue; }
void setHardware_gamma_blue(int value) { m_Hardware_gamma_blue=value; }
AtmoGammaCorrect getSoftware_gamma_mode() { return m_Software_gamma_mode; }
int getSoftware_gamma_red() { return m_Software_gamma_red; }
int getSoftware_gamma_green() { return m_Software_gamma_green; }
......@@ -375,9 +359,6 @@ 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
......@@ -114,8 +114,7 @@ enum AtmoConnectionType
actNUL = 3,
actMultiAtmo = 4,
actMondolight = 5,
actMoMoLight = 6,
actFnordlicht = 7
actMoMoLight = 6
};
static const char *AtmoDeviceTypes[] = {
"Atmo-Classic",
......@@ -124,10 +123,10 @@ static const char *AtmoDeviceTypes[] = {
"Nul-Device",
"Multi-Atmo",
"Mondolight",
"MoMoLight",
"Fnordlicht"
"MoMoLight"
};
#define ATMO_DEVICE_COUNT 8
#define ATMO_DEVICE_COUNT 7
#if defined(_ATMO_VLC_PLUGIN_)
enum EffectMode {
......
......@@ -13,7 +13,6 @@
#include "AtmoDmxSerialConnection.h"
#include "AtmoMultiConnection.h"
#include "MoMoConnection.h"
#include "FnordlichtConnection.h"
#include "AtmoExternalCaptureInput.h"
#include <math.h>
......@@ -28,6 +27,7 @@
# include "AtmoGdiDisplayCaptureInput.h"
#endif
CAtmoTools::CAtmoTools(void)
{
}
......@@ -40,6 +40,7 @@ void CAtmoTools::ShowShutdownColor(CAtmoDynData *pDynData)
{
pDynData->LockCriticalSection();
CAtmoConnection *atmoConnection = pDynData->getAtmoConnection();
CAtmoConfig *atmoConfig = pDynData->getAtmoConfig();
if((atmoConnection != NULL) && (atmoConfig!=NULL) && atmoConfig->isSetShutdownColor()) {
......@@ -402,24 +403,6 @@ 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;
......
This diff is collapsed.
/*
* 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)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $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);
ATMO_BOOL reset(unsigned char addr);
ATMO_BOOL start_bootloader(unsigned char addr);
ATMO_BOOL boot_enter_application(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
This diff is collapsed.
......@@ -139,8 +139,7 @@ static const int pi_device_type_values[] = {
1, /* AtmoLight classic */
2, /* Quattro AtmoLight */
3, /* DMX Device */
4, /* MoMoLight device */
5 /* fnordlicht */
4 /* MoMoLight device */
};
static const char *const ppsz_device_type_descriptions[] = {
#if defined( WIN32 )
......@@ -149,8 +148,7 @@ static const char *const ppsz_device_type_descriptions[] = {
N_("Classic AtmoLight"),
N_("Quattro AtmoLight"),
N_("DMX"),
N_("MoMoLight"),
N_("fnordlicht")
N_("MoMoLight")
};
#define DMX_CHANNELS_TEXT N_("Count of AtmoLight channels")
......@@ -164,11 +162,6 @@ 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 fnordlicht'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
......@@ -383,7 +376,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/ttyUSB0", NULL,
add_string(CFG_PREFIX "serialdev", "/dev/ttyS01", NULL,
SERIALDEV_TEXT, SERIALDEV_LONGTEXT, false )
#endif
......@@ -428,13 +421,6 @@ 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)
/*
......@@ -666,7 +652,6 @@ static const char *const ppsz_filter_options[] = {
"dmx-channels",
"dmx-chbase",
"momo-channels",
"fnordlicht-amount",
#if defined(WIN32 )
"atmowinexe",
......@@ -1538,14 +1523,6 @@ 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")
);
}
......@@ -1626,58 +1603,48 @@ static void Atmo_SetupParameters(filter_t *p_filter)
/* importing all required functions I hope*/
p_sys->pf_ctrl_atmo_initialize =
(int32_t (*)(void))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoInitialize");
(int32_t (*)(void))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoInitialize");
if(!p_sys->pf_ctrl_atmo_initialize)
msg_Err( p_filter, "export AtmoInitialize missing.");
p_sys->pf_ctrl_atmo_finalize =
(void (*)(int32_t))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoFinalize");
(void (*)(int32_t))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoFinalize");
if(!p_sys->pf_ctrl_atmo_finalize)
msg_Err( p_filter, "export AtmoFinalize missing.");
p_sys->pf_ctrl_atmo_switch_effect =
(int32_t(*)(int32_t))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoSwitchEffect" );
(int32_t(*)(int32_t))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoSwitchEffect");
if(!p_sys->pf_ctrl_atmo_switch_effect)
msg_Err( p_filter, "export AtmoSwitchEffect missing.");
p_sys->pf_ctrl_atmo_set_live_source =
(int32_t(*)(int32_t))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoSetLiveSource" );
(int32_t(*)(int32_t))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoSetLiveSource");
if(!p_sys->pf_ctrl_atmo_set_live_source)
msg_Err( p_filter, "export AtmoSetLiveSource missing.");
p_sys->pf_ctrl_atmo_create_transfer_buffers =
(void (*)(int32_t, int32_t, int32_t , int32_t))
GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoCreateTransferBuffers" );
(void (*)(int32_t, int32_t, int32_t , int32_t))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoCreateTransferBuffers");
if(!p_sys->pf_ctrl_atmo_create_transfer_buffers)
msg_Err( p_filter, "export AtmoCreateTransferBuffers missing.");
p_sys->pf_ctrl_atmo_lock_transfer_buffer=
(uint8_t*(*) (void))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoLockTransferBuffer");
(uint8_t*(*) (void))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoLockTransferBuffer");
if(!p_sys->pf_ctrl_atmo_lock_transfer_buffer)
msg_Err( p_filter, "export AtmoLockTransferBuffer missing.");
p_sys->pf_ctrl_atmo_send_pixel_data =
(void (*)(void))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoSendPixelData");
(void (*)(void))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoSendPixelData");
if(!p_sys->pf_ctrl_atmo_send_pixel_data)
msg_Err( p_filter, "export AtmoSendPixelData missing.");
p_sys->pf_ctrl_atmo_get_image_size =
(void (*)(int32_t*,int32_t*))GetProcAddress( p_sys->h_AtmoCtrl,
"AtmoWinGetImageSize");
(void (*)(int32_t*,int32_t*))GetProcAddress(p_sys->h_AtmoCtrl,"AtmoWinGetImageSize");
if(!p_sys->pf_ctrl_atmo_get_image_size)
msg_Err( p_filter, "export AtmoWinGetImageSize missing.");
} else {
/* the DLL is missing try internal filter ...*/
msg_Warn( p_filter,
"AtmoCtrlLib.dll missing fallback to internal atmo classic driver" );
msg_Warn( p_filter, "AtmoCtrlLib.dll missing fallback to internal atmo classic driver");
p_sys->i_device_type = 1;
}
}
......@@ -1717,10 +1684,6 @@ 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 );
......@@ -2264,8 +2227,7 @@ static void CreateMiniImage( filter_t *p_filter, picture_t *p_inpic)
}
}
msg_Dbg( p_filter, "AtmoFrame %u Time: %d ms", p_sys->ui_frame_counter,
mdate() / 1000);
msg_Dbg( p_filter, "AtmoFrame %u Time: %d ms", p_sys->ui_frame_counter, mdate() / 1000);
p_sys->ui_frame_counter++;
#endif
......@@ -2570,7 +2532,7 @@ static int AtmoSettingsCallback( vlc_object_t *p_this, char const *psz_var,
);
if( !strcmp( psz_var, CFG_PREFIX "filtermode" ))
p_atmo_config->setLiveViewFilterMode( (AtmoFilterMode)newval.i_int );
p_atmo_config->setLiveViewFilterMode( (AtmoFilterMode)newval.i_int);
else if( !strcmp( psz_var, CFG_PREFIX "percentnew" ))
p_atmo_config->setLiveViewFilter_PercentNew( newval.i_int );
......@@ -2800,14 +2762,10 @@ static void atmo_parse_crop(char *psz_cropconfig,
i_crop_bottom = strtol( psz_end, &psz_end, 10 );
if( *psz_end != '\0' ) return;
i_width = fmt_render.i_visible_width -
i_crop_left -
i_crop_right;
i_width = fmt_render.i_visible_width - i_crop_left - i_crop_right;
i_visible_width = i_width;
i_height = fmt_render.i_visible_height -
i_crop_top -
i_crop_bottom;
i_height = fmt_render.i_visible_height - i_crop_top - i_crop_bottom;
i_visible_height = i_height;
i_x_offset = i_crop_left;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment