samp_nav.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:7k
源码类别:

DVD

开发平台:

Others

  1. /*******************************************************************************
  2. * Copyright(c) Philips Consumer Electronics B.V. 2001
  3. * The attached material and the information contained therein is proprietary
  4. * to Philips and is issued only under strict confidentiality arrangements.
  5. * It shall not be used, reproduced, copied in whole or in part, adapted,
  6. * modified, or disseminated without a written license of Philips.           
  7. * It must be returned to Philips upon its first request.
  8. *
  9. *  Project:        SA-MP ( Super Audio Media Player )
  10. *  File %name:     samp_nav.h %
  11. *  %version:       15 %
  12. *  %date_modified: Wed Oct 23 13:55:22 2002 %
  13. *  %derived_by:    potm %
  14. *  Creation date:  Fri Jun 15 09:42:50 2001
  15. *  First author:   klerxm
  16. *
  17. *  Advanced Systems and Applications Lab - Eindhoven
  18. *
  19. *  Continuus %full_filespec: samp_nav.h~15:incl:1 %
  20. *
  21. *  Description:    Exported header file of the Navigator
  22. *
  23. * Change history:
  24. *
  25. * Rev  Date       Who      Comments
  26. * ---- ---------- -------- -----------------------------------------------------
  27. *   1  2001-06-07 klerxm   Initial version
  28. *   2  2001-06-14 klerxm   Template update
  29. *   3  2001-08-21 novosadt Initial version
  30. *   4  2001-09-04 klerxm   Changes required for new global header files
  31. *   5  2001-10-25 novosadt Reserve events NAV_(NOT_)ACTIVATED
  32. *   6  2001-10-30 novosadt Corrected definition of NAV_ProgramListDef
  33. *   7  2001-12-10 novosadt Corrected definition of NAV_CHANNELS_CONFIG
  34. *   8  2001-12-12 novosadt Added NAV_GetState, NAV_PlayStateDef, NAV_StateDef
  35. *   9  2002-01-11 novosadt pointer in NAV_SetProgramList (PR277)
  36. *  10  2002-01-29 novosadt NAV_MODE_CHANGE added (PR230)
  37. *                          NAV_GetPlayList added (PR229)
  38. *  11  2002-02-20 novosadt NAV_WarningCodeDef (PR230)
  39. *  12  2002-05-14 potm     Replaced SACD_LogTrack with UInt8
  40. *  13  2002-06-07 klerxm   Added 'extern "C"'
  41. *  13  2002-10-23 novosadt NAV_ERROR_RETRIES, NAV_ERROR_RETRIES_MUTE removed 
  42. *                          (CR426)
  43. *                          NAV_ERROR_BE added to NAV_ErrorCodeDef (CR426)
  44. *                          NAV_PLAY_SEQ_TRACK added to NAV_PlaySequenceDe 
  45. *                          (CR437)
  46. *
  47. *******************************************************************************/
  48. #ifndef _SAMP_NAV_H
  49. #define _SAMP_NAV_H
  50. /*******************************************************************************
  51. *                                Include Files
  52. *******************************************************************************/
  53. #include "Playcoresampsamp_gen.h"
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. /*******************************************************************************
  58. *                              Macro Definitions
  59. *******************************************************************************/
  60. #define NAV_MAX_TRACK_NUMBER 25 //jerry todo: ask philips to change it back to 256.
  61. #define NAV_STARTED   (1 << 0)
  62. #define NAV_PAUSED          (1 << 1)
  63. #define NAV_STOPPED         (1 << 2)
  64. #define NAV_FINISHED        (1 << 3)
  65. #define NAV_PROGRESS_INFO   (1 << 4)
  66. #define NAV_ERROR           (1 << 5)
  67. #define NAV_CHANNELS_CONFIG (1 << 6)
  68. #define NAV_ACTIVATED       (1 << 7) /* reserved for NAV_ACTIVATED */
  69. #define NAV_NOT_ACTIVATED       (1 << 8) /* reserved for NAV_NOT_ACTIVATED */
  70. #define NAV_WARNING         (1 << 9)
  71. #define NAV_MODE_CHANGE     (1 << 10)
  72. /* 1394 event definitions */
  73. #define NAV_1394_CHANNELS_CONFIG (1 << 0)
  74. /*******************************************************************************
  75. *                              Type Definitions
  76. *******************************************************************************/
  77. typedef struct {
  78.   SAMP(UInt8) track;
  79.   SAMP(UInt8) index;
  80.   SAMP(SACD_TimeCode) abs_time;
  81.   SAMP(SACD_TimeCode) rel_time;
  82.   SAMP(Bool) pause;
  83. } SAMP(NAV_ProgressInfoDef);
  84. typedef enum {
  85.   SAMP(NAV_DIR_FORWARD),
  86.   SAMP(NAV_DIR_BACKWARD)
  87. } SAMP(NAV_DirectionDef);
  88. typedef enum {
  89.   SAMP(NAV_PLAY_SEQ_ALL),
  90.   SAMP(NAV_PLAY_SEQ_PROGRAM),
  91.   SAMP(NAV_PLAY_SEQ_TRACK)
  92. } SAMP(NAV_PlaySequenceDef);
  93. typedef enum {
  94.   SAMP(NAV_REPEAT_OFF),
  95.   SAMP(NAV_REPEAT_TRACK),
  96.   SAMP(NAV_REPEAT_ALL)
  97. } SAMP(NAV_RepeatModeDef);
  98. typedef enum {
  99.   SAMP(NAV_REPEAT_AB_OFF),
  100.   SAMP(NAV_REPEAT_AB_A),
  101.   SAMP(NAV_REPEAT_AB_AB)
  102. } SAMP(NAV_RepeatABModeDef);
  103. typedef enum {
  104.   SAMP(NAV_ERROR_FATAL),
  105.   SAMP(NAV_ERROR_OS),
  106.   SAMP(NAV_ERROR_BE)
  107. } SAMP(NAV_ErrorCodeDef);
  108. typedef enum {
  109.   SAMP(NAV_WARNING_RETRIES),
  110.   SAMP(NAV_WARNING_MUTED),
  111.   SAMP(NAV_WARNING_DEMUTED),
  112.   SAMP(NAV_WARNING_DECODER_ERROR),
  113.   SAMP(NAV_WARNING_SKIP)
  114. } SAMP(NAV_WarningCodeDef);
  115. typedef struct {
  116.   SAMP(UInt8) NumberOfTracks;
  117.   SAMP(UInt8) tracks[NAV_MAX_TRACK_NUMBER];
  118. } SAMP(NAV_ProgramListDef);
  119. typedef struct {
  120.   SAMP(Bool) reshuffled;
  121.   SAMP(Bool) repeat_ab_canceled;
  122. } SAMP(NAV_ModeChangeDef);
  123. typedef void (*SAMP(NAV_CallbackDef))(SAMP(BitSet32) Event, void* EventData);
  124. typedef enum {
  125.   SAMP(NAV_NOT_ACTIVATED),
  126.   SAMP(NAV_ACTIVATING),
  127.   SAMP(NAV_DEACTIVATED),
  128.   SAMP(NAV_STOP_CALLED),
  129.   SAMP(NAV_STOPPED),  //todo: check why it's disabled by Philips.
  130.   SAMP(NAV_PLAY_CALLED),
  131.   SAMP(NAV_PLAYING),
  132.   SAMP(NAV_PAUSE_CALLED),
  133.   SAMP(NAV_PAUSED)  //todo: check why it's disabled by Philips.
  134. } SAMP(NAV_PlayStateDef);
  135. typedef struct {
  136.   SAMP(NAV_PlayStateDef)    PlayState;
  137.   SAMP(NAV_PlaySequenceDef) PlaySequence;
  138.   SAMP(NAV_RepeatModeDef)   RepeatMode;
  139.   SAMP(NAV_RepeatABModeDef) RepeatABMode;
  140.   SAMP(Bool)                IntroOn;
  141.   SAMP(Bool)                ShuffleOn;
  142.   SAMP(Int16)               PlaySpeed;
  143. } SAMP(NAV_StateDef);
  144. /*******************************************************************************
  145. *                            Functions Prototypes
  146. *******************************************************************************/
  147. SAMP(ErrCode) SAMP(NAV_AreaSwitch)(SAMP(SACD_Area) Area);
  148. SAMP(ErrCode) SAMP(NAV_PlayAtTimecode)(SAMP(SACD_TimeCode) Timecode);
  149. SAMP(ErrCode) SAMP(NAV_PlayTrack)(SAMP(UInt16) track, SAMP(UInt16) index);
  150. SAMP(ErrCode) SAMP(NAV_Stop)(void);
  151. SAMP(ErrCode) SAMP(NAV_Pause)(void);
  152. SAMP(ErrCode) SAMP(NAV_ResumePlay)(void);
  153. SAMP(ErrCode) SAMP(NAV_NextTrack)(void);
  154. SAMP(ErrCode) SAMP(NAV_PreviousTrack)(void);
  155. SAMP(ErrCode) SAMP(NAV_ForwardScan)(SAMP(UInt8) Speed);
  156. SAMP(ErrCode) SAMP(NAV_BackwardScan)(SAMP(UInt8) Speed);
  157. SAMP(ErrCode) SAMP(NAV_Repeat)(SAMP(NAV_RepeatModeDef) RepeatMode);
  158. SAMP(ErrCode) SAMP(NAV_RepeatAB)(SAMP(NAV_RepeatABModeDef) RepeatABMode);
  159. SAMP(ErrCode) SAMP(NAV_Shuffle)(SAMP(Bool) ShuffleMode);
  160. SAMP(ErrCode) SAMP(NAV_IntroScan)(SAMP(Bool) IntroScanMode, SAMP(UInt8) Duration);
  161. SAMP(ErrCode) SAMP(NAV_SetPlaySequence)(SAMP(NAV_PlaySequenceDef) PlaySequence);
  162. SAMP(ErrCode) SAMP(NAV_SetProgramList)(SAMP(NAV_ProgramListDef) *ProgramList);
  163. SAMP(ErrCode) SAMP(NAV_Subscribe)(SAMP(NAV_CallbackDef) Callback, SAMP(BitSet32) Events);
  164. SAMP(ErrCode) SAMP(NAV_Subscribe_1394)(SAMP(NAV_CallbackDef) Callback, SAMP(BitSet32) Events);
  165. SAMP(ErrCode) SAMP(NAV_GetState)(SAMP(NAV_StateDef) *PState);
  166. SAMP(ErrCode) SAMP(NAV_GetPlayList)(SAMP(NAV_ProgramListDef) *ProgramList);
  167. #ifdef __cplusplus
  168. }
  169. #endif
  170. #endif /* _SAMP_NAV_H */
  171. /*******************************************************************************
  172. *                                End of File
  173. *******************************************************************************/