qtmobility/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
child 15 1f895d8a5b2b
--- a/qtmobility/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h	Fri Jun 11 14:26:25 2010 +0300
+++ b/qtmobility/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h	Wed Jun 23 19:08:38 2010 +0300
@@ -44,47 +44,52 @@
 
 #include "s60mediaplayersession.h"
 #include "s60mediaplayeraudioendpointselector.h"
+#ifdef MMF_VIDEO_SURFACES_SUPPORTED
+#include <videoplayer2.h>
+#else
 #include <videoplayer.h>
+#endif // MMF_VIDEO_SURFACES_SUPPORTED
 #include <QtGui/qwidget.h>
 #include <qvideowidget.h>
 
+#ifdef HAS_AUDIOROUTING_IN_VIDEOPLAYER
 #include <AudioOutput.h>
 #include <MAudioOutputObserver.h>
-
+#endif
 class QTimer;
 
 class S60VideoPlayerSession : public S60MediaPlayerSession,
-                              public MVideoPlayerUtilityObserver, 
-                              public MVideoLoadingObserver,
-                              public MAudioOutputObserver
+                              public MVideoPlayerUtilityObserver,
+                              public MVideoLoadingObserver
+#ifdef HAS_AUDIOROUTING_IN_VIDEOPLAYER
+                              , public MAudioOutputObserver
+#endif //HAS_AUDIOROUTING_IN_VIDEOPLAYER
 {
     Q_OBJECT
-
 public:
     S60VideoPlayerSession(QMediaService *service);
     ~S60VideoPlayerSession();
-    
+
     //From S60MediaPlayerSession
     bool isVideoAvailable() const;
     bool isAudioAvailable() const;
     void setVideoRenderer(QObject *renderer);
-    
+
     //From MVideoLoadingObserver
     void MvloLoadingStarted();
     void MvloLoadingComplete();
-    
+
+#ifdef HAS_AUDIOROUTING_IN_VIDEOPLAYER
     // From MAudioOutputObserver
     void DefaultAudioOutputChanged(CAudioOutput& aAudioOutput,
         CAudioOutput::TAudioOutputPreference aNewDefault);
-
+#endif //HAS_AUDIOROUTING_IN_VIDEOPLAYER
 public:
     // From S60MediaPlayerAudioEndpointSelector
     QString activeEndpoint() const;
     QString defaultEndpoint() const;
 public Q_SLOTS:
     void setActiveEndpoint(const QString& name);
-Q_SIGNALS:
-     void activeEndpointChanged(const QString &name);
 
 protected:
     //From S60MediaPlayerSession
@@ -111,8 +116,9 @@
     QPair<qreal, qreal> scaleFactor();
     void startDirectScreenAccess();
     bool stopDirectScreenAccess();
+#ifdef HAS_AUDIOROUTING_IN_VIDEOPLAYER
     QString qStringFromTAudioOutputPreference(CAudioOutput::TAudioOutputPreference output) const;
-    
+#endif
     
     // From MVideoPlayerUtilityObserver
     void MvpuoOpenComplete(TInt aError);
@@ -123,9 +129,13 @@
 
 private:
     // Qwn
+#ifdef MMF_VIDEO_SURFACES_SUPPORTED
+    CVideoPlayerUtility2 *m_player;
+#else
     CVideoPlayerUtility *m_player;
+#endif // MMF_VIDEO_SURFACES_SUPPORTED
     TRect m_rect;
-    QVideoOutputControl::Output m_output;
+    //QVideoOutputControl::Output m_output;
     WId m_windowId;
     bool m_dsaActive;
     bool m_dsaStopped;
@@ -134,10 +144,13 @@
     RWsSession &m_wsSession;
     CWsScreenDevice &m_screenDevice;
     RWindowBase *m_window;
+    RWindow *m_displayWindow;
     QMediaService &m_service;
     Qt::AspectRatioMode m_aspectRatioMode;
     QSize m_originalSize;
+#ifdef HAS_AUDIOROUTING_IN_VIDEOPLAYER
     CAudioOutput *m_audioOutput;
+#endif
     QString m_audioEndpoint;
 };