view VideoPlayer.h @ 2353:bb9f180d50f6

Removing a few unsorted_subs includes
author Grumpy7
date Wed, 09 Apr 2014 21:58:09 +0200
parents d57505d3c70c
children 08c4f1799ca1
line wrap: on
line source

#pragma once
#include "OSWindow.h"
#include "Texture.h"
#include "MediaPlayer.h"

#pragma pack(push, 1)

#pragma pack(pop)

#pragma pack(push, 1)
struct MovieHeader
{
  char pVideoName[40];
  unsigned int uFileOffset;
};
#pragma pack(pop)

void ShowMM7IntroVideo_and_LoadingScreen();

extern "C"
{
#include "lib/libavcodec/avcodec.h"
#include "lib/libavformat/avformat.h"
#include "lib/libavutil/avutil.h"
#include "lib/libavutil/imgutils.h"
#include "lib/libswscale/swscale.h"
#include "lib/libswresample/swresample.h"
#include "lib/libavutil/opt.h"
}
#pragma comment(lib, "avcodec.lib")
#pragma comment(lib, "avformat.lib")
#pragma comment(lib, "avutil.lib")
#pragma comment(lib, "swscale.lib")
#pragma comment(lib, "swresample.lib")

#include "lib/OpenAL/al.h"
#include "lib/OpenAL/alc.h"
#pragma comment(lib, "OpenAL32.lib")

#pragma pack(push, 1)
struct VideoPlayer
{
  VideoPlayer();
  //----- (004BECBD) --------------------------------------------------------
  virtual ~VideoPlayer()
  {
    bStopBeforeSchedule = false;
    pResetflag = 0;
    pVideoFrame.Release();
  }

  void PlayDeathMovie();
  void Initialize(OSWindow *window);
  void Unload();
  void OpenHouseMovie(const char *pMovieName, unsigned int a3_1);//0x4BF28F
  bool AnyMovieLoaded();
  void OpenGlobalMovie(const char *pFilename, unsigned int bLoop, int a4);
  void _4BF5B2();
  void SelectMovieType();//0x4BF73A
  void _inlined_in_463149();
  void MovieLoop(const char *pMovieName, int a2, int a3, int a4);

  RGBTexture pVideoFrame;
  int field_34;
  MovieHeader *pMightVideoHeaders;
  MovieHeader *pMagicVideoHeaders;
  int pResetflag;
  int field_44;
  unsigned int uNumMightVideoHeaders;
  unsigned int uNumMagicVideoHeaders;
  int uBinkDirectDrawSurfaceType;
  int bBufferLoaded;
  unsigned int bPlayingMovie;
  unsigned int bFirstFrame;
  unsigned int bUsingSmackerMMX;
  unsigned int bLoopPlaying;
  int field_68;
  unsigned int bStopBeforeSchedule;
  OSWindow *window;
  struct _SMACKBLIT *pSmackMovieBlit;
  HANDLE hMightVid;
  HANDLE hMagicVid;
  char field_88[20];
  unsigned int uMovieFormat;
  int uMovieFormatSwapped;
  char pCurrentMovieName[64];
  char pVideoFrameTextureFilename[32];
  int field_104;
  Media::Player *pPlayer;
  Media::IMovie *pMovie;
  HANDLE hVidFile;
  int uSize;
  int uOffset;

  void UpdatePalette();
  static int readFunction(void *, uint8_t *, int);
  static int64_t seekFunction(void *, int64_t, int);
  void LoadMovie(const char *);
  void PlayAudio(const wchar_t * pFilename);
  void PlayMovie(const wchar_t * pFilename);
};
#pragma pack(pop)

extern VideoPlayer *pVideoPlayer;
extern LRESULT __stdcall wWinProc(HWND hwnd, unsigned int msg, WPARAM wparam, LPARAM lparam);