IMediaController.h
Go to the documentation of this file.
1 #ifndef imm_IMediaController_included
2 #define imm_IMediaController_included
3 
4 
5 // ACF includes
6 #include "istd/IChangeable.h"
7 #include <QtCore/QString>
8 #include "ifile/IFileTypeInfo.h"
9 
10 #include "imm/imm.h"
11 
12 
13 namespace imm
14 {
15 
16 
18  virtual public istd::IChangeable,
19  virtual public ifile::IFileTypeInfo
20 {
21 public:
23  {
24  CF_STATUS = 1 << 28,
25  CF_MEDIA_POSITION = 1 << 29,
26  };
27 
29  {
31  SF_PLAY = 0x2,
32  SF_SEEK = 0x4,
34  };
35 
39  virtual QString GetOpenedMediumUrl() const = 0;
40 
44  virtual bool OpenMediumUrl(const QString& url, bool autoPlay = true) = 0;
45 
50  virtual void CloseMedium() = 0;
51 
55  virtual bool IsPlaying() const = 0;
56 
60  virtual bool SetPlaying(bool state = true) = 0;
61 
65  virtual double GetMediumLength() const = 0;
66 
70  virtual double GetCurrentPosition() const = 0;
71 
75  virtual bool SetCurrentPosition(double position) = 0;
76 
81  virtual int GetSupportedFeatures() const = 0;
82 };
83 
84 
85 } // namespace imm
86 
87 
88 #endif // !imm_IMediaController_included
89 
90 
virtual int GetSupportedFeatures() const =0
Get info about features, that are supported by this media controller.
virtual bool OpenMediumUrl(const QString &url, bool autoPlay=true)=0
Open some media file.
virtual double GetMediumLength() const =0
Return length of opened media.
virtual bool IsPlaying() const =0
Return true, if media is currntly playing.
virtual void CloseMedium()=0
Close this media player.
virtual bool SetPlaying(bool state=true)=0
Play or pause current media.
virtual bool SetCurrentPosition(double position)=0
Skip to some position of media stream.
virtual QString GetOpenedMediumUrl() const =0
Get URL of the medium object.
virtual double GetCurrentPosition() const =0
Get current position.

© 2007-2011 Witold Gantzke and Kirill Lepskiy