Updated Kaffeine to latest upstream version

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kaffeine@1182813 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent c1aed14da1
commit d32030ae51

@ -3,6 +3,31 @@
* KAFFEINE ChangeLog *
****************************
0.8.8
* DVB: allow OSD on HD channels.
* DVB: PAT/PMT radios fixes.
* DVB: added live ringbuffer size option (in misc page)
* DVB: added tuner priority option.
* DVB: added mini-Diseqc option.
* DVB: added "Sending diseqc cmds twice" option.
* DVB: added "External positionner" option.
* DVB: option to disable MFE probing.
* DVB: add DVB-S2 support.
* DVB: port to S2API.
* DVB: fixed crash that sometimes occurred during ATSC scanning
* DVB: improve support for ATSC scanning on cable (QAM)
0.8.7
* kaffeine: add MOD/STM mimetypes
* kaffeine: fullscreen fix, patch by Einars Lielmanis <einars@gmail.com>
* DVB: updated libdvb, added CAM menu.
* DVB: added multiservices CAM support.
* DVB: added ATSC scanning, patch by "Devin Heitmueller" <devin.heitmueller@gmail.com>
* DVB: added 7MHz autoscan.
* DVB: reworked CAM support.
0.8.6
* kaffeine: new jpeg logo (the animated one is renamed logo.avi)

@ -1 +1 @@
kaffeine version 0.8.6
kaffeine version 0.8.8

File diff suppressed because it is too large Load Diff

13128
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -40,9 +40,7 @@ dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kaffeine, 0.8.5) dnl searches for some needed programs
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE(kaffeine-0.8.8, "3.5.7") dnl searches for some needed programs
KDE_SET_PREFIX
@ -66,13 +64,6 @@ dnl FILE: configure.in.in
dnl =======================================================
#MIN_CONFIG(3.3)
KDE_ENABLE_HIDDEN_VISIBILITY
dnl PACKAGE set before
AM_MAINTAINER_MODE
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
if test "$build_arts" = "yes"; then
@ -309,7 +300,7 @@ dnl --------------------
dnl check for cdparanoia
dnl --------------------
KDE_CHECK_HEADER([cdda_interface.h], [with_cdparanoia=yes], [with_cdparanoia=no])
KDE_CHECK_HEADER([cdio/cdda.h], [with_cdparanoia=yes], [with_cdparanoia=no])
if test "$with_cdparanoia" != "yes" ; then
echo ""
@ -395,6 +386,7 @@ AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/libdvbapi/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/libdvben50221/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/libucsi/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/libucsi/atsc/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/libucsi/dvb/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/lib/libucsi/mpeg/Makefile ])
AC_CONFIG_FILES([ kaffeine/src/input/dvb/plugins/Makefile ])

@ -1,11 +1,4 @@
#MIN_CONFIG(3.3)
KDE_ENABLE_HIDDEN_VISIBILITY
AM_INIT_AUTOMAKE(kaffeine, 0.8.5)
AM_MAINTAINER_MODE
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
if test "$build_arts" = "yes"; then

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 KiB

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@ -220,7 +220,7 @@ dnl --------------------
dnl check for cdparanoia
dnl --------------------
KDE_CHECK_HEADER([cdda_interface.h], [with_cdparanoia=yes], [with_cdparanoia=no])
KDE_CHECK_HEADER([cdio/cdda.h], [with_cdparanoia=yes], [with_cdparanoia=no])
if test "$with_cdparanoia" != "yes" ; then
echo ""

Binary file not shown.

@ -28,7 +28,7 @@ libkaffeinedisc_la_LDFLAGS = $(KDE_RPATH) \
libkaffeinedisc_la_LIBADD = $(top_builddir)/kaffeine/src/input/libkaffeineinput.la \
$(top_builddir)/kaffeine/src/player-parts/kaffeine-part/libkaffeinepart.la \
$(top_builddir)/kaffeine/src/input/disc/plugins/libkaffeineaudioencoder.la \
-lcdda_interface -lcdda_paranoia
-lcdio_cdda -lcdio_paranoia
# this is where the XML-GUI resource file goes
shellrcdir = $(kde_datadir)/kaffeine

@ -120,7 +120,7 @@ KiloConfig::~KiloConfig()
{
}
void paranoiaCallback( long, int )
void paranoiaCallback( long int, paranoia_cb_mode_t )
{
}
@ -396,7 +396,7 @@ void Paranoia::run()
curpos = currentSector;
endpos = endOfTrack;
if ( normalize ) {
len = CD_FRAMESIZE_RAW;
len = CDIO_CD_FRAMESIZE_RAW;
fn.open( IO_ReadWrite | IO_Truncate );
do {
buf = paranoia_read_limited( p, paranoiaCallback, 3 );
@ -419,7 +419,7 @@ void Paranoia::run()
while ( curpos<endpos && len!=0 );
factor = 32767.0/max;
buf = new signed short[CD_FRAMESIZE_RAW];
buf = new signed short[CDIO_CD_FRAMESIZE_RAW];
fn.at( 0 );
f.open( IO_ReadWrite | IO_Truncate );
currentEncoder->start( encodingList[i].remove(0,3), encodingList[0], encodingList[1], encodingList[i].left(2) );
@ -428,7 +428,7 @@ void Paranoia::run()
f.writeBlock( encoded, len );
do {
len = fn.readBlock( (char*)buf, CD_FRAMESIZE_RAW );
len = fn.readBlock( (char*)buf, CDIO_CD_FRAMESIZE_RAW );
if ( len>0 ) {
if ( max<32760 )
for ( n=0; n<len/2; ++n )
@ -455,7 +455,7 @@ void Paranoia::run()
encoded = currentEncoder->getHeader( len );
if ( encoded )
f.writeBlock( encoded, len );
len = CD_FRAMESIZE_RAW;
len = CDIO_CD_FRAMESIZE_RAW;
do {
buf = paranoia_read_limited( p, paranoiaCallback, 3 );
if ( Q_BYTE_ORDER == Q_BIG_ENDIAN ) {
@ -514,7 +514,7 @@ QString Paranoia::trackSize( int t )
QString s, c;
long total;
total = CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) );
total = CDIO_CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) );
if ( total>(1048576 ) ) s = c.setNum(total/1048576.0, 'f', 2)+" "+i18n("MB");
else if ( total>1024 ) s = c.setNum(total/1024.0, 'f', 2)+" "+i18n("KB");
else s = c.setNum(total*1.0, 'f', 2)+" "+i18n("Bytes");
@ -532,8 +532,8 @@ QString Paranoia::trackTime( int t )
long total, time;
int m, s;
if ( t<0 ) total = CD_FRAMESIZE_RAW * (cdda_disc_lastsector( d )-cdda_disc_firstsector( d ) );
else total = CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) );
if ( t<0 ) total = CDIO_CD_FRAMESIZE_RAW * (cdda_disc_lastsector( d )-cdda_disc_firstsector( d ) );
else total = CDIO_CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) );
time = (8 * total) / (44100 * 2 * 16);
m = time/60;
s = time%60;

@ -32,8 +32,8 @@
extern "C"
{
#include <cdda_interface.h>
#include <cdda_paranoia.h>
#include <cdio/cdda.h>
#include <cdio/paranoia.h>
}
class KiloConfig : public ParanoiaSettings
@ -91,8 +91,8 @@ private:
bool setPath( QString &path, const QString &artist, const QString &album );
long nTracks;
cdrom_drive *d;
cdrom_paranoia *p;
cdrom_drive_t *d;
cdrom_paranoia_t *p;
long currentSector, endOfTrack;
bool isRunning;
QStringList encodingList;

@ -10,7 +10,7 @@ noinst_HEADERS = koggenc.h
libkaffeineoggvorbis_la_SOURCES = koggenc.cpp oggconfig.ui
libkaffeineoggvorbis_la_LIBADD = ../libkaffeineaudioencoder.la $(LIB_OGGVORBIS)
libkaffeineoggvorbis_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(KDE_PLUGIN) $(LIB_KPARTS) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) -avoid-version -no-undefined
libkaffeineoggvorbis_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -avoid-version -no-undefined
# this is where the desktop file will go
partdesktopdir = $(kde_servicesdir)

@ -30,6 +30,8 @@ libkaffeinedvb_la_SOURCES = audioeditor.cpp \
dvbsection.h \
dvbsi.cpp \
dvbsi.h \
camdialog.ui \
cammenudialog.ui \
dvbstream.cpp \
dvbstream.h \
gdvb.h \

@ -0,0 +1,149 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>CamDialog</class>
<widget class="QDialog">
<property name="name">
<cstring>CamDialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<height>198</height>
</rect>
</property>
<property name="caption">
<string>CAM settings</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel9</cstring>
</property>
<property name="text">
<string>Maximum Concurrent Services:</string>
</property>
</widget>
<widget class="QSpinBox">
<property name="name">
<cstring>maxServiceSpin</cstring>
</property>
<property name="minValue">
<number>1</number>
</property>
</widget>
</hbox>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Application Type:</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
<property name="text">
<string>Manufacturer Code:</string>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
<property name="text">
<string>Menu String:</string>
</property>
</widget>
<widget class="QLabel" row="2" column="1">
<property name="name">
<cstring>manuCodeLab</cstring>
</property>
<property name="text">
<string>_</string>
</property>
</widget>
<widget class="QLabel" row="1" column="1">
<property name="name">
<cstring>appManuLab</cstring>
</property>
<property name="text">
<string>_</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>Application Manufacturer:</string>
</property>
</widget>
<widget class="QLabel" row="3" column="1">
<property name="name">
<cstring>menuStringLab</cstring>
</property>
<property name="text">
<string>_</string>
</property>
</widget>
<widget class="QLabel" row="0" column="1">
<property name="name">
<cstring>appTypeLab</cstring>
</property>
<property name="text">
<string>_</string>
</property>
</widget>
</grid>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>camMenuBtn</cstring>
</property>
<property name="text">
<string>CAM Menu</string>
</property>
</widget>
</vbox>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>maxServiceSpin</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,67 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>CamMenuDialog</class>
<widget class="QDialog">
<property name="name">
<cstring>CamMenuDialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>317</width>
<height>345</height>
</rect>
</property>
<property name="caption">
<string>CAM Menu</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QTextBrowser">
<property name="name">
<cstring>menuText</cstring>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Your choice (enter to validate):</string>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>inputLine</cstring>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>inputLine</tabstop>
<tabstop>menuText</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -115,6 +115,8 @@ Transponder::Transponder()
coderateH=FEC_AUTO;
bandwidth=BANDWIDTH_AUTO;
snr = 0;
rolloff = ROLLOFF_AUTO;
S2 = 0;
}
Transponder::Transponder( const Transponder &trans )
@ -134,6 +136,8 @@ Transponder::Transponder( const Transponder &trans )
coderateL=trans.coderateL;
coderateH=trans.coderateH;
bandwidth=trans.bandwidth;
rolloff = trans.rolloff;
S2 = trans.S2;
}
bool Transponder::sameAs( Transponder *trans )

@ -101,6 +101,8 @@ public:
fe_code_rate_t coderateH;
fe_bandwidth_t bandwidth;
int snr;
fe_rolloff_t rolloff;
char S2;
};
class ChannelDesc

@ -143,6 +143,9 @@ void ChannelEditor::accept()
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();
@ -165,13 +168,7 @@ void ChannelEditor::accept()
else {
channel->tp.freq = freqSpin->value();
channel->tp.inversion = (fe_spectral_inversion_t)(INVERSION_OFF+inversionComb->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;
}
channel->tp.modulation = (fe_modulation_t)(QPSK+modulationComb->currentItem());
}
done( Accepted );
@ -187,10 +184,15 @@ void ChannelEditor::initS()
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 );
}
@ -211,6 +213,8 @@ void ChannelEditor::initC()
bandwidthComb->setEnabled( false );
hierarchyComb->setEnabled( false );
guardComb->setEnabled( false );
stypeComb->setEnabled( false );
rolloffComb->setEnabled( false );
}
void ChannelEditor::initT()
@ -234,6 +238,8 @@ void ChannelEditor::initT()
guardComb->setCurrentItem( GUARD_INTERVAL_1_32+channel->tp.guard );
srSpin->setEnabled( false );
polGroup->setEnabled( false );
stypeComb->setEnabled( false );
rolloffComb->setEnabled( false );
}
void ChannelEditor::initA()
@ -241,14 +247,8 @@ void ChannelEditor::initA()
freqSpin->setValue( channel->tp.freq );
inversionComb->insertStringList( inversionList() );
inversionComb->setCurrentItem( INVERSION_OFF+channel->tp.inversion );
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;
}
modulationComb->insertStringList( modulationList() );
modulationComb->setCurrentItem( QPSK+channel->tp.modulation );
srSpin->setEnabled( false );
polGroup->setEnabled( false );
transmissionComb->setEnabled( false );
@ -257,6 +257,8 @@ void ChannelEditor::initA()
bandwidthComb->setEnabled( false );
hierarchyComb->setEnabled( false );
guardComb->setEnabled( false );
stypeComb->setEnabled( false );
rolloffComb->setEnabled( false );
}
QStringList ChannelEditor::inversionList()
@ -271,7 +273,7 @@ QStringList ChannelEditor::coderateList()
{
QStringList list;
list<<"NONE"<<"1/2"<<"2/3"<<"3/4"<<"4/5"<<"5/6"<<"6/7"<<"7/8"<<"8/9"<<"AUTO";
list<<"NONE"<<"1/2"<<"2/3"<<"3/4"<<"4/5"<<"5/6"<<"6/7"<<"7/8"<<"8/9"<<"AUTO"<<"3/5"<<"9/10";
return list;
}
@ -279,15 +281,7 @@ QStringList ChannelEditor::modulationList()
{
QStringList list;
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";
list<<"QPSK"<<"QAM 16"<<"QAM 32"<<"QAM 64"<<"QAM 128"<<"QAM 256"<<"AUTO"<<"VSB-8"<<"VSB-16"<<"8PSK"<<"16APSK"<<"DQPSK";
return list;
}
@ -323,6 +317,22 @@ QStringList ChannelEditor::guardList()
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()
{
}

@ -53,11 +53,12 @@ private:
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;

@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>477</width>
<height>533</height>
<height>541</height>
</rect>
</property>
<property name="caption">
@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="Line" row="1" column="0">
<widget class="Line" row="0" column="1">
<property name="name">
<cstring>line2</cstring>
</property>
@ -35,7 +35,7 @@
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout9</cstring>
<cstring>layout7</cstring>
</property>
<vbox>
<property name="name">
@ -432,22 +432,6 @@
<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>
@ -480,11 +464,6 @@
<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>
@ -511,11 +490,6 @@
<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>
@ -595,6 +569,58 @@
<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>
@ -610,7 +636,7 @@
<property name="sizeHint">
<size>
<width>20</width>
<height>98</height>
<height>166</height>
</size>
</property>
</spacer>

File diff suppressed because it is too large Load Diff

@ -1,6 +1,7 @@
/*
* dvbcam.h
*
* Copyright (C) 2008 Christophe Thommeret <hftom@free.fr>
* Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@ -21,32 +22,182 @@
#ifndef DVBCAM_H
#define DVBCAM_H
class DvbCamCamThread;
class DvbCamPmtThread;
#include <libdvbapi/dvbca.h>
#include <libdvbapi/dvbdemux.h>
#include <libdvben50221/en50221_app_ai.h>
#include <libdvben50221/en50221_app_ca.h>
#include <libdvben50221/en50221_app_mmi.h>
#include <libdvben50221/en50221_app_rm.h>
#include <libdvben50221/en50221_app_tags.h>
#include <libdvben50221/en50221_session.h>
#include <libdvben50221/en50221_stdcam.h>
#include <libucsi/mpeg/section.h>
class DvbCam
#include <qthread.h>
#include <qmutex.h>
#include <qptrlist.h>
#include "channeldesc.h"
#include "camdialog.h"
#include "cammenudialog.h"
#define MMI_STATE_CLOSED 0
#define MMI_STATE_OPEN 1
#define MMI_STATE_ENQ 2
#define MMI_STATE_MENU 3
#define MMI_NO_MENU 0
#define MMI_MENU 1
class CamService : protected QThread
{
public:
DvbCam(int adapter, int ca_device, int demux_device, int ci_type);
~DvbCam();
enum PmtState{ NotReady=0, Ready, Added, Remove, Destroy };
CamService( int adapter, int demux_device, ChannelDesc *chan, int maxService );
~CamService();
void setState( PmtState st );
int getState();
const ChannelDesc& getChannel() { return channel; }
void restart();
void restart(int service_id);
unsigned char caPmt[4096];
int caPmtSize;
protected:
void run();
private:
int createSectionFilter( uint16_t pid, uint8_t table_id );
int processPat( int demux_fd );
int processPmt( int demux_fd );
bool setCaPmt( int list_management, int cmd_id );
void stop();
bool running() { return isRunning; }
int serviceId() { return sid; }
int Adapter;
int DemuxDevice;
ChannelDesc channel;
unsigned char pmtBuffer[4096];
struct mpeg_pmt_section *parsedPmt;
PmtState state;
bool isRunning;
QMutex mutex;
int CamMaxService;
};
class DvbCam;
class StandardCam
{
public:
StandardCam( en50221_stdcam *sc, DvbCam *dc ) {
stdcam=sc;
dvbcam=dc;
mmi_state=MMI_STATE_CLOSED;
menuType=MMI_NO_MENU;
}
en50221_stdcam *stdcam;
DvbCam *dvbcam;
int mmi_state;
int mmi_enq_blind;
int mmi_enq_length;
int menuType;
QStringList menuList;
QMutex mutex;
};
class MCamMenuDialog : public CamMenuDialog
{
Q_OBJECT
public:
MCamMenuDialog( StandardCam *sc );
private:
StandardCam *stdcam;
QTimer readTimer;
private slots:
void setMenu();
void validateClicked();
signals:
void enteredResponse( QString );
};
class DvbCam : public QObject, public QThread
{
Q_OBJECT
public:
DvbCam(int adapter, int ca_device, int demux_device, int ci_type, int maxService);
~DvbCam();
void startService( ChannelDesc *chan );
void stopService( ChannelDesc *chan );
bool canPlay( ChannelDesc *chan );
static int probe( int adapter, int ca_device );
void setAppType( QString s ) { appType=s; }
void setAppManu( QString s ) { appManu=s; }
void setManuCode( QString s ) { manuCode=s; }
void setMenuString( QString s ) { menuString=s; }
QString getAppType() { return appType; }
QString getAppManu() { return appManu; }
QString getManuCode() { return manuCode; }
QString getMenuString() { return menuString; }
int getCamMaxService() { return CamMaxService; }
int showCamDialog();
protected:
void run();
void timerEvent( QTimerEvent *e );
private slots:
void mmiResponse( QString s );
void showMMI();
void closeMMI();
void enterMenu();
private:
bool init();
bool sendPmt( unsigned char *pmt_buffer, int size );
void resendPmts();
static int infoCallback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
static int aiCallback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t application_type,
uint16_t application_manufacturer, uint16_t manufacturer_code, uint8_t menu_string_length, uint8_t *menu_string);
static int mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t cmd_id, uint8_t delay);
static int mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t cmd_id, uint8_t mmi_mode);
static int mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t blind_answer, uint8_t expected_answer_length,
uint8_t *text, uint32_t text_size);
static int mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number, struct en50221_app_mmi_text *title,
struct en50221_app_mmi_text *sub_title, struct en50221_app_mmi_text *bottom, uint32_t item_count,
struct en50221_app_mmi_text *items, uint32_t item_raw_length, uint8_t *items_raw);
int Adapter;
int CaDevice;
int DemuxDevice;
bool isRunning;
int sid;
int ciType;
int CamMaxService;
bool isRunning;
QPtrList<CamService> sidList;
QMutex sidMutex;
QString appType, appManu, manuCode, menuString;
StandardCam *stdcam;
en50221_session_layer *SessionLayer;
en50221_transport_layer *TransportLayer;
DvbCamCamThread *CamThread;
DvbCamPmtThread *PmtThread;
MCamMenuDialog *menuDialog;
};
#endif /* DVBCAM_H */

@ -38,6 +38,7 @@
#include "dvbconfig.h"
#include "kaffeinedvbplugin.h"
#include "dvbpanel.h"
@ -72,6 +73,21 @@ void MPushButton::isClicked()
MCAMButton::MCAMButton( QWidget *parent, int devNum ) : QPushButton( i18n("CAM"), parent )
{
deviceNumber = devNum;
connect( this, SIGNAL(clicked()), this, SLOT(isClicked()) );
}
void MCAMButton::isClicked()
{
emit clicked( deviceNumber );
}
MComboBox::MComboBox( QWidget *parent, int devNum, int lnbNum ) : QComboBox( parent )
{
deviceNumber = devNum;
@ -109,6 +125,12 @@ Device::Device( int anum, int tnum, fe_type_t t, const QString &n, bool as )
source = "";
canAutoscan= as;
tuningTimeout = 1500;
hasCAM = false;
camMaxService = 1;
secMini = 0;
secTwice = 0;
priority = 10;
doS2 = 0;
}
@ -134,6 +156,7 @@ DVBconfig::DVBconfig( const QString &dvbConf )
sizeFile = 0;
categories.setAutoDelete( true );
devList.setAutoDelete( true );
readFirst();
startup();
readConfig();
}
@ -187,6 +210,7 @@ void DVBconfig::startup()
int i=0, j=0, res, fdFrontend=0;
struct dvb_frontend_info info;
bool as;
QTime t1;
QStringList list, flist;
QString s, t;
@ -200,6 +224,11 @@ void DVBconfig::startup()
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) ) {
@ -212,13 +241,14 @@ void DVBconfig::startup()
as = true;
else
as = false;
fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s )\n", s.ascii(), t.ascii(), info.name );
fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s ) (%dms)\n", s.ascii(), t.ascii(), info.name, t1.msecsTo(QTime::currentTime()) );
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").arg( s ).arg( t ).ascii() );
else {
perror( QString("/dev/dvb/%1/%2 %3/%4").arg( s ).arg( t ).arg( errno ).arg( -EBUSY ).ascii() );
}
}
}
@ -292,9 +322,9 @@ bool DVBconfig::localData()
bool DVBconfig::haveData()
{
if ( !QDir( dvbConfigDir+"dvb-s" ).exists() || !QDir( dvbConfigDir+"dvb-c" ).exists() || !QDir( dvbConfigDir+"dvb-t" ).exists() ) {
if ( !QDir( dvbConfigDir+"dvb-s" ).exists() || !QDir( dvbConfigDir+"dvb-c" ).exists() || !QDir( dvbConfigDir+"dvb-t" ).exists() || !QDir( dvbConfigDir+"atsc" ).exists()) {
loadDvbData(0);
if ( !QDir( dvbConfigDir+"dvb-s" ).exists() || !QDir( dvbConfigDir+"dvb-c" ).exists() || !QDir( dvbConfigDir+"dvb-t" ).exists() ) {
if ( !QDir( dvbConfigDir+"dvb-s" ).exists() || !QDir( dvbConfigDir+"dvb-c" ).exists() || !QDir( dvbConfigDir+"dvb-t" ).exists() || !QDir( dvbConfigDir+"atsc" ).exists() ) {
if ( !localData() )
return false;
}
@ -313,6 +343,7 @@ QStringList DVBconfig::getSourcesList( fe_type_t type )
case FE_QPSK : s = "dvb-s"; break;
case FE_QAM : s = "dvb-c"; break;
case FE_OFDM : s = "dvb-t"; break;
case FE_ATSC : s = "atsc"; break;
default : return list;
}
list = QDir( dvbConfigDir+s ).entryList( QDir::Files, QDir::Name );
@ -383,6 +414,14 @@ void DVBconfig::saveDvbChanOrder( int s, int col )
void DVBconfig::readFirst()
{
config->setGroup( "DVB Options" );
probeMfe = config->readNumEntry( "ProbeMFE", 1 );
}
void DVBconfig::readConfig()
{
QSize size;
@ -413,6 +452,8 @@ void DVBconfig::readConfig()
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 );
@ -426,6 +467,9 @@ void DVBconfig::readConfig()
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 );
}
j = config->readNumEntry( "NumCategories", 0 );
for ( i=0; i<j; i++ )
@ -442,6 +486,9 @@ void DVBconfig::readConfig()
devList.at(i)->usalsLatitude = usalsLatitude;
devList.at(i)->usalsLongitude = usalsLongitude;
}
ringBufSize = config->readNumEntry( "RingBufSize", 2 );
if ( ringBufSize<2 )
ringBufSize = 2;
}
@ -463,9 +510,12 @@ void DVBconfig::saveConfig()
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 );
@ -479,6 +529,9 @@ void DVBconfig::saveConfig()
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( "NumCategories", categories.count() );
for ( i=0; i<(int)categories.count(); i++ ) {
@ -494,6 +547,7 @@ void DVBconfig::saveConfig()
config->writeEntry( "UsalsLatitude", usalsLatitude );
config->writeEntry( "UsalsLongitude", usalsLongitude );
config->writeEntry( "SizeFile", sizeFile );
config->writeEntry( "RingBufSize", ringBufSize );
config->sync();
}
@ -511,7 +565,7 @@ bool DVBconfig::firstRun()
DvbConfigDialog::DvbConfigDialog( DVBconfig *dc, QWidget *parent, KaffeineDvbPlugin *p ) :
DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, KaffeineDvbPlugin *p ) :
KDialogBase ( IconList, i18n("DVB Settings"), Ok|Cancel, Ok, parent, "dvbConfigDialog", true, true )
{