mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
our current experimental Neutrino branch
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@27 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
10
lib/controldclient/Makefile.am
Normal file
10
lib/controldclient/Makefile.am
Normal file
@@ -0,0 +1,10 @@
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_srcdir)/lib/connection \
|
||||
-I$(top_srcdir)/lib/libeventserver
|
||||
|
||||
AM_CPPFLAGS = -fno-rtti -fno-exceptions
|
||||
|
||||
lib_LTLIBRARIES = libcontroldclient.la
|
||||
|
||||
libcontroldclient_la_SOURCES = controldclient.cpp
|
172
lib/controldclient/controldMsg.h
Normal file
172
lib/controldclient/controldMsg.h
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __controldMsg__
|
||||
#define __controldMsg__
|
||||
|
||||
#include <controldclient/controldtypes.h>
|
||||
#include <connection/basicmessage.h>
|
||||
|
||||
#define CONTROLD_UDS_NAME "/tmp/controld.sock"
|
||||
|
||||
|
||||
class CControldMsg : public CBasicMessage
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
static const CBasicMessage::t_version ACTVERSION = 2;
|
||||
|
||||
enum commands
|
||||
{
|
||||
CMD_SHUTDOWN = 1,
|
||||
CMD_SAVECONFIG,
|
||||
|
||||
CMD_SETVOLUME,
|
||||
CMD_GETVOLUME,
|
||||
|
||||
CMD_SETVOLUME_AVS,
|
||||
CMD_GETVOLUME_AVS,
|
||||
|
||||
CMD_SETMUTE,
|
||||
CMD_GETMUTESTATUS,
|
||||
|
||||
CMD_SETVIDEOFORMAT,
|
||||
CMD_GETVIDEOFORMAT,
|
||||
|
||||
CMD_SETVIDEOOUTPUT,
|
||||
CMD_GETVIDEOOUTPUT,
|
||||
|
||||
CMD_SETVCROUTPUT,
|
||||
CMD_GETVCROUTPUT,
|
||||
|
||||
CMD_SETBOXTYPE,
|
||||
CMD_GETBOXTYPE,
|
||||
|
||||
CMD_SETSCARTMODE,
|
||||
CMD_GETSCARTMODE,
|
||||
|
||||
CMD_GETASPECTRATIO,
|
||||
|
||||
CMD_SETVIDEOPOWERDOWN,
|
||||
CMD_GETVIDEOPOWERDOWN,
|
||||
|
||||
CMD_REGISTEREVENT,
|
||||
CMD_UNREGISTEREVENT,
|
||||
|
||||
CMD_EVENT,
|
||||
|
||||
CMD_SETCSYNC,
|
||||
CMD_GETCSYNC,
|
||||
CMD_SETVIDEOMODE,
|
||||
CMD_GETVIDEOMODE
|
||||
|
||||
};
|
||||
|
||||
struct commandVolume
|
||||
{
|
||||
unsigned char volume;
|
||||
CControld::volume_type type;
|
||||
};
|
||||
|
||||
struct commandMute
|
||||
{
|
||||
bool mute;
|
||||
CControld::volume_type type;
|
||||
};
|
||||
|
||||
struct commandVideoFormat
|
||||
{
|
||||
unsigned char format;
|
||||
};
|
||||
|
||||
struct commandVideoOutput
|
||||
{
|
||||
unsigned char output;
|
||||
};
|
||||
|
||||
struct commandVCROutput
|
||||
{
|
||||
unsigned char vcr_output;
|
||||
};
|
||||
|
||||
struct commandBoxType
|
||||
{
|
||||
CControld::tuxbox_maker_t boxtype;
|
||||
};
|
||||
|
||||
struct commandScartMode
|
||||
{
|
||||
unsigned char mode;
|
||||
};
|
||||
|
||||
struct commandVideoPowerSave
|
||||
{
|
||||
bool powerdown;
|
||||
};
|
||||
|
||||
//response structures
|
||||
|
||||
struct responseVideoFormat
|
||||
{
|
||||
unsigned char format;
|
||||
};
|
||||
|
||||
struct responseAspectRatio
|
||||
{
|
||||
unsigned char aspectRatio;
|
||||
};
|
||||
|
||||
struct responseVideoOutput
|
||||
{
|
||||
unsigned char output;
|
||||
};
|
||||
|
||||
struct responseVCROutput
|
||||
{
|
||||
unsigned char vcr_output;
|
||||
};
|
||||
|
||||
struct responseBoxType
|
||||
{
|
||||
CControld::tuxbox_maker_t boxtype;
|
||||
};
|
||||
|
||||
struct responseScartMode
|
||||
{
|
||||
unsigned char mode;
|
||||
};
|
||||
|
||||
struct commandCsync
|
||||
{
|
||||
unsigned char csync;
|
||||
};
|
||||
|
||||
struct responseVideoPowerSave
|
||||
{
|
||||
bool videoPowerSave;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
316
lib/controldclient/controldclient.cpp
Normal file
316
lib/controldclient/controldclient.cpp
Normal file
@@ -0,0 +1,316 @@
|
||||
/*
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Kommentar:
|
||||
|
||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
||||
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
|
||||
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
|
||||
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
|
||||
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <eventserver.h>
|
||||
#include <controldclient/controldclient.h>
|
||||
|
||||
|
||||
const unsigned char CControldClient::getVersion () const
|
||||
{
|
||||
return CControldMsg::ACTVERSION;
|
||||
}
|
||||
|
||||
const char * CControldClient::getSocketName() const
|
||||
{
|
||||
return CONTROLD_UDS_NAME;
|
||||
}
|
||||
|
||||
void CControldClient::shutdown()
|
||||
{
|
||||
send(CControldMsg::CMD_SHUTDOWN);
|
||||
close_connection();
|
||||
}
|
||||
|
||||
void CControldClient::setBoxType(CControld::tuxbox_maker_t type)
|
||||
{
|
||||
CControldMsg::commandBoxType msg2;
|
||||
|
||||
msg2.boxtype = type;
|
||||
|
||||
send(CControldMsg::CMD_SETBOXTYPE, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
CControld::tuxbox_maker_t CControldClient::getBoxType()
|
||||
{
|
||||
CControldMsg::responseBoxType rmsg;
|
||||
|
||||
send(CControldMsg::CMD_GETBOXTYPE);
|
||||
|
||||
if (!receive_data((char*)&rmsg, sizeof(rmsg)))
|
||||
rmsg.boxtype = CControld::TUXBOX_MAKER_UNKNOWN;
|
||||
|
||||
close_connection();
|
||||
|
||||
return rmsg.boxtype;
|
||||
}
|
||||
|
||||
void CControldClient::setScartMode(bool mode)
|
||||
{
|
||||
CControldMsg::commandScartMode msg2;
|
||||
|
||||
msg2.mode = mode;
|
||||
|
||||
send(CControldMsg::CMD_SETSCARTMODE, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
char CControldClient::getScartMode()
|
||||
{
|
||||
CControldMsg::responseScartMode rmsg;
|
||||
send(CControldMsg::CMD_GETSCARTMODE);
|
||||
receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
close_connection();
|
||||
|
||||
return rmsg.mode;
|
||||
}
|
||||
|
||||
void CControldClient::setVolume(const char volume, const CControld::volume_type volume_type)
|
||||
{
|
||||
CControldMsg::commandVolume msg2;
|
||||
msg2.type = volume_type;
|
||||
msg2.volume = volume;
|
||||
send(CControldMsg::CMD_SETVOLUME, (char*)&msg2, sizeof(msg2));
|
||||
close_connection();
|
||||
}
|
||||
|
||||
char CControldClient::getVolume(const CControld::volume_type volume_type)
|
||||
{
|
||||
CControldMsg::commandVolume rmsg;
|
||||
rmsg.type = volume_type;
|
||||
send(CControldMsg::CMD_GETVOLUME, (char*)&rmsg, sizeof(rmsg));
|
||||
receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
close_connection();
|
||||
|
||||
return rmsg.volume;
|
||||
}
|
||||
|
||||
void CControldClient::setVideoFormat(char format)
|
||||
{
|
||||
CControldMsg::commandVideoFormat msg2;
|
||||
|
||||
msg2.format = format;
|
||||
|
||||
send(CControldMsg::CMD_SETVIDEOFORMAT, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
char CControldClient::getAspectRatio()
|
||||
{
|
||||
CControldMsg::responseAspectRatio rmsg;
|
||||
|
||||
send(CControldMsg::CMD_GETASPECTRATIO);
|
||||
|
||||
receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
|
||||
close_connection();
|
||||
|
||||
return rmsg.aspectRatio;
|
||||
}
|
||||
|
||||
char CControldClient::getVideoFormat()
|
||||
{
|
||||
CControldMsg::responseVideoFormat rmsg;
|
||||
|
||||
send(CControldMsg::CMD_GETVIDEOFORMAT);
|
||||
|
||||
bool success = receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
|
||||
close_connection();
|
||||
|
||||
return success ? rmsg.format : 2; /* default value is 2 (cf. controld.cpp) */
|
||||
}
|
||||
|
||||
void CControldClient::setVideoOutput(char output)
|
||||
{
|
||||
CControldMsg::commandVideoOutput msg2;
|
||||
|
||||
msg2.output = output;
|
||||
|
||||
send(CControldMsg::CMD_SETVIDEOOUTPUT, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
void CControldClient::setVCROutput(char output)
|
||||
{
|
||||
CControldMsg::commandVCROutput msg2;
|
||||
|
||||
msg2.vcr_output = output;
|
||||
|
||||
send(CControldMsg::CMD_SETVCROUTPUT, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
char CControldClient::getVideoOutput()
|
||||
{
|
||||
CControldMsg::responseVideoOutput rmsg;
|
||||
|
||||
send(CControldMsg::CMD_GETVIDEOOUTPUT);
|
||||
|
||||
bool success = receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
|
||||
close_connection();
|
||||
|
||||
return success ? rmsg.output : 1; /* default value is 1 (cf. controld.cpp) */
|
||||
}
|
||||
|
||||
char CControldClient::getVCROutput()
|
||||
{
|
||||
CControldMsg::responseVCROutput rmsg;
|
||||
|
||||
send(CControldMsg::CMD_GETVCROUTPUT);
|
||||
|
||||
bool success = receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
|
||||
close_connection();
|
||||
|
||||
return success ? rmsg.vcr_output : 1; /* default value is 1 (cf. controld.cpp) */
|
||||
}
|
||||
|
||||
void CControldClient::Mute(const CControld::volume_type volume_type)
|
||||
{
|
||||
setMute(true,volume_type);
|
||||
}
|
||||
|
||||
void CControldClient::UnMute(const CControld::volume_type volume_type)
|
||||
{
|
||||
setMute(false,volume_type);
|
||||
}
|
||||
|
||||
void CControldClient::setMute(const bool mute, const CControld::volume_type volume_type)
|
||||
{
|
||||
CControldMsg::commandMute msg;
|
||||
msg.mute = mute;
|
||||
msg.type = volume_type;
|
||||
send(CControldMsg::CMD_SETMUTE, (char*)&msg, sizeof(msg));
|
||||
close_connection();
|
||||
}
|
||||
|
||||
bool CControldClient::getMute(const CControld::volume_type volume_type)
|
||||
{
|
||||
CControldMsg::commandMute rmsg;
|
||||
rmsg.type = volume_type;
|
||||
send(CControldMsg::CMD_GETMUTESTATUS, (char*)&rmsg, sizeof(rmsg));
|
||||
receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
close_connection();
|
||||
return rmsg.mute;
|
||||
}
|
||||
|
||||
void CControldClient::registerEvent(unsigned int eventID, unsigned int clientID, const char * const udsName)
|
||||
{
|
||||
CEventServer::commandRegisterEvent msg2;
|
||||
|
||||
msg2.eventID = eventID;
|
||||
msg2.clientID = clientID;
|
||||
strcpy(msg2.udsName, udsName);
|
||||
|
||||
send(CControldMsg::CMD_REGISTEREVENT, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
void CControldClient::unRegisterEvent(unsigned int eventID, unsigned int clientID)
|
||||
{
|
||||
CEventServer::commandUnRegisterEvent msg2;
|
||||
|
||||
msg2.eventID = eventID;
|
||||
msg2.clientID = clientID;
|
||||
|
||||
send(CControldMsg::CMD_UNREGISTEREVENT, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
void CControldClient::videoPowerDown(bool powerdown)
|
||||
{
|
||||
CControldMsg::commandVideoPowerSave msg2;
|
||||
|
||||
msg2.powerdown = powerdown;
|
||||
|
||||
send(CControldMsg::CMD_SETVIDEOPOWERDOWN, (char*)&msg2, sizeof(msg2));
|
||||
|
||||
close_connection();
|
||||
}
|
||||
|
||||
bool CControldClient::getVideoPowerDown()
|
||||
{
|
||||
CControldMsg::responseVideoPowerSave msg;
|
||||
send(CControldMsg::CMD_GETVIDEOPOWERDOWN);
|
||||
receive_data((char*) &msg, sizeof(msg));
|
||||
close_connection();
|
||||
return msg.videoPowerSave;
|
||||
}
|
||||
|
||||
void CControldClient::saveSettings()
|
||||
{
|
||||
send(CControldMsg::CMD_SAVECONFIG);
|
||||
close_connection();
|
||||
}
|
||||
|
||||
void CControldClient::setRGBCsync(char val)
|
||||
{
|
||||
CControldMsg::commandCsync msg;
|
||||
msg.csync = val;
|
||||
send(CControldMsg::CMD_SETCSYNC, (char*) &msg, sizeof(msg));
|
||||
close_connection();
|
||||
}
|
||||
|
||||
char CControldClient::getRGBCsync()
|
||||
{
|
||||
CControldMsg::commandCsync msg;
|
||||
send(CControldMsg::CMD_GETCSYNC);
|
||||
receive_data((char*) &msg, sizeof(msg));
|
||||
close_connection();
|
||||
return msg.csync;
|
||||
}
|
||||
char CControldClient::getVideoMode()
|
||||
{
|
||||
CControldMsg::responseVideoFormat rmsg;
|
||||
send(CControldMsg::CMD_GETVIDEOMODE);
|
||||
bool success = receive_data((char*)&rmsg, sizeof(rmsg));
|
||||
close_connection();
|
||||
return success ? rmsg.format : 1; /* default value is 2 (cf. controld.cpp) */
|
||||
}
|
||||
void CControldClient::setVideoMode(char format)
|
||||
{
|
||||
CControldMsg::commandVideoFormat msg2;
|
||||
msg2.format = format;
|
||||
send(CControldMsg::CMD_SETVIDEOMODE, (char*)&msg2, sizeof(msg2));
|
||||
close_connection();
|
||||
}
|
||||
|
196
lib/controldclient/controldclient.h
Normal file
196
lib/controldclient/controldclient.h
Normal file
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __controldclient__
|
||||
#define __controldclient__
|
||||
|
||||
#include <connection/basicclient.h>
|
||||
#include <controldclient/controldMsg.h>
|
||||
|
||||
|
||||
#define VCR_STATUS_OFF 0
|
||||
#define VCR_STATUS_ON 1
|
||||
#define VCR_STATUS_16_9 2
|
||||
|
||||
class CControldClient:private CBasicClient
|
||||
{
|
||||
private:
|
||||
virtual const unsigned char getVersion () const;
|
||||
virtual const char * getSocketName() const;
|
||||
|
||||
public:
|
||||
|
||||
enum events
|
||||
{
|
||||
EVT_VOLUMECHANGED,
|
||||
EVT_MUTECHANGED,
|
||||
EVT_MODECHANGED,
|
||||
EVT_VCRCHANGED
|
||||
};
|
||||
|
||||
//VideoFormat
|
||||
static const char VIDEOFORMAT_AUTO = 0;
|
||||
static const char VIDEOFORMAT_16_9 = 1;
|
||||
static const char VIDEOFORMAT_4_3 = 2;
|
||||
static const char VIDEOFORMAT_4_3_PS = 3;
|
||||
|
||||
//VideoOutput
|
||||
static const char VIDEOOUTPUT_COMPOSITE = 0;
|
||||
static const char VIDEOOUTPUT_RGB = 1;
|
||||
static const char VIDEOOUTPUT_SVIDEO = 2;
|
||||
static const char VIDEOOUTPUT_YUV_VBS = 3;
|
||||
static const char VIDEOOUTPUT_YUV_CVBS = 4;
|
||||
|
||||
//mute
|
||||
static const bool VOLUME_MUTE = true;
|
||||
static const bool VOLUME_UNMUTE = false;
|
||||
|
||||
//scartmode
|
||||
static const char SCARTMODE_ON = 1;
|
||||
static const char SCARTMODE_OFF = 0;
|
||||
|
||||
/*
|
||||
setVolume(volume_type) : Setzten der Lautst<73>rke
|
||||
Parameter: 0..100 - 0=leise 100=laut
|
||||
volume_type : device AVS/OST/UNKOWN(=last used)
|
||||
*/
|
||||
void setVolume(const char volume, const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN);
|
||||
char getVolume(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN);
|
||||
|
||||
/*
|
||||
setMute(bool, volume_type) : setzen von Mute
|
||||
Parameter: mute == true : ton aus
|
||||
mute == false : ton an
|
||||
volume_type : device AVS/OST/UNKOWN(=last used)
|
||||
*/
|
||||
void setMute(const bool mute, const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN);
|
||||
bool getMute(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN);
|
||||
|
||||
/*
|
||||
Mute(volume_type) : Ton ausschalten
|
||||
Parameter: volume_type : device AVS/OST/UNKOWN(=last used)
|
||||
*/
|
||||
void Mute(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN);
|
||||
|
||||
/*
|
||||
UnMute(bool) : Ton wieder einschalten
|
||||
Parameter: volume_type : device AVS/OST/UNKOWN(=last used)
|
||||
|
||||
*/
|
||||
void UnMute(const CControld::volume_type volume_type = CControld::TYPE_UNKNOWN);
|
||||
|
||||
|
||||
/*
|
||||
setVideoFormat(char) : Setzten des Bildformates ( 4:3 / 16:9 )
|
||||
Parameter: VIDEOFORMAT_AUTO = auto
|
||||
VIDEOFORMAT_4_3 = 4:3
|
||||
VIDEOFORMAT_16_9 = 16:9
|
||||
*/
|
||||
void setVideoFormat(char);
|
||||
char getVideoFormat();
|
||||
/*
|
||||
getAspectRatio : Aktueller Wert aus dem Bitstream
|
||||
2: 4:3
|
||||
3: 16:9
|
||||
4: 2:2.1
|
||||
*/
|
||||
char getAspectRatio();
|
||||
|
||||
/*
|
||||
setVideoOutput(char) : Setzten des Videooutputs ( composite (= cvbs) / svideo / rgb+cvbs / yuv+vbs / yuv+cvbs )
|
||||
Parameter: VIDEOOUTPUT_COMPOSITE = cvbs (composite) video
|
||||
VIDEOOUTPUT_SVIDEO = svideo
|
||||
VIDEOOUTPUT_RGB = rgb+cvbs
|
||||
VIDEOOUTPUT_YUV_VBS = yuv+vbs
|
||||
VIDEOOUTPUT_YUV_CVBS = yuv+cvbs
|
||||
*/
|
||||
void setVideoOutput(char);
|
||||
char getVideoOutput();
|
||||
|
||||
/*
|
||||
setVCROutput(char) : Setzten des Videooutputs f<>r VCR ( composite / svideo )
|
||||
Parameter: VIDEOOUTPUT_COMPOSITE = cvbs
|
||||
VIDEOOUTPUT_SVIDEO = svideo
|
||||
*/
|
||||
void setVCROutput(char);
|
||||
char getVCROutput();
|
||||
|
||||
/*
|
||||
setBoxType(CControldClient::tuxbox_vendor_t) : Setzten des Boxentyps ( nokia / sagem / philips )
|
||||
*/
|
||||
void setBoxType(const CControld::tuxbox_maker_t);
|
||||
CControld::tuxbox_maker_t getBoxType();
|
||||
|
||||
/*
|
||||
setScartMode(char) : Scartmode ( an / aus )
|
||||
Parameter: SCARTMODE_ON = auf scartinput schalten
|
||||
SCARTMODE_OFF = wieder dvb anzeigen
|
||||
|
||||
|
||||
*/
|
||||
void setScartMode(bool);
|
||||
char getScartMode();
|
||||
|
||||
|
||||
/*
|
||||
die dBox in standby bringen
|
||||
*/
|
||||
void videoPowerDown(bool);
|
||||
|
||||
/*
|
||||
standby abfragen
|
||||
*/
|
||||
bool getVideoPowerDown();
|
||||
|
||||
/*
|
||||
die Dbox herunterfahren
|
||||
*/
|
||||
void shutdown();
|
||||
|
||||
|
||||
/*
|
||||
ein beliebiges Event anmelden
|
||||
*/
|
||||
void registerEvent(unsigned int eventID, unsigned int clientID, const char * const udsName);
|
||||
|
||||
/*
|
||||
ein beliebiges Event abmelden
|
||||
*/
|
||||
void unRegisterEvent(unsigned int eventID, unsigned int clientID);
|
||||
|
||||
void saveSettings();
|
||||
|
||||
/*
|
||||
setzen der sync correction im RGB mode des saa7126 (csync) 0=aus, 31=max
|
||||
*/
|
||||
|
||||
void setRGBCsync(char csync);
|
||||
/*
|
||||
lesen der sync correction im RGB mode des saa7126 (csync) 0=aus, 31=max
|
||||
*/
|
||||
char getRGBCsync();
|
||||
void setVideoMode(char);
|
||||
char getVideoMode();
|
||||
};
|
||||
|
||||
#endif
|
62
lib/controldclient/controldtypes.h
Normal file
62
lib/controldclient/controldtypes.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __controldtypes__
|
||||
#define __controldtypes__
|
||||
|
||||
class CControld
|
||||
{
|
||||
public:
|
||||
|
||||
//BoxType /* cf. driver/include/tuxbox/tuxbox_info.h */
|
||||
typedef enum tuxbox_maker
|
||||
{
|
||||
TUXBOX_MAKER_UNKNOWN = 0,
|
||||
TUXBOX_MAKER_NOKIA = 1,
|
||||
TUXBOX_MAKER_PHILIPS = 2,
|
||||
TUXBOX_MAKER_SAGEM = 3,
|
||||
TUXBOX_MAKER_DREAM_MM = 4,
|
||||
TUXBOX_MAKER_TECHNOTREND = 5
|
||||
} tuxbox_maker_t;
|
||||
|
||||
enum volume_type
|
||||
{
|
||||
TYPE_OST=0,
|
||||
TYPE_AVS=1,
|
||||
TYPE_LIRC=2,
|
||||
TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
const static int no_video_formats = 5;
|
||||
|
||||
typedef enum video_format
|
||||
{
|
||||
FORMAT_CVBS = 0,
|
||||
FORMAT_RGB = 1,
|
||||
FORMAT_SVIDEO = 2,
|
||||
FORMAT_YUV_VBS = 3,
|
||||
FORMAT_YUV_CVBS = 4
|
||||
} t_video_format;
|
||||
|
||||
};
|
||||
#endif
|
Reference in New Issue
Block a user