Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

545 lines
20 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // The copyright to the contents herein is the property of Valve, L.L.C.
  4. // The contents may be used and/or copied only with the written permission of
  5. // Valve, L.L.C., or in accordance with the terms and conditions stipulated in
  6. // the agreement/contract under which the contents have been supplied.
  7. //
  8. //=============================================================================
  9. #ifndef IVIDEOSERVICES_H
  10. #define IVIDEOSERVICES_H
  11. #if defined ( WIN32 )
  12. #pragma once
  13. #endif
  14. #include <math.h>
  15. #include "appframework/IAppSystem.h"
  16. #include "tier0/platform.h"
  17. #include <stdint.h>
  18. #ifndef _STDINT_H
  19. #define _STDINT_H
  20. #endif
  21. #ifndef _STDINT
  22. #define _STDINT
  23. #endif
  24. #ifndef INT32_MAX
  25. #define INT32_MAX (0x7FFFFFFF)
  26. #endif
  27. #ifndef UINT32_MAX
  28. #define UINT32_MAX (0xFFFFFFFFu)
  29. #endif
  30. //-----------------------------------------------------------------------------
  31. // Forward declarations
  32. //-----------------------------------------------------------------------------
  33. class IMaterial;
  34. //-----------------------------------------------------------------------------
  35. // Types used when dealing with video services
  36. //-----------------------------------------------------------------------------
  37. #define FILE_EXTENSION_ANY_MATCHING_VIDEO ".vid"
  38. //#define ENABLE_EXTERNAL_ENCODER_LOGGING
  39. //-----------------------------------------------------------------------------
  40. // enums used when dealing with video services
  41. //-----------------------------------------------------------------------------
  42. // ==============================================
  43. // various general video system enumerations
  44. namespace VideoResult
  45. {
  46. enum EVideoResult_t
  47. {
  48. SUCCESS = 0,
  49. SYSTEM_NOT_AVAILABLE,
  50. CODEC_NOT_AVAILABLE,
  51. FEATURE_NOT_AVAILABLE,
  52. UNKNOWN_OPERATION,
  53. ILLEGAL_OPERATION,
  54. OPERATION_NOT_SUPPORTED,
  55. BAD_INPUT_PARAMETERS,
  56. OPERATION_ALREADY_PERFORMED,
  57. OPERATION_OUT_OF_SEQUENCE,
  58. VIDEO_ERROR_OCCURED,
  59. FILE_ERROR_OCCURED,
  60. AUDIO_ERROR_OCCURED,
  61. SYSTEM_ERROR_OCCURED,
  62. INITIALIZATION_ERROR_OCCURED,
  63. SHUTDOWN_ERROR_OCCURED,
  64. MATERIAL_NOT_FOUND,
  65. RECORDER_NOT_FOUND,
  66. VIDEO_FILE_NOT_FOUND,
  67. VIDEO_SYSTEM_NOT_FOUND,
  68. };
  69. };
  70. typedef VideoResult::EVideoResult_t VideoResult_t;
  71. namespace VideoSystem
  72. {
  73. enum EVideoSystem_t
  74. {
  75. ALL_VIDEO_SYSTEMS = -2,
  76. DETERMINE_FROM_FILE_EXTENSION = -1,
  77. NONE = 0,
  78. BINK,
  79. AVI,
  80. WMV,
  81. QUICKTIME,
  82. WEBM,
  83. VIDEO_SYSTEM_COUNT,
  84. VIDEO_SYSTEM_FIRST = 1,
  85. };
  86. };
  87. typedef VideoSystem::EVideoSystem_t VideoSystem_t;
  88. namespace VideoSystemStatus
  89. {
  90. enum EVideoSystemStatus_t
  91. {
  92. OK = 0,
  93. NOT_INSTALLED,
  94. NOT_CURRENT_VERSION,
  95. NOT_INITIALIZED,
  96. INITIALIZATION_ERROR,
  97. };
  98. };
  99. typedef VideoSystemStatus::EVideoSystemStatus_t VideoSystemStatus_t;
  100. namespace VideoSystemFeature
  101. {
  102. enum EVideoSystemFeature_t
  103. {
  104. NO_FEATURES = 0x00000000,
  105. PLAY_VIDEO_FILE_FULL_SCREEN = 0x00000001,
  106. PLAY_VIDEO_FILE_IN_MATERIAL = 0x00000002,
  107. ENCODE_VIDEO_TO_FILE = 0x00000004,
  108. ENCODE_AUDIO_TO_FILE = 0x00000008,
  109. FULL_PLAYBACK = PLAY_VIDEO_FILE_FULL_SCREEN | PLAY_VIDEO_FILE_IN_MATERIAL,
  110. FULL_ENCODE = ENCODE_VIDEO_TO_FILE | ENCODE_AUDIO_TO_FILE,
  111. ALL_VALID_FEATURES = FULL_PLAYBACK | FULL_ENCODE,
  112. ESF_FORCE_UINT32 = UINT32_MAX,
  113. };
  114. DEFINE_ENUM_BITWISE_OPERATORS( EVideoSystemFeature_t );
  115. };
  116. typedef VideoSystemFeature::EVideoSystemFeature_t VideoSystemFeature_t;
  117. namespace VideoSoundDeviceOperation
  118. {
  119. enum EVideoSoundDeviceOperation_t
  120. {
  121. SET_DIRECT_SOUND_DEVICE = 0, // Windows option
  122. SET_MILES_SOUND_DEVICE, // Supported by RAD
  123. HOOK_X_AUDIO, // Xbox Option
  124. SET_SOUND_MANAGER_DEVICE, // OSX Option
  125. SET_LIB_AUDIO_DEVICE, // PS3 Option
  126. SET_SDL_SOUND_DEVICE, // SDL Audio
  127. SET_SDL_PARAMS, // SDL Audio params
  128. SDLMIXER_CALLBACK, // SDLMixer callback
  129. OPERATION_COUNT
  130. };
  131. };
  132. typedef VideoSoundDeviceOperation::EVideoSoundDeviceOperation_t VideoSoundDeviceOperation_t;
  133. // ==============================================
  134. // Video Encoding related settings
  135. namespace VideoEncodeCodec
  136. {
  137. //
  138. // NOTE: NEW CODECS SHOULD BE ADDED TO THE END OF THIS LIST.
  139. //
  140. enum EVideoEncodeCodec_t
  141. {
  142. MPEG2_CODEC,
  143. MPEG4_CODEC,
  144. H261_CODEC,
  145. H263_CODEC,
  146. H264_CODEC,
  147. MJPEG_A_CODEC,
  148. MJPEG_B_CODEC,
  149. SORENSON3_CODEC,
  150. CINEPACK_CODEC,
  151. WEBM_CODEC,
  152. //
  153. // NOTE: ADD NEW CODECS HERE.
  154. //
  155. CODEC_COUNT,
  156. DEFAULT_CODEC = H264_CODEC,
  157. };
  158. };
  159. typedef VideoEncodeCodec::EVideoEncodeCodec_t VideoEncodeCodec_t;
  160. namespace VideoEncodeQuality
  161. {
  162. enum EVideoEncodeQuality_t
  163. {
  164. MIN_QUALITY = 0,
  165. MAX_QUALITY = 100
  166. };
  167. };
  168. typedef VideoEncodeQuality::EVideoEncodeQuality_t VideoEncodeQuality_t;
  169. namespace VideoEncodeSourceFormat
  170. {
  171. enum EVideoEncodeSourceFormat_t // Image source format for frames to encoded
  172. {
  173. BGRA_32BIT = 0,
  174. BGR_24BIT,
  175. RGB_24BIT,
  176. RGBA_32BIT,
  177. VIDEO_FORMAT_COUNT,
  178. VIDEO_FORMAT_FIRST = 0
  179. };
  180. };
  181. typedef VideoEncodeSourceFormat::EVideoEncodeSourceFormat_t VideoEncodeSourceFormat_t;
  182. namespace VideoEncodeGamma
  183. {
  184. enum EVideoEncodeGamma_t
  185. {
  186. NO_GAMMA_ADJUST = 0,
  187. PLATFORM_STANDARD_GAMMA,
  188. GAMMA_1_8,
  189. GAMMA_2_2,
  190. GAMMA_2_5,
  191. GAMMA_COUNT
  192. };
  193. };
  194. typedef VideoEncodeGamma::EVideoEncodeGamma_t VideoEncodeGamma_t;
  195. namespace VideoPlaybackGamma
  196. {
  197. enum EVideoPlaybackGamma_t
  198. {
  199. USE_GAMMA_CONVAR = -1,
  200. NO_GAMMA_ADJUST = 0,
  201. PLATFORM_DEFAULT_GAMMMA,
  202. GAMMA_1_8,
  203. GAMMA_2_2,
  204. GAMMA_2_5,
  205. GAMMA_COUNT
  206. };
  207. };
  208. typedef VideoPlaybackGamma::EVideoPlaybackGamma_t VideoPlaybackGamma_t;
  209. // ==============================================
  210. // Video Playback related settings
  211. namespace VideoPlaybackFlags
  212. {
  213. enum EVideoPlaybackFlags_t // Options when playing a video file
  214. {
  215. NO_PLAYBACK_OPTIONS = 0x00000000,
  216. // Full Screen Playback Options
  217. FILL_WINDOW = 0x00000001, // force video fill entire window
  218. LOCK_ASPECT_RATIO = 0x00000002, // preserve aspect ratio when scaling
  219. INTEGRAL_SCALE = 0x00000004, // scale video only by integral amounts
  220. CENTER_VIDEO_IN_WINDOW = 0x00000008, // center output video in window
  221. FORCE_MIN_PLAY_TIME = 0x00000010, // play for a minimum amount of time before allowing skip or abort
  222. ABORT_ON_SPACE = 0x00000100, // Keys to abort fullscreen playback on
  223. ABORT_ON_ESC = 0x00000200,
  224. ABORT_ON_RETURN = 0x00000400,
  225. ABORT_ON_ANY_KEY = 0x00000700,
  226. PAUSE_ON_SPACE = 0x00001000, // Keys to pause fullscreen playback on
  227. PAUSE_ON_ESC = 0x00002000,
  228. PAUSE_ON_RETURN = 0x00004000,
  229. PAUSE_ON_ANY_KEY = 0x00007000,
  230. LOOP_VIDEO = 0x00010000, // Full Screen and Video material
  231. NO_AUDIO = 0x00020000,
  232. PRELOAD_VIDEO = 0x00040000,
  233. DONT_AUTO_START_VIDEO = 0x00100000, // Don't begin playing until told to do so.
  234. TEXTURES_ACTUAL_SIZE = 0x00200000, // Try and use textures the same size as the video frame
  235. VALID_FULLSCREEN_FLAGS = 0x0007771F, // Playback Flags that are valid for playing videos fullscreen
  236. VALID_MATERIAL_FLAGS = 0x00370000, // Playback Flags that are valid for playing videos in a material
  237. DEFAULT_MATERIAL_OPTIONS = NO_PLAYBACK_OPTIONS,
  238. DEFAULT_FULLSCREEN_OPTIONS = CENTER_VIDEO_IN_WINDOW | LOCK_ASPECT_RATIO | ABORT_ON_ANY_KEY,
  239. EVPF_FORCE_UINT32 = UINT32_MAX,
  240. };
  241. DEFINE_ENUM_BITWISE_OPERATORS( EVideoPlaybackFlags_t );
  242. }
  243. typedef VideoPlaybackFlags::EVideoPlaybackFlags_t VideoPlaybackFlags_t;
  244. namespace AudioEncodeSourceFormat
  245. {
  246. enum EAudioEncodeSourceFormat_t // Audio source format to encode
  247. {
  248. AUDIO_NONE = 0,
  249. AUDIO_16BIT_PCMStereo,
  250. AUDIO_FORMAT_COUNT
  251. };
  252. };
  253. typedef AudioEncodeSourceFormat::EAudioEncodeSourceFormat_t AudioEncodeSourceFormat_t;
  254. namespace AudioEncodeOptions
  255. {
  256. enum EAudioEncodeOptions_t // Options to control audio encoding
  257. {
  258. NO_AUDIO_OPTIONS = 0x00000000,
  259. USE_AUDIO_ENCODE_GROUP_SIZE = 0x00000001, // When adding to the video media, use fixed size sample groups
  260. GROUP_SIZE_IS_VIDEO_FRAME = 0x00000002, // use a group size equal to one video frame in duration
  261. LIMIT_AUDIO_TRACK_TO_VIDEO_DURATION = 0x00000004, // Don't let the Audio Track exceed the video track in duration
  262. PAD_AUDIO_WITH_SILENCE = 0x00000008, // If Audio track duration is less than video track's, pad with silence
  263. AEO_FORCE_UINT32 = UINT32_MAX,
  264. };
  265. DEFINE_ENUM_BITWISE_OPERATORS( EAudioEncodeOptions_t );
  266. }
  267. typedef AudioEncodeOptions::EAudioEncodeOptions_t AudioEncodeOptions_t;
  268. //-----------------------------------------------------------------------------
  269. // Frame Rate Class
  270. //-----------------------------------------------------------------------------
  271. class VideoFrameRate_t
  272. {
  273. public:
  274. inline VideoFrameRate_t() : m_TimeUnitsPerSecond( 0 ), m_TimeUnitsPerFrame( 1000 ) {};
  275. inline VideoFrameRate_t( int FPS, bool NTSC ) { SetFPS( FPS, NTSC); }
  276. inline explicit VideoFrameRate_t( float FPS ) { SetFPS( FPS); };
  277. inline VideoFrameRate_t& operator=( const VideoFrameRate_t& rhs ) { m_TimeUnitsPerSecond = rhs.m_TimeUnitsPerSecond; m_TimeUnitsPerFrame = rhs.m_TimeUnitsPerFrame; return *this; }
  278. inline VideoFrameRate_t( const VideoFrameRate_t &rhs ) { *this = rhs; };
  279. inline void SetRaw( int timeUnitsPerSecond, int TimeUnitsPerFrame ) { m_TimeUnitsPerSecond = timeUnitsPerSecond; m_TimeUnitsPerFrame = TimeUnitsPerFrame; }
  280. inline float GetFPS() const { return (float) m_TimeUnitsPerSecond / (float) m_TimeUnitsPerFrame; }
  281. inline int GetIntFPS() const { return (int) ( (float) m_TimeUnitsPerSecond / (float) m_TimeUnitsPerFrame + 0.5f ); }
  282. inline bool IsNTSCRate() const { return ( m_TimeUnitsPerFrame == 1001 ); }
  283. inline int GetUnitsPerSecond() const { return m_TimeUnitsPerSecond; }
  284. inline int GetUnitsPerFrame() const { return m_TimeUnitsPerFrame; }
  285. inline void SetFPS( int FPS, bool NTSC ) { m_TimeUnitsPerSecond = FPS * 1000; m_TimeUnitsPerFrame = 1000 + (uint) NTSC; }
  286. inline void SetFPS( float FPS ) { m_TimeUnitsPerSecond = (uint) ( FPS * 1000.0f ); m_TimeUnitsPerFrame = 1000; }
  287. static inline bool IsNTSC( float FPS ) { float diff = ceil(FPS) - FPS; return ( diff > 0.02f && diff < 0.05f); }
  288. inline void Clear() { m_TimeUnitsPerSecond = 0; m_TimeUnitsPerFrame = 1000; }
  289. inline bool IsValid() { return ( m_TimeUnitsPerSecond != 0); }
  290. private:
  291. uint32 m_TimeUnitsPerSecond;
  292. uint32 m_TimeUnitsPerFrame;
  293. };
  294. //-----------------------------------------------------------------------------
  295. // specific interfaces returned and managed by video services
  296. //-----------------------------------------------------------------------------
  297. //-----------------------------------------------------------------------------
  298. // Video Material interface - manages the playing back of a video to a
  299. // a material / texture combo
  300. //-----------------------------------------------------------------------------
  301. class IVideoMaterial : public IBaseInterface
  302. {
  303. public:
  304. // Video information functions
  305. virtual const char *GetVideoFileName() = 0; // Gets the file name of the video this material is playing
  306. virtual VideoResult_t GetLastResult() = 0; // Gets detailed info on the last operation
  307. virtual VideoFrameRate_t &GetVideoFrameRate() = 0; // Returns the frame rate of the associated video in FPS
  308. // Audio Functions
  309. virtual bool HasAudio() = 0; // Query if the video has an audio track
  310. virtual bool SetVolume( float fVolume ) = 0; // Adjust the playback volume
  311. virtual float GetVolume() = 0; // Query the current volume
  312. virtual void SetMuted( bool bMuteState ) = 0; // Mute/UnMutes the audio playback
  313. virtual bool IsMuted() = 0; // Query muted status
  314. virtual VideoResult_t SoundDeviceCommand( VideoSoundDeviceOperation_t operation, void *pDevice = nullptr, void *pData = nullptr ) = 0; // Assign Sound Device for this Video Material
  315. // Video playback state functions
  316. virtual bool IsVideoReadyToPlay() = 0; // Queries if the video material was initialized successfully and is ready for playback, but not playing or finished
  317. virtual bool IsVideoPlaying() = 0; // Is the video currently playing (and needs update calls, etc), or paused while playing?
  318. virtual bool IsNewFrameReady() = 0; // Do we have a new frame to get & display?
  319. virtual bool IsFinishedPlaying() = 0; // Have we reached the end of the movie
  320. virtual bool StartVideo() = 0; // Starts the video playing
  321. virtual bool StopVideo() = 0; // Terminates the video playing
  322. virtual void SetLooping( bool bLoopVideo ) = 0; // Sets the video to loop (or not)
  323. virtual bool IsLooping() = 0; // Queries if the video is looping
  324. virtual void SetPaused( bool bPauseState ) = 0; // Pauses or Unpauses video playback
  325. virtual bool IsPaused() = 0; // Queries if the video is paused
  326. // Position in playback functions
  327. virtual float GetVideoDuration() = 0; // Returns the duration of the associated video in seconds
  328. virtual int GetFrameCount() = 0; // Returns the total number of (unique) frames in the video
  329. virtual bool SetFrame( int FrameNum ) = 0; // Sets the current frame # in the video to play next
  330. virtual int GetCurrentFrame() = 0; // Gets the current frame # for the video playback, 0 based
  331. virtual bool SetTime( float flTime ) = 0; // Sets the video playback to specified time (in seconds)
  332. virtual float GetCurrentVideoTime() = 0; // Gets the current time in the video playback
  333. // Update function
  334. virtual bool Update() = 0; // Updates the video frame to reflect the time passed, true = new frame available
  335. // Material / Texture Info functions
  336. virtual IMaterial *GetMaterial() = 0; // Gets the IMaterial associated with an video material
  337. virtual void GetVideoTexCoordRange( float *pMaxU, float *pMaxV ) = 0; // Returns the max texture coordinate of the video portion of the material surface ( 0.0, 0.0 to U, V )
  338. virtual void GetVideoImageSize( int *pWidth, int *pHeight ) = 0; // Returns the frame size of the Video Image Frame in pixels ( the stored in a subrect of the material itself)
  339. };
  340. //-----------------------------------------------------------------------------
  341. // Video Recorder interface - manages the creation of a new video file
  342. //-----------------------------------------------------------------------------
  343. class IVideoRecorder : public IBaseInterface
  344. {
  345. public:
  346. virtual bool EstimateMovieFileSize( size_t *pEstSize, int movieWidth, int movieHeight, VideoFrameRate_t movieFps, float movieDuration, VideoEncodeCodec_t theCodec, int videoQuality, AudioEncodeSourceFormat_t srcAudioFormat = AudioEncodeSourceFormat::AUDIO_NONE, int audioSampleRate = 0 ) = 0;
  347. virtual bool CreateNewMovieFile( const char *pFilename, bool hasAudioTrack = false ) = 0;
  348. virtual bool SetMovieVideoParameters( VideoEncodeCodec_t theCodec, int videoQuality, int movieFrameWidth, int movieFrameHeight, VideoFrameRate_t movieFPS, VideoEncodeGamma_t gamma = VideoEncodeGamma::NO_GAMMA_ADJUST ) = 0;
  349. virtual bool SetMovieSourceImageParameters( VideoEncodeSourceFormat_t srcImageFormat, int imgWidth, int imgHeight ) = 0;
  350. virtual bool SetMovieSourceAudioParameters( AudioEncodeSourceFormat_t srcAudioFormat = AudioEncodeSourceFormat::AUDIO_NONE, int audioSampleRate = 0, AudioEncodeOptions_t audioOptions = AudioEncodeOptions::NO_AUDIO_OPTIONS, int audioSampleGroupSize = 0) = 0;
  351. virtual bool IsReadyToRecord() = 0;
  352. virtual VideoResult_t GetLastResult() = 0;
  353. virtual bool AppendVideoFrame( void *pFrameBuffer, int nStrideAdjustBytes = 0 ) = 0;
  354. virtual bool AppendAudioSamples( void *pSampleBuffer, size_t sampleSize ) = 0;
  355. virtual int GetFrameCount() = 0;
  356. virtual int GetSampleCount() = 0;
  357. virtual VideoFrameRate_t GetFPS() = 0;
  358. virtual int GetSampleRate() = 0;
  359. virtual bool AbortMovie() = 0;
  360. virtual bool FinishMovie( bool SaveMovieToDisk = true ) = 0;
  361. #ifdef ENABLE_EXTERNAL_ENCODER_LOGGING
  362. virtual bool LogMessage( const char *msg ) = 0;
  363. #endif
  364. };
  365. //-----------------------------------------------------------------------------
  366. // Main VIDEO_SERVICES interface
  367. //-----------------------------------------------------------------------------
  368. #define VIDEO_SERVICES_INTERFACE_VERSION "IVideoServices002"
  369. class IVideoServices : public IAppSystem
  370. {
  371. public:
  372. // Query the available video systems
  373. virtual int GetAvailableVideoSystemCount() = 0;
  374. virtual VideoSystem_t GetAvailableVideoSystem( int n ) = 0;
  375. virtual bool IsVideoSystemAvailable( VideoSystem_t videoSystem ) = 0;
  376. virtual VideoSystemStatus_t GetVideoSystemStatus( VideoSystem_t videoSystem ) = 0;
  377. virtual VideoSystemFeature_t GetVideoSystemFeatures( VideoSystem_t videoSystem ) = 0;
  378. virtual const char *GetVideoSystemName( VideoSystem_t videoSystem ) = 0;
  379. virtual VideoSystem_t FindNextSystemWithFeature( VideoSystemFeature_t features, VideoSystem_t startAfter = VideoSystem::NONE ) = 0;
  380. virtual VideoResult_t GetLastResult() = 0;
  381. // deal with video file extensions and video system mappings
  382. virtual int GetSupportedFileExtensionCount( VideoSystem_t videoSystem ) = 0;
  383. virtual const char *GetSupportedFileExtension( VideoSystem_t videoSystem, int extNum = 0 ) = 0;
  384. virtual VideoSystemFeature_t GetSupportedFileExtensionFeatures( VideoSystem_t videoSystem, int extNum = 0 ) = 0;
  385. virtual VideoSystem_t LocateVideoSystemForPlayingFile( const char *pFileName, VideoSystemFeature_t playMode = VideoSystemFeature::PLAY_VIDEO_FILE_IN_MATERIAL ) = 0;
  386. virtual VideoResult_t LocatePlayableVideoFile( const char *pSearchFileName, const char *pPathID, VideoSystem_t *pPlaybackSystem, char *pPlaybackFileName, int fileNameMaxLen, VideoSystemFeature_t playMode = VideoSystemFeature::FULL_PLAYBACK ) = 0;
  387. // Create/destroy a video material
  388. virtual IVideoMaterial *CreateVideoMaterial( const char *pMaterialName, const char *pVideoFileName, const char *pPathID = nullptr,
  389. VideoPlaybackFlags_t playbackFlags = VideoPlaybackFlags::DEFAULT_MATERIAL_OPTIONS,
  390. VideoSystem_t videoSystem = VideoSystem::DETERMINE_FROM_FILE_EXTENSION, bool PlayAlternateIfNotAvailable = true ) = 0;
  391. virtual VideoResult_t DestroyVideoMaterial( IVideoMaterial* pVideoMaterial ) = 0;
  392. virtual int GetUniqueMaterialID() = 0;
  393. // Create/destroy a video encoder
  394. virtual VideoResult_t IsRecordCodecAvailable( VideoSystem_t videoSystem, VideoEncodeCodec_t codec ) = 0;
  395. virtual IVideoRecorder *CreateVideoRecorder( VideoSystem_t videoSystem ) = 0;
  396. virtual VideoResult_t DestroyVideoRecorder( IVideoRecorder *pVideoRecorder ) = 0;
  397. // Plays a given video file until it completes or the user presses ESC, SPACE, or ENTER
  398. virtual VideoResult_t PlayVideoFileFullScreen( const char *pFileName, const char *pPathID, void *mainWindow, int windowWidth, int windowHeight, int desktopWidth, int desktopHeight, bool windowed, float forcedMinTime,
  399. VideoPlaybackFlags_t playbackFlags = VideoPlaybackFlags::DEFAULT_FULLSCREEN_OPTIONS,
  400. VideoSystem_t videoSystem = VideoSystem::DETERMINE_FROM_FILE_EXTENSION, bool PlayAlternateIfNotAvailable = true ) = 0;
  401. // Sets the sound devices that the video will decode to
  402. virtual VideoResult_t SoundDeviceCommand( VideoSoundDeviceOperation_t operation, void *pDevice = nullptr, void *pData = nullptr, VideoSystem_t videoSystem = VideoSystem::ALL_VIDEO_SYSTEMS ) = 0;
  403. // Get the (localized) name of a codec as a string
  404. virtual const wchar_t *GetCodecName( VideoEncodeCodec_t nCodec ) = 0;
  405. };
  406. #endif // IVIDEOSERVICES_H