diff options
Diffstat (limited to 'src/player.cc')
-rw-r--r-- | src/player.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/player.cc b/src/player.cc index 8e39fa5..0fee7b1 100644 --- a/src/player.cc +++ b/src/player.cc @@ -39,6 +39,9 @@ /* * $Log$ + * Revision 1.26 2005/07/25 12:42:13 deva + * *** empty log message *** + * * Revision 1.25 2005/06/16 21:28:57 deva * Rewrote thread object * Fixed bug in mov_encoder (pushed read_sem too many times, whihc lead to @@ -66,6 +69,7 @@ #include <time.h> Player::Player(Info *ginfo, + int w, int h, volatile int *grunning, sem_t *gsem, Queue<Frame> *gqueue, @@ -74,6 +78,9 @@ Player::Player(Info *ginfo, // No errors has ocurred... yet! noErrors = true; + width = w; + height = h; + info = ginfo; running = grunning; @@ -89,20 +96,20 @@ Player::Player(Info *ginfo, return; } - screen = SDL_SetVideoMode(DISPLAYWIDTH, - DISPLAYHEIGHT, + screen = SDL_SetVideoMode(width, + height, 0, // 0 bpp means 'use current display depth' SDL_HWSURFACE | SDL_ANYFORMAT | SDL_HWACCEL); if(!screen) { info->error("Unable to set %dx%d video: %s.", - DISPLAYWIDTH, DISPLAYHEIGHT, SDL_GetError()); + width, height, SDL_GetError()); noErrors = false; return; } - overlay = SDL_CreateYUVOverlay(DISPLAYWIDTH, - DISPLAYHEIGHT, + overlay = SDL_CreateYUVOverlay(width, + height, SDL_YUY2_OVERLAY, // Match for the libdv decoder output screen); if(!overlay) { @@ -133,8 +140,8 @@ void Player::player() // Setup the displayarea. rect.x = 0; rect.y = 0; - rect.w = DISPLAYWIDTH; - rect.h = DISPLAYHEIGHT; + rect.w = width; + rect.h = height; bool first = true; dv_decoder_t *decoder = dv_decoder_new(FALSE/*this value is unused*/, FALSE, FALSE); |