You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.8 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __VIDEOAVLIBSOURCE_H_INCL__
  2. #define __VIDEOAVLIBSOURCE_H_INCL__
  3. #ifndef LRF_PROXY_ONLY
  4. #include "../../../alg/generic/md5.h"
  5. #include "../../../components/base/basicLIBAV.h"
  6. #include "../../../components/base/basicLogCollection.h"
  7. #include "../../../components/base/basicMediaSource.h"
  8. #include "../../../components/base/basicSettings.h"
  9. #include "../../../components/base/basicThread.h"
  10. /**
  11. * TODO: Add class description
  12. *
  13. * @author Gagua
  14. */
  15. class videoAVLIBSource : public basicMediaSource, public basicThread
  16. {
  17. private:
  18. basicLogCollection * m_pLog;
  19. config_setting_t * m_pConfig;
  20. char m_pCookie[33];
  21. VideoState * m_pVideoState;
  22. void * m_pOpaque;
  23. uint8_t m_bSrcType;
  24. // uint8_t * m_pOut_buffer;
  25. int m_nInWidth;
  26. int m_nInHeight;
  27. int m_nOutWidth;
  28. int m_nOutHeight;
  29. int m_iY_size;
  30. #ifndef _NOAUDIO_
  31. mediaBus * m_pAudioBus;
  32. static void * m_tAudioProc(void * args);
  33. #endif
  34. bool m_bSizeIsAutomatic;
  35. protected:
  36. void m_fThreadProc(void);
  37. public:
  38. virtual bool _open(CSTR URI, bool ShowDeviceMenu = false, float framerate = -1.0f, int inputPin = -1, int width = -1, int height = -1, int s_width = -1, int s_height = -1);
  39. virtual bool _close(void);
  40. virtual bool _continue(void);
  41. virtual bool _stop(void);
  42. virtual bool _restart(void);
  43. bool isFinished(void);
  44. MediaStateStatus getStatus(void);
  45. videoAVLIBSource(void * opaque = NULL);
  46. videoAVLIBSource(CSTR URI, void * opaque = NULL);
  47. // videoAVLIBSource( config_setting_t *CFG, void *opaque=NULL );
  48. virtual ~videoAVLIBSource();
  49. bool setOutputSize(int Width, int Height);
  50. bool setProportionalByWidth(int Width);
  51. bool setProportionalByHeight(int Height);
  52. bool setFPS(int);
  53. bool setName(CSTR Name);
  54. bool setFrameAspectRatio(FrameAspectRatio AspectRatio);
  55. };
  56. #endif //!LRF_PROXY_ONLY
  57. #endif // __VIDEOAVLIBSOURCE_H_INCL__