view MediaPlayer.h @ 2352:8a49cf25fb88

Moving zlib wrappers to separate headers
author Grumpy7
date Wed, 09 Apr 2014 21:51:06 +0200
parents d57505d3c70c
children 08c4f1799ca1
line wrap: on
line source

#pragma once

namespace Media
{
  class ITrack
  {
    public: virtual void Play(bool loop = false) = 0;
  };

  class IMovie
  {
    public: virtual void Play() = 0;
            virtual void GetNextFrame(double dt, void *target_surface) = 0;
  };

  class Player
  {
    public:
               Player();
      virtual ~Player();

      ITrack *LoadTrack(const wchar_t *name);
      IMovie *LoadMovie(const wchar_t *name, int width, int height, int cache_ms);
      IMovie *LoadMovieFromLOD(HANDLE h, int readFunction(void*, uint8_t*, int), int64_t seekFunction(void*, int64_t, int), int width, int height);
  };
};

extern bool end_current_file;
extern bool loop_current_file;
extern DWORD time_video_begin;
extern int current_movie_width;
extern int current_movie_height;

int64_t seekFunction(void* opaque, int64_t offset, int whence);