cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlQtWidgetVideoEncoder.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Balazs P. Vagvolgyi
7  Created on: 2011-05-24
8 
9  (C) Copyright 2011 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 
20 */
21 
22 #ifndef _svlQtWidgetVideoEncoder_h
23 #define _svlQtWidgetVideoEncoder_h
24 
29 
30 #include <QObject>
31 
32 // Always include last!
34 
35 // Forward declarations
36 class svlQtDialog;
37 class QListWidgetItem;
38 class Ui_WidgetVideoEncoder;
39 
40 
41 class CISST_EXPORT svlQtWidgetVideoEncoder: public QObject, public mtsComponent
42 {
43  Q_OBJECT
45 
46 public:
50 
51  static svlQtWidgetVideoEncoder* New();
52  static svlQtWidgetVideoEncoder* New(const std::string & filename);
53  void Delete();
54 
55  bool WaitForClose();
56 
57  bool Create(const std::string & filename);
58  svlVideoIO::Compression* GetCodecParams();
59  bool Destroy();
60 
61  bool Connect(svlVideoCodecBase *codec, const std::string & filename);
62  bool Connect(const std::string & component_name, const std::string & filename);
63  bool Connect(const std::string & process_name, const std::string & component_name, const std::string & filename);
64  bool Disconnect();
65 
66  bool UpdateData();
67 
68 protected:
70  Ui_WidgetVideoEncoder *UIWidget;
71 
72 protected slots:
73  void QSlotOnSliderMove(int value);
74  void QSlotOnQualityBasedCBStateChanged(int value);
75 
76  void QSlotCreate();
77  void QSlotGetCodecParams();
78  void QSlotDestroy();
79  void QSlotConnect();
80  void QSlotConnect2();
81  void QSlotConnect3();
82  void QSlotDisconnect();
83  void QSlotUpdateData();
84 
85 public:
87 
88 private:
89  vctDynamicVector<int> EncoderIDs;
91  svlVideoCodecBase* ExternalCodec;
92  std::string ExternalCodecName;
93 
94  svlVideoCodecBase* argCodec;
95  std::string argFileName;
96  std::string argProcessName;
97  std::string argComponentName;
98 
99  bool retSuccess;
100  svlVideoIO::Compression* retCodecParams;
101 };
102 
104 
105 #endif // _svlQtWidgetVideoEncoder_h
106 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Typedef for dynamic vectors.
virtual void Create(void)
Definition: svlQtDialog.h:32
Macros to export the symbols of cisstStereoVisionQt (in a Dll).
Ui_WidgetVideoEncoder * UIWidget
Definition: svlQtWidgetVideoEncoder.h:70
Declaration of mtsComponent.
svlQtDialog * Dialog
Definition: svlQtWidgetVideoEncoder.h:69
Definition: mtsComponent.h:150
Definition: svlRequiredInterfaces.h:469
Definition: svlVideoIO.h:49
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Definition: svlVideoIO.h:95
IReqVideoEncoder VideoEncoder
Definition: svlQtWidgetVideoEncoder.h:86
const int CMN_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:331
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition: cmnClassRegisterMacros.h:202
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76
Definition: svlQtWidgetVideoEncoder.h:41