Result.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. //
  2. // Notice Regarding Standards. AMD does not provide a license or sublicense to
  3. // any Intellectual Property Rights relating to any standards, including but not
  4. // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4;
  5. // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3
  6. // (collectively, the "Media Technologies"). For clarity, you will pay any
  7. // royalties due for such third party technologies, which may include the Media
  8. // Technologies that are owed as a result of AMD providing the Software to you.
  9. //
  10. // MIT license
  11. //
  12. // Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
  13. //
  14. // Permission is hereby granted, free of charge, to any person obtaining a copy
  15. // of this software and associated documentation files (the "Software"), to deal
  16. // in the Software without restriction, including without limitation the rights
  17. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  18. // copies of the Software, and to permit persons to whom the Software is
  19. // furnished to do so, subject to the following conditions:
  20. //
  21. // The above copyright notice and this permission notice shall be included in
  22. // all copies or substantial portions of the Software.
  23. //
  24. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  25. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  26. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  27. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  28. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  29. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  30. // THE SOFTWARE.
  31. //
  32. #ifndef AMF_Result_h
  33. #define AMF_Result_h
  34. #pragma once
  35. #include "Platform.h"
  36. //----------------------------------------------------------------------------------------------
  37. // result codes
  38. //----------------------------------------------------------------------------------------------
  39. typedef enum AMF_RESULT
  40. {
  41. AMF_OK = 0,
  42. AMF_FAIL ,
  43. // common errors
  44. AMF_UNEXPECTED ,
  45. AMF_ACCESS_DENIED ,
  46. AMF_INVALID_ARG ,
  47. AMF_OUT_OF_RANGE ,
  48. AMF_OUT_OF_MEMORY ,
  49. AMF_INVALID_POINTER ,
  50. AMF_NO_INTERFACE ,
  51. AMF_NOT_IMPLEMENTED ,
  52. AMF_NOT_SUPPORTED ,
  53. AMF_NOT_FOUND ,
  54. AMF_ALREADY_INITIALIZED ,
  55. AMF_NOT_INITIALIZED ,
  56. AMF_INVALID_FORMAT ,// invalid data format
  57. AMF_WRONG_STATE ,
  58. AMF_FILE_NOT_OPEN ,// cannot open file
  59. // device common codes
  60. AMF_NO_DEVICE ,
  61. // device directx
  62. AMF_DIRECTX_FAILED ,
  63. // device opencl
  64. AMF_OPENCL_FAILED ,
  65. // device opengl
  66. AMF_GLX_FAILED ,//failed to use GLX
  67. // device XV
  68. AMF_XV_FAILED , //failed to use Xv extension
  69. // device alsa
  70. AMF_ALSA_FAILED ,//failed to use ALSA
  71. // component common codes
  72. //result codes
  73. AMF_EOF ,
  74. AMF_REPEAT ,
  75. AMF_INPUT_FULL ,//returned by AMFComponent::SubmitInput if input queue is full
  76. AMF_RESOLUTION_CHANGED ,//resolution changed client needs to Drain/Terminate/Init
  77. AMF_RESOLUTION_UPDATED ,//resolution changed in adaptive mode. New ROI will be set on output on newly decoded frames
  78. //error codes
  79. AMF_INVALID_DATA_TYPE ,//invalid data type
  80. AMF_INVALID_RESOLUTION ,//invalid resolution (width or height)
  81. AMF_CODEC_NOT_SUPPORTED ,//codec not supported
  82. AMF_SURFACE_FORMAT_NOT_SUPPORTED ,//surface format not supported
  83. AMF_SURFACE_MUST_BE_SHARED ,//surface should be shared (DX11: (MiscFlags & D3D11_RESOURCE_MISC_SHARED) == 0, DX9: No shared handle found)
  84. // component video decoder
  85. AMF_DECODER_NOT_PRESENT ,//failed to create the decoder
  86. AMF_DECODER_SURFACE_ALLOCATION_FAILED ,//failed to create the surface for decoding
  87. AMF_DECODER_NO_FREE_SURFACES ,
  88. // component video encoder
  89. AMF_ENCODER_NOT_PRESENT ,//failed to create the encoder
  90. // component video processor
  91. // component video conveter
  92. // component dem
  93. AMF_DEM_ERROR ,
  94. AMF_DEM_PROPERTY_READONLY ,
  95. AMF_DEM_REMOTE_DISPLAY_CREATE_FAILED ,
  96. AMF_DEM_START_ENCODING_FAILED ,
  97. AMF_DEM_QUERY_OUTPUT_FAILED ,
  98. // component TAN
  99. AMF_TAN_CLIPPING_WAS_REQUIRED , // Resulting data was truncated to meet output type's value limits.
  100. AMF_TAN_UNSUPPORTED_VERSION , // Not supported version requested, solely for TANCreateContext().
  101. AMF_NEED_MORE_INPUT ,//returned by AMFComponent::SubmitInput did not produce a buffer because more input submissions are required.
  102. } AMF_RESULT;
  103. #endif //#ifndef AMF_Result_h