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.

43 lines
1.1 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
7 years ago
​
​
7 years ago
​
7 years ago
​
7 years ago
​
​
​
  1. #ifndef __BASICMEDIASOURCE_H_INCL__
  2. #define __BASICMEDIASOURCE_H_INCL__
  3. #include "basicMediaDestination.h"
  4. /**
  5. * TODO: Add class description
  6. *
  7. * @author Gagua
  8. */
  9. class basicMediaSource {
  10. private:
  11. protected:
  12. basicMediaDestination *m_pMediaDestination;
  13. MediaStateStatus m_eMediaStatus;
  14. bool m_bStreamingSource;
  15. public:
  16. basicMediaSource();
  17. virtual ~basicMediaSource();
  18. bool attachDestination(basicMediaDestination *Viewer){
  19. if (Viewer != NULL){
  20. m_pMediaDestination = Viewer;
  21. return true;
  22. };
  23. return false;
  24. };
  25. void setStreaming(bool T){ m_bStreamingSource = T; };
  26. virtual bool _stop(void){ return true; };
  27. MediaStateStatus getStatus( void ){ return m_eMediaStatus;};
  28. };
  29. inline basicMediaSource::basicMediaSource(){
  30. m_bStreamingSource = true;
  31. m_pMediaDestination = NULL;
  32. m_eMediaStatus = MS_UNDEFINED;
  33. };
  34. inline basicMediaSource::~basicMediaSource() {
  35. };
  36. typedef vector<basicMediaSource *> mediaSourceCollection;
  37. #endif // __BASICMEDIASOURCE_H_INCL__