From 103c0face1e5dcc089b21715dfc20f4812b36072 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 25 Jul 2005 16:09:47 +0000 Subject: *** empty log message *** --- src/player.cc | 18 +++++++++++++++--- src/player.h | 6 ++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/player.cc b/src/player.cc index e42b332..ad8cdc4 100644 --- a/src/player.cc +++ b/src/player.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.29 2005/07/25 16:09:47 deva + * *** empty log message *** + * * Revision 1.28 2005/07/25 15:56:27 deva * *** empty log message *** * @@ -114,15 +117,19 @@ void Player::reinitSDL() void Player::deinitSDL() { + printf("Deinit SDL..."); SDL_FreeYUVOverlay(overlay); SDL_Quit(); + printf("done!\n"); } void Player::initSDL() { + printf("Init SDL..."); if(SDL_Init(SDL_INIT_VIDEO) < 0) { info->error("Unable to init SDL: %s.", SDL_GetError()); noErrors = false; + printf("failed!\n"); return; } @@ -135,6 +142,7 @@ void Player::initSDL() info->error("Unable to set %dx%d video: %s.", 720, 576, SDL_GetError()); noErrors = false; + printf("failed!\n"); return; } @@ -145,8 +153,10 @@ void Player::initSDL() if(!overlay) { info->error("Unable to create SDL overlay: %s.", SDL_GetError()); noErrors = false; + printf("failed!\n"); return; } + printf("done!\n"); } void Player::player() @@ -177,8 +187,10 @@ void Player::player() sem_post(&play_sem); if(doresize) { - doresize = false; + width = new_width; + height = new_height; reinitSDL(); + doresize = false; } if(!SDL_WaitEvent(&event)) break; // FIXME: Gracefully exit... @@ -266,8 +278,8 @@ void Player::stop() void Player::resize(int w, int h) { - width = w; - height = h; + new_width = w; + new_height = h; doresize = true; } diff --git a/src/player.h b/src/player.h index 410b3e9..2231b71 100644 --- a/src/player.h +++ b/src/player.h @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.11 2005/07/25 16:09:47 deva + * *** empty log message *** + * * Revision 1.10 2005/07/25 15:56:27 deva * *** empty log message *** * @@ -114,6 +117,9 @@ private: // Set to true, whenever a resize is requested. volatile bool doresize; + // New output dimensions (overlay) + int new_width; + int new_height; Info *info; -- cgit v1.2.3