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.

91 lines
2.9 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // videomaterialdefs.h
  4. //
  5. // Purpose: provides an abstract interface to extract singleframes from
  6. // a video file
  7. //
  8. //=============================================================================
  9. #pragma once
  10. #ifndef VIDEOMATERIALDEFS_H
  11. #define VIDEOMATERIALDEFS_H
  12. // -----------------------------------------------------------------------
  13. // ServerVideoHandle_t - Handle to a cached video asset
  14. // -----------------------------------------------------------------------
  15. typedef uint32 ServerVideoHandle_t;
  16. typedef uint8 RemoteVideoSessionId_t;
  17. // -----------------------------------------------------------------------
  18. // eVideoFrameFormat_t - bitformat for transfered video frames
  19. // -----------------------------------------------------------------------
  20. enum eVideoFrameFormat_t
  21. {
  22. cVFF_Undefined = 0,
  23. cVFF_R8G8B8A8_32Bit,
  24. cVFF_R8G8B8_24Bit,
  25. cVFF_Count, // Auto list counter
  26. cVFF_ForceInt32 = INT32_MAX // Make sure eNum is (at least) an int32
  27. };
  28. // -----------------------------------------------------------------------
  29. // eVideoCodec_t available video codecs
  30. // -----------------------------------------------------------------------
  31. enum eVideoCodec_t
  32. {
  33. cVC_H264VideoCodec = 0,
  34. };
  35. // -----------------------------------------------------------------------
  36. // eVideoQuality_t - encoding quality options
  37. // -----------------------------------------------------------------------
  38. enum eVideoQuality_t
  39. {
  40. cVQ_MinQuality = 0,
  41. cVQ_LowQuality,
  42. cVQ_MediumQuality,
  43. cVQ_HighQuality,
  44. cVQ_MaxQuality,
  45. cVQ_LoselessQuality,
  46. };
  47. // -----------------------------------------------------------------------
  48. // eVidCacheError_t - error codes from the remote video cache app
  49. // -----------------------------------------------------------------------
  50. enum eVidCacheError_t
  51. {
  52. cVCE_NoErr = 0, // success!
  53. cVCE_NoChacheSession, // not in a current cache session
  54. cVCE_CacheSessionOpen, // already opened a cache session
  55. cVCE_InvalidSessionID, // don't know what you are talking about...
  56. cVCE_InvalidFileName, // problem with the filename
  57. cVCE_FileNotFound, // the file doesn't exist
  58. cVCE_FileNotMovie, // unable to open file as a movie
  59. cVCE_BadFormatData, // problem with the video frame size or buffer format
  60. cVCE_ForceUint8 = UINT8_MAX
  61. };
  62. // Misc constants
  63. static const ServerVideoHandle_t INVALID_VIDEO_HANDLE = 0;
  64. static const RemoteVideoSessionId_t REMOTE_SESSION_ID_NONE = 0;
  65. static const float VIDEO_TIME_UNINITALIZED = -1.0f;
  66. static const int cMinVideoFrameWidth = 16; // Minimum video frame width supported
  67. static const int cMinVideoFrameHeight = 16; // Minimum video frame height supported
  68. static const int cMaxVideoFrameWidth = 2048; // Maximum video frame width supported
  69. static const int cMaxVideoFrameHeight = 2048; // Maximum video frame height supported
  70. #endif