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.

60 lines
2.1 KiB

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