Repair and Cleanup. Think before you do.

This commit is contained in:
Hiro Protagonist 2017-04-04 17:27:34 +12:00
parent 089baccac9
commit 905151689e
6 changed files with 20 additions and 10 deletions

View file

@ -4,7 +4,11 @@
using namespace FlyCapture2;
CameraManager::CameraManager( QObject * parent ) : QObject( parent ), num_cameras {0}, camera_index {-1}, is_capturing {false} {
CameraManager::CameraManager( QObject * parent ) :
QObject( parent ),
num_cameras {0},
is_capturing {false},
camera_index {-1} {
bus_mgr.RegisterCallback( &CameraManager::camConnectEvent, ARRIVAL, this, &handleC );
bus_mgr.RegisterCallback( &CameraManager::camDisconnectEvent, REMOVAL, this, &handleD );
}

View file

@ -64,12 +64,12 @@ class CameraManager : public QObject {
unsigned int num_cameras;
// GUID of the camera, which is currently being used
FlyCapture2::PGRGuid camera_guid;
// Index of the current camera
int camera_index;
// GUID of the camera, which is currently being used
FlyCapture2::PGRGuid camera_guid;
// Event Handlers
static void camConnectEvent( void * pParameter, unsigned int serialNumber );
static void camDisconnectEvent( void * pParameter, unsigned int serialNumber );

View file

@ -15,8 +15,8 @@ MainWindow::MainWindow( QWidget * parent ) :
ui( new Ui::MainWindow ),
camMan( this ),
recorder( 0, 18, false ),
resize { false },
comm( this ) {
comm( this ),
resize { false } {
ui->setupUi( this );
// Set Scene and Hide Preview Widget

View file

@ -14,7 +14,13 @@ const QHash<RecorderError::_RecorderError, QString> RecorderError::_description
{ RecorderError::OK, "All went OK." },
};
Recorder::Recorder( QObject * parent, unsigned int frame_rate, bool cap_frames ) : QObject( parent ), is_recording {false}, append {false}, frame_n {0}, time_c {0}, pDirSet { false } {
Recorder::Recorder( QObject * parent, unsigned int frame_rate, bool cap_frames ) :
QObject( parent ),
is_recording {false},
pDirSet { false },
append {false},
frame_n {0},
time_c {0} {
// No Compression for frame_captures
frame_options.compression = frame_options.NONE;
options.frameRate = frame_rate;

View file

@ -121,13 +121,13 @@ class Recorder : public QObject {
// lock the appendFrame function.
QMutex write_lock;
// Indicates wether the project directorie is set.
bool pDirSet;
// basic state Variable, because AVIRecorder doesn't provide it.
// Well it does, but it is boring to look it up.
bool is_recording;
// Indicates wether the project directorie is set.
bool pDirSet;
// append to existing files
bool append;

Binary file not shown.