avdctrl.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:3k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef __AVDCTRL_H
  2. #define __AVDCTRL_H
  3. #include "types.h"
  4. #ifndef EXTERN
  5. #define EXTERN extern
  6. #endif
  7. //#include "avd.h"
  8. #include "vpp.h"
  9. #include "kinf.h"
  10. #define CHK_IDLE 0
  11. #define CHK_FOR_I 1
  12. #define CHK_FOR_R 2
  13. //
  14. // current UI state
  15. #define avdst_fast_time() (AVD_fast_factor)
  16. #define AVD_FAST_JUMP 3
  17. //
  18. // current PE state
  19. #define is_avd_fast() (batch_fast_time)
  20. #define is_avd_slow() is_avd_playback_slow()
  21. #define is_avd_step() is_avd_playback_step()
  22. #define is_avd_paused() is_avd_playback_pause()
  23. //
  24. // status updated every-field
  25. //
  26. EXTERN UINT8 avdflg_not_realtime;
  27. EXTERN UINT8 avdflg_speed_normal;
  28. EXTERN UINT8 avdflg_reset_stc_when_play;
  29. EXTERN UINT8 avdflg_flush_pci_when_play;
  30. void    avd_update_status(void);
  31. //
  32. // avd_not_realtime()
  33. //
  34. // NOT realtime playback (no user operation)
  35. // user forces playback in a speed different than design.
  36. // pause/fast/slow/step...
  37. //
  38. #define avd_not_realtime() (avdflg_not_realtime)
  39. // 
  40. // avd_realtime()
  41. //
  42. // realtime playback (no user operation)
  43. //
  44. #define avd_realtime() (!avd_not_realtime())
  45. //
  46. // avd_normal_speed():
  47. // follow the bitstream speed
  48. //
  49. #define avd_normal_speed() (avdflg_speed_normal)
  50. //
  51. // single_field:
  52. // 1. frame_rate_control
  53. //    during frame-rate conversion
  54. //
  55. // 2. user operations
  56. //    pause
  57. //    fast
  58. //    step
  59. //    slow (not_realtime)
  60. // except following cases
  61. // 1. 32 pulldown (must be frame-source??)
  62. // 2. only single-frame sequence (showing first picture in sequence..)
  63. //
  64. #define avd_single_field() (!avd_normal_speed() | avd_not_realtime())
  65. #define avd_sync_find_I() (chk_first_B==CHK_FOR_I)
  66. #define avd_sync_found() (chk_first_B==CHK_IDLE)
  67. #define avd_play_ref1() (AVD_state==STATE_1STREF)
  68. #define avd_play_refs() (AVD_state==STATE_REFS)
  69. #define avd_play_only_ref() (avd_play_ref1() | avd_play_refs())
  70. //
  71. //
  72. #define avd_decode_frame()      (avd_play_ref1() | is_avd_fast())
  73. #define avd_reset_stc_state()           (!avd_realtime())
  74. #define avd_pic_check_pts()             avd_realtime()
  75. #define avd_ignore_tpf_flag()           avd_single_field()
  76. int avd_ignore_rff_flag(void);
  77. int avd_framerate_ctrl(void);
  78. #define avd_drop_av_packet()            (0)
  79. #define avd_jump_at_1STREF()            (batch_fast_time<0)
  80. #define avd_support_mpeg2() 1
  81. #define avd_parse_user_data() avd_is_dvd()
  82. #define avd_support_line21() avd_is_dvd()
  83. #define is_dsi_search_sup()             (dsi_state==DSI_SP_JUMP)
  84. #define is_dsi_search_video()           (dsi_state==DSI_VIDEO_JUMP)
  85. #define is_dsi_search()                 (is_dsi_search_sup() || is_dsi_search_video())
  86. #define avdkern_drop_audio() (AVD_slow_factor | is_dsi_search() | is_avd_no_audio())
  87. #define avdkern_drop_private1_audio() avdkern_drop_audio()
  88. #define avd_search_seq_header() (AVD_state==STATE_FINDFIRSTSEQ)
  89. int     avd_parse_private1(void);
  90. int     avd_parse_private2(void);
  91. int avd_slow_read();  
  92. int avd_get_fast_time(void);
  93. int avd_parse_drop_p_pic(void);
  94. int avd_decode_drop_p_pic(void);
  95. int avd_parse_drop_b_pic(void);
  96. int avd_decode_drop_b_pic(void);
  97. void dvd_batch_start(void);
  98. #endif