summaryrefslogtreecommitdiff
path: root/src/camera.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/camera.cc')
-rw-r--r--src/camera.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/camera.cc b/src/camera.cc
index 52fe0b8..a9a0982 100644
--- a/src/camera.cc
+++ b/src/camera.cc
@@ -31,6 +31,11 @@
/*
* $Log$
+ * Revision 1.18 2005/06/16 21:28:57 deva
+ * Rewrote thread object
+ * Fixed bug in mov_encoder (pushed read_sem too many times, whihc lead to
+ * growing server queue)
+ *
* Revision 1.17 2005/05/25 13:11:42 deva
*
* Made unfreeze close connection, when no recording is done.
@@ -133,21 +138,24 @@ void Camera::connect(const char *ip, const int port)
}
*/
- pthread_create (&decodetid, NULL, thread_run, decoder);
+ // pthread_create (&decodetid, NULL, thread_run, decoder);
+ decoder->run();
/*
if(errorstatus->hasError()) {
errorstatus->pushError("Camera initialization failed (decoder thread).");
return;
}
*/
- pthread_create (&encodetid, NULL, thread_run, encoder);
+ // pthread_create (&encodetid, NULL, thread_run, encoder);
+ encoder->run();
/*
if(errorstatus->hasError()) {
errorstatus->pushError("Camera initialization failed (encoder thread).");
return;
}
*/
- pthread_create (&playertid, NULL, thread_run, player);
+ // pthread_create (&playertid, NULL, thread_run, player);
+ player->run();
/*
if(errorstatus->hasError()) {
errorstatus->pushError("Camera initialization failed (player thread).");
@@ -162,9 +170,11 @@ Camera::~Camera()
// Signal to the threads to stop
running = 0;
+ /* // FIXME: Add some way to stop a thread object
pthread_join(decodetid, NULL);
pthread_join(playertid, NULL);
pthread_join(encodetid, NULL);
+ */
delete decoder;
delete encoder;