diff VideoPlayer.cpp @ 2356:08c4f1799ca1

Elements of VideoPlayer structure moved
author Ritor1
date Thu, 10 Apr 2014 17:34:50 +0600
parents d57505d3c70c
children 5b9fb75b6f54
line wrap: on
line diff
--- a/VideoPlayer.cpp	Tue Apr 08 17:39:59 2014 +0600
+++ b/VideoPlayer.cpp	Thu Apr 10 17:34:50 2014 +0600
@@ -45,8 +45,6 @@
   return true;
 }
 
-unsigned __int64 uBinkVersion;
-
 //----- (004BF794) --------------------------------------------------------
 void ShowMM7IntroVideo_and_LoadingScreen()
 {
@@ -245,38 +243,6 @@
 //----- (004BEBD7) --------------------------------------------------------
 void VideoPlayer::Unload()
 {
-  //_BINK *pBinkMovie; // eax@1
-  //_BINKBUF *pBinkBuffer; // eax@3
-  //_SMACK *pSmackerMovie; // eax@5
-	/*
-  if ( pBinkMovie )
-  {
-    //BinkPause(pBinkMovie, 1);
-    Sleep(300);
-    //BinkClose(pBinkMovie);
-    pBinkMovie = 0;
-  }
-
-  if ( pBinkBuffer )
-  {
-    pBinkBuffer->pTargetDDrawSurface->Release();
-    pBinkBuffer->pTargetDDrawSurface = 0;
-    free(pBinkBuffer);
-    pBinkBuffer = 0;
-  }
-
-  if ( pSmackerMovie )
-  {
-    //SmackSoundOnOff(pSmackerMovie, 0);
-    //SmackClose(pSmackerMovie);
-    pSmackerMovie = 0;
-  }
-  if ( pSmackerBuffer )
-  {
-    SmackBufferClose(pSmackerBuffer);
-    pSmackerBuffer = 0;
-  }
-  */
   if ( pSmackMovieBlit )
   {
     SmackBlitClose(pSmackMovieBlit);
@@ -309,12 +275,12 @@
 	}
 }
 
-void VideoPlayer::UpdatePalette()
+void VideoPlayer::UpdatePalette() //UpdateVideo
 {
   Log::Warning(L"smacker");
   loop_current_file = true;
   pRenderer->BeginScene();
-  /*if (pMovie->Stopped())//видео завершено/перезагрузка
+  /*if (end_current_file)//видео завершено/перезагрузка
   {
     int width = game_viewport_width;
     int height = game_viewport_height;
@@ -434,7 +400,7 @@
     }
   }*/
   pMouse->_469E24();
-  if ( window_SpeakInHouse && window_SpeakInHouse->ptr_1C == (void *)165 && !this->pMovie)//!this->pSmackerMovie )
+  if ( window_SpeakInHouse && window_SpeakInHouse->ptr_1C == (void *)165 && !pMovie)//!this->pSmackerMovie )
   {
     bGameoverLoop = true;
     HouseDialogPressCloseBtn();
@@ -487,9 +453,7 @@
   //RGBTexture::RGBTexture(&pVideoPlayer->pVideoFrame);
   bStopBeforeSchedule = false;
   pResetflag = 0;
-  //pPlayer = new MultimediaPlayer();
-  //pPlayer->Initialize();
-  pPlayer = new Media::Player;//создаётся плеер
+  pMediaPlayer = new Media::MPlayer;//создаётся плеер
   pMovie = nullptr;
   //pBinkMovie = nullptr;
 }
@@ -525,17 +489,6 @@
   sprintf(pVideoNameSmk, "%s.smk", pFilename);
   for (uint i = 0; i < uNumMightVideoHeaders; ++i)
   {
-    //no BIK in MightVid
-    /*
-    if (!_stricmp(pVideoNameBik, pMightVideoHeaders[i].pVideoName))
-    {
-      hVidFile = hMightVid;
-      uOffset = pMightVideoHeaders[i].uFileOffset;
-      uSize = pMightVideoHeaders[i + 1].uFileOffset - uOffset;
-      this->uMovieFormat = 2;
-      this->uMovieFormatSwapped = 1;
-    }
-    */
     if (!_stricmp(pVideoNameSmk, pMightVideoHeaders[i].pVideoName))
     {
       hVidFile = hMightVid;
@@ -581,16 +534,6 @@
       client_height = rc_client.bottom - rc_client.top;
 
 
-  pMovie = pPlayer->LoadMovieFromLOD(hVidFile, &readFunction, &seekFunction, client_width, client_height);
+  pMovie = pMediaPlayer->LoadMovieFromLOD(hVidFile, &readFunction, &seekFunction, client_width, client_height);
 
 }
-void VideoPlayer::PlayAudio(const wchar_t * pFilename)
-{
-  Media::ITrack *track = pPlayer->LoadTrack(pFilename);
-  track->Play();
-}
-void VideoPlayer::PlayMovie(const wchar_t * pFilename)
-{
-  Media::IMovie *track = pPlayer->LoadMovie(pFilename, 640, 480, 0);
-  track->Play();
-}
\ No newline at end of file