VideoDecoderDecore.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:2k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /**************************************************************************************
  2.  *                                                                                    *
  3.  *                                                                                    *
  4.  **************************************************************************************/
  5. #ifndef VIDEODECODER_DECORE_H
  6. #define VIDEODECODER_DECORE_H
  7. /*
  8.  * 基类
  9.  */
  10. #include "MediaClasses.h"
  11. #include "decore.h"
  12. #include "../build/win32/ressources.h"
  13. #include "../build/win32/resource.h"
  14. #define DECORE_PLAYA_ID   0x8001
  15. #define DECORE_INPUT_SIZE 128000
  16. class MediaVideoDecoderDecore : public MediaItemVideoDecoder {
  17. private:
  18. DEC_MEM_REQS       decMem;
  19. DEC_PARAM          decParam;
  20. DEC_FRAME          decFrame;
  21. DEC_SET            decSet;
  22. media_video_mode_t videoMode;
  23. BOOL               invertFlag;
  24. MediaItemDecaps   *decaps;
  25. MediaBuffer       *inputBuffer;
  26. HINSTANCE          hDivXDll;
  27. public:
  28. DWORD              postprocessing;
  29. decoreFunc         decoreFunction;
  30. MediaVideoDecoderDecore();
  31. ~MediaVideoDecoderDecore();
  32. /*
  33.  * 视频项方法
  34.  */
  35. media_type_t  GetType();
  36. char         *GetName();
  37. MP_RESULT     Connect(MediaItem *item);
  38. MP_RESULT     ReleaseConnections();
  39. DWORD         GetCaps();
  40. MP_RESULT     Configure(HINSTANCE hInstance, HWND hwnd);
  41. /*
  42.  * 视频解码器方法
  43.  *
  44.  */
  45. unsigned int       GetFrameSize();
  46. media_video_mode_t GetVideoMode();
  47. BOOL               GetInvertFlag();
  48. MP_RESULT          SetVideoMode(media_video_mode_t mode);
  49. MP_RESULT          SetQuality(DWORD quality);
  50. DWORD              GetQuality();
  51. MP_RESULT          Decompress(MediaBuffer *mb_out, unsigned int stride);
  52. MP_RESULT          Drop(MediaBuffer *mb_out, unsigned int stride);
  53. };
  54. #endif