Counter Strike : Global Offensive Source Code
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.

61 lines
2.0 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // iremotevideomaterial.h
  4. //
  5. // Purpose: provides an abstract interface to extract singleframes from
  6. // a video file
  7. //
  8. //=============================================================================
  9. #pragma once
  10. #ifndef IREMOTEVIDEOMATERIAL_H
  11. #define IREMOTEVIDEOMATERIAL_H
  12. #include "videocache/videomaterialdefs.h"
  13. // needed for definitions of ITextureRegenerator & IMaterial
  14. class IMaterial;
  15. //-----------------------------------------------------------------------------
  16. // Interface class for connecting to a remote video and retrieving specific
  17. // frames from the video.
  18. //
  19. //
  20. //
  21. //-----------------------------------------------------------------------------
  22. class IRemoteVideoMaterial
  23. {
  24. public:
  25. virtual void Release() = 0;
  26. virtual bool IsInitialized() = 0;
  27. virtual bool IsRemoteVideoAvailable() = 0;
  28. virtual bool IsConnectedToRemoteVideo() = 0;
  29. // commands that involve communication with the remote video server
  30. virtual bool ConnectToRemoteVideo( const char* videoFileName ) = 0;
  31. virtual bool GetRemoteVideoFrame( float theTime ) = 0;
  32. virtual bool DisconnectFromRemoteVideo() = 0;
  33. // Get information about the remote video
  34. virtual const char *GetRemoteVideoFileName() = 0;
  35. virtual float GetRemoteVideoDuration() = 0;
  36. virtual float GetRemoteVideoFPS() = 0;
  37. virtual float GetLastFrameTime() = 0;
  38. // Get a Texture/Material with the video frame in it
  39. virtual IMaterial *GetRemoteVideoFrameMaterial() = 0;
  40. virtual bool GetRemoteVideoFrameSize( int &width, int &height ) = 0;
  41. virtual bool GetRemoteVideoFrameTextureCoordRange( float &maxU, float &maxV ) = 0;
  42. // Get the raw video frame buffer
  43. virtual void *GetRemoteVideoFrameBuffer() = 0;
  44. virtual int GetRemoteVideoFrameBufferSize() = 0;
  45. virtual eVideoFrameFormat_t GetRemoteVideoFrameBufferFormat() = 0;
  46. };
  47. #endif // IREMOTEVIDEOMATERIAL_H