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.

59 lines
1.6 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __BASICMEDIASOURCE_H_INCL__
  2. #define __BASICMEDIASOURCE_H_INCL__
  3. #include <opencv2/opencv.hpp>
  4. #include "basicMediaDestination.h"
  5. #include "basicThread.h"
  6. /**
  7. * TODO: Add class description
  8. *
  9. * @author Gagua
  10. */
  11. class basicMediaSource : public basicThread {
  12. private:
  13. protected:
  14. //mediaPorts m_vCorossBar;
  15. basicMediaDestination *m_pMediaDestination;
  16. MediaStateStatus m_eMediaStatus;
  17. bool m_bStreamingSource;
  18. public:
  19. // Constructor
  20. basicMediaSource();
  21. // Destructor
  22. virtual ~basicMediaSource();
  23. bool attachDestination(basicMediaDestination *Viewer){
  24. if (Viewer != NULL){
  25. m_pMediaDestination = Viewer;
  26. return true;
  27. };
  28. return false;
  29. };
  30. void setStreaming(bool T){ m_bStreamingSource = T; };
  31. virtual bool _stop(void){ return true; };
  32. MediaStateStatus getStatus( void ){ return m_eMediaStatus;};
  33. // Copy constructor
  34. // TODO: Uncomment the copy constructor when you need it.
  35. //basicMediaSource(const basicMediaSource& src);
  36. // Assignment operator
  37. // TODO: Uncomment the assignment operator when you need it.
  38. //basicMediaSource& operator=(const basicMediaSource& src);
  39. };
  40. // Constructor implementation
  41. inline basicMediaSource::basicMediaSource(): basicThread(){
  42. m_pMediaDestination = NULL;
  43. m_eMediaStatus = MS_UNDEFINED;
  44. }
  45. // Destructor implementation
  46. inline basicMediaSource::~basicMediaSource(){
  47. }
  48. typedef vector<basicMediaSource *> mediaSourceCollection;
  49. #endif // __BASICMEDIASOURCE_H_INCL__