CPhononVideoViewGuiComp.h
Go to the documentation of this file.
1 #ifndef iphonon_CPhononVideoViewGuiComp_included
2 #define iphonon_CPhononVideoViewGuiComp_included
3 
4 
5 // Qt includes
6 #include <Phonon/VideoWidget>
7 #include <Phonon/MediaObject>
8 
9 // ACF includes
10 #include "imm/IVideoController.h"
12 
13 
14 namespace iphonon
15 {
16 
17 
19  public iqtgui::TGuiComponentBase<Phonon::VideoWidget>,
20  virtual public imm::IVideoController
21 {
22  Q_OBJECT
23 public:
25 
26  I_BEGIN_COMPONENT(CPhononVideoViewGuiComp);
27  I_REGISTER_INTERFACE(istd::IChangeable);
28  I_REGISTER_INTERFACE(imm::IMediaController);
29  I_REGISTER_INTERFACE(imm::IVideoInfo);
30  I_REGISTER_INTERFACE(imm::IVideoController);
31  I_ASSIGN(m_framesPerSecondAttrPtr, "FramesPerSecond", "Default number of frames per second if this info is unavailable from video", true, 25.0);
32  I_END_COMPONENT;
33 
35 
36  // reimplemented (imm::IMediaController)
37  virtual QString GetOpenedMediumUrl() const;
38  virtual bool OpenMediumUrl(const QString& url, bool autoPlay = true);
39  virtual void CloseMedium();
40  virtual bool IsPlaying() const;
41  virtual bool SetPlaying(bool state = true);
42  virtual double GetMediumLength() const;
43  virtual double GetCurrentPosition() const;
44  virtual bool SetCurrentPosition(double position);
45  virtual int GetSupportedFeatures() const;
46 
47  // reimplemented (imm::IVideoInfo)
48  virtual int GetFramesCount() const;
49  virtual double GetFrameIntervall() const;
50  virtual istd::CIndex2d GetFrameSize() const;
51  virtual double GetPixelAspectRatio() const;
52 
53  // reimplemented (imm::IVideoController)
54  virtual int GetCurrentFrame() const;
55  virtual bool SetCurrentFrame(int frameIndex);
56 
57  // reimplemented (ifile::IFileTypeInfo)
58  virtual bool GetFileExtensions(QStringList& result, int flags = -1, bool doAppend = false) const;
59  virtual QString GetTypeDescription(const QString* extensionPtr = NULL) const;
60 
61 protected:
62  void EnsureSync() const;
63 
64  // reimplemented (iqtgui::CGuiComponentBase)
65  virtual void OnGuiCreated();
66  virtual void OnGuiDestroyed();
67 
68 private:
69  Phonon::MediaObject m_mediaObject;
70 
71  double m_currentPosition;
72 
73  I_ATTR(double, m_framesPerSecondAttrPtr);
74 };
75 
76 
77 } // namespace iphonon
78 
79 
80 #endif // !iphonon_CPhononVideoViewGuiComp_included
81 
virtual bool SetCurrentFrame(int frameIndex)
virtual double GetPixelAspectRatio() const
virtual bool SetCurrentPosition(double position)
iqtgui::TGuiComponentBase< Phonon::VideoWidget > BaseClass
virtual double GetMediumLength() const
virtual int GetSupportedFeatures() const
virtual double GetFrameIntervall() const
virtual bool IsPlaying() const
virtual bool GetFileExtensions(QStringList &result, int flags=-1, bool doAppend=false) const
virtual QString GetTypeDescription(const QString *extensionPtr=NULL) const
virtual double GetCurrentPosition() const
virtual QString GetOpenedMediumUrl() const
virtual istd::CIndex2d GetFrameSize() const
virtual bool SetPlaying(bool state=true)
virtual int GetFramesCount() const
virtual bool OpenMediumUrl(const QString &url, bool autoPlay=true)
virtual int GetCurrentFrame() const

© 2007-2011 Witold Gantzke and Kirill Lepskiy