NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxLocalServerStreamerServer.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 #ifndef CXLOCALSERVERSTREAMERSERVER_H
12 #define CXLOCALSERVERSTREAMERSERVER_H
13 
14 #include "org_custusx_core_video_Export.h"
15 #include "cxStreamerService.h"
16 #include "cxStreamer.h"
17 #include "cxProcessWrapper.h"
18 
19 class ctkPluginContext;
20 
21 namespace cx
22 {
23 typedef boost::shared_ptr<class StringPropertyBase> StringPropertyBasePtr;
24 typedef boost::shared_ptr<class DoublePropertyBase> DoublePropertyBasePtr;
25 typedef boost::shared_ptr<class Property> PropertyPtr;
26 typedef boost::shared_ptr<class FilePathProperty> FilePathPropertyPtr;
27 typedef boost::shared_ptr<class BoolPropertyBase> BoolPropertyBasePtr;
28 
29 
37 class org_custusx_core_video_EXPORT LocalServerStreamerArguments
38 {
39 public:
40  std::vector<PropertyPtr> getSettings(QDomElement root);
41 
42  BoolPropertyBasePtr getRunLocalServerOption(QDomElement root);
43  FilePathPropertyPtr getLocalServerNameOption(QDomElement root);
44 };
45 
53 class org_custusx_core_video_EXPORT LocalServerStreamer: public Streamer
54 {
55 Q_OBJECT
56 
57 public:
58  LocalServerStreamer(QString serverName, QString serverArguments);
59  virtual ~LocalServerStreamer();
60  virtual void startStreaming(SenderPtr sender);
61  virtual void stopStreaming();
62  virtual bool isStreaming();
63 
64  static StreamerPtr createStreamerIfEnabled(QDomElement root, StringMap args);
65 
66 private slots:
67  virtual void streamSlot() {}
68 
69  void processStateChanged();
70 private:
71  bool localVideoServerIsRunning();
72  ProcessWrapperPtr mLocalVideoServerProcess;
73 
74  StreamerPtr mBase;
75  QString mServerName;
76  QString mServerArguments;
77 };
78 typedef boost::shared_ptr<class LocalServerStreamer> LocalServerStreamerPtr;
79 
80 } //end namespace cx
81 
82 
83 #endif // CXLOCALSERVERSTREAMERSERVER_H
cx::Streamer
Definition: cxStreamer.h:39
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxStreamer.h
cxStreamerService.h
cx::LocalServerStreamerArguments
Definition: cxLocalServerStreamerServer.h:37
cx::PropertyPtr
boost::shared_ptr< class Property > PropertyPtr
Definition: cxLocalServerStreamerServer.h:25
cx::FilePathPropertyPtr
boost::shared_ptr< class FilePathProperty > FilePathPropertyPtr
Definition: cxPlusConnectWidget.h:28
cxProcessWrapper.h
cx::StringMap
std::map< QString, QString > StringMap
Definition: cxCommandlineImageStreamerFactory.h:28
cx::ProcessWrapperPtr
boost::shared_ptr< class ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:41
cx::LocalServerStreamerPtr
boost::shared_ptr< class LocalServerStreamer > LocalServerStreamerPtr
Definition: cxLocalServerStreamerServer.h:78
cx::BoolPropertyBasePtr
boost::shared_ptr< class BoolPropertyBase > BoolPropertyBasePtr
Definition: cxImageFileStreamerService.h:22
cx::DoublePropertyBasePtr
boost::shared_ptr< class DoublePropertyBase > DoublePropertyBasePtr
Definition: cxIGTLinkStreamerService.h:21
cx::StringPropertyBasePtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Definition: cxIGTLinkStreamerService.h:20
cx::SenderPtr
boost::shared_ptr< Sender > SenderPtr
Definition: cxSender.h:64
cx::LocalServerStreamer
Definition: cxLocalServerStreamerServer.h:53
cx::StreamerPtr
boost::shared_ptr< class Streamer > StreamerPtr
Definition: cxImageReceiverThread.h:29