net_player_if.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. #ifndef __NET_PLAYER_IF_H__
  2. #define __NET_PLAYER_IF_H__
  3. #define NET_PLAYER_SUCCESS (0)
  4. #define NET_PLAYER_FAIL (-1)
  5. #define NETPLAYER_IF_PE_MP3_LYRIC_NOT_PRESENT_WARNING (1)
  6. #define NETPLAYER_IF_PE_TRICKMODE_NOT_SUPPORT_WARNING (2)
  7. #define NETPLAYER_IF_PE_UNSUPPORT_AUDIO_WARNING (3)
  8. #define NETPLAYER_IF_PE_NO_VIDEO_WARNING (4)
  9. typedef int (*Net_Player_MWCallback)(int, UINT32, UINT32);
  10. typedef struct Net_Player_PInfo_t_t_
  11. {
  12. UINT32 dParam;
  13. Net_Player_MWCallback pfPicCallback;
  14. Net_Player_MWCallback pfDlnaCallback;
  15. } Net_Player_PInfo_t;
  16. typedef struct Net_Player_AVInfo_t_t_
  17. {
  18. Net_Player_MWCallback pfAVCallback;
  19. Net_Player_MWCallback pfDlnaCallback;
  20. INT32 (*pfInitializePack)(char **pszBuf);
  21. INT32 (*pfPrepareData)(UINT32 dHandle,char *pszBuf,UINT32 dIndex); //pack for data.
  22. INT32 (*pfFinalizePack)(char *pszBuf);
  23. } Net_Player_AVInfo_t;
  24. typedef struct Net_Player_CustomInfo_t_
  25. {
  26. Net_Player_PInfo_t stPInfo;
  27. Net_Player_AVInfo_t stAVInfo;
  28. } Net_Player_CustomInfo_t;
  29. typedef enum Net_Player_IF_Mode_t_
  30. {
  31. NET_PLAYER_UNKNOWN = 0,
  32. NET_PLAYER_IF_P,
  33. NET_PLAYER_IF_AV
  34. } Net_Player_IF_Mode_t;
  35. //HONG.ZHANG 2013.03.30 add for AP playback mode record
  36. //must be sync with FMW filter definition
  37. typedef enum Net_Player_APPB_Mode_t_
  38. {
  39. NET_PLAYER_APPB_V,
  40. NET_PLAYER_APPB_A,
  41. NET_PLAYER_APPB_P,
  42. NET_PLAYER_APPB_UNKNOWN
  43. } Net_Player_APPB_Mode_t;
  44. typedef enum Net_Player_StreamMode_e_
  45. {
  46. NET_PLAYER_STREAM_FILE = 0,
  47. NET_PLAYER_STREAM_LIVE,
  48. NET_PLAYER_STREAM_END
  49. } Net_Player_StreamMode_e;
  50. typedef struct Net_Player_MediaInfo_
  51. {
  52. char* pUrl;
  53. char* pMetaData;
  54. char * trackDuration;//add by rui.l
  55. UINT64 dwFileSize;
  56. UINT32 Index;
  57. Net_Player_APPB_Mode_t eAPPB_mode;
  58. Net_Player_IF_Mode_t eMode;
  59. Net_Player_StreamMode_e eStreamMode;
  60. } Net_Player_MediaInfo;
  61. typedef struct Net_Player_AudStrmAttribute_t_
  62. {
  63. UINT32 dAudStrmIdx;
  64. void* pstAudStrmAttribute;
  65. } Net_Player_AudStrmAttribute_t;
  66. typedef enum Net_Player_Set_e_
  67. {
  68. NET_PLAYER_SET_NULL,
  69. // Photo Slideshow
  70. NET_PLAYER_SET_EFFECT,
  71. NET_PLAYER_SET_SLIDESHOW,
  72. NET_PLAYER_SET_SLIDETIME,
  73. NET_PLAYER_SET_ZOOMIN,
  74. NET_PLAYER_SET_ZOOMMOVE,
  75. NET_PLAYER_SET_ROTATION,
  76. NET_PLAYER_SET_CLEAR_FRAMBUFER,
  77. NET_PLAYER_SET_EFFECT_TYPE,
  78. NET_PLAYER_SET_AUDIOSTREAM,
  79. NET_PLAYER_SET_AUDIOCHANNEL,
  80. NET_PLAYER_SET_SUBPICONOFF,
  81. NET_PLAYER_SET_SUBPICCHANGE,
  82. NET_PLAYER_SET_WMKLOCKRULE,
  83. NET_PLAYER_SET_WMKUNLOCKRULE,
  84. NET_PLAYER_SET_MAX
  85. } Net_Player_Set_e;
  86. typedef enum Net_Player_Get_e_
  87. {
  88. NET_PLAYER_GET_NULL,
  89. NET_PLAYER_GET_ELAPSEDTIME,
  90. NET_PLAYER_GET_PLAYBACKINFO,
  91. NET_PLAYER_GET_CURRENTAUDIOSTREAMNUM,
  92. NET_PLAYER_GET_TOTALAUDIOSTREAMCOUNT,
  93. NET_PLAYER_GET_CURRENTAUDIOCHANNELNUM,
  94. NET_PLAYER_GET_TOTALAUDIOCHANNELCOUNT,
  95. NET_PLAYER_GET_TOTALSUBPICCOUNT,
  96. NET_PLAYER_GET_CURSUBPICONOFF,
  97. NET_PLAYER_GET_CURSUBPICSTREAM,
  98. NET_PLAYER_GET_AUDIOSTREAMATTRIBUTE,
  99. NET_PLAYER_GET_PICTURESTATE,//add by rui.l
  100. NET_PLAYER_GET_PICFRAMEINFO,
  101. NET_PLAYER_GET_CURRENTPOSITION,//add by rui.l 0411
  102. NET_PLAYER_GET_CURRENTTRACKSIZE,//add by rui.l0411
  103. NET_PLAYER_GET_PlaySpeed,
  104. NET_PLAYER_GET_MAX
  105. } Net_Player_Get_e;
  106. typedef struct Net_Player_Set_ZMInfo_t_
  107. {
  108. UINT32 MoveFactor;
  109. UINT16 wStep;
  110. UINT16 wDistance;
  111. } Net_Player_Set_ZMInfo_t;
  112. typedef enum
  113. {
  114. NET_PLAYER_CBK_NULL = 0,
  115. NET_PLAYER_CBK_GET_PRE_URL,
  116. NET_PLAYER_CBK_GET_NEXT_URL,
  117. NET_PLAYER_CBK_DRAW_LARGE_PIC_READY,
  118. NET_PLAYER_CBK_DECODE_PIC_DONE,
  119. NET_PLAYER_CBK_DRAW_LARGE_PIC_DONE,
  120. NET_PLAYER_CBK_DRAW_LARGE_PIC_ERROR,
  121. NET_PLAYER_CBK_DRAW_THUMBNAIL_DONE,
  122. NET_PLAYER_CBK_DRAW_THUMBNAIL_ERROR,
  123. NET_PLAYER_CBK_STARTUP_FAIL,
  124. NET_PLAYER_CBK_STARTUP_DONE,//10
  125. NET_PLAYER_CBK_SHOW_PLAY,
  126. NET_PLAYER_CBK_SHOW_STOP,
  127. NET_PLAYER_CBK_SHOW_STOP_FAIL, //add by jiang.hu for mantis 0159370
  128. NET_PLAYER_CBK_SHOW_PAUSE,
  129. NET_PLAYER_CBK_SHOW_PAUSE_FAIL,
  130. NET_PLAYER_CBK_SHOW_FF,
  131. NET_PLAYER_CBK_SHOW_FR,
  132. NET_PLAYER_CBK_SHOW_FR_FILE_BEIGIN,
  133. NET_PLAYER_CBK_SHOW_FF_FAIL,
  134. NET_PLAYER_CBK_SHOW_FR_FAIL,//20
  135. NET_PLAYER_CBK_SHOW_NEXT,
  136. NET_PLAYER_CBK_SHOW_PREV,
  137. NET_PLAYER_CBK_PLAY_DONE,
  138. NET_PLAYER_CBK_GOTO_DONE,
  139. NET_PLAYER_CBK_GOTO_FAIL,
  140. NET_PLAYER_CBK_CACHE_START,
  141. NET_PLAYER_CBK_CACHE_STOP,
  142. NET_PLAYER_CBK_PLAY_FINISH,
  143. NET_PLAYER_CBK_PLAY_START,// add for mantis 0160705
  144. NET_PLAYER_CBK_FINALIZE_DONE,//30
  145. NET_PLAYER_CBK_CHANGE2_NORMAL_PLAY_DONE,
  146. NET_PLAYER_CBK_PE_WARNING,
  147. NET_PLAYER_CBK_MAX,
  148. } NET_PLAYER_CbkMessage_t;
  149. typedef enum
  150. {
  151. DLNA_PLAYER_PIC_EVENT_DECODE_START = 0X0004FFFF, /*!< Picture Decode Start evnet*/
  152. DLNA_PLAYER_PIC_EVENT_DECODE_FINISH = 0X00040001, /*!< Picture Decode Finish evnet*/
  153. DLNA_PLAYER_PIC_EVENT_DECODE_STOP = 0X00040002, /*!< Picture Decode Finish evnet*/
  154. DLNA_PLAYER_PIC_EVENT_DECODE_ERROR = 0x0040007, /*!< Picture Decode Error*/
  155. DLNA_PLAYER_AV_EVENT_DECODE_START = 0X0001000F, /*!< Audio/Video Decode Start evnet*/
  156. DLNA_PLAYER_AV_EVENT_INITOK = 0X0001000D,
  157. DLNA_PLAYER_AV_EVENT_INIT_FAILED = 0X0001000C,
  158. DLNA_PLAYER_AV_EVENT_PLAY_DONE = 0X0001000E,
  159. DLNA_PLAYER_AV_EVENT_BUFFERING_START = 0X0001000A,
  160. DLNA_PLAYER_AV_EVENT_BUFFERING_END = 0X0001000B,
  161. DLNA_PLAYER_AV_EVENT_POOR_NETWORK = 0X00010010,
  162. DLNA_PLAYER_EVENT_END = 0X000FFFFF,
  163. } AL_DLNA_PLAYER_Event_t;
  164. #ifdef DLNA_BG_VERSION
  165. INT32 NET_Player_IF_MusicSel_SetMediaInfo(Net_Player_MediaInfo *MediaInfo);
  166. INT32 NET_Player_IF_MusicSel_Play(void);
  167. INT32 NET_Player_IF_MusicSel_Stop(void);
  168. INT32 NET_Player_IF_MusicSel_Pause(void);
  169. #endif
  170. void DLNA_MediaCtrl_NET_Player_PE_Event_Process(UINT32 event_id);
  171. void DLNA_MediaCtrl_NET_Player_PE_Register_MsgRouteway(BOOL (*SendMsg_Func)(AL_DLNA_PLAYER_Event_t));
  172. void DLNA_MediaCtrl_NET_Player_RegisterMsgRouteway(BOOL (*SendMsg_Func)(AL_DLNA_PLAYER_Event_t));
  173. INT32 NET_Player_IF_Initialize(Net_Player_CustomInfo_t* pstCusInfo);
  174. INT32 NET_Player_IF_Finalize(void);
  175. INT32 NET_Player_IF_SetMediaInfo(Net_Player_MediaInfo *MediaInfo);
  176. INT32 NET_Player_IF_Play(void);
  177. INT32 NET_Player_IF_Stop(void);
  178. INT32 NET_Player_IF_Pause(void);
  179. INT32 NET_Player_IF_FF(UINT32 dFactor);
  180. INT32 NET_Player_IF_FR(UINT32 dFactor);
  181. INT32 NET_Player_IF_Goto(UINT32 dSecond);
  182. INT32 NET_Player_IF_Next(void);
  183. INT32 NET_Player_IF_Prev(void);
  184. INT32 NET_Player_IF_Set(Net_Player_Set_e eSet, UINT32 dParam);
  185. INT32 NET_Player_IF_Get(Net_Player_Get_e eGet, UINT32 dParam);
  186. #endif