diff options
author | deva <deva> | 2005-06-16 21:28:57 +0000 |
---|---|---|
committer | deva <deva> | 2005-06-16 21:28:57 +0000 |
commit | e0592745a40dae2e14e5b6d9226f41a293ababc9 (patch) | |
tree | b3640c07fd6af71aa01bed384613ffda6c03bf41 /src/camera.cc | |
parent | c397f2dcdc399b43cf150f8000e711fc20613deb (diff) |
Rewrote thread object
Fixed bug in mov_encoder (pushed read_sem too many times, whihc lead to
growing server queue)
Diffstat (limited to 'src/camera.cc')
-rw-r--r-- | src/camera.cc | 16 |
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; |