summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordeva <deva>2005-04-19 18:16:18 +0000
committerdeva <deva>2005-04-19 18:16:18 +0000
commit7af06f473e99f02a0cb8978aee67a61b5718664d (patch)
tree9d90d64984bcb5196c8397cb26c3fd70f2e51da8 /src
parent7d7ee51b2d4284f936a40b0edce760fbf226b93a (diff)
xome crap
Diffstat (limited to 'src')
-rw-r--r--src/encoder.cc18
-rw-r--r--src/mainwindow.cc1
2 files changed, 10 insertions, 9 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index 714ee81..d3f4925 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -68,37 +68,37 @@ Encoder::~Encoder()
void Encoder::encode()
{
- Frame *f;
+ Frame *frame;
while(*running) {
sem_wait(sem);
pthread_mutex_lock(mutex);
- f = queue->pop();
+ frame = queue->pop();
pthread_mutex_unlock(mutex);
- if((f && record) ||
+ if((frame && record) ||
(freeze_request != freeze_value) ||
(shoot_request != shoot_value)) {
n_header h;
-
+
h.header_type = DATA_HEADER;
sprintf(h.header.h_data.cpr, cpr);
h.header.h_data.freeze = (freeze_request != freeze_value);
h.header.h_data.snapshot = (shoot_request != shoot_value);
h.header.h_data.record = record;
h.header.h_data.savestate = NO_CHANGE;
-
+
if(freeze_request != freeze_value) freeze_value = freeze_request;
if(shoot_request != shoot_value) shoot_value = shoot_request;
-
- n->sendPackage(&h, f->data, f->size);
-
+
+ n->sendPackage(&h, frame->data, frame->size);
+
// free(f->data);
// delete f;
}
}
- pthread_exit(NULL);
+ // pthread_exit(NULL);
}
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 27452ce..9c049ac 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -261,6 +261,7 @@ void MainWindow::cpr_clicked()
// TODO: Restore old CPR and name, in the labels.
} else {
// TODO: Change CPR camera.
+ camera->setCpr("fisk");
}
}