1
0

VideoThread.h 885 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef NULLSOFTVIDEOTHREADH
  2. #define NULLSOFTVIDEOTHREADH
  3. #include "VideoDataConverter.h"
  4. #include "WMHandler.h"
  5. #include <deque>
  6. #include <wmsdk.h>
  7. #include "MediaThread.h"
  8. class VideoThread : public MediaThread
  9. {
  10. public:
  11. VideoThread();
  12. void Start(VideoDataConverter *_converter, WMHandler *_clock);
  13. /* AddBuffers put a video buffer in the queue
  14. it returns true if it was added
  15. it returns false if it was NOT added. it is up to YOU (the caller) to sleep for a while and call again
  16. */
  17. void VidThread();
  18. void OpenVideo(bool drm, int width, int height, bool flip, double aspect, int fourcc);
  19. void CloseVideo(bool drm);
  20. private:
  21. static VOID CALLBACK VideoThread_VideoOpenAPC(ULONG_PTR params);
  22. static VOID CALLBACK VideoThread_VideoCloseAPC(ULONG_PTR params);
  23. void AddAPC(MediaBuffer *);
  24. VideoDataConverter *converter;
  25. WMHandler *clock;
  26. bool drm;
  27. };
  28. #endif