Commit 20c27cbe authored by Jussi Lindgren's avatar Jussi Lindgren

Server: Acquisition drivers can now be deprecated

Additionally, deprecated several components for clarity,

- Deprecated gUSBamp legacy driver
- Deprecated TMSI Refa32B legacy driver
- Deprecated the Downsampling box
parent ebe8bcd8
......@@ -10,6 +10,7 @@ namespace OpenViBEAcquisitionServer
typedef enum
{
DriverFlag_IsUnstable,
DriverFlag_IsDeprecated,
} EDriverFlag;
/**
......
......@@ -248,7 +248,7 @@ void CDriverTMSiRefa32B::release(void)
const char* CDriverTMSiRefa32B::getName(void)
{
return "TMSi Refa32B (Legacy)";
return "TMSi Refa32B Legacy";
}
boolean CDriverTMSiRefa32B::initialize(
......
......@@ -38,7 +38,7 @@ namespace OpenViBEAcquisitionServer
virtual OpenViBE::boolean isFlagSet(
const OpenViBEAcquisitionServer::EDriverFlag eFlag) const
{
return eFlag==DriverFlag_IsUnstable;
return (eFlag==DriverFlag_IsUnstable) || (eFlag==DriverFlag_IsDeprecated);
}
virtual OpenViBE::boolean initialize(
......
......@@ -417,18 +417,19 @@ boolean CAcquisitionServerGUI::initialize(void)
gtk_tree_store_append(l_pDriverTreeStore, &l_oIter, NULL);
string l_sDriverName=m_vDriver[i]->getName();
if(m_vDriver[i]->isFlagSet(DriverFlag_IsUnstable))
{
gtk_tree_store_set(l_pDriverTreeStore, &l_oIter,
Resource_StringMarkup, (string("<span foreground=\"#6f6f6f\">")+l_sDriverName+string("</span> <span size=\"smaller\" style=\"italic\">(<span foreground=\"#202060\">unstable</span>)</span>")).c_str(),
-1);
}
else
{
gtk_tree_store_set(l_pDriverTreeStore, &l_oIter,
Resource_StringMarkup, (string("")+l_sDriverName+string("")).c_str(),
-1);
}
const bool l_bUnstable = m_vDriver[i]->isFlagSet(DriverFlag_IsUnstable);
const bool l_bDeprecated = m_vDriver[i]->isFlagSet(DriverFlag_IsDeprecated);
const std::string l_sStringToDisplay =
std::string((l_bUnstable || l_bDeprecated) ? "<span foreground=\"#6f6f6f\">" : "")
+= l_sDriverName
+= std::string((l_bUnstable || l_bDeprecated) ? "</span>" : "")
+= std::string(l_bUnstable ? " <span size=\"smaller\" style=\"italic\">(<span foreground=\"#202060\">unstable</span>)</span>" : "")
+= std::string(l_bDeprecated ? " <span size=\"smaller\" style=\"italic\">(<span foreground=\"#602020\">deprecated</span>)</span>" : "");
gtk_tree_store_set(l_pDriverTreeStore, &l_oIter,
Resource_StringMarkup, l_sStringToDisplay.c_str(), -1);
transform(l_sDriverName.begin(), l_sDriverName.end(), l_sDriverName.begin(), ::to_lower<string::value_type>);
if(l_sDefaultDriverName==l_sDriverName)
......
......@@ -7,6 +7,9 @@ __________________________________________________________________
* |OVP_DocBegin_BoxAlgorithm_Downsampling_Description|
*
* NOTE: This box has been deprecated. Please use
* Signal Resampling box instead.
*
* This plugin is used to downsample the input signal. First, a
* low-pass filter is applied to the input signal for anti-aliasing.
* Then, the input signal is downsampled at the new sampling rate.
......
......@@ -79,6 +79,8 @@ namespace OpenViBEPlugins
rPrototype.addSetting("Filter order", OV_TypeId_Integer, "4");
rPrototype.addSetting("Pass band ripple (dB)", OV_TypeId_Float, "0.5");
rPrototype.addFlag (OV_AttributeId_Box_FlagIsUnstable);
rPrototype.addFlag (OpenViBE::Kernel::BoxFlag_IsDeprecated);
return true;
}
......
......@@ -68,7 +68,7 @@ void CDriverGTecGUSBampLegacy::release(void)
const char* CDriverGTecGUSBampLegacy::getName(void)
{
return "g.Tec gUSBamp (Legacy)";
return "g.Tec gUSBamp Legacy";
}
//___________________________________________________________________//
......
......@@ -41,6 +41,12 @@ namespace OpenViBEAcquisitionServer
virtual OpenViBE::boolean isConfigurable(void);
virtual OpenViBE::boolean configure(void);
virtual const OpenViBEAcquisitionServer::IHeader* getHeader(void) { return &m_oHeader; }
virtual OpenViBE::boolean isFlagSet(
const OpenViBEAcquisitionServer::EDriverFlag eFlag) const
{
return eFlag==DriverFlag_IsDeprecated;
}
protected:
......
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