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.

34 lines
564 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "path.h"
  2. namespace mtx {
  3. Path::Path(const PathConf & conf, const Conf & global) : MediaPath(conf.name, conf.record, global), m_conf(conf), m_fullConf(global) {}
  4. Path::~Path()
  5. {
  6. stop();
  7. }
  8. void Path::start()
  9. {
  10. m_pSource.reset(new RtspSource(m_conf, m_fullConf, this));
  11. m_pSource->start();
  12. }
  13. void Path::stop()
  14. {
  15. if (m_pSource)
  16. {
  17. m_pSource->stop(); // calls sourceSetNotReady() if it was ready
  18. m_pSource.reset();
  19. }
  20. }
  21. PathInfo Path::info() const
  22. {
  23. PathInfo tI = MediaPath::info();
  24. tI.source = m_conf.source;
  25. return tI;
  26. }
  27. } // namespace mtx