samp_nav.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:7k
- /*******************************************************************************
- * Copyright(c) Philips Consumer Electronics B.V. 2001
- * The attached material and the information contained therein is proprietary
- * to Philips and is issued only under strict confidentiality arrangements.
- * It shall not be used, reproduced, copied in whole or in part, adapted,
- * modified, or disseminated without a written license of Philips.
- * It must be returned to Philips upon its first request.
- *
- * Project: SA-MP ( Super Audio Media Player )
- * File %name: samp_nav.h %
- * %version: 15 %
- * %date_modified: Wed Oct 23 13:55:22 2002 %
- * %derived_by: potm %
- * Creation date: Fri Jun 15 09:42:50 2001
- * First author: klerxm
- *
- * Advanced Systems and Applications Lab - Eindhoven
- *
- * Continuus %full_filespec: samp_nav.h~15:incl:1 %
- *
- * Description: Exported header file of the Navigator
- *
- * Change history:
- *
- * Rev Date Who Comments
- * ---- ---------- -------- -----------------------------------------------------
- * 1 2001-06-07 klerxm Initial version
- * 2 2001-06-14 klerxm Template update
- * 3 2001-08-21 novosadt Initial version
- * 4 2001-09-04 klerxm Changes required for new global header files
- * 5 2001-10-25 novosadt Reserve events NAV_(NOT_)ACTIVATED
- * 6 2001-10-30 novosadt Corrected definition of NAV_ProgramListDef
- * 7 2001-12-10 novosadt Corrected definition of NAV_CHANNELS_CONFIG
- * 8 2001-12-12 novosadt Added NAV_GetState, NAV_PlayStateDef, NAV_StateDef
- * 9 2002-01-11 novosadt pointer in NAV_SetProgramList (PR277)
- * 10 2002-01-29 novosadt NAV_MODE_CHANGE added (PR230)
- * NAV_GetPlayList added (PR229)
- * 11 2002-02-20 novosadt NAV_WarningCodeDef (PR230)
- * 12 2002-05-14 potm Replaced SACD_LogTrack with UInt8
- * 13 2002-06-07 klerxm Added 'extern "C"'
- * 13 2002-10-23 novosadt NAV_ERROR_RETRIES, NAV_ERROR_RETRIES_MUTE removed
- * (CR426)
- * NAV_ERROR_BE added to NAV_ErrorCodeDef (CR426)
- * NAV_PLAY_SEQ_TRACK added to NAV_PlaySequenceDe
- * (CR437)
- *
- *******************************************************************************/
- #ifndef _SAMP_NAV_H
- #define _SAMP_NAV_H
- /*******************************************************************************
- * Include Files
- *******************************************************************************/
- #include "Playcoresampsamp_gen.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*******************************************************************************
- * Macro Definitions
- *******************************************************************************/
- #define NAV_MAX_TRACK_NUMBER 25 //jerry todo: ask philips to change it back to 256.
- #define NAV_STARTED (1 << 0)
- #define NAV_PAUSED (1 << 1)
- #define NAV_STOPPED (1 << 2)
- #define NAV_FINISHED (1 << 3)
- #define NAV_PROGRESS_INFO (1 << 4)
- #define NAV_ERROR (1 << 5)
- #define NAV_CHANNELS_CONFIG (1 << 6)
- #define NAV_ACTIVATED (1 << 7) /* reserved for NAV_ACTIVATED */
- #define NAV_NOT_ACTIVATED (1 << 8) /* reserved for NAV_NOT_ACTIVATED */
- #define NAV_WARNING (1 << 9)
- #define NAV_MODE_CHANGE (1 << 10)
- /* 1394 event definitions */
- #define NAV_1394_CHANNELS_CONFIG (1 << 0)
- /*******************************************************************************
- * Type Definitions
- *******************************************************************************/
- typedef struct {
- SAMP(UInt8) track;
- SAMP(UInt8) index;
- SAMP(SACD_TimeCode) abs_time;
- SAMP(SACD_TimeCode) rel_time;
- SAMP(Bool) pause;
- } SAMP(NAV_ProgressInfoDef);
- typedef enum {
- SAMP(NAV_DIR_FORWARD),
- SAMP(NAV_DIR_BACKWARD)
- } SAMP(NAV_DirectionDef);
- typedef enum {
- SAMP(NAV_PLAY_SEQ_ALL),
- SAMP(NAV_PLAY_SEQ_PROGRAM),
- SAMP(NAV_PLAY_SEQ_TRACK)
- } SAMP(NAV_PlaySequenceDef);
- typedef enum {
- SAMP(NAV_REPEAT_OFF),
- SAMP(NAV_REPEAT_TRACK),
- SAMP(NAV_REPEAT_ALL)
- } SAMP(NAV_RepeatModeDef);
- typedef enum {
- SAMP(NAV_REPEAT_AB_OFF),
- SAMP(NAV_REPEAT_AB_A),
- SAMP(NAV_REPEAT_AB_AB)
- } SAMP(NAV_RepeatABModeDef);
- typedef enum {
- SAMP(NAV_ERROR_FATAL),
- SAMP(NAV_ERROR_OS),
- SAMP(NAV_ERROR_BE)
- } SAMP(NAV_ErrorCodeDef);
- typedef enum {
- SAMP(NAV_WARNING_RETRIES),
- SAMP(NAV_WARNING_MUTED),
- SAMP(NAV_WARNING_DEMUTED),
- SAMP(NAV_WARNING_DECODER_ERROR),
- SAMP(NAV_WARNING_SKIP)
- } SAMP(NAV_WarningCodeDef);
- typedef struct {
- SAMP(UInt8) NumberOfTracks;
- SAMP(UInt8) tracks[NAV_MAX_TRACK_NUMBER];
- } SAMP(NAV_ProgramListDef);
- typedef struct {
- SAMP(Bool) reshuffled;
- SAMP(Bool) repeat_ab_canceled;
- } SAMP(NAV_ModeChangeDef);
- typedef void (*SAMP(NAV_CallbackDef))(SAMP(BitSet32) Event, void* EventData);
- typedef enum {
- SAMP(NAV_NOT_ACTIVATED),
- SAMP(NAV_ACTIVATING),
- SAMP(NAV_DEACTIVATED),
- SAMP(NAV_STOP_CALLED),
- SAMP(NAV_STOPPED), //todo: check why it's disabled by Philips.
- SAMP(NAV_PLAY_CALLED),
- SAMP(NAV_PLAYING),
- SAMP(NAV_PAUSE_CALLED),
- SAMP(NAV_PAUSED) //todo: check why it's disabled by Philips.
- } SAMP(NAV_PlayStateDef);
- typedef struct {
- SAMP(NAV_PlayStateDef) PlayState;
- SAMP(NAV_PlaySequenceDef) PlaySequence;
- SAMP(NAV_RepeatModeDef) RepeatMode;
- SAMP(NAV_RepeatABModeDef) RepeatABMode;
- SAMP(Bool) IntroOn;
- SAMP(Bool) ShuffleOn;
- SAMP(Int16) PlaySpeed;
- } SAMP(NAV_StateDef);
- /*******************************************************************************
- * Functions Prototypes
- *******************************************************************************/
- SAMP(ErrCode) SAMP(NAV_AreaSwitch)(SAMP(SACD_Area) Area);
- SAMP(ErrCode) SAMP(NAV_PlayAtTimecode)(SAMP(SACD_TimeCode) Timecode);
- SAMP(ErrCode) SAMP(NAV_PlayTrack)(SAMP(UInt16) track, SAMP(UInt16) index);
- SAMP(ErrCode) SAMP(NAV_Stop)(void);
- SAMP(ErrCode) SAMP(NAV_Pause)(void);
- SAMP(ErrCode) SAMP(NAV_ResumePlay)(void);
- SAMP(ErrCode) SAMP(NAV_NextTrack)(void);
- SAMP(ErrCode) SAMP(NAV_PreviousTrack)(void);
- SAMP(ErrCode) SAMP(NAV_ForwardScan)(SAMP(UInt8) Speed);
- SAMP(ErrCode) SAMP(NAV_BackwardScan)(SAMP(UInt8) Speed);
- SAMP(ErrCode) SAMP(NAV_Repeat)(SAMP(NAV_RepeatModeDef) RepeatMode);
- SAMP(ErrCode) SAMP(NAV_RepeatAB)(SAMP(NAV_RepeatABModeDef) RepeatABMode);
- SAMP(ErrCode) SAMP(NAV_Shuffle)(SAMP(Bool) ShuffleMode);
- SAMP(ErrCode) SAMP(NAV_IntroScan)(SAMP(Bool) IntroScanMode, SAMP(UInt8) Duration);
- SAMP(ErrCode) SAMP(NAV_SetPlaySequence)(SAMP(NAV_PlaySequenceDef) PlaySequence);
- SAMP(ErrCode) SAMP(NAV_SetProgramList)(SAMP(NAV_ProgramListDef) *ProgramList);
- SAMP(ErrCode) SAMP(NAV_Subscribe)(SAMP(NAV_CallbackDef) Callback, SAMP(BitSet32) Events);
- SAMP(ErrCode) SAMP(NAV_Subscribe_1394)(SAMP(NAV_CallbackDef) Callback, SAMP(BitSet32) Events);
- SAMP(ErrCode) SAMP(NAV_GetState)(SAMP(NAV_StateDef) *PState);
- SAMP(ErrCode) SAMP(NAV_GetPlayList)(SAMP(NAV_ProgramListDef) *ProgramList);
- #ifdef __cplusplus
- }
- #endif
- #endif /* _SAMP_NAV_H */
- /*******************************************************************************
- * End of File
- *******************************************************************************/