}
prefix_ senf::DVBSocketController::~DVBSocketController()
-{
-}
+{}
-prefix_ senf::DVBDemuxSectionHandle senf::DVBSocketController::createDVBDemuxSectionHandle( int adapternumber, int demuxnumber, bool addToConsole ){
+prefix_ senf::DVBDemuxSectionHandle
+senf::DVBSocketController::createDVBDemuxSectionHandle(int adapternumber, int demuxnumber,
+ bool addToConsole)
+{
DVBDemuxSectionHandle sectionHandle(adapternumber, demuxnumber);
- if(addToConsole)
+ if (addToConsole)
this->addToConsole(sectionHandle);
return sectionHandle;
}
-prefix_ senf::DVBDemuxPESHandle senf::DVBSocketController::createDVBDemuxPESHandle( int adapternumber, int demuxnumber, bool addToConsole ){
+prefix_ senf::DVBDemuxPESHandle
+senf::DVBSocketController::createDVBDemuxPESHandle(int adapternumber, int demuxnumber,
+ bool addToConsole)
+{
DVBDemuxPESHandle pesHandle(adapternumber, demuxnumber);
- if(addToConsole )
+ if (addToConsole)
this->addToConsole(pesHandle);
return pesHandle;
}
-prefix_ void senf::DVBSocketController::addToConsole(senf::DVBDemuxSectionHandle sh){
+prefix_ void senf::DVBSocketController::addToConsole(senf::DVBDemuxSectionHandle sh)
+{
boost::shared_ptr<DVBSectionProtocolWrapper> wrap(new DVBSectionProtocolWrapper(sh));
sh.protocol().addWrapper(wrap);
dir.node().add("section" + senf::str(sectionNr), wrap->dir);
sectionNr++;
}
-prefix_ void senf::DVBSocketController::addToConsole(senf::DVBDemuxPESHandle sh){
+
+prefix_ void senf::DVBSocketController::addToConsole(senf::DVBDemuxPESHandle sh)
+{
boost::shared_ptr<DVBPESProtocolWrapper> wrap(new DVBPESProtocolWrapper(sh));
sh.protocol().addWrapper(wrap);
dir.node().add("pes"+ senf::str(pesNr), wrap->dir);
struct dvb_frontend_parameters frontend;
// no valid configline, so it will be treaten like a channel name
- if (input.find(":")==string::npos){
+ if (input.find(":")==string::npos)
+ {
if (mode.c_str()[0]=='a')
tuneTo(input);
else
// add psydo name "foo" to complete configline syntax
frontend = parser.getFrontendParam("foo:"+input);
- if (mode.c_str()[0]=='a'){
+ if (mode.c_str()[0]=='a') {
switch (type) {
case FE_QPSK:
tuneDVB_S(frontend.frequency, frontend.inversion, frontend.u.qpsk.symbol_rate, frontend.u.qpsk.fec_inner);
fe_hierarchy_t hierarchy_information
)
{
- if(type != FE_OFDM)
+ if (type != FE_OFDM)
SENF_THROW_SYSTEM_EXCEPTION("Type of card is: ") << getTypeString() << " for this operation you need a DVB-T Card!";
event.enable();
prefix_ void senf::DVBSocketController::tuneDVB_S(unsigned int frequency, fe_spectral_inversion_t inversion, unsigned int symbole_rate, fe_code_rate_t code_rate)
{
- if(type != FE_QPSK)
+ if (type != FE_QPSK)
SENF_THROW_SYSTEM_EXCEPTION("Type of card is: ") << getTypeString() << " for this operation you need a DVB-S Card!";
event.enable();
fe_modulation_t modulation
)
{
- if(type != FE_QAM)
+ if (type != FE_QAM)
SENF_THROW_SYSTEM_EXCEPTION("Type of card is: ") << getTypeString() << " for this operation you need a DVB-C Card!";
event.enable();
fe_hierarchy_t hierarchy_information
)
{
- if(type != FE_OFDM)
+ if (type != FE_OFDM)
SENF_THROW_SYSTEM_EXCEPTION("Type of card is: ") << getTypeString() << " for this operation you need a DVB-T Card!";
event.disable();
guard_interval,
hierarchy_information);
- if(!frontendHandle.waitOOBReadable(senf::ClockService::seconds(2)))
+ if (!frontendHandle.waitOOBReadable(senf::ClockService::seconds(2)))
SENF_THROW_SYSTEM_EXCEPTION("Could not tune to channel!");
return frontendHandle.protocol().getEvent();
}
-prefix_ dvb_frontend_event senf::DVBSocketController::tuneDVB_S_sync(unsigned int frequency, fe_spectral_inversion_t inversion, unsigned int symbole_rate, fe_code_rate_t code_rate){
- if(type != FE_QPSK)
+prefix_ dvb_frontend_event
+senf::DVBSocketController::tuneDVB_S_sync(unsigned int frequency,
+ fe_spectral_inversion_t inversion,
+ unsigned int symbole_rate, fe_code_rate_t code_rate)
+{
+ if (type != FE_QPSK)
SENF_THROW_SYSTEM_EXCEPTION("Type of card is: ") << getTypeString() << " for this operation you need a DVB-S Card!";
event.disable();
frontendHandle.protocol().tuneDVB_S(frequency, inversion, symbole_rate, code_rate);
- if(!frontendHandle.waitOOBReadable(senf::ClockService::seconds(2)))
+ if (!frontendHandle.waitOOBReadable(senf::ClockService::seconds(2)))
SENF_THROW_SYSTEM_EXCEPTION("Could not tune to channel!");
return frontendHandle.protocol().getEvent();
}
fe_modulation_t modulation
)
{
- if(type != FE_QAM)
+ if (type != FE_QAM)
SENF_THROW_SYSTEM_EXCEPTION("Type of card is: ") << getTypeString() << " for this operation you need a DVB-C Card!";
event.disable();
frontendHandle.protocol().setNonBlock(false);
frontendHandle.protocol().tuneDVB_C(frequency, inversion, symbol_rate, fec_inner, modulation);
- if(!frontendHandle.waitOOBReadable(senf::ClockService::seconds(2)))
+ if (!frontendHandle.waitOOBReadable(senf::ClockService::seconds(2)))
SENF_THROW_SYSTEM_EXCEPTION("Could not tune to channel!");
return frontendHandle.protocol().getEvent();
info << hex;
- for(unsigned int i = 0; i < conf.size(); ++i){
- if(i>0)
+ for (unsigned int i = 0; i < conf.size(); ++i) {
+ if (i>0)
info << " | ";
- switch(cConf[i]){
+ switch (cConf[i]) {
case 'S' :
info << "signal " << signal;
break;
prefix_ void senf::DVBSocketController::readEvent(int event)
{
- if(cb)
+ if (cb)
cb(frontendHandle.protocol().getEvent());
}