Ignore:
Timestamp:
May 3, 2016, 2:14:41 PM (10 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update vendor to version 16.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smplayer/vendor/current/src/inforeader.h

    r163 r175  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2014 Ricardo Villalba <[email protected]>
     2    Copyright (C) 2006-201 Ricardo Villalba <[email protected]>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    1818
    1919
    20 #ifndef _INFOREADER_H_
    21 #define _INFOREADER_H_
     20#ifndef
     21#define
    2222
    2323#include <QObject>
    2424#include <QList>
    25 
    26 #define USE_QPROCESS 1
    27 
    28 #if USE_QPROCESS
    29 class QProcess;
    30 #else
    31 class MyProcess;
    32 #endif
     25#include <QStringList>
     26#include "config.h"
    3327
    3428class InfoData {
     
    4539        void setDesc(QString desc) { _desc = desc; };
    4640
    47         QString name() { return _name; };
    48         QString desc() { return _desc; };
     41        QString name() const { return _name; };
     42        QString desc() const { return _desc; };
     43
     44        bool operator<(const InfoData & other) const {
     45                return name() < other.name();
     46        }
     47
     48        bool operator==(const InfoData & other) const {
     49                return name() == other.name();
     50        }
    4951
    5052private:
     
    6365        ~InfoReader();
    6466
     67
     68
     69
    6570        void getInfo();
    6671
    6772        InfoList voList() { return vo_list; };
    6873        InfoList aoList() { return ao_list; };
     74
     75
    6976        InfoList demuxerList() { return demuxer_list; };
    7077        InfoList vcList() { return vc_list; };
    7178        InfoList acList() { return ac_list; };
     79
     80
     81
    7282
    73         int mplayerVersion() { return mplayer_svn; };
     83        int mplayerSVN() { return mplayer_svn; };
     84        QString mpvVersion() { return mpv_version; };
     85        QString mplayer2Version() { return mplayer2_version; };
     86        bool isMplayer2() { return is_mplayer2; };
     87        bool isMPV() { return is_mpv; };
    7488
    75         //! Returns an InfoReader objects. If it didn't exist before, one
    76         //! is created and getInfo() is called.
    77         static InfoReader * obj();
     89        QString playerVersion();
    7890
    79 protected slots:
    80         virtual void readLine(QByteArray);
     91        //! Returns an InfoReader object. If it didn't exist before, one
     92        //! is created.
     93        static InfoReader * obj(const QString & mplayer_bin = QString::null);
    8194
    8295protected:
    83         bool run(QString options);
    84         void list();
    85 
    86 protected:
    87 #if USE_QPROCESS
    88         QProcess * proc;
    89 #else
    90         MyProcess * proc;
    91 #endif
    9296        QString mplayerbin;
    9397
    9498        InfoList vo_list;
    9599        InfoList ao_list;
     100
     101
    96102        InfoList demuxer_list;
    97103        InfoList vc_list;
    98104        InfoList ac_list;
     105
     106
     107
    99108
    100109        int mplayer_svn;
     110
     111
     112
    101113
    102114private:
    103         bool waiting_for_key;
    104         int reading_type;
    105 
    106115        static InfoReader * static_obj;
     116
     117
    107118};
    108119
Note: See TracChangeset for help on using the changeset viewer.