mid_playback.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. /*! \addtogroup playback
  2. * @{
  3. */
  4. /******************************************************************************/
  5. /**
  6. *
  7. * \file mid_playback.h
  8. *
  9. * \brief middle-ware of digital TV playback.
  10. *
  11. * \note Copyright (c) 2008 Sunplus Technology Co., Ltd. \n
  12. * All rights reserved.
  13. *
  14. * \author EMI
  15. */
  16. /******************************************************************************/
  17. #ifndef _MID_PLAYBACK_H_
  18. #define _MID_PLAYBACK_H_
  19. #include "types.h"
  20. //#include "config_sys.h"
  21. #include "cdbi.h"
  22. #include "mid_common.h"
  23. #ifdef CONFIG_DVB_SYSTEM_DVBS_SUPPORT
  24. #include "middleware/dtv/dtvdvbs/mid_sat_antenna.h"
  25. #endif
  26. /******************************************************************************/
  27. /**
  28. * \brief Playback Programe State
  29. */
  30. typedef enum _mid_playback_prog_state
  31. {
  32. MID_PLAYBK_PROG_STATE_NORMAL = 0, /*!< \brief program state is NORMAL */
  33. MID_PLAYBK_PROG_STATE_AUDIO_VIDEO_SCRAMBLED, /*!< \brief program state is SCRAMBLED */
  34. MID_PLAYBK_PROG_STATE_ONLY_VIDEO_SCRAMBLED, /*!< \brief program state is SCRAMBLED */
  35. MID_PLAYBK_PROG_STATE_ONLY_AUDIO_SCRAMBLED, /*!< \brief program state is SCRAMBLED */
  36. MID_PLAYBK_PROG_STATE_LOCKED, /*!< \brief program state is LOCKED */
  37. MID_PLAYBK_PROG_STATE_TEMP_SERVICE, /*!< \brief program state is TEMP SERVICE */
  38. MID_PLAYBK_PROG_STATE_VIDEO_AVC, /*!< \brief program state is VIDEO AVC */
  39. MID_PLAYBK_PROG_STATE_VIDEO_MPEG4, /*!< \brief program state is VIDEO MPEG4 */
  40. MID_PLAYBK_PROG_STATE_NOT_RUNNING, /*!< \brief program state is service not running */
  41. MID_PLAYBK_PROG_STATE_REPLACE, /*!< \brief program state is replace service */
  42. }MID_PlaybackProgState_t; /*!<program status */
  43. /**
  44. * \brief Playback Change Pid
  45. */
  46. typedef enum _mid_playback_change_pid
  47. {
  48. MID_PLAYBK_CHANGE_VIDPID = 0, /*!< \brief change video PID */
  49. MID_PLAYBK_CHANGE_AUDPID, /*!< \brief change audio PID */
  50. MID_PLAYBK_CHANGE_SECAUDPID, /*!< \brief change second audio PID */ // ifdef SUPPORT_DUAL_DSP
  51. MID_PLAYBK_CHANGE_PCRPID, /*!< \brief change PCR PID */
  52. }MID_PlaybackChangePid_t; /*!<program pid change */
  53. /**
  54. * \brief Playback Elementary Stream Info Structure
  55. */
  56. typedef struct _mid_playback_elementary_stream_info
  57. {
  58. UINT8 bHasData; /*!< \brief If elementary stream has data */
  59. UINT8 bIsScrambled; /*!< \brief If elementary stream scrambled */
  60. // for video attribute +
  61. UINT8 bIsMpeg2; /*!< \brief is mpeg2 video? */
  62. UINT8 bIsDecoded; /*!< \brief has video frame decoded? */
  63. UINT16 usWidth; /*!< \brief width*/
  64. UINT16 usHeight; /*!< \brief height*/
  65. UINT32 dFrameRate; /*!< \brief frame-rate, defined in viddec.h MPEG_FRAME_RATE_2997, MPEG_FRAME_RATE_XXX....*/
  66. UINT8 ucAspectRatio; /*!< \brief aspect ratio of video frame*/
  67. UINT8 ucAfd; /*!< \brief active format*/
  68. // -
  69. UINT8 copyright; /*!< \brief PES copyright flag*/
  70. //add arthur_20110809
  71. UINT8 ucProgressive; /*!< \brief Video Progressive Sequence*/
  72. //arthur end
  73. }MID_PlaybackStreamInfo_t; /*!< stream information for playback*/
  74. /******************************************************************************/
  75. /*! \defgroup playback_Initialize Initialize
  76. * \brief Init and Uninit playback
  77. * @{ */
  78. /******************************************************************************/
  79. /**
  80. * \fn MID_Status_t MID_PlaybackInit(void)
  81. *
  82. * \param none.
  83. *
  84. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  85. *
  86. * \note Description: \n
  87. * Initialization presentation engine for playback module using.
  88. *
  89. * \note Restrictions: none.
  90. */
  91. /******************************************************************************/
  92. MID_Status_t MID_PlaybackInit(void);
  93. /******************************************************************************/
  94. /**
  95. * \fn void MID_PlaybackUninit(void)
  96. *
  97. * \param none.
  98. *
  99. * \return none.
  100. *
  101. * \note Description: \n
  102. * Uninit presentation engine.
  103. *
  104. * \note Restrictions: none.
  105. */
  106. /******************************************************************************/
  107. void MID_PlaybackUninit(void);
  108. /******************************************************************************/
  109. /*! @} end of defgroup Initialize */
  110. /******************************************************************************/
  111. /*! \defgroup playback_Operation Operation
  112. * \brief operation ( e.g. play, pause, stop ) functions
  113. * @{ */
  114. /*******************************************************************************************/
  115. /**
  116. * \fn MID_Status_t MID_PlaybackConnectTp(CDBIHandle_t hTPHandle)
  117. *
  118. * \param hTPHandle: CDBIHandle_t of TP
  119. *
  120. * \return DRV_SUCCESS if successful, warning or error code if function failed
  121. *
  122. * \note Description:
  123. *
  124. * \note Restrictions: none.
  125. *
  126. ********************************************************************************************/
  127. MID_Status_t MID_PlaybackConnectTp(CDBIHandle_t hTPHandle, CDBIHandle_t hSrvHandle);
  128. /******************************************************************************/
  129. /**
  130. * \fn MID_Status_t MID_PlaybackPlay(CDBIHandle_t hProgramHandle, MID_PlaybackProgState_t ePlayProgState)
  131. *
  132. * \param hProgramHandle: CDBIHandle_t of program
  133. * \param ePlayProgState : the state of the program wanted to playback
  134. *
  135. * \return DRV_SUCCESS if successful, warning or error code if function failed
  136. *
  137. * \note Description: \n
  138. * 1.Get NIM parameter from data base by CDBIHandle_t from application. \n
  139. * 2.Set all NIM parameter to NIM drivers. \n
  140. * 3.Get program detials information from data base by CDBIHandle_t from application. \n
  141. * 4.Set program parameter to demux and A/V drivers.
  142. *
  143. * \note Restrictions: none.
  144. */
  145. /******************************************************************************/
  146. #ifdef CONFIG_SUPPORT_BISS
  147. MID_Status_t MID_PlaybackPlay(CDBIHandle_t hProgramHandle, MID_PlaybackProgState_t ePlayProgState, UINT64 bBissKey);
  148. #else
  149. MID_Status_t MID_PlaybackPlay(CDBIHandle_t hProgramHandle, MID_PlaybackProgState_t ePlayProgState);
  150. #endif
  151. /******************************************************************************/
  152. /**
  153. * \fn MID_Status_t MID_PlaybackStopEx(int bFifoStop, CDBIHandle_t hNextProg)
  154. *
  155. * \param bFifoStop if need to stop demux FIFO
  156. * \param hNextProg Next program which needs pre-connect
  157. *
  158. * \return DRV_SUCCESS if successful, warning or error code if function failed
  159. *
  160. * \note Support Pre-connect next program.
  161. *
  162. * \note Description: \n
  163. * 1. Stop demux fifo \n
  164. * 2. Pre-connect next program \n
  165. * 3. close video/audio/pcr channel \n
  166. * 4. close demux \n
  167. * 5. flush AV \n
  168. * if hNextProg = 0 will not pre-connect next program \n
  169. *
  170. * \note Restrictions: none.
  171. */
  172. /******************************************************************************/
  173. MID_Status_t MID_PlaybackStopEx(CDBIHandle_t hNextProg);
  174. /******************************************************************************/
  175. /**
  176. * \fn MID_Status_t MID_PlaybackStop(int bFifoStop)
  177. *
  178. * \param bFifoStop Doesn't need to stop demux FIFO?
  179. *
  180. * \return DRV_SUCCESS if successful, warning or error code if function failed
  181. *
  182. * \note Description: \n
  183. * 1. Stop demux fifo \n
  184. * 2. close video/audio/pcr channel \n
  185. * 3. flush AV \n
  186. *
  187. * \note Restrictions: none.
  188. */
  189. /******************************************************************************/
  190. MID_Status_t MID_PlaybackStop(int bFifoStop);
  191. /******************************************************************************/
  192. /*! \defgroup playback_Operation_AV AV
  193. * \brief audio and video related operation
  194. * @{ */
  195. /******************************************************************************/
  196. /**
  197. * \fn MID_Status_t MID_PlaybackStartAVOnly(void)
  198. *
  199. * \param none.
  200. *
  201. * \return DRV_SUCCESS if successful, warning or error code if function failed
  202. *
  203. * \note Description: \n
  204. * DTV playback start av channel only. \n
  205. * for dynamic detecting scrambled or locked channel transits to normal channel.
  206. *
  207. * \note Restrictions: none.
  208. */
  209. /******************************************************************************/
  210. MID_Status_t MID_PlaybackStartAVOnly(void);
  211. /*******************************************************************************************/
  212. /**
  213. * \fn MID_Status_t MID_PlaybackStopAVOnly(void)
  214. *
  215. * \param none.
  216. *
  217. * \return DRV_SUCCESS if successful, warning or error code if function failed
  218. *
  219. * \note Description:
  220. * DTV playback stop av channel only.
  221. * for dynamic detecting normal channel transits to scrambled & locked channel.
  222. *
  223. * \note Restrictions: none.
  224. */
  225. /******************************************************************************/
  226. MID_Status_t MID_PlaybackStopAVOnly(void);
  227. /******************************************************************************/
  228. /*! @} end of defgroup AV */
  229. /******************************************************************************/
  230. /**
  231. * \fn MID_Status_t MID_PlaybackStreamPause(UINT8 bVideo)
  232. *
  233. * \param bVideo: 1 for streaming pause video, 0 for streaming pause audio
  234. *
  235. * \return DRV_SUCCESS if successful, warning or error code if function failed
  236. *
  237. * \note Description: \n
  238. * DTV playback resume to normal playback video or audio only.
  239. * The streaming pause means video or audio enter frozen status but background is still decoding
  240. * video or audio data.
  241. *
  242. * \note Restrictions: none.
  243. */
  244. /******************************************************************************/
  245. MID_Status_t MID_PlaybackStreamPause(UINT8 bVideo);
  246. /******************************************************************************/
  247. /**
  248. * \fn MID_Status_t MID_PlaybackStreamResume(UINT8 bVideo)
  249. *
  250. * \param bVideo: 1 for streaming resume video, 0 for streaming resum audio
  251. *
  252. * \return DRV_SUCCESS if successful, warning or error code if function failed
  253. *
  254. * \note Description: \n
  255. * DTV playback resume to normal playback video or audio only.
  256. *
  257. * \note Restrictions: none.
  258. */
  259. /******************************************************************************/
  260. MID_Status_t MID_PlaybackStreamResume(UINT8 bVideo);
  261. /******************************************************************************/
  262. /**
  263. * \fn MID_Status_t MID_PlaybackPause(void)
  264. *
  265. * \param none.
  266. *
  267. * \return DRV_SUCCESS if successful, warning or error code if function failed
  268. *
  269. * \note Description: \n
  270. * DTV playback Pause.
  271. *
  272. * \note Restrictions: none.
  273. */
  274. /******************************************************************************/
  275. MID_Status_t MID_PlaybackPause(void);
  276. /******************************************************************************/
  277. /**
  278. * \fn MID_Status_t MID_PlaybackResume(void)
  279. *
  280. * \param none.
  281. *
  282. * \return DRV_SUCCESS if successful, warning or error code if function failed
  283. *
  284. * \note Description: \n
  285. * DTV playback resume to normal playback.
  286. *
  287. * \note Restrictions: none.
  288. */
  289. /******************************************************************************/
  290. MID_Status_t MID_PlaybackResume(void);
  291. /******************************************************************************/
  292. /*! @} end of defgroup Operation */
  293. /******************************************************************************/
  294. /*! \defgroup playback_Get_Handle Get CDBIHandle_t
  295. * \brief Get program CDBIHandle_t
  296. * @{ */
  297. /******************************************************************************/
  298. /**
  299. * \fn MID_Status_t MID_PlaybackGetCurProgHandle(UINT32 *pu32TvRadioType, CDBIHandle_t *phProg)
  300. *
  301. * \param pu32TvRadioType : Pointer to the service type of current playback program \n
  302. * \param phProg : Pointer to the CDBIHandle_t of current playback program
  303. *
  304. * \return DRV_SUCCESS if successful, warning or error code if function failed
  305. *
  306. * \note Description: \n
  307. * To get the current playback program index
  308. *
  309. * \note Restrictions: none.
  310. */
  311. /******************************************************************************/
  312. MID_Status_t MID_PlaybackGetCurProgHandle(UINT32 *pu32TvRadioType, CDBIHandle_t *phProg);
  313. MID_Status_t MID_PlaybackSetCurProgHandle(UINT32 *pu32TvRadioType, CDBIHandle_t *phProg);
  314. /******************************************************************************/
  315. /*! @} end of defgroup Get CDBIHandle_t */
  316. /******************************************************************************/
  317. /*! \defgroup playback_Clear_screan Clear Screan
  318. * \brief clear screen related function
  319. * @{ */
  320. /******************************************************************************/
  321. /**
  322. * \fn void MID_PlaybackSetClearScreen(Boolean bAutoClear)
  323. *
  324. * \param bAutoClear: auto clear video frame after stop program.
  325. *
  326. * \return none.
  327. *
  328. * \note Description: \n
  329. * Set auto clear flag for playback stop.
  330. *
  331. * \note Restrictions: none.
  332. */
  333. /******************************************************************************/
  334. void MID_PlaybackSetClearScreen(bool bAutoClear);
  335. /******************************************************************************/
  336. /*! @} end of defgroup Clear Screan */
  337. /******************************************************************************/
  338. /*! \defgroup playback_Setting_Function Setting Functions
  339. * \brief setting frequency, PID ,and so on.
  340. * @{ */
  341. /******************************************************************************/
  342. /**
  343. * \fn void MID_PlaybackResetPreFrequency(void)
  344. *
  345. * \param none.
  346. *
  347. * \return none.
  348. *
  349. * \note Description: \n
  350. * Reset the recently frequency stored in playback module.
  351. *
  352. * \note Restrictions: none.
  353. */
  354. /******************************************************************************/
  355. void MID_PlaybackResetPreFrequency(void);
  356. #ifdef CONFIG_DVB_SYSTEM_DVBT2_SUPPORT
  357. /*******************************************************************************************/
  358. /**
  359. * \fn void MID_PlaybackResetPrePLPId(void)
  360. *
  361. * \param none.
  362. *
  363. * \return none.
  364. *
  365. * \note Description:
  366. * Reset the recently plp id stored in playback module.
  367. *
  368. * \note Restrictions: none.
  369. *
  370. ********************************************************************************************/
  371. void MID_PlaybackResetPrePLPId(void);
  372. #endif
  373. /******************************************************************************/
  374. /**
  375. * \fn void MID_PlaybackChangePid(MID_PlaybackChangePid_t eChangeType, UINT32 u32Param)
  376. *
  377. * \param eChangeType: The pid type changed.
  378. * \param u32Param : The related parameter about the pid changed.
  379. *
  380. * \return none.
  381. *
  382. * \note Description: \n
  383. * CDBIHandle_t the pid changing about playback related.
  384. *
  385. * \note Restrictions: none.
  386. */
  387. /******************************************************************************/
  388. MID_Status_t MID_PlaybackChangePid(MID_PlaybackChangePid_t eChangeType, UINT32 u32Param);
  389. /******************************************************************************/
  390. /*! @} end of defgroup Setting Function */
  391. /******************************************************************************/
  392. /*! \defgroup playback_Query_Info Query Info
  393. * \brief query playback related Info.
  394. * @{ */
  395. /******************************************************************************/
  396. /**
  397. * \fn Boolean MID_PlaybackHasInit(void)
  398. *
  399. * \param none.
  400. *
  401. * \return none.
  402. *
  403. * \note Description:
  404. * Does Playback has initialize?
  405. *
  406. * \note Restrictions: none.
  407. */
  408. /******************************************************************************/
  409. bool MID_PlaybackHasInit(void);
  410. /******************************************************************************/
  411. /**
  412. * \fn Boolean MID_PlaybackIsPlaying(void)
  413. *
  414. * \param none.
  415. *
  416. * \return TRUE : Playback is playing
  417. * FALSE : Playback is not playing
  418. *
  419. * \note Description: \n
  420. * Is current playing?
  421. *
  422. * \note Restrictions: none.
  423. */
  424. /******************************************************************************/
  425. bool MID_PlaybackIsPlaying(void);
  426. /******************************************************************************/
  427. /**
  428. * \fn MID_Status_t MID_PlaybackGetVideoStreamInfo(MID_PlaybackStreamInfo_t *pstStreamInfo, int nTimeout)
  429. *
  430. * \param pstStreamInfo : pointer of return info.
  431. * \param nTimeout : timeout count.
  432. *
  433. * \return DTV_DRV_SUCCESS if successful, warning or error code if function failed.
  434. *
  435. * \note Description: \n
  436. * Get current playing video stream info.
  437. *
  438. * \note Restrictions: none.
  439. */
  440. /******************************************************************************/
  441. MID_Status_t MID_PlaybackGetVideoStreamInfo(MID_PlaybackStreamInfo_t *pstStreamInfo, int nTimeout);
  442. /******************************************************************************/
  443. /**
  444. * \fn MID_Status_t MID_PlaybackGetAudioStreamInfo(MID_PlaybackStreamInfo_t *pstStreamInfo, int nTimeout)
  445. *
  446. * \param pstStreamInfo : pointer of return info.
  447. * \param nTimeout : timeout count.
  448. *
  449. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  450. *
  451. * \note Description: \n
  452. * Get current playing audio stream info.
  453. *
  454. * \note Restrictions: none.
  455. */
  456. /******************************************************************************/
  457. MID_Status_t MID_PlaybackGetAudioStreamInfo(MID_PlaybackStreamInfo_t *pstStreamInfo, int nTimeout);
  458. /******************************************************************************/
  459. /*! @} end of defgroup Query Info */
  460. /******************************************************************************/
  461. /*! \defgroup playback_Operation Operation
  462. * @{ */
  463. /******************************************************************************/
  464. /*! \defgroup playback_Operation_Video Video
  465. * \brief video only related operation
  466. * @{ */
  467. /******************************************************************************/
  468. /**
  469. * \fn MID_Status_t MID_PlaybackStartVideo(UINT16 usPID, UINT16 usPCR, unsigned short usCodec)
  470. *
  471. * \param usPID : video PID.
  472. * \param usPCR : related PCR PID.
  473. * \param usCodec : video codec.
  474. *
  475. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  476. *
  477. * \note Description: \n
  478. * DTV playback start video channel only. \n
  479. *
  480. * \note Restrictions: none.
  481. */
  482. /******************************************************************************/
  483. MID_Status_t MID_PlaybackStartVideo(UINT16 usPID, UINT16 usPCR, unsigned short usCodec);
  484. /******************************************************************************/
  485. /**
  486. * \fn MID_Status_t MID_PlaybackStopVideo(UINT8 bClearFrame)
  487. *
  488. * \param bClearFrame : 1: needs to clear frame, 0: DOESN'T need to clear frame
  489. *
  490. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  491. *
  492. * \note Description: \n
  493. * DTV playback stop video channel only. \n
  494. *
  495. * \note Restrictions: none.
  496. */
  497. /******************************************************************************/
  498. MID_Status_t MID_PlaybackStopVideo(UINT8 bClearFrame);
  499. /******************************************************************************/
  500. /*! @} end of defgroup Video */
  501. /******************************************************************************/
  502. /*! \defgroup playback_Operation_Audio Audio
  503. * \brief audio only related operation
  504. * @{ */
  505. /******************************************************************************/
  506. /**
  507. * \fn MID_Status_t MID_PlaybackStartAudio(UINT16 usPID, UINT16 usPCR, unsigned short usCodec)
  508. *
  509. * \param usPID : video PID.
  510. * \param usPCR : related PCR PID.
  511. * \param usCodec : video codec.
  512. *
  513. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  514. *
  515. * \note Description: \n
  516. * DTV playback start audio channel only. \n
  517. *
  518. * \note Restrictions: none.
  519. */
  520. /******************************************************************************/
  521. MID_Status_t MID_PlaybackStartAudio(UINT16 usPID, UINT16 usPCR, unsigned short usCodec);
  522. /******************************************************************************/
  523. /**
  524. * \fn MID_Status_t MID_PlaybackStopAudio(void)
  525. *
  526. * \param none.
  527. *
  528. * \return none.
  529. *
  530. * \note Description:
  531. * Is current playing?
  532. *
  533. * \note Restrictions: none.
  534. */
  535. /******************************************************************************/
  536. MID_Status_t MID_PlaybackStopAudio(void);
  537. /******************************************************************************/
  538. /**
  539. * \fn MID_Status_t MID_PlaybackStartSecondAudio(UINT16 usPID, UINT16 usPCR, unsigned short usCodec)
  540. *
  541. * \param usPID : video PID.
  542. * \param usPCR : related PCR PID.
  543. * \param usCodec : video codec.
  544. *
  545. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  546. *
  547. * \note Description: \n
  548. * DTV playback start audio channel only. \n
  549. *
  550. * \note Restrictions: none.
  551. */
  552. /******************************************************************************/
  553. MID_Status_t MID_PlaybackStartSecondAudio(UINT16 usPID, UINT16 usPCR, unsigned short usCodec);
  554. /******************************************************************************/
  555. /**
  556. * \fn MID_Status_t MID_PlaybackStopSecondAudio(void)
  557. *
  558. * \param none.
  559. *
  560. * \return none.
  561. *
  562. * \note Description:
  563. * Is current playing?
  564. *
  565. * \note Restrictions: none.
  566. */
  567. /******************************************************************************/
  568. MID_Status_t MID_PlaybackStopSecondAudio(void);
  569. MID_Status_t MID_PlaybackSetADPidToMainPath(UINT16 uADPid);
  570. /******************************************************************************/
  571. /*! @} end of defgroup Audio */
  572. /******************************************************************************/
  573. /******************************************************************************/
  574. /*! @} end of defgroup AV */
  575. /******************************************************************************/
  576. /*! @} end of defgroup Operation */
  577. /******************************************************************************/
  578. /******************************************************************************/
  579. /**
  580. * \fn void MID_PlaybackInitCallback(void)
  581. *
  582. * \param none.
  583. *
  584. * \return none.
  585. *
  586. * \note Description: \n
  587. * This interface will set if middleware playback init for a/v playback or for logo display
  588. *
  589. *
  590. * \note Restrictions: none.
  591. */
  592. /******************************************************************************/
  593. extern void (*MID_PlaybackInitCallback)(void); //qiuwei20100506 add for mains 0086556
  594. /******************************************************************************/
  595. /**
  596. * \fn MID_Status_t MID_PlaybackReplaceService(CDBIHandle_t hOriginalProg, CDBIHandle_t hReplacementProg)
  597. *
  598. * \param hOriginalProg original program.
  599. * \param hReplacementProg the program to replace the original one
  600. *
  601. * \return DRV_SUCCESS if successful, warning or error code if function failed.
  602. *
  603. * \note Description: \n
  604. * This interface will replace service from hOriginalProg to hReplacementProg
  605. *
  606. *
  607. * \note Restrictions: none.
  608. */
  609. /******************************************************************************/
  610. #ifdef CONFIG_SUPPORT_BISS
  611. MID_Status_t MID_PlaybackReplaceService(CDBIHandle_t hOriginalProg, CDBIHandle_t hReplacementProg, UINT64 ulBissKey);
  612. #else
  613. MID_Status_t MID_PlaybackReplaceService(CDBIHandle_t hOriginalProg, CDBIHandle_t hReplacementProg);
  614. #endif
  615. /******************************************************************************/
  616. /**
  617. * \fn void MID_PlaybackGetActiveVidPid(unsigned short *pid)
  618. *
  619. * \param none.
  620. *
  621. * \return hdl : get active video demux chan CDBIHandle_t.
  622. *
  623. * \note Description: \n
  624. * Uninit presentation engine.
  625. *
  626. * \note Restrictions: none.
  627. */
  628. /******************************************************************************/
  629. UINT16 MID_PlaybackGetActiveVidHandle(void);
  630. /******************************************************************************/
  631. /**
  632. * \fn void MID_PlaybackGetActiveAudPid(unsigned short *pid)
  633. *
  634. * \param none.
  635. *
  636. * \return hdl : get active audio demux chan CDBIHandle_t.
  637. *
  638. * \note Description: \n
  639. * Uninit presentation engine.
  640. *
  641. * \note Restrictions: none.
  642. */
  643. /******************************************************************************/
  644. UINT16 MID_PlaybackGetActiveAudHandle(bool bPid);
  645. /******************************************************************************/
  646. /**
  647. * \fn UINT16 MID_PlaybackGetActiveSecAudHandle
  648. *
  649. * \param none.
  650. *
  651. * \return hdl : get active audio demux chan CDBIHandle_t.
  652. *
  653. * \note Description: \n
  654. * Uninit presentation engine.
  655. *
  656. * \note Restrictions: none.
  657. */
  658. /******************************************************************************/
  659. UINT16 MID_PlaybackGetActiveSecAudHandle(bool bPid);
  660. /******************************************************************************/
  661. /**
  662. * \fn UINT16 MID_PlaybackGetActiveAudCodec
  663. *
  664. * \param none.
  665. *
  666. * \return hdl : get active audio codec.
  667. *
  668. * \note Description: \n
  669. * Uninit presentation engine.
  670. *
  671. * \note Restrictions: none.
  672. */
  673. /******************************************************************************/
  674. UINT16 MID_PlaybackGetActiveAudCodec(void);
  675. /******************************************************************************/
  676. /*! @} end of defgroup PE Connetion */
  677. /******************************************************************************/
  678. /******************************************************************************/
  679. /*! @} end of defgroup Debug */
  680. /******************************************************************************/
  681. //pingchi 20100825 added for mantis 101993 ++
  682. /******************************************************************************/
  683. /**
  684. * \fn UINT8 MID_PlaybackIsPauseState
  685. *
  686. * \return 1 if pause
  687. * 0 if play
  688. *
  689. * \note Restrictions: none.
  690. */
  691. /******************************************************************************/
  692. UINT8 MID_PlaybackIsPauseState(void);
  693. /*******************************************************************************************/
  694. /**
  695. * \fn void MID_PlaybackSetFreqChange(UINT32 Freq)
  696. *
  697. * \param Freq: current play service frequency
  698. *
  699. * \return None
  700. *
  701. * \note Description:
  702. * if other module(example CI+) change frequency notify playback frequency changed,
  703. * then change to other service judge need to link tuner.
  704. *
  705. * \note Restrictions: none.
  706. *
  707. ********************************************************************************************/
  708. void MID_PlaybackSetFreqChange(UINT32 Freq);
  709. #ifdef CONFIG_SUPPORT_MHEG5
  710. /*******************************************************************************************/
  711. /**
  712. * \fn MID_PlaybackStartVideoIFrame
  713. *
  714. * \param pVideoData: Pointer to video data block to start I-frame decoding
  715. *
  716. * \param nLength: Length of video data block.
  717. *
  718. * \param stream_type: stream type, which is defined in mpeg spec
  719. *
  720. * \return MID_SUCCESS if successful, warning or error code if function failed
  721. *
  722. * \note Description:
  723. *
  724. * \note Restrictions: none.
  725. *
  726. ********************************************************************************************/
  727. MID_Status_t MID_PlaybackStartVideoIFrame(UINT8 *pVideoData, int nLength, UINT8 stream_type);
  728. /*******************************************************************************************/
  729. /**
  730. * \fn MID_PlaybackStopVideoIFrame
  731. *
  732. * \return MID_SUCCESS if successful, warning or error code if function failed
  733. *
  734. * \note Description:
  735. *
  736. * \note Restrictions: none.
  737. *
  738. ********************************************************************************************/
  739. MID_Status_t MID_PlaybackStopVideoIFrame(void);
  740. #endif
  741. #ifdef CONFIG_DVB_SYSTEM_DVBS_SUPPORT
  742. /*******************************************************************************************/
  743. /**
  744. * \fn MID_Status_t MID_Playback_DVBSConnectTp(CDBIHandle_t hTPHandle, UINT8 ForceMotor)
  745. *
  746. * \param hTPHandle: TP handle
  747. * ForceMotor: force run Motor(TRUE or FALSE)
  748. *
  749. * \return MID_SUCCESS
  750. *
  751. * \note Description:
  752. * use TP handler to connect dvb-s/s2 frontend.
  753. *
  754. *
  755. * \note Restrictions: none.
  756. *
  757. ********************************************************************************************/
  758. MID_Status_t MID_Playback_DVBSConnectTp(CDBIHandle_t hTPHandle, UINT8 ForceMotor);
  759. /*******************************************************************************************/
  760. /**
  761. * \fn MID_Status_t MID_Playback_DVBSTune(Ant_TRANSPONDER_st TpInfo, UINT8 ForceMotor, UINT8 bConnectFE)
  762. *
  763. * \param TpInfo: TP information
  764. * ForceMotor: force run Motor(TRUE or FALSE)
  765. * bConnectFE: connect to FE
  766. *
  767. * \return MID_SUCCESS
  768. *
  769. * \note Description:
  770. * dvb-s/s2 set params to frontend.
  771. *
  772. *
  773. * \note Restrictions: none.
  774. *
  775. ********************************************************************************************/
  776. MID_Status_t MID_Playback_DVBSTune(Ant_TRANSPONDER_st TpInfo, UINT8 ForceMotor, UINT8 bConnectFE);
  777. /*******************************************************************************************/
  778. /**
  779. * \fn MID_Status_t MID_Playback_ConnectSatellite(UINT8 ForceMotor)
  780. *
  781. * \param ForceMotor: force run Motor(TRUE or FALSE)
  782. *
  783. *
  784. *
  785. * \return MID_SUCCESS
  786. *
  787. * \note Description:
  788. * dvb-s/s2 connect to satellite.
  789. *
  790. *
  791. * \note Restrictions: none.
  792. *
  793. ********************************************************************************************/
  794. MID_Status_t MID_Playback_ConnectSatellite(UINT8 ForceMotor);
  795. /*******************************************************************************************/
  796. /**
  797. * \fn MID_Status_t MID_Playback_DVBSTuneInit(void)
  798. *
  799. * \param None
  800. *
  801. * \return MID_SUCCESS
  802. *
  803. * \note Description:
  804. * dvb-s/s2 initial api
  805. *
  806. *
  807. * \note Restrictions: none.
  808. *
  809. ********************************************************************************************/
  810. MID_Status_t MID_Playback_DVBSTuneInit(void);
  811. #endif
  812. #ifdef CONFIG_SUPPORT_INDONESIA_EWS
  813. MID_Status_t MID_PlaybackStartEWSFile(void);
  814. MID_Status_t MID_PlaybackStopEWSFile(void);
  815. #endif
  816. #ifdef DEMUX_CONTROL_TEST
  817. MID_Status_t Mid_PlaybackStartDemux(void);
  818. UINT8 MID_PlaybackGetState(void);
  819. UINT8 MID_PlaybackGetStateForPSI(void);
  820. void MID_PlaybackSetStateForPSI(UINT8 State);
  821. #endif
  822. #ifdef CONFIG_SUPPORT_AUDIO_CODEC_OVERLAY
  823. void MID_PlaybackResetPrevAudioCodec(void);
  824. #endif
  825. void MID_PlaybackClearPcrPid(void);
  826. #ifdef CONFIG_MOD_PACK_DTV
  827. void MID_PlaybackClearPreNetType(void);
  828. #endif
  829. #endif /*_DVB_PLAYBACK_H_*/
  830. /*! @} end of addtogroup playback*/