repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9b56a19
)
Add new method PowerOnScreensaver. closes #114
author
Javier Marcet
<javier@marcet.info>
Wed, 2 Jan 2013 01:05:36 +0000
(
02:05
+0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Tue, 26 Feb 2013 22:49:31 +0000
(23:49 +0100)
include/cectypes.h
patch
|
blob
|
blame
|
history
src/LibCecSharp/CecSharpTypes.h
patch
|
blob
|
blame
|
history
src/LibCecSharp/LibCecSharp.cpp
patch
|
blob
|
blame
|
history
src/lib/CECClient.cpp
patch
|
blob
|
blame
|
history
diff --git
a/include/cectypes.h
b/include/cectypes.h
index 3a004aab31e35f617b104452ddf481d6f1e04266..58c7f6c15f32c4ca224af8f455bc5304da4280a9 100644
(file)
--- a/
include/cectypes.h
+++ b/
include/cectypes.h
@@
-174,6
+174,11
@@
namespace CEC {
*/
#define CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER 1
*/
#define CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER 1
+/*!
+ * default value for settings "wake up when deactivating the screensaver"
+ */
+#define CEC_DEFAULT_SETTING_POWER_ON_SCREENSAVER 1
+
/*!
* default value for settings "power off on standby"
*/
/*!
* default value for settings "power off on standby"
*/
@@
-1452,6
+1457,7
@@
struct libcec_configuration
uint8_t bUseTVMenuLanguage; /*!< use the menu language of the TV in the player application */
uint8_t bActivateSource; /*!< make libCEC the active source on the bus when starting the player application */
uint8_t bPowerOffScreensaver; /*!< put devices in standby mode when activating the screensaver */
uint8_t bUseTVMenuLanguage; /*!< use the menu language of the TV in the player application */
uint8_t bActivateSource; /*!< make libCEC the active source on the bus when starting the player application */
uint8_t bPowerOffScreensaver; /*!< put devices in standby mode when activating the screensaver */
+ uint8_t bPowerOnScreensaver; /*!< wake devices when deactivating the screensaver */
uint8_t bPowerOffOnStandby; /*!< put this PC in standby mode when the TV is switched off. only used when bShutdownOnStandby = 0 */
uint8_t bSendInactiveSource; /*!< send an 'inactive source' message when stopping the player. added in 1.5.1 */
uint8_t bPowerOffOnStandby; /*!< put this PC in standby mode when the TV is switched off. only used when bShutdownOnStandby = 0 */
uint8_t bSendInactiveSource; /*!< send an 'inactive source' message when stopping the player. added in 1.5.1 */
@@
-1504,8
+1510,9
@@
struct libcec_configuration
cecVersion == other.cecVersion &&
adapterType == other.adapterType &&
iDoubleTapTimeoutMs == other.iDoubleTapTimeoutMs &&
cecVersion == other.cecVersion &&
adapterType == other.adapterType &&
iDoubleTapTimeoutMs == other.iDoubleTapTimeoutMs &&
- (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || comboKey == other.comboKey) &&
- (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || iComboKeyTimeoutMs == other.iComboKeyTimeoutMs));
+ (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || comboKey == other.comboKey) &&
+ (other.clientVersion <= CEC_CLIENT_VERSION_2_0_4 || iComboKeyTimeoutMs == other.iComboKeyTimeoutMs) &&
+ (other.clientVersion < CEC_CLIENT_VERSION_2_1_0 || bPowerOnScreensaver == other.bPowerOnScreensaver));
}
bool operator!=(const libcec_configuration &other) const
}
bool operator!=(const libcec_configuration &other) const
@@
-1529,6
+1536,7
@@
struct libcec_configuration
bUseTVMenuLanguage = CEC_DEFAULT_SETTING_USE_TV_MENU_LANGUAGE;
bActivateSource = CEC_DEFAULT_SETTING_ACTIVATE_SOURCE;
bPowerOffScreensaver = CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER;
bUseTVMenuLanguage = CEC_DEFAULT_SETTING_USE_TV_MENU_LANGUAGE;
bActivateSource = CEC_DEFAULT_SETTING_ACTIVATE_SOURCE;
bPowerOffScreensaver = CEC_DEFAULT_SETTING_POWER_OFF_SCREENSAVER;
+ bPowerOnScreensaver = CEC_DEFAULT_SETTING_POWER_ON_SCREENSAVER;
bPowerOffOnStandby = CEC_DEFAULT_SETTING_POWER_OFF_ON_STANDBY;
bShutdownOnStandby = CEC_DEFAULT_SETTING_SHUTDOWN_ON_STANDBY;
bSendInactiveSource = CEC_DEFAULT_SETTING_SEND_INACTIVE_SOURCE;
bPowerOffOnStandby = CEC_DEFAULT_SETTING_POWER_OFF_ON_STANDBY;
bShutdownOnStandby = CEC_DEFAULT_SETTING_SHUTDOWN_ON_STANDBY;
bSendInactiveSource = CEC_DEFAULT_SETTING_SEND_INACTIVE_SOURCE;
diff --git
a/src/LibCecSharp/CecSharpTypes.h
b/src/LibCecSharp/CecSharpTypes.h
index 67829daf60911fb801d4672f1547dbf4fd4901cc..78c2a8dc76f10896d0ebf1b1f8c3e0db72a2736e 100644
(file)
--- a/
src/LibCecSharp/CecSharpTypes.h
+++ b/
src/LibCecSharp/CecSharpTypes.h
@@
-1794,6
+1794,9
@@
namespace CecSharp
if (ServerVersion >= CecServerVersion::Version1_8_2)
AdapterType = (CecAdapterType)config.adapterType;
if (ServerVersion >= CecServerVersion::Version1_8_2)
AdapterType = (CecAdapterType)config.adapterType;
+
+ if (ServerVersion >= CecServerVersion::Version2_1_0)
+ PowerOnScreensaver = config.bPowerOnScreensaver == 1;
}
/// <summary>
}
/// <summary>
diff --git
a/src/LibCecSharp/LibCecSharp.cpp
b/src/LibCecSharp/LibCecSharp.cpp
index ff3c619f487694166c2ec37d23aa37763e446c67..562d13af8a5db27cb07b5f86bcf729df5ebb270a 100644
(file)
--- a/
src/LibCecSharp/LibCecSharp.cpp
+++ b/
src/LibCecSharp/LibCecSharp.cpp
@@
-822,6
+822,9
@@
namespace CecSharp
if (netConfig->ServerVersion >= CecServerVersion::Version1_8_0)
config.cecVersion = (cec_version)netConfig->CECVersion;
if (netConfig->ServerVersion >= CecServerVersion::Version1_8_0)
config.cecVersion = (cec_version)netConfig->CECVersion;
+ if (netConfig->ServerVersion >= CecServerVersion::Version2_1_0)
+ config.bPowerOnScreensaver = netConfig->PowerOnScreensaver ? 1 : 0;
+
config.callbacks = &g_cecCallbacks;
}
config.callbacks = &g_cecCallbacks;
}
diff --git
a/src/lib/CECClient.cpp
b/src/lib/CECClient.cpp
index d0699130cd303a6bc247351edd318653ce7cdd5a..a67b956c7cf5d71f2e94041a4a5b93dbc7b66083 100644
(file)
--- a/
src/lib/CECClient.cpp
+++ b/
src/lib/CECClient.cpp
@@
-822,6
+822,7
@@
bool CCECClient::GetCurrentConfiguration(libcec_configuration &configuration)
configuration.wakeDevices = m_configuration.wakeDevices;
configuration.powerOffDevices = m_configuration.powerOffDevices;
configuration.bPowerOffScreensaver = m_configuration.bPowerOffScreensaver;
configuration.wakeDevices = m_configuration.wakeDevices;
configuration.powerOffDevices = m_configuration.powerOffDevices;
configuration.bPowerOffScreensaver = m_configuration.bPowerOffScreensaver;
+ configuration.bPowerOnScreensaver = m_configuration.bPowerOnScreensaver;
configuration.bPowerOffOnStandby = m_configuration.bPowerOffOnStandby;
configuration.bSendInactiveSource = m_configuration.bSendInactiveSource;
configuration.logicalAddresses = m_configuration.logicalAddresses;
configuration.bPowerOffOnStandby = m_configuration.bPowerOffOnStandby;
configuration.bSendInactiveSource = m_configuration.bSendInactiveSource;
configuration.logicalAddresses = m_configuration.logicalAddresses;
@@
-888,6
+889,11
@@
bool CCECClient::SetConfiguration(const libcec_configuration &configuration)
m_configuration.comboKey = defaultSettings.comboKey;
m_configuration.iComboKeyTimeoutMs = defaultSettings.iComboKeyTimeoutMs;
}
m_configuration.comboKey = defaultSettings.comboKey;
m_configuration.iComboKeyTimeoutMs = defaultSettings.iComboKeyTimeoutMs;
}
+
+ if (m_configuration.clientVersion >= CEC_CLIENT_VERSION_2_1_0)
+ m_configuration.bPowerOnScreensaver = configuration.bPowerOnScreensaver;
+ else
+ m_configuration.bPowerOnScreensaver = defaultSettings.bPowerOnScreensaver;
}
bool bNeedReinit(false);
}
bool bNeedReinit(false);