CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxVideoService.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXVIDEOSERVICE_H
13 #define CXVIDEOSERVICE_H
14 
15 #include "cxResourceExport.h"
16 
17 #include <QObject>
18 #include <boost/shared_ptr.hpp>
19 #include "cxPlaybackTime.h"
20 
21 #define VideoService_iid "cx::VideoService"
22 
23 namespace cx
24 {
25 class StreamerService;
26 
27 typedef boost::shared_ptr<class VideoService> VideoServicePtr;
28 typedef boost::shared_ptr<class StreamerService> StreamerServicePtr;
29 typedef boost::shared_ptr<class VideoSource> VideoSourcePtr;
30 typedef boost::shared_ptr<class USAcquisitionVideoPlayback> USAcquisitionVideoPlaybackPtr;
31 typedef boost::shared_ptr<class PlaybackTime> PlaybackTimePtr;
32 
75 class cxResource_EXPORT VideoService : public QObject
76 {
77  Q_OBJECT
78 public:
79  virtual void setActiveVideoSource(QString uid) = 0;
80  virtual VideoSourcePtr getActiveVideoSource() = 0;
81  virtual std::vector<VideoSourcePtr> getVideoSources() = 0;
82 
83  virtual void setConnectionMethod(QString connectionMethod) = 0;
84  virtual QString getConnectionMethod() = 0;
85  virtual void openConnection() = 0;
86  virtual void closeConnection() = 0;
87  virtual bool isConnected() const = 0;
88 
89  virtual void setPlaybackMode(PlaybackTimePtr controller) = 0;
90  virtual std::vector<TimelineEvent> getPlaybackEvents() = 0;
91 
92  virtual StreamerServicePtr getStreamerService(QString uid) = 0;
93  virtual QList<StreamerServicePtr> getStreamerServices() = 0;
94 
95  virtual bool isNull() = 0;
96  static VideoServicePtr getNullObject();
97 
98 signals:
99  void connected(bool on);
100  void connectionMethodChanged();
104  void activeVideoSourceChanged();
105  void fps(int);
106 
107  void StreamerServiceAdded(StreamerService* service);
108  void StreamerServiceRemoved(StreamerService* service);
109 };
110 
111 } //cx
112 Q_DECLARE_INTERFACE(cx::VideoService, VideoService_iid)
113 
114 #endif // CXVIDEOSERVICE_H
boost::shared_ptr< class VideoService > VideoServicePtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
boost::shared_ptr< USAcquisitionVideoPlayback > USAcquisitionVideoPlaybackPtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
Provides access to all video sources in the system, and connection stuff for the sources.
#define VideoService_iid
boost::shared_ptr< class StreamerService > StreamerServicePtr
Abstract class. Interface to Streamers.
Namespace for all CustusX production code.