CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxVLCRecorder.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 CXVLCPROCESS_H_
13 #define CXVLCPROCESS_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include <QString>
18 #include "cxProcessWrapper.h"
19 
20 namespace cx
21 {
22 
29 typedef boost::shared_ptr<class VLCRecorder> VLCRecorderPtr;
30 
42 class cxResource_EXPORT VLCRecorder: public QObject
43 {
44  Q_OBJECT
45 
46 public:
47  static VLCRecorder* getInstance();
48  static void initialize();
49  static void shutdown();
50 
51  bool hasVLCApplication();
52  void findVLCApplication(QStringList suggestedVLCLocations = QStringList());
53  QString getVLCPath();
54 
55  bool isRecording();
56 
57  //for running without a event loop - used for testing
58  bool waitForStarted(int msecs = 30000);
59  bool waitForFinished(int msecs = 30000);
60 
61 signals:
62  void stateChanged();
63 
64 public slots:
65  void startRecording(QString saveFile);
66  void stopRecording();
67 
68 private:
69  VLCRecorder();
70  virtual ~VLCRecorder();
71  VLCRecorder(const VLCRecorder&);
72  VLCRecorder& operator=(const VLCRecorder&);
73 
74  void setVLCPath(QString path);
75  bool isValidVLC(QString vlcPath);
76  QString getVLCDefaultLocation();
77  QString getVLCDefaultRecorderArguments(QString saveFile);
78 
79  ProcessWrapperPtr mCommandLine;
80  QString mVLCPath;
81 
82  static VLCRecorder* mTheInstance;
83 };
84 
85 cxResource_EXPORT VLCRecorder* vlc();
86 
91 } /* namespace cx */
92 
93 #endif /* CXVLCPROCESS_H_ */
Lets you use the third party application VLC to record a video of the screen.
Definition: cxVLCRecorder.h:42
boost::shared_ptr< class VLCRecorder > VLCRecorderPtr
Definition: cxVLCRecorder.h:29
boost::shared_ptr< class ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:41
VLCRecorder * vlc()
Shortcut for accessing the vlc recorder.
Namespace for all CustusX production code.