summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordeva <deva>2005-07-25 16:09:47 +0000
committerdeva <deva>2005-07-25 16:09:47 +0000
commit103c0face1e5dcc089b21715dfc20f4812b36072 (patch)
tree0fc4f44a4d57490656d15f012fb77c5b9ec59647 /src
parentca7341269959f106656efa78f17628560105bd3d (diff)
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/player.cc18
-rw-r--r--src/player.h6
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;