?? mediaplayeriface.h.svn-base
字號:
/***************************************** Copyright 2001-2003 Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//** @file mediaplayeriface.h @brief common interface for media players (file, dvd, vcd, ...) @author Laurent Crinon @date 2004-01-07*/#ifndef __RMMEDIAPLAYERIFACE_H__#define __RMMEDIAPLAYERIFACE_H__class RMmediaPlayerIface{ public: /** Constructor @param context : context of the application, contains poinbter to the needed class @param type : type of media player (cdda, vcd, file, ...) */ RMmediaPlayerIface(typeCuracaoContext *context, typeMediaPlayer type); /** Destructor */ virtual ~RMmediaPlayerIface(); /** Interpret user input command @param c : input command @param val : some command may need a parameter (seek for example) @return RM_UNKNOWN_KEY if the command is unknown, RM_OK if succeeded, RM_ERROR if failed */ virtual RMstatus InterpretCommand(RMremoteKey c, void *val) PURE_VIRTUAL; /** Reset the media player. After this function, the mediaplayer is ready to playback the disc from the beginnig. @return RM_OK if succeeded, RM_ERROR if failed */ virtual RMstatus Reset() PURE_VIRTUAL; /** Read data from media and send it to the decoder. */ virtual void ProcessData() PURE_VIRTUAL; /** Open the mediaplayer and start the playback */ virtual RMstatus Open(RMascii *name) PURE_VIRTUAL; /** Stop the playback and close the mediaplayer. The navigation need to be re-initialized in order to start the same or another disc playback (using Open function) @return RM_OK if succeeded, RM_ERROR if failed */ virtual RMstatus Close() PURE_VIRTUAL; /** Returns the mediaplayer type ... see common.h for type definition @return media player type */ typeMediaPlayer GetType(); /** Returns the current state of the media player @return current state */ virtual typeMediaPlayerSate GetState(); virtual RMstatus UpdateDisplayInfo(); virtual RMstatus GetParameters(void **params); virtual RMstatus UpdateMediaInfo(); /** Sets the current state of the media player @param state : current state @param speed : some state may specify a speed (fast forward, fast rewind) */ virtual void SetState(typeMediaPlayerSate state, void *val); /** Gets some information concerning the media played back (duration, state, ...) @param message : type of information @param val : value corresponding to the wanted info @return RM_OK if succeeded, RM_ERROR if failed, RM_PROPERTY_NOT_SUPPORTED in case of a not supported information request */ virtual RMstatus GetInfo(typeCuracaoMessage message, void *val); virtual RMstatus GetBookmark(RMuint8 *val, RMuint32 size); virtual RMstatus ResumeBookmark(RMuint8 *val); virtual RMuint32 GetDiscID(); virtual RMstatus GetAudioStreamID(RMuint8 stream, RMascii *str); virtual RMstatus GetCurrentAudioStream(RMuint8 *stream); virtual void SetSampleType() {}; virtual RMstatus SetStreamInfo(struct RMFileStreamInfo *streamInfo); protected: /** Reads the remote and return 1 or more digiut antered by user. If the key entered is not a digit, 0 is returned. @param rh : handle to the remote device. @param oneDigit : indicate if 1 or more digits need to be read. @return -1 if failed or canceles, user input otherwise. */ virtual int GetUserInputFromRemote(RMremoteHandle rh, RMbool oneDigit); /** Sends a message to the GUI or the OSD (if no GUI is present) @param message : message to send @param val : value correspoding to the specific message */ virtual RMstatus SendMessage(typeCuracaoMessage message, void *val); public: /** Returns TRUE if the player is displaying a menu where certain keys on the frontpanel should be interpreted as navigation keys. */ virtual RMbool IsMenu(); /** Returns the current speed of the media player @return current speed */ virtual RMint8 GetSpeed(); protected: typeCuracaoContext *m_context; RMbool m_initialized; RMuint32 m_speed; RMuint32 m_last_speed; typeMediaPlayerSate m_state; typeMediaPlayer m_type; public:// these should go into update media info virtual RMbool IsRepeatDisc() { return FALSE; } virtual RMbool IsRepeatTitle() { return FALSE; } virtual RMbool IsRepeatChapter() { return FALSE; } virtual RMbool IsRepeatA() { return FALSE; } virtual RMbool IsRepeatAB() { return FALSE; } virtual RMbool IsRepeatTrack() { return FALSE; } virtual RMbool IsRepeatTracks() { return FALSE; } // iso playlist? virtual RMbool IsRepeatEntry() { return FALSE; } // specific to VCD for now virtual RMbool IsRepeatRandom() { return FALSE; } virtual RMbool IsRepeatNone() { return TRUE; }};#endif // __RMMEDIAPLAYERIFACE_H__
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -