~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to kde/src/lib/videocodec.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
 *   Copyright (C) 2012-2014 by Savoir-Faire Linux                          *
3
 
 *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
4
 
 *                                                                          *
5
 
 *   This library is free software; you can redistribute it and/or          *
6
 
 *   modify it under the terms of the GNU Lesser General Public             *
7
 
 *   License as published by the Free Software Foundation; either           *
8
 
 *   version 2.1 of the License, or (at your option) any later version.     *
9
 
 *                                                                          *
10
 
 *   This library is distributed in the hope that it will be useful,        *
11
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
12
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
13
 
 *   Lesser General Public License for more details.                        *
14
 
 *                                                                          *
15
 
 *   You should have received a copy of the GNU General Public License      *
16
 
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
17
 
 ***************************************************************************/
18
 
#ifndef VIDEO_CODEC_H
19
 
#define VIDEO_CODEC_H
20
 
 
21
 
#include "typedefs.h"
22
 
#include <QtCore/QObject>
23
 
 
24
 
class Account;
25
 
class VideoCodec;
26
 
 
27
 
typedef QHash<QString,VideoCodec*> CodecHash;
28
 
 
29
 
///VideoCodec: Codecs used for video calls
30
 
class LIB_EXPORT VideoCodec : public QObject {
31
 
   Q_OBJECT
32
 
   friend class VideoCodecModel;
33
 
   public:
34
 
      //Properties
35
 
      Q_PROPERTY(QString name       READ name                          )
36
 
      Q_PROPERTY(uint    bitrate    READ bitrate    WRITE setBitrate   )
37
 
      Q_PROPERTY(bool    enabled    READ enabled    WRITE setEnabled   )
38
 
      Q_PROPERTY(QString parameters READ parameters WRITE setParamaters)
39
 
 
40
 
      //Consts
41
 
      class CodecFields {
42
 
      public:
43
 
         constexpr static const char* PARAMETERS = "parameters";
44
 
         constexpr static const char* ENABLED    = "enabled"   ;
45
 
         constexpr static const char* BITRATE    = "bitrate"   ;
46
 
         constexpr static const char* NAME       = "name"      ;
47
 
      };
48
 
 
49
 
      //Static setters
50
 
      static void setActiveCodecList(Account* account, QStringList codecs);
51
 
 
52
 
      //Getters
53
 
      QString name      () const;
54
 
      uint    bitrate   () const;
55
 
      bool    enabled   () const;
56
 
      QString parameters() const;
57
 
      QMap<QString,QString> toMap() const;
58
 
 
59
 
      //Setters
60
 
      void setBitrate   (const uint     bitrate );
61
 
      void setEnabled   (const bool     enabled );
62
 
      void setParamaters(const QString& params  );
63
 
 
64
 
   private:
65
 
      //Constructor
66
 
      VideoCodec(const QString &codecName, uint bitRate, bool enabled);
67
 
      ~VideoCodec(){}
68
 
 
69
 
      //Attributes
70
 
      static CodecHash m_slCodecs;
71
 
      QString          m_Name;
72
 
      uint             m_Bitrate;
73
 
      bool             m_Enabled;
74
 
      static bool      m_sInit;
75
 
      QString          m_Parameters;
76
 
};
77
 
 
78
 
#endif