summaryrefslogtreecommitdiffstats
path: root/src/app/theStream.h
blob: f6168629c6de6eb24ddf33e00caec80b60a1cc05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information

#ifndef CODEINE_THESTREAM_H
#define CODEINE_THESTREAM_H

#include "codeineConfig.h"  // needed for inline functions
#include <kurl.h>    // larger :( but no macros at least
#include <tqsize.h>   // small header
#include <tqstring.h> // small header

/// for purely static classes
#define CODEINE_NO_EXPORT( T ) \
   T(); \
  ~T(); \
   T( const T& ); \
   T &operator=( const T& ); \
   bool operator==( const T& ); \
   bool operator!=( const T& );

namespace Codeine
{
   enum class MetaData
   {
      Title = 0,
      Comment,
      Artist,
      Genre,
      Album,
      Year,
      VideoCodec,
      AudioCodec,
   };

   enum class StreamInfo
   {
      VideoWidth = 0,
      VideoHeight,
      VideoBitRate,
      AudioBits,
      AudioSampleRate,
      AudioBitRate
   };

   class TheStream
   {
   CODEINE_NO_EXPORT( TheStream )

   public:

      static TQMap<MetaData, TQString> metaData();
      static TQMap<StreamInfo, TQString> info();

      static const KURL &url();

      static bool canSeek();
      static bool hasAudio();
      static bool hasVideo();

      static TQSize defaultVideoSize();

      static int aspectRatio();
      static int subtitleChannel();
      static int audioChannel();

      static TQString prettyTitle();

      static inline bool hasProfile()
            { return TDEGlobal::config()->hasGroup( url().prettyURL() ); }

      static TDEConfig *profile();
   };
}

#endif