~ubuntu-branches/ubuntu/karmic/kaffeine/karmic

« back to all changes in this revision

Viewing changes to src/dvb/dvbdevice.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2009-05-11 06:52:11 UTC
  • mfrom: (1.16.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090511065211-8edzz93l7iixgl7v
Tags: 0.8.7+kde4svn966351-0ubuntu1
* New SVN snapshot
* Packaging rewrote for KDE4
* Added kubuntu_01_qt_phonon.diff, fix compile with Qt's Phonon which
  does not install Phonon/Global

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * dvbdevice.cpp
3
3
 *
4
 
 * Copyright (C) 2007-2008 Christoph Pfister <christophpfister@gmail.com>
 
4
 * Copyright (C) 2007-2009 Christoph Pfister <christophpfister@gmail.com>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
10
10
 *
11
11
 * This program is distributed in the hope that it will be useful,
12
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
14
 * GNU General Public License for more details.
15
15
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
16
 * You should have received a copy of the GNU General Public License along
 
17
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
18
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
 */
20
20
 
21
21
#include "dvbdevice.h"
26
26
 */
27
27
typedef quint64 __u64;
28
28
 
29
 
#include <cmath>
30
29
#include <errno.h>
31
30
#include <fcntl.h>
32
31
#include <linux/dvb/dmx.h>
34
33
#include <poll.h>
35
34
#include <sys/ioctl.h>
36
35
#include <unistd.h>
 
36
#include <cmath>
37
37
#include <QCoreApplication>
38
38
#include <QDir>
39
 
#include <QFile>
40
39
#include <QMutex>
41
40
#include <QThread>
42
41
#include <Solid/DeviceNotifier>
43
42
#include <Solid/DvbInterface>
44
43
#include <KDebug>
45
 
#include "dvbchannel.h"
46
 
#include "dvbconfig.h"
47
44
#include "dvbmanager.h"
48
45
 
49
46
class DvbFilterInternal
996
993
                        signal = 0;
997
994
                }
998
995
 
999
 
                bool carry = true;
1000
 
 
1001
996
                if ((signal != 0) && (signal < 0x2000)) {
1002
997
                        // signal too weak
1003
 
                        carry = false;
 
998
                        kWarning() << "tuning failed for" << frontendPath;
 
999
                        setDeviceState(DeviceTuningFailed);
 
1000
                        return;
1004
1001
                }
1005
1002
 
 
1003
                bool carry = true;
 
1004
 
1006
1005
                if (carry && ((frontendCapabilities & FE_CAN_FEC_AUTO) == 0)) {
1007
1006
                        switch (autoTTransponder->fecRateHigh) {
1008
1007
                        case DvbTTransponder::Fec2_3:
1021
1020
                                autoTTransponder->fecRateHigh = DvbTTransponder::Fec7_8;
1022
1021
                                carry = false;
1023
1022
                                break;
1024
 
                        case DvbTTransponder::Fec7_8:
1025
 
                                autoTTransponder->fecRateHigh = DvbTTransponder::Fec4_5;
1026
 
                                carry = false;
1027
 
                                break;
1028
1023
                        case DvbTTransponder::Fec4_5:
1029
 
                                autoTTransponder->fecRateHigh = DvbTTransponder::Fec6_7;
1030
 
                                carry = false;
1031
 
                                break;
1032
1024
                        case DvbTTransponder::Fec6_7:
1033
 
                                autoTTransponder->fecRateHigh = DvbTTransponder::Fec8_9;
1034
 
                                carry = false;
1035
 
                                break;
 
1025
                        case DvbTTransponder::Fec7_8:
1036
1026
                        case DvbTTransponder::Fec8_9:
1037
1027
                        case DvbTTransponder::FecNone:
1038
1028
                        case DvbTTransponder::FecAuto: