diff options
Diffstat (limited to 'src/camera.cc')
-rw-r--r-- | src/camera.cc | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/camera.cc b/src/camera.cc index 6300946..e7994f6 100644 --- a/src/camera.cc +++ b/src/camera.cc @@ -27,6 +27,9 @@ */ /* * $Log$ + * Revision 1.10 2005/05/02 09:50:22 deva + * Rewrote freeze, shoot and record flags, from encoder to frame. + * * Revision 1.9 2005/05/01 11:25:56 deva * Added code to read screenshot from frame queue, decode it to rgb and put it into a qimage. * @@ -149,23 +152,30 @@ void Camera::setCpr(char *newcpr) void Camera::start() { - if(initialized) encoder->start(); - else errorstatus->pushError("Camera not initialized."); + if(initialized) { + decoder->start(); + encoder->start(); + } else { + errorstatus->pushError("Camera not initialized."); + } } void Camera::stop(n_savestate save) { - if(initialized) encoder->stop(save); - else errorstatus->pushError("Camera not initialized."); + if(initialized) { + decoder->stop(save); + encoder->stop(save); + } else { + errorstatus->pushError("Camera not initialized."); + } } void Camera::freeze() { - // FIXME: Ensure they freeze the same frame, i.e. the player - // shows the same frame that is actually frozen on the server. if(initialized) { player->stop(); - encoder->freeze(); + // encoder->freeze(); + decoder->freeze(); } else { errorstatus->pushError("Camera not initialized."); } @@ -179,8 +189,12 @@ void Camera::unfreeze() void Camera::snapshot(unsigned char *rgb) { - if(initialized) encoder->shoot(rgb); - else errorstatus->pushError("Camera not initialized."); + if(initialized) { + decoder->shoot(rgb); + encoder->shoot(rgb); + } else { + errorstatus->pushError("Camera not initialized."); + } } Error *Camera::errorObject() |