view MediaPlayer.h @ 2345:182effc4b0ee

for MultimediaPlayer
author Ritor1
date Mon, 07 Apr 2014 19:15:13 +0600
parents 58be29479e75
children d57505d3c70c
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;
            bool Stopped();
            bool End_file();
  };

  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);
      bool LoadFromLOD(HANDLE h, int readFunction(void*, uint8_t*, int), int64_t seekFunction(void*, int64_t, int), int width, int height);
	  char *DoFrame();

  };
};

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;