~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to libs/libmythtv/linuxfirewiredevice.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey), Jamie Bennett, Mario Limonciello, Dave Walker (Daviey)
  • Date: 2010-03-23 19:32:33 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20100323193233-5sv9djoxtlmwt3ca
Tags: 0.23.0+fixes23789-0ubuntu1
[ Jamie Bennett ]
* Fix FTBFS on armel (LP: #537714)

[ Mario Limonciello ]
* mythtv-{common,backend}.{config,templates,postinst}: (LP: #483748)
  - Simplify debconf questions by avoiding showing the generated pw
  - Don't warn about mythtv group.
  - Don't notify about running mythtv-setup.  This is optional (but
    of course encouraged!)
* Set version to include a "+" delimitter.
* Restore libfaad-dev dependency. (LP: #546552)

[ Dave Walker (Daviey) ]
* New snapshot (r23789), based from 0.23-fixes.
* debian/control:
  - mythtv-frontend set to Conflict with mythflix, as it's dropped
    upstream. (LP: #544521)
  - Remove unnecessary and potentially problematic use of Pre-Depends.
  - Set the debug package to Priority extra.
  - Change *-perl Section's from libs to perl
  - add ${shlibs:Depends} for mythtv-common Depends field
  - Minor spelling fix.
  - Fixes the long description for one of the packages, ensuring the
    description doesn't exceed 80 characters.
  - Vcs-* set to -fixes, rather than -trunk.
* debian/rules:
  - Use debconf-updatepo to update translations when required
  - Ensure license files are not included in the binary packages, except 
    for debian/copyright.
  - Fixes the permissions of certain files in the packaging.
* debian/copyright:
  - updated to reflect that mythtv is GPL-2 only.
  - inserted better licence statement and Copyright reference.
* debian/mythtv-*.templates
  - Simplified strings; removed verbosity and improved readability.
* Prevent the maintainer scripts from failing in case any questions 
  can't be displayed.
* Added holding debian/mythtv-frontend.config, mainly to appease lintian.
* debian/mythtv-frontend.menu: Changed section to Applications/Graphics.
* debian/mythtv-backend.postinst: Load debconf libraries.
* debian/source.lintian-overrides: Removes the unecessary override of the 
  binNMU warnings.
* Fix perl binding installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
static QString speed_to_string(uint speed);
122
122
static int linux_firewire_device_bus_reset_handler(
123
123
    raw1394handle_t handle, uint generation);
124
 
static bool get_guid(raw1394handle_t handle, nodeid_t node,
125
 
                     uint64_t &guid, bool &temp_unavailable);
126
124
 
127
125
LinuxFirewireDevice::LinuxFirewireDevice(
128
126
    uint64_t guid, uint subunitid,
414
412
}
415
413
 
416
414
bool LinuxFirewireDevice::CloseNode(void)
417
 
 
415
{
418
416
    if (m_priv->is_p2p_node_open)
419
417
        return CloseP2PNode();
420
418
 
820
818
    }
821
819
    else if (dropped_packets > 1)
822
820
    {
823
 
        VERBOSE(VB_RECORD, LOC_ERR + 
 
821
        VERBOSE(VB_RECORD, LOC_ERR +
824
822
                QString("Dropped %1 TS packets").arg(dropped_packets));
825
823
    }
826
824
}
896
894
            continue;
897
895
        }
898
896
 
899
 
        MythTimer guid_timer;
900
 
        guid_timer.start();
901
897
        for (int node = 0; node < raw1394_get_nodecount(item.handle); node++)
902
898
        {
903
 
            bool tmp;
904
899
            uint64_t guid;
905
 
            if (!get_guid(item.handle, 0xffc0 | node, guid, tmp))
906
 
            {
907
 
                if (tmp && (guid_timer.elapsed() < 200))
908
 
                { // device has gone off-line temporarily
909
 
                    usleep(10 * 1000);
910
 
                    node--;
911
 
                }
912
 
                continue; // device has gone off-line
913
 
            }
914
900
 
 
901
            guid = rom1394_get_guid(item.handle, node);
915
902
            item.port = port;
916
903
            item.node = node;
917
904
            UpdateDeviceListItem(guid, &item);
918
905
            guid_online[guid] = true;
919
 
            guid_timer.start();
920
906
        }
921
907
 
922
908
        raw1394_destroy_handle(item.handle);
1046
1032
 
1047
1033
    return 0;
1048
1034
}
1049
 
 
1050
 
// get_guid copied from plugreport, Copyright 2002-2004 Dan Dennedy GPL v2+
1051
 
#define PLUGREPORT_GUID_HI 0x0C
1052
 
#define PLUGREPORT_GUID_LO 0x10
1053
 
static bool get_guid(raw1394handle_t handle, nodeid_t node, uint64_t &guid,
1054
 
                     bool &temp_unavailable)
1055
 
{
1056
 
    uint64_t offset = CSR_REGISTER_BASE + CSR_CONFIG_ROM + PLUGREPORT_GUID_HI;
1057
 
    uint32_t quadlet;
1058
 
    int err = raw1394_read(handle, node, offset, sizeof(uint32_t), &quadlet);
1059
 
    if (-1 == err)
1060
 
    {
1061
 
        temp_unavailable = (errno == 11);
1062
 
        if (!temp_unavailable)
1063
 
            VERBOSE(VB_IMPORTANT, "get_guid 1, Error: " + ENO);
1064
 
        return false;
1065
 
    }
1066
 
    guid = htonl(quadlet);
1067
 
    guid <<= 32;
1068
 
 
1069
 
    offset = CSR_REGISTER_BASE + CSR_CONFIG_ROM + PLUGREPORT_GUID_LO;
1070
 
    err = raw1394_read(handle, node, offset, sizeof(uint32_t), &quadlet);
1071
 
    if (-1 == err)
1072
 
    {
1073
 
        temp_unavailable = (errno == 11);
1074
 
        if (!temp_unavailable)
1075
 
            VERBOSE(VB_IMPORTANT, "get_guid 2, Error: " + ENO);
1076
 
        return false;
1077
 
    }
1078
 
    guid += htonl(quadlet);
1079
 
 
1080
 
    return true;
1081
 
}