Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
kaffeine
> kaffeine-dvb-downgrade.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File kaffeine-dvb-downgrade.patch of Package kaffeine (Revision 12)
Currently displaying revision
12
,
show latest
diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/channeldesc.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/channeldesc.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/channeldesc.cpp 2008-10-24 23:39:35.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/channeldesc.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -115,8 +115,6 @@ coderateH=FEC_AUTO; bandwidth=BANDWIDTH_AUTO; snr = 0; - rolloff = ROLLOFF_AUTO; - S2 = 0; } Transponder::Transponder( const Transponder &trans ) @@ -136,8 +134,6 @@ coderateL=trans.coderateL; coderateH=trans.coderateH; bandwidth=trans.bandwidth; - rolloff = trans.rolloff; - S2 = trans.S2; } bool Transponder::sameAs( Transponder *trans ) diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/channeldesc.h kaffeine-0.8.7/kaffeine/src/input/dvb/channeldesc.h --- kaffeine-0.8.8/kaffeine/src/input/dvb/channeldesc.h 2008-10-24 23:39:35.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/channeldesc.h 2008-07-01 15:35:03.000000000 +0200 @@ -101,8 +101,6 @@ fe_code_rate_t coderateH; fe_bandwidth_t bandwidth; int snr; - fe_rolloff_t rolloff; - char S2; }; class ChannelDesc diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/channeleditor.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/channeleditor.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/channeleditor.cpp 2008-10-24 23:39:35.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/channeleditor.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -143,9 +143,6 @@ else channel->tp.pol = 'h'; channel->tp.coderateH = (fe_code_rate_t)(FEC_NONE+coderateHComb->currentItem()); channel->tp.inversion = (fe_spectral_inversion_t)(INVERSION_OFF+inversionComb->currentItem()); - channel->tp.modulation = (fe_modulation_t)(QPSK+modulationComb->currentItem()); - channel->tp.S2 = stypeComb->currentItem(); - channel->tp.rolloff = (fe_rolloff_t)(ROLLOFF_35+rolloffComb->currentItem() ); } else if ( channel->tp.type==FE_QAM ) { channel->tp.freq = freqSpin->value(); @@ -168,7 +165,13 @@ else { channel->tp.freq = freqSpin->value(); channel->tp.inversion = (fe_spectral_inversion_t)(INVERSION_OFF+inversionComb->currentItem()); - channel->tp.modulation = (fe_modulation_t)(QPSK+modulationComb->currentItem()); + switch (modulationComb->currentItem()) { + case 0: channel->tp.modulation = QAM_64; break; + case 1: channel->tp.modulation = QAM_256; break; + case 2: channel->tp.modulation = VSB_8; break; + case 3: channel->tp.modulation = VSB_16; break; + default: channel->tp.modulation = QAM_AUTO; break; + } } done( Accepted ); @@ -184,15 +187,10 @@ inversionComb->setCurrentItem( INVERSION_OFF+channel->tp.inversion ); coderateHComb->insertStringList( coderateList() ); coderateHComb->setCurrentItem( FEC_NONE+channel->tp.coderateH ); - modulationComb->insertStringList( modulationList() ); - modulationComb->setCurrentItem( QPSK+channel->tp.modulation ); - stypeComb->insertStringList( stypeList() ); - stypeComb->setCurrentItem( channel->tp.S2 ); - rolloffComb->insertStringList( rolloffList() ); - rolloffComb->setCurrentItem( ROLLOFF_35+channel->tp.rolloff ); transmissionComb->setEnabled( false ); coderateLComb->setEnabled( false ); bandwidthComb->setEnabled( false ); + modulationComb->setEnabled( false ); hierarchyComb->setEnabled( false ); guardComb->setEnabled( false ); } @@ -213,8 +211,6 @@ bandwidthComb->setEnabled( false ); hierarchyComb->setEnabled( false ); guardComb->setEnabled( false ); - stypeComb->setEnabled( false ); - rolloffComb->setEnabled( false ); } void ChannelEditor::initT() @@ -238,8 +234,6 @@ guardComb->setCurrentItem( GUARD_INTERVAL_1_32+channel->tp.guard ); srSpin->setEnabled( false ); polGroup->setEnabled( false ); - stypeComb->setEnabled( false ); - rolloffComb->setEnabled( false ); } void ChannelEditor::initA() @@ -247,8 +241,14 @@ freqSpin->setValue( channel->tp.freq ); inversionComb->insertStringList( inversionList() ); inversionComb->setCurrentItem( INVERSION_OFF+channel->tp.inversion ); - modulationComb->insertStringList( modulationList() ); - modulationComb->setCurrentItem( QPSK+channel->tp.modulation ); + modulationComb->insertStringList( modulationListAtsc() ); + switch (channel->tp.modulation) { + case QAM_64: modulationComb->setCurrentItem(0); break; + case QAM_256: modulationComb->setCurrentItem(1); break; + case VSB_8: modulationComb->setCurrentItem(2); break; + case VSB_16: modulationComb->setCurrentItem(3); break; + default: modulationComb->setCurrentItem(4); break; + } srSpin->setEnabled( false ); polGroup->setEnabled( false ); transmissionComb->setEnabled( false ); @@ -257,8 +257,6 @@ bandwidthComb->setEnabled( false ); hierarchyComb->setEnabled( false ); guardComb->setEnabled( false ); - stypeComb->setEnabled( false ); - rolloffComb->setEnabled( false ); } QStringList ChannelEditor::inversionList() @@ -273,7 +271,7 @@ { QStringList list; - list<<"NONE"<<"1/2"<<"2/3"<<"3/4"<<"4/5"<<"5/6"<<"6/7"<<"7/8"<<"8/9"<<"AUTO"<<"3/5"<<"9/10"; + list<<"NONE"<<"1/2"<<"2/3"<<"3/4"<<"4/5"<<"5/6"<<"6/7"<<"7/8"<<"8/9"<<"AUTO"; return list; } @@ -281,7 +279,15 @@ { QStringList list; - list<<"QPSK"<<"QAM 16"<<"QAM 32"<<"QAM 64"<<"QAM 128"<<"QAM 256"<<"AUTO"<<"VSB-8"<<"VSB-16"<<"8PSK"<<"16APSK"<<"DQPSK"; + list<<"QPSK"<<"QAM 16"<<"QAM 32"<<"QAM 64"<<"QAM 128"<<"QAM 256"<<"AUTO"; + return list; +} + +QStringList ChannelEditor::modulationListAtsc() +{ + QStringList list; + + list<<"QAM 64"<<"QAM 256"<<"VSB 8"<<"VSB 16"<<"AUTO"; return list; } @@ -317,22 +323,6 @@ return list; } -QStringList ChannelEditor::stypeList() -{ - QStringList list; - - list<<"DVB-S"<<"DVB-S2"; - return list; -} - -QStringList ChannelEditor::rolloffList() -{ - QStringList list; - - list<<"35"<<"20"<<"25"<<"AUTO"; - return list; -} - ChannelEditor::~ChannelEditor() { } diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/channeleditor.h kaffeine-0.8.7/kaffeine/src/input/dvb/channeleditor.h --- kaffeine-0.8.8/kaffeine/src/input/dvb/channeleditor.h 2008-10-24 23:39:35.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/channeleditor.h 2008-07-01 15:35:03.000000000 +0200 @@ -53,12 +53,11 @@ QStringList inversionList(); QStringList coderateList(); QStringList modulationList(); + QStringList modulationListAtsc(); QStringList transmissionList(); QStringList bandwidthList(); QStringList hierarchyList(); QStringList guardList(); - QStringList stypeList(); - QStringList rolloffList(); ChannelDesc *channel; QPtrList<ChannelDesc> *chandesc; diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/channeleditorui.ui kaffeine-0.8.7/kaffeine/src/input/dvb/channeleditorui.ui --- kaffeine-0.8.8/kaffeine/src/input/dvb/channeleditorui.ui 2008-10-24 23:39:35.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/channeleditorui.ui 2008-07-01 15:35:03.000000000 +0200 @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>477</width> - <height>541</height> + <height>533</height> </rect> </property> <property name="caption"> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="Line" row="0" column="1"> + <widget class="Line" row="1" column="0"> <property name="name"> <cstring>line2</cstring> </property> @@ -35,7 +35,7 @@ </widget> <widget class="QLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>layout9</cstring> </property> <vbox> <property name="name"> @@ -432,6 +432,22 @@ <cstring>transmissionComb</cstring> </property> </widget> + <widget class="QLabel" row="3" column="0"> + <property name="name"> + <cstring>textLabel11</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Bandwidth:</string> + </property> + </widget> <widget class="QLabel" row="2" column="0"> <property name="name"> <cstring>textLabel10</cstring> @@ -464,6 +480,11 @@ <string>Transmission:</string> </property> </widget> + <widget class="QComboBox" row="3" column="1"> + <property name="name"> + <cstring>bandwidthComb</cstring> + </property> + </widget> <widget class="QComboBox" row="2" column="1"> <property name="name"> <cstring>coderateHComb</cstring> @@ -490,6 +511,11 @@ <string>FEC low:</string> </property> </widget> + <widget class="QComboBox" row="3" column="3"> + <property name="name"> + <cstring>guardComb</cstring> + </property> + </widget> <widget class="QLabel" row="3" column="2"> <property name="name"> <cstring>textLabel7</cstring> @@ -569,58 +595,6 @@ <string>Inversion:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> - <property name="name"> - <cstring>textLabel11</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>5</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Bandwidth:</string> - </property> - </widget> - <widget class="QComboBox" row="3" column="1"> - <property name="name"> - <cstring>bandwidthComb</cstring> - </property> - </widget> - <widget class="QLabel" row="4" column="0"> - <property name="name"> - <cstring>textLabel1_3</cstring> - </property> - <property name="text"> - <string>Type:</string> - </property> - </widget> - <widget class="QComboBox" row="4" column="1"> - <property name="name"> - <cstring>stypeComb</cstring> - </property> - </widget> - <widget class="QComboBox" row="4" column="3"> - <property name="name"> - <cstring>rolloffComb</cstring> - </property> - </widget> - <widget class="QLabel" row="4" column="2"> - <property name="name"> - <cstring>textLabel2_4</cstring> - </property> - <property name="text"> - <string>Roll off:</string> - </property> - </widget> - <widget class="QComboBox" row="3" column="3"> - <property name="name"> - <cstring>guardComb</cstring> - </property> - </widget> </grid> </widget> <spacer> @@ -636,7 +610,7 @@ <property name="sizeHint"> <size> <width>20</width> - <height>166</height> + <height>98</height> </size> </property> </spacer> diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbconfig.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/dvbconfig.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbconfig.cpp 2008-12-27 14:21:58.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbconfig.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -127,10 +127,6 @@ tuningTimeout = 1500; hasCAM = false; camMaxService = 1; - secMini = 0; - secTwice = 0; - priority = 10; - doS2 = 0; } @@ -156,7 +152,6 @@ sizeFile = 0; categories.setAutoDelete( true ); devList.setAutoDelete( true ); - readFirst(); startup(); readConfig(); } @@ -210,7 +205,6 @@ int i=0, j=0, res, fdFrontend=0; struct dvb_frontend_info info; bool as; - QTime t1; QStringList list, flist; QString s, t; @@ -224,11 +218,6 @@ for ( j=0; j<(int)flist.count(); j++ ) { s = list[i]; t = flist[j]; - if ( devList.count()==MAX_DEVICES ) - break; - if ( !probeMfe && t!="frontend0" ) - continue; - t1 = QTime::currentTime(); fdFrontend = open( QString("/dev/dvb/%1/%2").arg( s ).arg( t ).ascii(), O_RDWR); if ( fdFrontend>0 ) { if ( !(res = ioctl( fdFrontend, FE_GET_INFO, &info ) < 0) ) { @@ -241,14 +230,13 @@ as = true; else as = false; - fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s ) (%dms)\n", s.ascii(), t.ascii(), info.name, t1.msecsTo(QTime::currentTime()) ); + fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s )\n", s.ascii(), t.ascii(), info.name ); devList.append( new Device( s.replace("adapter","").toInt(), t.replace("frontend","").toInt(), info.type, info.name, as ) ); } close( fdFrontend ); } - else { - perror( QString("/dev/dvb/%1/%2 %3/%4").arg( s ).arg( t ).arg( errno ).arg( -EBUSY ).ascii() ); - } + else + perror( QString("/dev/dvb/%1/%2").arg( s ).arg( t ).ascii() ); } } @@ -414,14 +402,6 @@ -void DVBconfig::readFirst() -{ - config->setGroup( "DVB Options" ); - probeMfe = config->readNumEntry( "ProbeMFE", 1 ); -} - - - void DVBconfig::readConfig() { QSize size; @@ -452,8 +432,6 @@ for ( i=0; i<(int)devList.count(); i++ ) { devList.at(i)->source = config->readEntry( QString("DVB%1").arg(i), "" ); devList.at(i)->tuningTimeout = config->readNumEntry( QString("DVB%1_TIMEOUT").arg(i), 1500 ); - devList.at(i)->camMaxService = config->readNumEntry( QString("DVB%1_CAM_MAX").arg(i), 1 ); - devList.at(i)->priority = config->readNumEntry( QString("DVB%1_PRIORITY").arg(i), 10 ); if ( devList.at(i)->type!=FE_QPSK ) continue; devList.at(i)->numLnb = config->readNumEntry( QString("DVB%1_NLNB").arg(i), 1 ); @@ -467,9 +445,7 @@ devList.at(i)->lnb[j].speed13v = config->readDoubleNumEntry( QString("DVB%1_LNB%2_speed13v").arg(i).arg(j), 2.5 ); devList.at(i)->lnb[j].speed18v = config->readDoubleNumEntry( QString("DVB%1_LNB%2_speed18v").arg(i).arg(j), 1.5 ); } - devList.at(i)->secMini = config->readNumEntry( QString("DVB%1_SEC_MINI").arg(i), 0 ); - devList.at(i)->secTwice = config->readNumEntry( QString("DVB%1_SEC_TWICE").arg(i), 0 ); - devList.at(i)->doS2 = config->readNumEntry( QString("DVB%1_DOS2").arg(i), 0 ); + devList.at(i)->camMaxService = config->readNumEntry( QString("DVB%1_CAM_MAX").arg(i), 1 ); } j = config->readNumEntry( "NumCategories", 0 ); for ( i=0; i<j; i++ ) @@ -486,9 +462,6 @@ devList.at(i)->usalsLatitude = usalsLatitude; devList.at(i)->usalsLongitude = usalsLongitude; } - ringBufSize = config->readNumEntry( "RingBufSize", 2 ); - if ( ringBufSize<2 ) - ringBufSize = 2; } @@ -510,12 +483,9 @@ config->writeEntry( "BroadcastAddress", broadcastAddress ); config->writeEntry( "BroadcastPort", broadcastPort ); config->writeEntry( "SenderPort", senderPort ); - config->writeEntry( "ProbeMFE", probeMfe ); for ( i=0; i<(int)devList.count(); i++ ) { config->writeEntry( QString("DVB%1").arg(i), devList.at(i)->source ); config->writeEntry( QString("DVB%1_TIMEOUT").arg(i), devList.at(i)->tuningTimeout ); - config->writeEntry( QString("DVB%1_PRIORITY").arg(i), devList.at(i)->priority ); - config->writeEntry( QString("DVB%1_CAM_MAX").arg(i), devList.at(i)->camMaxService ); if ( devList.at(i)->type!=FE_QPSK ) continue; config->writeEntry( QString("DVB%1_NLNB").arg(i), devList.at(i)->numLnb ); @@ -529,9 +499,7 @@ config->writeEntry( QString("DVB%1_LNB%2_speed13v").arg(i).arg(j), devList.at(i)->lnb[j].speed13v ); config->writeEntry( QString("DVB%1_LNB%2_speed18v").arg(i).arg(j), devList.at(i)->lnb[j].speed18v ); } - config->writeEntry( QString("DVB%1_SEC_MINI").arg(i), devList.at(i)->secMini ); - config->writeEntry( QString("DVB%1_SEC_TWICE").arg(i), devList.at(i)->secTwice ); - config->writeEntry( QString("DVB%1_DOS2").arg(i), devList.at(i)->doS2 ); + config->writeEntry( QString("DVB%1_CAM_MAX").arg(i), devList.at(i)->camMaxService ); } config->writeEntry( "NumCategories", categories.count() ); for ( i=0; i<(int)categories.count(); i++ ) { @@ -547,7 +515,6 @@ config->writeEntry( "UsalsLatitude", usalsLatitude ); config->writeEntry( "UsalsLongitude", usalsLongitude ); config->writeEntry( "SizeFile", sizeFile ); - config->writeEntry( "RingBufSize", ringBufSize ); config->sync(); } @@ -583,7 +550,7 @@ QSpinBox *spin; KPushButton *usals; QWidget *swidg; - QStringList rotorList; rotorList<<i18n("No rotor")<<i18n("USALS rotor")<<i18n("Positions rotor")<<i18n("External positionner"); + QStringList rotorList; rotorList<<i18n("No rotor")<<i18n("USALS rotor")<<i18n("Positions rotor"); dvbConfig = dc; timeoutSpin.setAutoDelete( true ); @@ -621,14 +588,6 @@ else grid->addMultiCellWidget( dvbType, gridLine, gridLine, 1, 3 ); ++gridLine; - - lab = new QLabel( i18n("Tuner priority (0=Don't use):"), gb ); - grid->addWidget( lab, gridLine, 0 ); - spin = new QSpinBox( 0, 99, 1, gb ); - spin->setValue( dvbConfig->devList.at(i)->priority ); - priority.append( spin ); - grid->addWidget( spin, gridLine, 1 ); - ++gridLine; lab = new QLabel( i18n("Tuner timeout :"), gb ); grid->addWidget( lab, gridLine, 0 ); @@ -641,11 +600,6 @@ ++gridLine; if ( dvbConfig->devList.at(i)->type==FE_QPSK ) { - doS2[i] = new QCheckBox( i18n("S2 capable device"), gb ); - doS2[i]->setChecked( dvbConfig->devList.at(i)->doS2 ); - grid->addWidget( doS2[i], gridLine, 0 ); - ++gridLine; - lab = new QLabel( i18n("Number of LNBs:"), gb ); grid->addWidget( lab, gridLine, 0 ); satNumber[i] = new MSpinBox( gb, i ); @@ -657,16 +611,6 @@ grid->addWidget( usals, gridLine, 2 ); ++gridLine; - - secMini[i] = new QCheckBox( i18n("Mini DiSEqC (A-B)."), gb ); - secMini[i]->setChecked( dvbConfig->devList.at(i)->secMini ); - secMini[i]->setEnabled( false ); - grid->addWidget( secMini[i], gridLine, 1 ); - secTwice[i] = new QCheckBox( i18n("Send DiSEqC commands twice."), gb ); - secTwice[i]->setChecked( dvbConfig->devList.at(i)->secTwice ); - grid->addWidget( secTwice[i], gridLine, 0 ); - - ++gridLine; lnb0[i] = new MPushButton( gb, i, 0 ); lnb0[i]->setGuiItem( KGuiItem(i18n("LNB 1 settings..."), icon->loadIconSet("hwinfo", KIcon::Small) ) ); @@ -937,19 +881,9 @@ vb = new QVBoxLayout( page, 6, 6 ); gb = new QGroupBox( "", page ); grid = new QGridLayout( gb, 1, 1, 20, 6 ); - - probeMfe = new QCheckBox( i18n("Probe Multiple-Frontends (Restart required)."), gb ); - probeMfe->setChecked( dvbConfig->probeMfe ); - grid->addWidget( probeMfe, 0, 0 ); - - lab = new QLabel( i18n("LiveShow ringbuffer size (MB) :"), gb ); - grid->addWidget( lab, 1, 0 ); - ringBufSize = new QSpinBox( 2, 99, 1, gb ); - ringBufSize->setValue( dvbConfig->ringBufSize ); - grid->addWidget( ringBufSize, 1, 1 ); lab = new QLabel( i18n("Default charset (restart needed):"), gb ); - grid->addWidget( lab, 2, 0 ); + grid->addWidget( lab, 0, 0 ); charsetComb = new QComboBox( gb ); charsetComb->insertItem( "ISO8859-1" ); charsetComb->insertItem( "ISO6937" ); @@ -957,19 +891,19 @@ charsetComb->setCurrentItem( 0 ); else if ( dvbConfig->defaultCharset=="ISO6937" ) charsetComb->setCurrentItem( 1 ); - grid->addWidget( charsetComb, 2, 1 ); + grid->addWidget( charsetComb, 0, 1 ); lab = new QLabel( i18n("Update scan data:"), gb ); - grid->addWidget( lab, 3, 0 ); + grid->addWidget( lab, 1, 0 ); updateBtn = new KPushButton( gb ); updateBtn->setGuiItem( KGuiItem(i18n("Download"), icon->loadIconSet("khtml_kget", KIcon::Small) ) ); - grid->addWidget( updateBtn, 3, 1 ); + grid->addWidget( updateBtn, 1, 1 ); lab = new QLabel( i18n("Dump epg's events to \n~/kaffeine_dvb_events.tx:"), gb ); - grid->addWidget( lab, 4, 0 ); + grid->addWidget( lab, 2, 0 ); dumpBtn = new KPushButton( gb ); dumpBtn->setGuiItem( KGuiItem(i18n("Dump"), icon->loadIconSet("filesave", KIcon::Small) ) ); - grid->addWidget( dumpBtn, 4, 1 ); + grid->addWidget( dumpBtn, 2, 1 ); vb->addWidget( gb ); vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); @@ -1133,8 +1067,6 @@ rotor1[devNum]->setEnabled( value > 1 ); rotor2[devNum]->setEnabled( value > 2 ); rotor3[devNum]->setEnabled( value > 3 ); - - secMini[devNum]->setEnabled( value==2 ); } @@ -1199,9 +1131,6 @@ switch (dvbConfig->devList.at(i)->type) { case FE_QPSK: { dvbConfig->devList.at(i)->numLnb = satNumber[i]->value(); - dvbConfig->devList.at(i)->secMini = secMini[i]->isChecked(); - dvbConfig->devList.at(i)->secTwice = secTwice[i]->isChecked(); - dvbConfig->devList.at(i)->doS2 = doS2[i]->isChecked(); if ( dvbConfig->devList.at(i)->lnb[3].rotorType==0 ) { dvbConfig->devList.at(i)->lnb[3].source.clear(); dvbConfig->devList.at(i)->lnb[3].source.append(sat3[i]->currentText()); @@ -1239,7 +1168,6 @@ } dvbConfig->devList.at(i)->source = s; dvbConfig->devList.at(i)->tuningTimeout = timeoutSpin.at(i)->value(); - dvbConfig->devList.at(i)->priority = priority.at(i)->value(); } dvbConfig->recordDir = recordDirLe->text(); @@ -1257,8 +1185,6 @@ dvbConfig->broadcastAddress = broadcastLe->text().stripWhiteSpace(); dvbConfig->broadcastPort = bportSpin->value(); dvbConfig->senderPort = sportSpin->value(); - dvbConfig->probeMfe = probeMfe->isChecked(); - dvbConfig->ringBufSize = ringBufSize->value(); dvbConfig->saveConfig(); done( Accepted ); } @@ -1505,24 +1431,22 @@ vb->addWidget( resetBtn ); vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - if ( dev->lnb[lnbNum].rotorType!=3 ) { - grid = new QGridLayout( 0, 1, 1 ); - lab = new QLabel( i18n("13V rotor speed:"), page ); - grid->addWidget( lab, 0, 0 ); - speed13 = new QLineEdit( page ); - speed13->setText( QString().setNum( dev->lnb[lnbNum].speed13v ) ); - grid->addWidget( speed13, 0, 1 ); - lab = new QLabel( i18n("sec./ °"), page ); - grid->addWidget( lab, 0, 2 ); - lab = new QLabel( i18n("18V rotor speed:"), page ); - grid->addWidget( lab, 1, 0 ); - speed18 = new QLineEdit( page ); - speed18->setText( QString().setNum( dev->lnb[lnbNum].speed18v ) ); - grid->addWidget( speed18, 1, 1 ); - lab = new QLabel( i18n("sec./ °"), page ); - grid->addWidget( lab, 1, 2 ); - vb->addLayout( grid ); - } + grid = new QGridLayout( 0, 1, 1 ); + lab = new QLabel( i18n("13V rotor speed:"), page ); + grid->addWidget( lab, 0, 0 ); + speed13 = new QLineEdit( page ); + speed13->setText( QString().setNum( dev->lnb[lnbNum].speed13v ) ); + grid->addWidget( speed13, 0, 1 ); + lab = new QLabel( i18n("sec./ °"), page ); + grid->addWidget( lab, 0, 2 ); + lab = new QLabel( i18n("18V rotor speed:"), page ); + grid->addWidget( lab, 1, 0 ); + speed18 = new QLineEdit( page ); + speed18->setText( QString().setNum( dev->lnb[lnbNum].speed18v ) ); + grid->addWidget( speed18, 1, 1 ); + lab = new QLabel( i18n("sec./ °"), page ); + grid->addWidget( lab, 1, 2 ); + vb->addLayout( grid ); vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); @@ -1566,14 +1490,8 @@ { QListViewItem *it; - if ( dev->lnb[lnbNum].rotorType!=3 ) { - dev->lnb[lnbNum].speed18v = speed18->text().toDouble(); - dev->lnb[lnbNum].speed13v = speed13->text().toDouble(); - } - else { - dev->lnb[lnbNum].speed18v = 0; - dev->lnb[lnbNum].speed13v = 0; - } + dev->lnb[lnbNum].speed18v = speed18->text().toDouble(); + dev->lnb[lnbNum].speed13v = speed13->text().toDouble(); dev->lnb[lnbNum].source.clear(); dev->lnb[lnbNum].position.clear(); for ( it=listView->firstChild(); it; it=it->nextSibling() ) { diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbconfig.h kaffeine-0.8.7/kaffeine/src/input/dvb/dvbconfig.h --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbconfig.h 2008-11-07 10:39:25.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbconfig.h 2008-07-01 15:35:03.000000000 +0200 @@ -28,7 +28,6 @@ #include <qtoolbutton.h> #include <qbuttongroup.h> #include <qlistview.h> -#include <qcheckbox.h> #include <kdialogbase.h> #include <kpushbutton.h> @@ -38,8 +37,6 @@ #include <linux/dvb/frontend.h> -#define MAX_DEVICES 8 - using namespace KIO; class MSpinBox : public QSpinBox @@ -136,10 +133,6 @@ double usalsLatitude, usalsLongitude; bool hasCAM; int camMaxService; - int secMini; - int secTwice; - int priority; - int doS2; }; @@ -162,7 +155,6 @@ DVBconfig( const QString &dvbConf ); ~DVBconfig(); - void readFirst(); void readConfig(); void saveConfig(); int readDvbChanOrder(); @@ -193,8 +185,6 @@ QValueList<int> splitSizes; QString defaultCharset; double usalsLatitude, usalsLongitude; - int probeMfe; - int ringBufSize; private: @@ -224,33 +214,28 @@ QLineEdit *recordDirLe, *shiftDirLe, *broadcastLe, *filenameFormatLe; QSpinBox *beginSpin, *endSpin, *instantDurationSpin, *bportSpin, *sportSpin, *sizeFileSpin; - MSpinBox *satNumber[MAX_DEVICES]; - QCheckBox *secMini[MAX_DEVICES], *secTwice[MAX_DEVICES]; - QCheckBox *doS2[MAX_DEVICES]; - QComboBox *sat0[MAX_DEVICES]; - QComboBox *sat1[MAX_DEVICES]; - QComboBox *sat2[MAX_DEVICES]; - QComboBox *sat3[MAX_DEVICES]; - MPushButton *src0[MAX_DEVICES]; - MPushButton *src1[MAX_DEVICES]; - MPushButton *src2[MAX_DEVICES]; - MPushButton *src3[MAX_DEVICES]; - MComboBox *rotor0[MAX_DEVICES]; - MComboBox *rotor1[MAX_DEVICES]; - MComboBox *rotor2[MAX_DEVICES]; - MComboBox *rotor3[MAX_DEVICES]; - MPushButton *lnb0[MAX_DEVICES]; - MPushButton *lnb1[MAX_DEVICES]; - MPushButton *lnb2[MAX_DEVICES]; - MPushButton *lnb3[MAX_DEVICES]; + MSpinBox *satNumber[8]; + QComboBox *sat0[8]; + QComboBox *sat1[8]; + QComboBox *sat2[8]; + QComboBox *sat3[8]; + MPushButton *src0[8]; + MPushButton *src1[8]; + MPushButton *src2[8]; + MPushButton *src3[8]; + MComboBox *rotor0[8]; + MComboBox *rotor1[8]; + MComboBox *rotor2[8]; + MComboBox *rotor3[8]; + MPushButton *lnb0[8]; + MPushButton *lnb1[8]; + MPushButton *lnb2[8]; + MPushButton *lnb3[8]; KPushButton *updateBtn, *dumpBtn; QToolButton *recordDirBtn, *shiftDirBtn, *helpNameBtn; DVBconfig *dvbConfig; QComboBox *charsetComb; QPtrList<QSpinBox> timeoutSpin; - QPtrList<QSpinBox> priority; - QCheckBox *probeMfe; - QSpinBox *ringBufSize; private slots: diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbout.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/dvbout.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbout.cpp 2009-04-20 17:36:30.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbout.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -136,23 +136,19 @@ tspmt[0x0a] = 0xc1; // section # and last section # tspmt[0x0b] = tspmt[0x0c] = 0x00; - if ( channel.vpid ) { - // PCR PID - tspmt[0x0d] = channel.vpid>>8; tspmt[0x0e] = channel.vpid&0xff; - } - else if ( channel.napid ) - tspmt[0x0d] = channel.apid[0].pid>>8; tspmt[0x0e] = channel.apid[0].pid&0xff; + // PCR PID + tspmt[0x0d] = channel.vpid>>8; tspmt[0x0e] = channel.vpid&0xff; // program_info_length == 0 tspmt[0x0f] = 0xf0; tspmt[0x10] = 0x00; - if ( channel.vpid ) { - // Program Map / Video PID - tspmt[0x11] = channel.vType; // video stream type - tspmt[0x12] = channel.vpid>>8; tspmt[0x13] = channel.vpid&0xff; - tspmt[0x14] = 0xf0; tspmt[0x15] = 0x00; // es info length - off = 0x15; - } - else - off = 0x10; + // Program Map / Video PID + tspmt[0x11] = channel.vType; // video stream type + tspmt[0x12] = channel.vpid>>8; tspmt[0x13] = channel.vpid&0xff; + tspmt[0x14] = 0xf0; tspmt[0x15] = 0x09; // es info length + // useless info + tspmt[0x16] = 0x07; tspmt[0x17] = 0x04; tspmt[0x18] = 0x08; tspmt[0x19] = 0x80; + tspmt[0x1a] = 0x24; tspmt[0x1b] = 0x02; tspmt[0x1c] = 0x11; tspmt[0x1d] = 0x01; + tspmt[0x1e] = 0xfe; + off = 0x1e; // audio pids i = 0; for ( i=0; i<channel.napid && i<MAX_AUDIO; i++ ) { @@ -262,19 +258,20 @@ liveFile.writeBlock( (char*)tspmt, TS_SIZE ); mutex.lock(); haveLive = false; - if ( !wait(1000) ) { + mutex.unlock(); + if ( !wait(100) ) { terminate(); wait(); } + mutex.lock(); + haveLive = true; if ( close( fdPipe )<0 ) perror("close out pipe: "); else fprintf(stderr,"out pipe closed\n"); fdPipe = 0; - if ( wDist>0 ) - liveFile.writeBlock( (char*)(wBuf+(wRead*TS_SIZE*NTS)), TS_SIZE*NTS*wDist ); - timeShifting = true; mutex.unlock(); + timeShifting = true; //emit shifting( timeShifting ); } return true; @@ -289,7 +286,7 @@ -bool DVBout::goLive( const QString &name, int ringBufSize ) +bool DVBout::goLive( const QString &name ) { if ( fdPipe ) return false; @@ -302,8 +299,7 @@ writePmt(); if ( !pids.contains(8192) ) patpmt = wpatpmt = true; - wbufSize = ringBufSize*1024*1024/(TS_SIZE*NTS); - wBuf = new unsigned char[TS_SIZE*NTS*wbufSize]; + wBuf = new unsigned char[TS_SIZE*NTS*100]; if ( !wBuf ) fprintf( stderr, "\nNO WBUF !!!\n\n" ); wRead = wWrite = wDist = 0; start(); @@ -330,7 +326,7 @@ emit shifting( timeShifting ); } mutex.unlock(); - if ( !wait(1000) ) { + if ( !wait(500) ) { terminate(); wait(); } @@ -473,16 +469,14 @@ beginLive = !beginLive; start(); } - if ( wDist<wbufSize ) { + if ( wDist<95 ) { memcpy( wBuf+(wWrite*TS_SIZE*NTS), thBuf, TS_SIZE*NTS ); wpatpmt = patpmt; ++wDist; ++wWrite; - if ( wWrite==wbufSize ) + if ( wWrite>99 ) wWrite = 0; - } - else { - fprintf(stderr,"Live ringbuffer full!! (%d)\n",wDist); + //fprintf(stderr,"WDIST = %d\n",wDist); } } else if ( timeShifting ) { @@ -537,7 +531,7 @@ { if ( haveLive && fdPipe ) { while ( haveLive && fdPipe ) { - if ( wDist>5 ) { + if ( wDist>0 ) { if ( wpatpmt ) { write( fdPipe, tspat, TS_SIZE ); write( fdPipe, tspmt, TS_SIZE ); @@ -546,12 +540,11 @@ write( fdPipe, wBuf+(wRead*TS_SIZE*NTS), TS_SIZE*NTS ); --wDist; ++wRead; - if ( wRead==wbufSize ) + if ( wRead>99 ) wRead = 0; } - else { + else usleep( 100 ); - } } return; } diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbout.h kaffeine-0.8.7/kaffeine/src/input/dvb/dvbout.h --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbout.h 2008-12-31 23:30:00.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbout.h 2008-07-01 15:35:03.000000000 +0200 @@ -44,7 +44,7 @@ DVBout( ChannelDesc chan, int anum, int tnum, KaffeineDvbPlugin *p ); ~DVBout(); void process( unsigned char *buf, int size ); - bool goLive( const QString &name, int ringBufSize ); + bool goLive( const QString &name ); void preStopLive(); void stopLive(); bool goBroadcast( Ts2Rtp *r ); @@ -102,7 +102,6 @@ int fileNumber; QString fileName; long long int fileMaxSize; - int wbufSize; signals: diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbpanel.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/dvbpanel.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbpanel.cpp 2008-11-06 10:52:57.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbpanel.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -55,12 +55,6 @@ #define CHANICONSIZE 28 -#define MODE_FREE 0 -#define MODE_LIVE 100 -#define MODE_BROADCAST 200 -#define MODE_RECORD 300 -#define MODE_CANTDO 400 - DIconViewItem::DIconViewItem( DvbPanel *pan, QIconView *parent, const QString &text, const QPixmap &icon ) @@ -1119,7 +1113,6 @@ return; rtp->setSocket( dvbConfig->broadcastAddress, dvbConfig->broadcastPort, dvbConfig->senderPort ); cleaner->setPaths( dvbConfig->shiftDir, dvbConfig->recordDir ); - fillChannelList(); } @@ -1139,8 +1132,6 @@ Transponder t; for ( i=0; i<(int)dvb.count(); i++ ) { - if ( !dvb.at(i)->getPriority() ) // priority==0==don't use - continue; list = dvb.at(i)->getSources(); for ( j=0; j<(int)list.count(); j++ ) { if ( dvb.at(i)->hasRec() || dvb.at(i)->hasBroadcast() ) @@ -1228,15 +1219,15 @@ DvbStream* DvbPanel::getWorkingDvb( int mode, ChannelDesc *chan ) { int i, ret; - QValueList<int> working; // free=0, hasLive=100, hasBroadcast=200, hasRec=300, can'tDoChannel=400 + QValueList<int> working; // notTuned=0, hasLive=1, hasBroadcast=2, hasRec=3, can'tDoChannel=4 for ( i=0; i<(int)dvb.count(); i++ ) - working.append( 100-dvb.at(i)->getPriority() ); + working.append( 0 ); // fill in working status for ( i=0; i<(int)dvb.count(); i++ ) { - if ( !dvb.at(i)->canSource( chan ) || working[i]==100 ) { - working[i] = MODE_CANTDO; + if ( !dvb.at(i)->canSource( chan ) ) { + working[i] = 4; continue; } if ( dvb.at(i)->isTuned() ) { @@ -1244,18 +1235,14 @@ return dvb.at(i); // use that one since it's already tuned on the good mplex } else if ( dvb.at(i)->hasRec() ) - working[i] += MODE_RECORD; + working[i] = 3; else if ( dvb.at(i)->hasBroadcast() ) - working[i] += MODE_BROADCAST; - else { - if ( mode==MODE_LIVE ) - working[i] += MODE_FREE; - else - working[i] += MODE_LIVE; - } + working[i] = 2; + else + working[i] = 1; } else - working[i] += MODE_FREE; + working[i] = 0; } ret = 0; // search for least working card @@ -1293,7 +1280,7 @@ return; } - d = getWorkingDvb( MODE_BROADCAST, list.at(0) ); + d = getWorkingDvb( 2, list.at(0) ); if ( d ) ret = d->canStartBroadcast( live, list.at(0) ); @@ -1337,7 +1324,7 @@ } if ( !chan ) continue; - d = getWorkingDvb( MODE_RECORD, chan ); + d = getWorkingDvb( 3, chan ); live = false; if ( d ) ret = d->canStartTimer( live, chan ); @@ -1847,7 +1834,7 @@ QTimer::singleShot( 2000, this, SLOT(playLastChannel()) ); return; } - d = getWorkingDvb( MODE_BROADCAST, list.at(0) ); + d = getWorkingDvb( 2, list.at(0) ); if ( d ) ret = d->canStartBroadcast( live, list.at(0) ); else @@ -1948,14 +1935,19 @@ void DvbPanel::dvbZap( ChannelDesc *chan ) { int i; - DvbStream *d; + DvbStream *d=0; if ( currentFifo.isEmpty() || isTuning ) return; isTuning = true; emit setTimeShiftFilename( "" ); - d = getWorkingDvb( MODE_LIVE, chan ); + for ( i=0; i<(int)dvb.count(); i++ ) { + if ( dvb.at(i)->getCurrentTransponder()==chan->tp ) { + d = dvb.at(i); + break; + } + } for ( i=0; i<(int)dvb.count(); i++ ) { if ( dvb.at(i)->hasLive() ) { dvb.at(i)->preStopLive(); @@ -1989,20 +1981,40 @@ { QString s, t; int i; + DvbStream *d1=d, *d2=0; emit setCurrentPlugin( this ); fprintf( stderr, "Tuning to: %s / autocount: %lu\n", chan->name.latin1(), autocount ); QTime tm; tm.start(); + if ( !d1 ) { + for ( i=0; i<(int)dvb.count(); i++ ) { + if ( !dvb.at(i)->canSource( chan ) ) + continue; + if ( dvb.at(i)->isTuned() ) { + if ( dvb.at(i)->getCurrentTransponder()==chan->tp ) { + d1 = dvb.at(i); + break; + } + else d2 = dvb.at(i); + } + else { + d1 = dvb.at(i); + break; + } + } + if ( !d1 && d2 ) + d1 = d2; + } - if ( !d ) { + if ( !d1 ) { emit dvbStop(); isTuning = false; return; } - int ret = d->goLive( chan, currentFifo, dvbConfig->ringBufSize ); + int ret = d1->goLive( chan, currentFifo ); switch ( ret ) { case DvbStream::ErrIsRecording : @@ -2041,7 +2053,7 @@ resetSearch(); } - if ( d->liveIsRecording() ) + if ( d1->liveIsRecording() ) recordBtn->setOn( true ); else recordBtn->setOn( false ); @@ -2251,8 +2263,6 @@ case 67 : chan->tp.coderateH = FEC_6_7; break; case 78 : chan->tp.coderateH = FEC_7_8; break; case 89 : chan->tp.coderateH = FEC_8_9; break; - case 35 : chan->tp.coderateH = FEC_3_5; break; - case 910 : chan->tp.coderateH = FEC_9_10; break; case -1 : chan->tp.coderateH = FEC_AUTO; } s = s.right( s.length()-pos-1 ); @@ -2273,9 +2283,6 @@ case 256 : chan->tp.modulation = QAM_256; break; case 108 : chan->tp.modulation = VSB_8; break; case 116 : chan->tp.modulation = VSB_16; break; - case 1000 : chan->tp.modulation = PSK_8; break; - case 1001 : chan->tp.modulation = APSK_16; break; - case 1003 : chan->tp.modulation = DQPSK; break; case -1 : chan->tp.modulation = QAM_AUTO; } s = s.right( s.length()-pos-1 ); @@ -2290,8 +2297,6 @@ case 67 : chan->tp.coderateL = FEC_6_7; break; case 78 : chan->tp.coderateL = FEC_7_8; break; case 89 : chan->tp.coderateL = FEC_8_9; break; - case 35 : chan->tp.coderateH = FEC_3_5; break; - case 910 : chan->tp.coderateH = FEC_9_10; break; case -1 : chan->tp.coderateL = FEC_AUTO; } s = s.right( s.length()-pos-1 ); @@ -2359,17 +2364,6 @@ s = s.right( s.length()-pos-1 ); pos = s.find("|"); chan->tp.nid = s.left(pos).toUShort(); - s = s.right( s.length()-pos-1 ); - pos = s.find("|"); - switch ( s.left(pos).toInt() ) { - case 20 : chan->tp.rolloff = ROLLOFF_20; break; - case 25 : chan->tp.rolloff = ROLLOFF_25; break; - case 35 : chan->tp.rolloff = ROLLOFF_35; break; - case -1 : chan->tp.rolloff = ROLLOFF_AUTO; - } - s = s.right( s.length()-pos-1 ); - pos = s.find("|"); - chan->tp.S2 = s.left(pos).toInt(); if ( chan->tp.source.isEmpty() ) { delete chan; @@ -2481,8 +2475,6 @@ case FEC_6_7 : tt<< "67|"; break; case FEC_7_8 : tt<< "78|"; break; case FEC_8_9 : tt<< "89|"; break; - case FEC_3_5 : tt<< "35|"; break; - case FEC_9_10 : tt<< "910|"; break; case FEC_AUTO : tt<< "-1|"; } switch ( chan->tp.inversion ) { @@ -2499,9 +2491,6 @@ case QAM_256 : tt<< "256|"; break; case VSB_8 : tt<< "108|"; break; case VSB_16 : tt<< "116|"; break; - case PSK_8 : tt<< "1000|"; break; - case APSK_16 : tt<< "1001|"; break; - case DQPSK : tt<< "1003|"; break; case QAM_AUTO : tt<< "-1|"; } switch ( chan->tp.coderateL ) { @@ -2514,8 +2503,6 @@ case FEC_6_7 : tt<< "67|"; break; case FEC_7_8 : tt<< "78|"; break; case FEC_8_9 : tt<< "89|"; break; - case FEC_3_5 : tt<< "35|"; break; - case FEC_9_10 : tt<< "910|"; break; case FEC_AUTO : tt<< "-1|"; } switch ( chan->tp.bandwidth ) { @@ -2554,15 +2541,7 @@ } tt<< "|"; tt<< chan->category+"|"; - tt<< s.setNum(chan->tp.nid)+"|"; - switch ( chan->tp.rolloff ) { - case ROLLOFF_20 : tt<< "20|"; break; - case ROLLOFF_25 : tt<< "25|"; break; - case ROLLOFF_35 : tt<< "35|"; break; - case ROLLOFF_AUTO : tt<< "-1|"; - } - tt<< s.setNum(chan->tp.S2)+"|"; - tt<< "\n"; + tt<< s.setNum(chan->tp.nid)+"|\n"; } ret = true; f.close(); diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbsi.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/dvbsi.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbsi.cpp 2008-12-04 23:54:57.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbsi.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -46,7 +46,6 @@ // These values are taken from ATSC A/65C Sec 4.1 #define PSIP_TABLE_TYPE_MGT 0xc7 #define PSIP_TABLE_TYPE_TVCT 0xc8 -#define PSIP_TABLE_TYPE_CVCT 0xc9 NitSection::NitSection( QPtrList<Transponder> *tp, bool *end, bool *ok, int anum, int tnum ) : KaffeineDVBsection( anum, tnum ) { @@ -174,9 +173,6 @@ fprintf(stderr," Found frequency list.\n"); freqListDesc( buf, trans ); break; - case 0x79 : - S2satelliteDesc( buf, trans ); - break; default : break; } @@ -230,57 +226,22 @@ trans->pol = 'v'; else trans->pol = 'h'; - switch ( getBits(buf,70,2) ) { - case 0 : trans->modulation = QAM_AUTO; break; - case 1 : trans->modulation = QPSK; break; - case 2 : trans->modulation = PSK_8; break; - case 3 : trans->modulation = QAM_16; break; - } s = t.setNum( getBits(buf,72,28), 16 ); trans->sr = s.toInt(); trans->sr /=10; switch ( getBits(buf,100,4) ) { - case 0 : trans->coderateH = FEC_AUTO; break; case 1 : trans->coderateH = FEC_1_2; break; case 2 : trans->coderateH = FEC_2_3; break; case 3 : trans->coderateH = FEC_3_4; break; case 4 : trans->coderateH = FEC_5_6; break; case 5 : trans->coderateH = FEC_7_8; break; case 6 : trans->coderateH = FEC_8_9; break; - case 7 : trans->coderateH = FEC_3_5; break; - case 8 : trans->coderateH = FEC_4_5; break; - case 9 : trans->coderateH = FEC_9_10; break; - case 15 : trans->coderateH = FEC_NONE; break; - } - if ( getBits(buf,69,1) ) { - fprintf(stderr,"!!!!!!!!!!!!!!!!!! Found S2 MODULATION SYSTEM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - trans->S2 = 1; - switch ( getBits(buf,67,2) ) { - case 0 : trans->rolloff = ROLLOFF_35; break; - case 1 : trans->rolloff = ROLLOFF_25; break; - case 2 : trans->rolloff = ROLLOFF_20; break; - } + case 7 : trans->coderateH = FEC_NONE; break; } } -void NitSection::S2satelliteDesc( unsigned char* buf, Transponder *trans ) -{ - fprintf(stderr,"!!!!!!!!!!!!!!!!!! Found S2 DESCRIPTOR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - int scrambling_sequence_selector = getBits(buf,16,1); - int multiple_input_stream_flag = getBits(buf,17,1); - int backwards_compatibility_indicator = getBits(buf,18,1); - int scrambling_sequence_index = 0; - if ( scrambling_sequence_selector ) - scrambling_sequence_index = getBits(buf,30,18); - int input_stream_identifier = 0; - if ( multiple_input_stream_flag ) - input_stream_identifier = getBits(buf,48,8); -} - - - void NitSection::cableDesc( unsigned char* buf, Transponder *trans ) { QString s, t; @@ -300,17 +261,13 @@ trans->sr = s.toInt(); trans->sr /=10; switch ( getBits(buf,100,4) ) { - case 0 : trans->coderateH = FEC_AUTO; break; case 1 : trans->coderateH = FEC_1_2; break; case 2 : trans->coderateH = FEC_2_3; break; case 3 : trans->coderateH = FEC_3_4; break; case 4 : trans->coderateH = FEC_5_6; break; case 5 : trans->coderateH = FEC_7_8; break; case 6 : trans->coderateH = FEC_8_9; break; - case 7 : trans->coderateH = FEC_3_5; break; - case 8 : trans->coderateH = FEC_4_5; break; - case 9 : trans->coderateH = FEC_9_10; break; - case 15 : trans->coderateH = FEC_NONE; break; + case 7 : trans->coderateH = FEC_NONE; break; } } @@ -756,12 +713,12 @@ if (table_type == 0x0000 || table_type == 0x0001) { // TVCT table found - vct_table = PSIP_TABLE_TYPE_TVCT; + vct_table = table_type; vct_found = true; } else if (table_type == 0x0002 || table_type == 0x0003) { // CVCT table found - vct_table = PSIP_TABLE_TYPE_CVCT; + vct_table = table_type; vct_found = true; } t_entry += (11 + table_number_des_length); @@ -974,7 +931,7 @@ }; // Now look at the TVCT for info on the individual channels found - if (parseVCT(PSIP_BASE_PID, vct_table, + if (parseVCT(PSIP_BASE_PID, PSIP_TABLE_TYPE_TVCT, PSIP_MAX_CYCLE_TIME_VCT) == false) { fprintf(stderr, "Could not parse VCT in stream. Cannot continue\n"); return false; @@ -1024,6 +981,10 @@ indexChannels = j; fprintf(stderr,"Transponders: %d/%d\n", i+1, transponders.count() ); fprintf(stderr,"scanMode=%d\n", scanMode); + if ( scanMode ) { + nitEnded = false; + ns = new NitSection( &transponders, &nitEnded, &ok, adapter, tuner ); //NIT + } if ( chan.tp.type == FE_ATSC ) { // Separate out the ATSC scanning so that we // don't interfere with existing DVB support @@ -1032,11 +993,6 @@ } else { printf("it's dvb %d!\n", chan.tp.type); - if ( scanMode ) { - nitEnded = false; - ns = new NitSection( &transponders, &nitEnded, &ok, adapter, tuner ); //NIT - } - getSection( 0x11, 0x42 ); //SDT } if ( !isRunning ) { diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbsi.h kaffeine-0.8.7/kaffeine/src/input/dvb/dvbsi.h --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbsi.h 2008-10-24 23:39:35.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbsi.h 2008-07-01 15:35:03.000000000 +0200 @@ -36,7 +36,6 @@ bool getSection( int pid, int tid, int timeout=5000 ); bool tableNIT( unsigned char* buf ); void satelliteDesc( unsigned char* buf, Transponder *trans ); - void S2satelliteDesc( unsigned char* buf, Transponder *trans ); void cableDesc( unsigned char* buf, Transponder *trans ); void terrestrialDesc( unsigned char* buf, Transponder *trans ); void freqListDesc( unsigned char* buf, Transponder *trans ); diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbstream.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/dvbstream.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbstream.cpp 2009-02-22 06:22:08.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbstream.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -154,8 +154,6 @@ else return false; } - if ( chan->tp.S2 && !dvbDevice->doS2 ) - return false; int i; for ( i=0; i<dvbDevice->numLnb; i++ ) { if ( dvbDevice->lnb[i].source.contains(chan->tp.source) ) @@ -166,13 +164,6 @@ -int DvbStream::getPriority() -{ - return dvbDevice->priority; -} - - - int DvbStream::getSatPos( const QString &src ) { int i; @@ -194,7 +185,7 @@ fprintf(stderr,"openFe: fdFrontend != 0\n"); return false; } - fdFrontend = open( frontendName.ascii(), O_RDWR /*| O_NONBLOCK*/ ); + fdFrontend = open( frontendName.ascii(), O_RDWR ); if ( fdFrontend<0 ) { perror("openFe:"); fdFrontend = 0; @@ -328,6 +319,7 @@ { unsigned long lof=0; int res, hiband=0; + struct dvb_frontend_parameters feparams; struct dvb_frontend_info fe_info; fe_status_t status; unsigned long freq=chan->tp.freq; @@ -336,14 +328,6 @@ int rotorMove = 0; int loop=0, i; - struct dtv_property cmdargs[20]; - struct dtv_properties cmdseq; - int inversion; - int bandwidth; - - if ( chan->tp.S2 && !dvbDevice->doS2 ) - return false; - closeFe(); if ( !openFe() ) return false; @@ -360,45 +344,18 @@ freq*=1000; srate*=1000; - QTime t1 = QTime::currentTime(); - - if ( chan->tp.inversion==INVERSION_AUTO ) { - if ( fe_info.caps & FE_CAN_INVERSION_AUTO ) - inversion = chan->tp.inversion; - else { - fprintf(stderr,"Can NOT inversion_auto\n"); - inversion = INVERSION_OFF; - } - } - else - inversion=chan->tp.inversion; - switch( fe_info.type ) { case FE_OFDM : { - QString s = fe_info.name; - //if ( s.contains("TerraTec/qanu USB2.0 Highspeed DVB-T Receiver") ) // cinergyT2 hack - // freq+=167000; if (freq < 1000000) freq*=1000UL; - cmdargs[0].cmd = DTV_DELIVERY_SYSTEM; cmdargs[0].u.data = SYS_DVBT; - cmdargs[1].cmd = DTV_FREQUENCY; cmdargs[1].u.data = freq; - cmdargs[2].cmd = DTV_MODULATION; cmdargs[2].u.data = chan->tp.modulation; - cmdargs[3].cmd = DTV_CODE_RATE_HP; cmdargs[3].u.data = chan->tp.coderateH; - cmdargs[4].cmd = DTV_CODE_RATE_LP; cmdargs[4].u.data = chan->tp.coderateL; - cmdargs[5].cmd = DTV_GUARD_INTERVAL; cmdargs[5].u.data = chan->tp.guard; - cmdargs[6].cmd = DTV_TRANSMISSION_MODE; cmdargs[6].u.data = chan->tp.transmission; - cmdargs[7].cmd = DTV_HIERARCHY; cmdargs[7].u.data = chan->tp.hierarchy; - if ( chan->tp.bandwidth==BANDWIDTH_8_MHZ ) - bandwidth = 8000000; - else if ( chan->tp.bandwidth==BANDWIDTH_7_MHZ ) - bandwidth = 7000000; - else if ( chan->tp.bandwidth==BANDWIDTH_6_MHZ ) - bandwidth = 6000000; - cmdargs[8].cmd = DTV_BANDWIDTH_HZ; cmdargs[8].u.data = bandwidth; - cmdargs[9].cmd = DTV_INVERSION; cmdargs[9].u.data = inversion; - cmdargs[10].cmd = DTV_TUNE; - cmdseq.num = 11; - cmdseq.props = cmdargs; + feparams.frequency=freq; + feparams.u.ofdm.bandwidth=chan->tp.bandwidth; + feparams.u.ofdm.code_rate_HP=chan->tp.coderateH; + feparams.u.ofdm.code_rate_LP=chan->tp.coderateL; + feparams.u.ofdm.constellation=chan->tp.modulation; + feparams.u.ofdm.transmission_mode=chan->tp.transmission; + feparams.u.ofdm.guard_interval=chan->tp.guard; + feparams.u.ofdm.hierarchy_information=chan->tp.hierarchy; fprintf(stderr,"tuning DVB-T to %lu Hz\n", freq); fprintf(stderr,"inv:%d bw:%d fecH:%d fecL:%d mod:%d tm:%d gi:%d hier:%d\n", chan->tp.inversion, chan->tp.bandwidth, chan->tp.coderateH, chan->tp.coderateL, chan->tp.modulation, @@ -406,16 +363,11 @@ break; } case FE_QAM : { - cmdargs[0].cmd = DTV_DELIVERY_SYSTEM; cmdargs[0].u.data = SYS_DVBC_ANNEX_AC; - cmdargs[1].cmd = DTV_FREQUENCY; cmdargs[1].u.data = freq; - cmdargs[2].cmd = DTV_MODULATION; cmdargs[2].u.data = chan->tp.modulation; - cmdargs[3].cmd = DTV_SYMBOL_RATE; cmdargs[3].u.data = srate; - cmdargs[4].cmd = DTV_INNER_FEC; cmdargs[4].u.data = chan->tp.coderateH; - cmdargs[5].cmd = DTV_INVERSION; cmdargs[5].u.data = inversion; - cmdargs[6].cmd = DTV_TUNE; - cmdseq.num = 7; - cmdseq.props = cmdargs; fprintf(stderr,"tuning DVB-C to %lu\n", freq); + feparams.frequency=freq; + feparams.u.qam.symbol_rate = srate; + feparams.u.qam.fec_inner = chan->tp.coderateH; + feparams.u.qam.modulation = chan->tp.modulation; fprintf(stderr,"inv:%d sr:%lu fecH:%d mod:%d\n", chan->tp.inversion, srate, chan->tp.coderateH, chan->tp.modulation ); break; @@ -443,78 +395,51 @@ lof = (dvbDevice->lnb[lnbPos].loFreq*1000); } if ( freq<lof ) - freq = ( lof-freq ); + feparams.frequency = ( lof-freq ); else - freq = ( freq-lof ); + feparams.frequency = ( freq-lof ); } - fprintf(stderr,"inv:%d fecH:%d mod:%d\n", chan->tp.inversion, chan->tp.coderateH, chan->tp.modulation ); + else + feparams.frequency=freq; + + feparams.u.qpsk.symbol_rate=srate; + feparams.u.qpsk.fec_inner=chan->tp.coderateH; + fprintf(stderr,"inv:%d fecH:%d\n", chan->tp.inversion, chan->tp.coderateH ); if ( setDiseqc( lnbPos, chan, hiband, rotorMove, dvr )!=0 ) { closeFe(); return false; } - fprintf( stderr, "Diseqc settings time = %d ms\n", t1.msecsTo( QTime::currentTime() ) ); - t1 = QTime::currentTime(); - if ( chan->tp.S2 ) { - fprintf(stderr,"\nTHIS IS DVB-S2 >>>>>>>>>>>>>>>>>>>\n"); - cmdargs[0].cmd = DTV_DELIVERY_SYSTEM; cmdargs[0].u.data = SYS_DVBS2; - cmdargs[1].cmd = DTV_FREQUENCY; cmdargs[1].u.data = freq; - cmdargs[2].cmd = DTV_MODULATION; cmdargs[2].u.data = chan->tp.modulation; - cmdargs[3].cmd = DTV_SYMBOL_RATE; cmdargs[3].u.data = srate; - cmdargs[4].cmd = DTV_INNER_FEC; cmdargs[4].u.data = chan->tp.coderateH; - cmdargs[5].cmd = DTV_PILOT; cmdargs[5].u.data = PILOT_AUTO; - cmdargs[6].cmd = DTV_ROLLOFF; cmdargs[6].u.data = chan->tp.rolloff; - cmdargs[7].cmd = DTV_INVERSION; cmdargs[7].u.data = inversion; - cmdargs[8].cmd = DTV_TUNE; - cmdseq.num = 9; - cmdseq.props = cmdargs; - } - else { - cmdargs[0].cmd = DTV_DELIVERY_SYSTEM; cmdargs[0].u.data = SYS_DVBS; - cmdargs[1].cmd = DTV_FREQUENCY; cmdargs[1].u.data = freq; - cmdargs[2].cmd = DTV_MODULATION; cmdargs[2].u.data = chan->tp.modulation; - if ( chan->tp.modulation==QAM_AUTO ) - cmdargs[2].u.data = QPSK; - cmdargs[3].cmd = DTV_SYMBOL_RATE; cmdargs[3].u.data = srate; - cmdargs[4].cmd = DTV_INNER_FEC; cmdargs[4].u.data = chan->tp.coderateH; - cmdargs[5].cmd = DTV_INVERSION; cmdargs[5].u.data = inversion; - cmdargs[6].cmd = DTV_TUNE; - cmdseq.num = 7; - cmdseq.props = cmdargs; - } break; } case FE_ATSC : { - cmdargs[0].cmd = DTV_DELIVERY_SYSTEM; cmdargs[0].u.data = SYS_ATSC; - cmdargs[1].cmd = DTV_FREQUENCY; cmdargs[1].u.data = freq; - cmdargs[2].cmd = DTV_MODULATION; cmdargs[2].u.data = chan->tp.modulation; - cmdargs[3].cmd = DTV_INVERSION; cmdargs[3].u.data = inversion; - cmdargs[4].cmd = DTV_TUNE; - cmdseq.num = 5; - cmdseq.props = cmdargs; fprintf(stderr,"tuning ATSC to %lu\n", freq); + feparams.frequency=freq; + feparams.u.vsb.modulation = chan->tp.modulation; fprintf(stderr,"inv:%d mod:%d\n", chan->tp.inversion, chan->tp.modulation ); break; } } - - if ( rotorMove ) { - if ( ioctl( fdFrontend, FE_SET_PROPERTY, &cmdseq )<0 ) { - perror("ERROR tuning\n"); - closeFe(); - return false; + if ( chan->tp.inversion==INVERSION_AUTO ) { + if ( fe_info.caps & FE_CAN_INVERSION_AUTO ) + feparams.inversion=chan->tp.inversion; + else { + fprintf(stderr,"Can NOT inversion_auto\n"); + feparams.inversion=INVERSION_OFF; } - moveRotor( lnbPos, chan, hiband, dvr ); - loop = 2; } + else + feparams.inversion=chan->tp.inversion; + + if ( rotorMove ) + loop = 2; while ( loop>-1 ) { - if ( ioctl( fdFrontend, FE_SET_PROPERTY, &cmdseq )<0 ) { - perror("ERROR tuning\n"); + if (ioctl(fdFrontend,FE_SET_FRONTEND,&feparams) < 0) { + perror("ERROR tuning \n"); closeFe(); return false; } - QTime lockTime = QTime::currentTime(); - do { + for ( i=0; i<(dvbDevice->tuningTimeout/100); i++ ) { usleep( 100000 ); fprintf( stderr, "." ); if ( ioctl( fdFrontend, FE_READ_STATUS, &status )==-1 ) { @@ -526,7 +451,7 @@ loop = 0; break; } - } while ( lockTime.msecsTo( QTime::currentTime() )<=dvbDevice->tuningTimeout ); + } fprintf(stderr,"\n"); --loop; } @@ -537,8 +462,6 @@ return false; } - fprintf( stderr, "Tuning time = %d ms\n", t1.msecsTo( QTime::currentTime() ) ); - if ( rotorMove ) dvbDevice->lnb[lnbPos].currentSource = chan->tp.source; @@ -584,23 +507,6 @@ int i; int voltage18 = ( (chan->tp.pol=='H')||(chan->tp.pol=='h') ); int ci = 4 * switchPos + 2 * hiband + (voltage18 ? 1 : 0); - bool secMini = false; - bool hasRotor = false; - bool hasSwitch = true; - - if ( dvbDevice->numLnb<2 ) - hasSwitch = false; - - if ( dvbDevice->lnb[switchPos].rotorType!=0 && dvbDevice->lnb[switchPos].rotorType!=3 ) - hasRotor = true; - - if ( dvbDevice->numLnb==2 && dvbDevice->secMini ) - secMini = true; - - if ( dvbDevice->secTwice ) - diseqcTwice = 2; - else - diseqcTwice = 1; fprintf( stderr, "DiSEqC: switch pos %i, %sV, %sband (index %d)\n", switchPos, voltage18 ? "18" : "13", hiband ? "hi" : "lo", ci ); if ( ci < 0 || ci >= (int)(sizeof(switchCmd)/sizeof(struct dvb_diseqc_master_cmd)) ) @@ -612,108 +518,85 @@ if ( ioctl(fdFrontend, FE_SET_VOLTAGE, ci%2 ? SEC_VOLTAGE_18 : SEC_VOLTAGE_13) ) perror("FE_SET_VOLTAGE failed"); - if ( hasSwitch ) { - if ( !secMini ) { - fprintf( stderr, "DiSEqC: %02x %02x %02x %02x %02x %02x\n", switchCmd[ci].msg[0], switchCmd[ci].msg[1], switchCmd[ci].msg[2], switchCmd[ci].msg[3], switchCmd[ci].msg[4], switchCmd[ci].msg[5] ); - for ( i=0; i<diseqcTwice; ++i ) { - usleep(15*1000); - if ( ioctl(fdFrontend, FE_DISEQC_SEND_MASTER_CMD, &switchCmd[ci]) ) - perror("FE_DISEQC_SEND_MASTER_CMD failed"); - } - } - else { - fprintf( stderr, "DiSEqC: mini_diseqc\n" ); - for ( i=0; i<diseqcTwice; ++i ) { - usleep(15*1000); - if ( ioctl(fdFrontend, FE_DISEQC_SEND_BURST, (ci/4)%2 ? SEC_MINI_B : SEC_MINI_A) ) - perror("FE_DISEQC_SEND_BURST failed"); - } - } - } - - if ( hasRotor && chan->tp.source!=dvbDevice->lnb[switchPos].currentSource ) { - rotor = 1; - return 0; - } - - if ( (ci/2)%2 ) { + fprintf( stderr, "DiSEqC: %02x %02x %02x %02x %02x %02x\n", switchCmd[ci].msg[0], switchCmd[ci].msg[1], switchCmd[ci].msg[2], switchCmd[ci].msg[3], switchCmd[ci].msg[4], switchCmd[ci].msg[5] ); + for ( i=0; i<2; ++i ) { usleep(15*1000); - if ( ioctl(fdFrontend, FE_SET_TONE, SEC_TONE_ON) ) - perror("FE_SET_TONE failed"); + if ( ioctl(fdFrontend, FE_DISEQC_SEND_MASTER_CMD, &switchCmd[ci]) ) + perror("FE_DISEQC_SEND_MASTER_CMD failed"); } - return 0; -} - - - -void DvbStream::moveRotor( int switchPos, ChannelDesc *chan, int hiband, bool dvr ) -{ - int i, j, index=-1; - double angle=0.0, oldAngle=0.0; - int rotor=0; - int voltage18 = ( (chan->tp.pol=='H')||(chan->tp.pol=='h') ); - int ci = 4 * switchPos + 2 * hiband + (voltage18 ? 1 : 0); QString msg; - - fprintf( stderr, "Driving rotor to %s\n", chan->tp.source.ascii() ); - for ( i=0; i<(int)dvbDevice->lnb[switchPos].source.count(); i++ ) { - if ( dvbDevice->lnb[switchPos].source[i]==chan->tp.source ) { - index = i; - break; + if ( dvbDevice->lnb[switchPos].rotorType!=0 && chan->tp.source!=dvbDevice->lnb[switchPos].currentSource ) { + int i, index=-1; + double angle=0.0, oldAngle=0.0; + fprintf( stderr, "Driving rotor to %s\n", chan->tp.source.ascii() ); + for ( i=0; i<(int)dvbDevice->lnb[switchPos].source.count(); i++ ) { + if ( dvbDevice->lnb[switchPos].source[i]==chan->tp.source ) { + index = i; + break; + } } - } - angle = getSourceAngle( chan->tp.source ); - if ( dvbDevice->lnb[switchPos].rotorType==1 ) { - fprintf( stderr, "Rotor: gotoX=%f\n", angle ); - gotoX( angle ); - } - else { - int pos = dvbDevice->lnb[switchPos].position[index]; - fprintf( stderr, "Rotor: gotoN=%d\n", pos ); - rotorCommand( 9, pos ); - } - if ( dvbDevice->lnb[switchPos].currentSource.isEmpty() ) { - rotor = 10; - msg = i18n("Moving rotor from unknown position..."); - } - else { - oldAngle = getSourceAngle( dvbDevice->lnb[switchPos].currentSource ); - fprintf( stderr, "old rotor pos: %f °\n", oldAngle ); - fprintf( stderr, "new rotor pos: %f °\n", angle ); - angle = fabs(angle-oldAngle); - fprintf( stderr, "Rotation angle: %f °\n", angle ); - if ( voltage18 ) - rotor = (int)(angle*dvbDevice->lnb[switchPos].speed18v)+1; - else - rotor = (int)(angle*dvbDevice->lnb[switchPos].speed13v)+1; - msg = i18n("Moving rotor..."); - } - fprintf( stderr, "Rotation time: %d sec.\n", rotor ); - - if ( !dvr ) { - for ( j=0; j<(rotor*2); j++ ) { - usleep( 500000 ); + angle = getSourceAngle( chan->tp.source ); + if ( dvbDevice->lnb[switchPos].rotorType==1 ) { + fprintf( stderr, "Rotor: gotoX=%f\n", angle ); + gotoX( angle ); + } + else { + int pos = dvbDevice->lnb[switchPos].position[index]; + fprintf( stderr, "Rotor: gotoN=%d\n", pos ); + rotorCommand( 9, pos ); + } + if ( dvbDevice->lnb[switchPos].currentSource.isEmpty() ) { + rotor = 10; + msg = i18n("Moving rotor from unknown position..."); } + else { + oldAngle = getSourceAngle( dvbDevice->lnb[switchPos].currentSource ); + fprintf( stderr, "old rotor pos: %f °\n", oldAngle ); + fprintf( stderr, "new rotor pos: %f °\n", angle ); + angle = fabs(angle-oldAngle); + fprintf( stderr, "Rotation angle: %f °\n", angle ); + if ( voltage18 ) + rotor = (int)(angle*dvbDevice->lnb[switchPos].speed18v)+1; + else + rotor = (int)(angle*dvbDevice->lnb[switchPos].speed13v)+1; + msg = i18n("Moving rotor..."); + } + fprintf( stderr, "Rotation time: %d sec.\n", rotor ); } - else { - QProgressDialog progress( msg, i18n("Cancel"), rotor*2, 0, "progress", true ); - for ( j=0; j<(rotor*2); j++ ) { - progress.setProgress( j ); + + if ( rotor ) { + int j; + if ( !dvr ) { + for ( j=0; j<(rotor*2); j++ ) { + usleep( 500000 ); + } + } + else { + QProgressDialog progress( msg, i18n("Cancel"), rotor*2, 0, "progress", true ); + for ( j=0; j<(rotor*2); j++ ) { + progress.setProgress( j ); + qApp->processEvents(); + if ( progress.wasCanceled() ) + break; + usleep( 500000 ); + } + progress.setProgress( rotor*2 ); qApp->processEvents(); - if ( progress.wasCanceled() ) - break; - usleep( 500000 ); } - progress.setProgress( rotor*2 ); - qApp->processEvents(); } - if ( (ci/2)%2 ) { + for ( i=0; i<2; ++i ) { usleep(15*1000); - if ( ioctl(fdFrontend, FE_SET_TONE, SEC_TONE_ON) ) - perror("FE_SET_TONE failed"); + if ( ioctl(fdFrontend, FE_DISEQC_SEND_BURST, (ci/4)%2 ? SEC_MINI_B : SEC_MINI_A) ) + perror("FE_DISEQC_SEND_BURST failed"); } + + usleep(15*1000); + if ( ioctl(fdFrontend, FE_SET_TONE, (ci/2)%2 ? SEC_TONE_ON : SEC_TONE_OFF) ) + perror("FE_SET_TONE failed"); + + return 0; } @@ -809,7 +692,7 @@ }; int i; - for ( i=0; i<diseqcTwice; ++i ) { + for ( i=0; i<2; ++i ) { usleep(15*1000); if ( ioctl( fdFrontend, FE_DISEQC_SEND_MASTER_CMD, &cmds[cmd] ) ) perror("Rotor : FE_DISEQC_SEND_MASTER_CMD failed"); @@ -931,33 +814,28 @@ void DvbStream::run() { - int READSIZE = 188*20; - int BUFSIZE = 188*100; - int WSIZE = 188*64; - unsigned char buf[READSIZE]; - unsigned char thBuf[BUFSIZE]; + unsigned char buf[188]; int n, i, thWrite=0; + int WSIZE=188*8; DVBout *o=0; signal( SIGPIPE, SIG_IGN ); while ( isRunning ) { if ( poll( &pfd, 1, 100 ) ) { - n = read( fdDvr, buf, READSIZE ); - if ( n && !(n%188) ) { - //fprintf( stderr, "DVR0: read : %d\n", n ); + n = read( fdDvr, buf, 188 ); + if ( n==188 ) { memcpy( thBuf+thWrite, buf, n ); thWrite+=n; - if ( thWrite>=WSIZE ) { + if ( thWrite==WSIZE ) { for ( i=0; i<(int)out.count(); i++ ) - out.at(i)->process( thBuf, thWrite ); + out.at(i)->process( thBuf, WSIZE ); thWrite = 0; } } - else - fprintf( stderr, "DVR0: read failed : %d\n", n ); - } + else + usleep(1000); if ( waitPause>0 ) { o = 0; @@ -1330,7 +1208,7 @@ -int DvbStream::goLive( ChannelDesc *chan, const QString &pipeName, int ringBufSize ) +int DvbStream::goLive( ChannelDesc *chan, const QString &pipeName ) { int i; bool stop=false; @@ -1382,7 +1260,7 @@ else i = 0; - o->goLive( pipeName, ringBufSize ); + o->goLive( pipeName ); fprintf(stderr,"NOUT: %d\n", out.count() ); if ( chan->fta && cam ) diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/dvbstream.h kaffeine-0.8.7/kaffeine/src/input/dvb/dvbstream.h --- kaffeine-0.8.8/kaffeine/src/input/dvb/dvbstream.h 2009-02-12 16:36:50.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/dvbstream.h 2008-07-01 15:35:03.000000000 +0200 @@ -62,11 +62,10 @@ void setPlug( KaffeineDvbPlugin *p ); QStringList getSources( bool all=false ); bool canSource( ChannelDesc *chan ); - int getPriority(); bool tuneDvb( ChannelDesc *chan, bool dvr=true ); void stopFrontend(); virtual void run(); - int goLive( ChannelDesc *chan, const QString &pipeName, int ringBufSize ); + int goLive( ChannelDesc *chan, const QString &pipeName ); void preStopLive(); void stopLive( ChannelDesc *chan ); void stop(); @@ -93,6 +92,7 @@ void probeCam(); void showCamDialog(); + unsigned char thBuf[188*10]; struct pollfd pfd; DVBevents *dvbEvents; @@ -111,7 +111,6 @@ private : int setDiseqc( int switchPos, ChannelDesc *chan, int hiband, int &rotor, bool dvr ); - void moveRotor( int switchPos, ChannelDesc *chan, int hiband, bool dvr ); void rotorCommand( int cmd, int n1=0, int n2=0, int n3=0 ); void gotoX( double azimuth ); double getAzimuth( double angle ); @@ -145,7 +144,6 @@ QString timeShiftFileName; DvbCam *cam; bool camProbed; - int diseqcTwice; KaffeineDvbPlugin *plug; signals: diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/scandialog.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/scandialog.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/scandialog.cpp 2008-11-29 21:15:54.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/scandialog.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -109,15 +109,13 @@ foundList->clear(); foundList->setAllColumnsShowFocus( true ); foundList->setSelectionMode( QListView::Extended ); - channelsList->setSorting( 1 ); // sort by source 1st than channel name - channelsList->setAllColumnsShowFocus( true ); - channelsList->setSelectionMode( QListView::Extended ); + channelsList->setSorting( 0 ); ChannelDesc *chan; QListViewItem *it; for ( int i=0; i<(int)chandesc->count(); i++ ) { chan = chandesc->at(i); - it = new QListViewItem( channelsList, chan->name, chan->tp.source ); + it = new QListViewItem( channelsList, chan->name ); if ( !chan->pix.isNull() ) it->setPixmap( 0, chan->pix ); else { diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/scandialogui.ui kaffeine-0.8.7/kaffeine/src/input/dvb/scandialogui.ui --- kaffeine-0.8.8/kaffeine/src/input/dvb/scandialogui.ui 2008-11-29 21:16:00.000000000 +0100 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/scandialogui.ui 2008-07-01 15:35:03.000000000 +0200 @@ -66,28 +66,9 @@ <bool>true</bool> </property> </column> - <column> - <property name="text"> - <string>Source</string> - </property> - <property name="clickable"> - <bool>true</bool> - </property> - <property name="resizable"> - <bool>true</bool> - </property> - </column> <property name="name"> <cstring>channelsList</cstring> </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> <property name="rootIsDecorated"> <bool>false</bool> </property> diff -uNr kaffeine-0.8.8/kaffeine/src/input/dvb/ts2rtp.cpp kaffeine-0.8.7/kaffeine/src/input/dvb/ts2rtp.cpp --- kaffeine-0.8.8/kaffeine/src/input/dvb/ts2rtp.cpp 2009-04-20 17:36:12.000000000 +0200 +++ kaffeine-0.8.7/kaffeine/src/input/dvb/ts2rtp.cpp 2008-07-01 15:35:03.000000000 +0200 @@ -345,12 +345,7 @@ buf[off++] = 0x01; // current_next_indicator buf[off++] = 0x00; // section_number buf[off++] = 0x00; // last_section_number - if ( desc->vpid ) { - buf[off++] = desc->vpid>>8; buf[off++] = desc->vpid&0xff; // PCR pid - } - else if ( desc->napid ) { - buf[off++] = desc->apid[0].pid>>8; buf[off++] = desc->apid[0].pid&0xff; // PCR pid - } + buf[off++] = desc->vpid>>8; buf[off++] = desc->vpid&0xff; // PCR pid buf[off++] = 0x00; buf[off++] = 0x00; // infos_length if ( desc->vpid ) { buf[off++] = desc->vType; // stream_type