qtinternetradio/irqmediaplayer/inc/irqmmfadapter.h
changeset 14 896e9dbc5f19
parent 0 09774dfdd46b
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
    20 #include <videoplayer2.h>
    20 #include <videoplayer2.h>
    21 #include <MMFMetadataEventConfigConstants.h>
    21 #include <MMFMetadataEventConfigConstants.h>
    22 #include "irqplayeradapterinterface.h"
    22 #include "irqplayeradapterinterface.h"
    23 
    23 
    24 class IRQMetaData;
    24 class IRQMetaData;
       
    25 class CStereoWidening;
    25 
    26 
    26 /**
    27 /**
    27  * This class wraps the MMF interface CVideoPlayerUtility
    28  * This class wraps the MMF interface CVideoPlayerUtility
    28  */
    29  */
    29 class IRQMMFAdapter : public IRQPlayerAdapterInterface,
    30 class IRQMMFAdapter : public IRQPlayerAdapterInterface,
    40     void  playStation(const QString &aUrl, int aApId); // Play specific url via certain access point id
    41     void  playStation(const QString &aUrl, int aApId); // Play specific url via certain access point id
    41     void  stop();                                      // Stop Playback
    42     void  stop();                                      // Stop Playback
    42     void  setVolume(int aVolume);                      // Set volume to player
    43     void  setVolume(int aVolume);                      // Set volume to player
    43     int   getVolume();                                 // Get current volume from player
    44     int   getVolume();                                 // Get current volume from player
    44     void* getPlayerInstance();                         // Get audio player instance for stereo effect
    45     void* getPlayerInstance();                         // Get audio player instance for stereo effect
       
    46     void  enableStereoEffect();                        //Turns on the stereo effect
       
    47     void  disableStereoEffect();                       //Turns off the stereo effect
    45 
    48 
    46     // Callback functions, MVideoPlayerUtilityObserver methods
    49     // Callback functions, MVideoPlayerUtilityObserver methods
    47     void MvpuoOpenComplete(TInt aError);                  // Opening url completed
    50     void MvpuoOpenComplete(TInt aError);                  // Opening url completed
    48     void MvpuoPlayComplete(TInt aError);                  // Playback completed, never called
    51     void MvpuoPlayComplete(TInt aError);                  // Playback completed, never called
    49     void MvpuoEvent(const TMMFEvent& aEvent);             // Events from player
    52     void MvpuoEvent(const TMMFEvent& aEvent);             // Events from player
    60     void createPlayerL();                           // Created player
    63     void createPlayerL();                           // Created player
    61     void destroyPlayer();                           // Destroy player
    64     void destroyPlayer();                           // Destroy player
    62     void setMetadataEventConfig();                  // Enable meta data event
    65     void setMetadataEventConfig();                  // Enable meta data event
    63     static TInt isPrepareCompleted(TAny* aPointer); // Periodic called function
    66     static TInt isPrepareCompleted(TAny* aPointer); // Periodic called function
    64     void checkPrepare();                            // Check if preparation completed
    67     void checkPrepare();                            // Check if preparation completed
    65 
    68     void enableStereoEffectL();
       
    69     
    66 private:
    70 private:
    67     CVideoPlayerUtility2*  iVideoPlayer;
    71     CVideoPlayerUtility2*  iVideoPlayer;
    68     IRQMetaData*          iQMetaData;       // Saving meta data
    72     IRQMetaData*          iQMetaData;       // Saving meta data
    69     /*
    73     /*
    70      * Sometimes the station server is on without encoder. In this case,
    74      * Sometimes the station server is on without encoder. In this case,
    71      * MvpuoPrepareComplete is not called after MvpuoOpenComplete. Need to stop playback
    75      * MvpuoPrepareComplete is not called after MvpuoOpenComplete. Need to stop playback
    72      * in this case. So start a timer to check if the preparation is complete.
    76      * in this case. So start a timer to check if the preparation is complete.
    73      */
    77      */
    74     CPeriodic*            iPrepareTimer;
    78     CPeriodic*            iPrepareTimer;
    75     QString               iLastArtistSongName;
    79     QString               iLastArtistSongName;
       
    80     
       
    81     /**
       
    82      *  Used for handling Stereo Mode
       
    83      */
       
    84     CStereoWidening* iStereoEffect;
    76 };
    85 };
    77 
    86 
    78 #endif /* IRQMMFADAPTER_H_ */
    87 #endif /* IRQMMFADAPTER_H_ */