From eac2e19c2fea1c704cdeabcaf5e19f774d3f820b Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 25 Jul 2005 16:18:34 +0000 Subject: *** empty log message *** --- src/camera.cc | 8 ++++++++ src/camera.h | 4 ++++ src/player.cc | 12 ++++++++++++ src/player.h | 5 +++++ src/videowidget.cc | 5 +++++ 5 files changed, 34 insertions(+) diff --git a/src/camera.cc b/src/camera.cc index 62509f5..1746030 100644 --- a/src/camera.cc +++ b/src/camera.cc @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.21 2005/07/25 16:18:34 deva + * *** empty log message *** + * * Revision 1.20 2005/07/25 15:56:27 deva * *** empty log message *** * @@ -222,4 +225,9 @@ void Camera::resize(int w, int h) player->resize(w,h); } +void Camera::pause() +{ + player->pause(); +} + #endif/* USE_GUI */ diff --git a/src/camera.h b/src/camera.h index 59f3628..be2e584 100644 --- a/src/camera.h +++ b/src/camera.h @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.16 2005/07/25 16:18:34 deva + * *** empty log message *** + * * Revision 1.15 2005/07/25 15:56:27 deva * *** empty log message *** * @@ -112,6 +115,7 @@ public: int getQueueLength(); void resize(int width, int height); + void pause(); private: // Info object passed to all sub objects. diff --git a/src/player.cc b/src/player.cc index ad8cdc4..8556ce6 100644 --- a/src/player.cc +++ b/src/player.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.30 2005/07/25 16:18:34 deva + * *** empty log message *** + * * Revision 1.29 2005/07/25 16:09:47 deva * *** empty log message *** * @@ -102,6 +105,7 @@ Player::Player(Info *ginfo, initSDL(); doresize = false; + dopause = false; } Player::~Player() @@ -191,8 +195,11 @@ void Player::player() height = new_height; reinitSDL(); doresize = false; + dopause = false; } + if(dopause) continue; + if(!SDL_WaitEvent(&event)) break; // FIXME: Gracefully exit... switch(event.type) { @@ -283,4 +290,9 @@ void Player::resize(int w, int h) doresize = true; } +void Player::pause() +{ + dopause = true; +} + #endif /* USE_GUI */ diff --git a/src/player.h b/src/player.h index 2231b71..cc7b512 100644 --- a/src/player.h +++ b/src/player.h @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.12 2005/07/25 16:18:34 deva + * *** empty log message *** + * * Revision 1.11 2005/07/25 16:09:47 deva * *** empty log message *** * @@ -102,6 +105,7 @@ public: void stop(); void resize(int width, int height); + void pause(); void thread_main(); @@ -117,6 +121,7 @@ private: // Set to true, whenever a resize is requested. volatile bool doresize; + volatile bool dopause; // New output dimensions (overlay) int new_width; int new_height; diff --git a/src/videowidget.cc b/src/videowidget.cc index 4633ff1..e4477a4 100644 --- a/src/videowidget.cc +++ b/src/videowidget.cc @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.7 2005/07/25 16:18:34 deva + * *** empty log message *** + * * Revision 1.6 2005/07/25 15:56:27 deva * *** empty log message *** * @@ -74,6 +77,8 @@ QPixmap VideoWidget::getScreenshot() void VideoWidget::mousePressEvent(QMouseEvent *event) { + camera->pause(); + if(isFullScreen()) { printf("Going normal\n"); -- cgit v1.2.3