Decaps.h
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:2k
源码类别:

VC书籍

开发平台:

Visual C++

  1. /**************************************************************************************
  2.  *                                                                                    *
  3.  *                                                                                    *
  4.  **************************************************************************************/
  5. #ifndef DECAPS_H
  6. #define DECAPS_H
  7. #include "MediaClasses.h"
  8. #include "DecapsAVI.h"
  9. class MediaDecaps : public MediaItemDecaps {
  10. private:
  11. MediaDecapsAVI  *decapsAVI;
  12. MediaItemDecaps *decaps;
  13. public:
  14. MediaDecaps();
  15. ~MediaDecaps();
  16. media_type_t  GetType();
  17. char         *GetName();
  18. MP_RESULT     Connect(MediaItem *item);
  19. MP_RESULT     ReleaseConnections();
  20. DWORD         GetCaps();
  21. MP_RESULT     Configure(HINSTANCE hInstance, HWND hwnd);
  22. unsigned int  GetNumberOfVideoStreams();
  23. unsigned int  GetNumberOfAudioStreams();
  24. unsigned int  GetVideoWidth(unsigned int StreamId);
  25. unsigned int  GetVideoHeight(unsigned int StreamId);
  26. double        GetVideoFrameRate(unsigned int StreamId);
  27. char         *GetVideoCompression(unsigned int StreamId);
  28. BITMAPINFOHEADER *GetVideoHeader(unsigned int StramId);
  29. unsigned long GetCurrentVideoFrame(unsigned int StreamId);
  30. unsigned long GetTotalVideoFrames(unsigned int StreamId);
  31. unsigned long GetTotalVideoTime(unsigned int StreamId);
  32. WAVEFORMATEX *GetAudioFormat(unsigned int StreamId);
  33. unsigned int  GetAudioBits(unsigned int StreamId);
  34. unsigned int  GetAudioChannels(unsigned int StreamId);
  35. unsigned int  GetAudioFrequency(unsigned int StreamId);
  36. unsigned int  GetNextVideoFrameSize(unsigned int StreamId);
  37. unsigned int  ReadVideoFrame(unsigned int StreamId, MediaBuffer *mb);
  38. unsigned int  ReadAudioData(unsigned int StreamId, char *buffer, unsigned int bytes);
  39. MP_RESULT     UpdateForSize();
  40. MP_RESULT     SeekAudio(unsigned int StreamId, long bytes);
  41. MP_RESULT     SeekVideo(unsigned int StreamId, long frame);
  42. MP_RESULT     ReSeekAudio(unsigned int StreamId);
  43. MP_RESULT     Seek(unsigned int videoStreamId, unsigned int audioStreamId, int percent);
  44. MP_RESULT     Rewind(unsigned int videoStreamId, unsigned int audioStreamId);
  45. MP_RESULT     SeekNextKeyFrame(unsigned int StreamId);
  46. MP_RESULT     SeekPreviousKeyFrame(unsigned int StreamId);
  47. };
  48. #endif