VideoStreamCatcher.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #pragma once
  2. #include "preHeader.h"
  3. #include "VideoPrepare/CVideoSource.h"
  4. #include "VideoPrepare/CVideoDecoder.h"
  5. #include "VideoPrepare/CVideoDataManager.h"
  6. #include "VideoPrepare/CSyncProc.h"
  7. class VideoStreamCatcher
  8. {
  9. public:
  10. //constructor
  11. VideoStreamCatcher();
  12. //destructor
  13. ~VideoStreamCatcher();
  14. //set a function to init the video stream catcher
  15. bool Init(QString strAddress);
  16. //use yuv or not
  17. //set a function to start the video stream catcher
  18. void Start();
  19. //set a function to stop the video stream catcher
  20. void Stop();
  21. //set a function to get video Image
  22. void GetVideoImage(unsigned char*& pImage, int& nWidth, int& nHeight, int& nPitch);
  23. public:
  24. //set a video source address
  25. QString m_szVideoSourceAddress;
  26. //set a video source
  27. CVideoSource* m_pVideoSource;
  28. //set a video decoder
  29. CVideoDecoder* m_pVideoDecoder;
  30. //set a video data manager
  31. CVideoDataManager* m_pVideoDataManager;
  32. //set a sync proc
  33. CSyncProc* m_pSyncProc;
  34. //video stream foundation status
  35. int m_nVideoWidth;
  36. int m_nVideoHeight;
  37. int m_nVideoFrameRate;
  38. int m_nVideoBitRate;
  39. int m_nVideoFrameCount;
  40. //output Image ,at last we put the image to the label
  41. unsigned char* m_pOutputImage;
  42. //output image width
  43. int m_nOutputImageWidth;
  44. //output image height
  45. int m_nOutputImageHeight;
  46. //output image pitch
  47. int m_nOutputImagePitch;
  48. static bool m_bStartOrNot;
  49. };