![]() |
AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
00001 // 00002 // 00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine 00004 // 00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk 00006 // 00007 // For updates, tutorials and more details check out www.appeasymobile.com 00008 // 00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin. 00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support 00011 // 00012 // 00013 00014 #if !defined(_CIZ_PLATFORM_VIDEO_H_) 00015 #define _CIZ_PLATFORM_VIDEO_H_ 00016 00017 #include "CzPlatform.h" 00018 00019 #define PLATFORM_VIDEO PLATFORM->getVideo() 00020 00021 enum eCzVideoCodec 00022 { 00023 Video_Codec_None, 00024 Video_Codec_Mpeg4, 00025 Video_Codec_3gpp, 00026 }; 00027 00028 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 00029 // 00030 // IzPlatformVideo 00031 // 00032 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 00033 class IzPlatformVideo 00034 { 00035 // Properties 00036 protected: 00037 bool Initialised; 00038 CzCallback VideoStoppedCallback; //< Callback to be called when video stops playing 00039 void* VideoStoppedCallbackData; ///< Callback data to be passed back with callback 00040 public: 00041 bool isInitialised() const { return Initialised; } 00042 virtual float getPlayPosition() const = 0; 00043 virtual bool setPlayPosition(float pos) = 0; 00044 virtual bool isPlaying() const = 0; 00045 virtual void setVolume(float volume) = 0; 00046 virtual float getVolume() const = 0; 00047 void setVideoStoppedCallback(CzCallback callback, void* data) { VideoStoppedCallback = callback; VideoStoppedCallbackData = data; } 00048 CzCallback getVideoStoppedCallback() { return VideoStoppedCallback; } 00049 // Properties end 00050 public: 00051 virtual int Init() = 0; 00052 virtual void Release() = 0; 00053 virtual bool Play(const char* filename, const CzIRect& rect, int repeat_count, eCzVideoCodec codec) = 0; 00054 virtual bool PlayFromMemory(char* mem, uint32 len, const CzIRect& rect, int repeat_count, eCzVideoCodec codec) = 0; 00055 virtual void Stop() = 0; 00056 virtual void Pause() = 0; 00057 virtual void Resume() = 0; 00058 virtual bool isCodecSupported(eCzVideoCodec codec) = 0; 00059 virtual bool isCodecSupported(unsigned int codec_hash, bool &found) = 0; 00060 00061 // Event notification 00062 virtual void NotifyStopped() = 0; 00063 00064 }; 00065 00066 00067 #endif // _CIZ_PLATFORM_VIDEO_H_