Ticket #6340: MPEGStreamData_replaceQMap.diff

File MPEGStreamData_replaceQMap.diff, 5.6 KB (added by Matthias "mortalmatt" Dahl <devel@…>, 12 years ago)
  • mythtv/libs/libmythtv/channelscan/channelscan_sm.h

     
    5757class DVBSignalMonitor;
    5858
    5959typedef vector<const ProgramMapTable*>  pmt_vec_t;
    60 typedef QMap<uint, pmt_vec_t>           pmt_map_t;
     60typedef QHash<uint, pmt_vec_t>           pmt_map_t;
    6161class ScannedChannelInfo;
    6262typedef QMap<transport_scan_items_it_t,ScannedChannelInfo*> ChannelMap;
    6363
  • mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp

     
    16031603    //        QString("Tearing down up decryption monitoring "
    16041604    //                "for program %1").arg(pnum));
    16051605
    1606     QMap<uint, uint_vec_t>::iterator list;
     1606    QHash<uint, uint_vec_t>::iterator list;
    16071607    uint_vec_t::iterator it;
    16081608
    16091609    uint_vec_t pids = _encryption_pnum_to_pids[pnum];
     
    16391639{
    16401640    QMutexLocker locker(&_encryption_lock);
    16411641
    1642     QMap<uint, CryptInfo>::const_iterator it =
     1642    QHash<uint, CryptInfo>::const_iterator it =
    16431643        _encryption_pid_to_info.find(pid);
    16441644
    16451645    return it != _encryption_pid_to_info.end();
  • mythtv/libs/libmythtv/mpeg/mpegstreamdata.h

     
    66#include <vector>
    77using namespace std;
    88
    9 #include <qmap.h>
     9#include <QHash>
     10
    1011#include <stdint.h>  // uint64_t
     12
    1113#include "tspacket.h"
    1214#include "util.h"
    1315#include "streamlisteners.h"
     
    2022
    2123typedef vector<uint>                    uint_vec_t;
    2224
    23 typedef QMap<unsigned int, PESPacket*>  pid_pes_map_t;
    24 typedef QMap<const PSIPTable*, int>     psip_refcnt_map_t;
     25typedef QHash<unsigned int, PESPacket*>  pid_pes_map_t;
     26typedef QHash<const PSIPTable*, int>     psip_refcnt_map_t;
    2527
    2628typedef ProgramAssociationTable*               pat_ptr_t;
    2729typedef vector<const ProgramAssociationTable*> pat_vec_t;
    28 typedef QMap<uint, pat_vec_t>                  pat_map_t;
    29 typedef QMap<uint, ProgramAssociationTable*>   pat_cache_t;
     30typedef QHash<uint, pat_vec_t>                 pat_map_t;
     31typedef QHash<uint, ProgramAssociationTable*>  pat_cache_t;
    3032
    3133typedef ProgramMapTable*                pmt_ptr_t;
    3234typedef vector<const ProgramMapTable*>  pmt_vec_t;
    33 typedef QMap<uint, pmt_vec_t>           pmt_map_t;
    34 typedef QMap<uint, ProgramMapTable*>    pmt_cache_t;
     35typedef QHash<uint, pmt_vec_t>          pmt_map_t;
     36typedef QHash<uint, ProgramMapTable*>   pmt_cache_t;
    3537
    3638typedef vector<unsigned char>           uchar_vec_t;
    3739typedef uchar_vec_t                     sections_t;
    38 typedef QMap<uint, sections_t>          sections_map_t;
     40typedef QHash<uint, sections_t>         sections_map_t;
    3941
    4042typedef vector<MPEGStreamListener*>     mpeg_listener_vec_t;
    4143typedef vector<TSPacketListener*>       ts_listener_vec_t;
    4244typedef vector<TSPacketListenerAV*>     ts_av_listener_vec_t;
    4345typedef vector<MPEGSingleProgramStreamListener*> mpeg_sp_listener_vec_t;
    4446
     47typedef QHash<uint, int> table_versions_map_t;
     48
    4549typedef enum
    4650{
    4751    kEncUnknown   = 0,
     
    7680    kPIDPriorityNormal = 2,
    7781    kPIDPriorityHigh   = 3,
    7882} PIDPriority;
    79 typedef QMap<uint, PIDPriority> pid_map_t;
     83typedef QHash<uint, PIDPriority> pid_map_t;
    8084
    8185class MPEGStreamData : public EITSource
    8286{
     
    158162    }
    159163    int  VersionPAT(uint tsid) const
    160164    {
    161         const QMap<uint, int>::const_iterator it = _pat_version.find(tsid);
     165        const table_versions_map_t::const_iterator it = _pat_version.find(tsid);
    162166        if (it == _pat_version.end())
    163167            return -1;
    164168        return *it;
     
    173177    }
    174178    int  VersionPMT(uint prog_num) const
    175179    {
    176         const QMap<uint, int>::const_iterator it = _pmt_version.find(prog_num);
     180        const table_versions_map_t::const_iterator it = _pmt_version.find(prog_num);
    177181        if (it == _pmt_version.end())
    178182            return -1;
    179183        return *it;
     
    328332
    329333    // Encryption monitoring
    330334    mutable QMutex            _encryption_lock;
    331     QMap<uint, CryptInfo>     _encryption_pid_to_info;
    332     QMap<uint, uint_vec_t>    _encryption_pnum_to_pids;
    333     QMap<uint, uint_vec_t>    _encryption_pid_to_pnums;
    334     QMap<uint, CryptStatus>   _encryption_pnum_to_status;
     335    QHash<uint, CryptInfo>    _encryption_pid_to_info;
     336    QHash<uint, uint_vec_t>   _encryption_pnum_to_pids;
     337    QHash<uint, uint_vec_t>   _encryption_pid_to_pnums;
     338    QHash<uint, CryptStatus>  _encryption_pnum_to_status;
    335339
    336340    // Signals
    337341    mutable QMutex            _listener_lock;
     
    341345    ts_av_listener_vec_t      _ts_av_listeners;
    342346
    343347    // Table versions
    344     QMap<uint, int>           _pat_version;
    345     QMap<uint, int>           _pmt_version;
     348    table_versions_map_t      _pat_version;
     349    table_versions_map_t      _pmt_version;
    346350
    347351    sections_map_t            _pat_section_seen;
    348352    sections_map_t            _pmt_section_seen;
  • mythtv/libs/libmythtv/siscan.h

     
    3737} SCANMODE;
    3838
    3939typedef vector<const ProgramMapTable*>  pmt_vec_t;
    40 typedef QMap<uint, pmt_vec_t>           pmt_map_t;
     40typedef QHash<uint, pmt_vec_t>           pmt_map_t;
    4141
    4242class SIScan : public QObject,
    4343               public MPEGStreamListener,