Dump.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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_Dump_h
  33. #define AMF_Dump_h
  34. #pragma once
  35. #include "Platform.h"
  36. #include "Result.h"
  37. #include "Interface.h"
  38. #if defined(__cplusplus)
  39. namespace amf
  40. {
  41. #endif
  42. #if defined(__cplusplus)
  43. class AMF_NO_VTABLE AMFDump : public AMFInterface
  44. {
  45. public:
  46. AMF_DECLARE_IID(0x75366ad4, 0x504c, 0x430b, 0xbb, 0xe2, 0xad, 0x21, 0x82, 0x8, 0xf, 0x72);
  47. virtual const wchar_t* AMF_STD_CALL GetDumpBasePath() const = 0; // Get application dump base path
  48. virtual AMF_RESULT AMF_STD_CALL SetDumpBasePath(const wchar_t* path) = 0; // Set application dump base path
  49. // Enable/disable input and/or output stream dumps
  50. virtual bool AMF_STD_CALL IsInputDumpEnabled() const = 0;
  51. virtual AMF_RESULT AMF_STD_CALL EnableInputDump(bool enabled) = 0;
  52. virtual const wchar_t* AMF_STD_CALL GetInputDumpFullName() const = 0; // Get full name of dump file
  53. // Enable/disable input and/or output stream dumps
  54. virtual bool AMF_STD_CALL IsOutputDumpEnabled() const = 0;
  55. virtual AMF_RESULT AMF_STD_CALL EnableOutputDump(bool enabled) = 0;
  56. virtual const wchar_t* AMF_STD_CALL GetOutputDumpFullName() const = 0; // Get full name of dump file
  57. // When enabled, each new application session will create a subfolder with a time stamp in the base path tree (disabled by default)
  58. virtual bool AMF_STD_CALL IsPerSessionDumpEnabled() const = 0;
  59. virtual void AMF_STD_CALL EnablePerSessionDump(bool enabled) = 0;
  60. };
  61. typedef AMFInterfacePtr_T<AMFDump> AMFDumpPtr;
  62. #else // #if defined(__cplusplus)
  63. AMF_DECLARE_IID(AMFDump, 0x75366ad4, 0x504c, 0x430b, 0xbb, 0xe2, 0xad, 0x21, 0x82, 0x8, 0xf, 0x72);
  64. typedef struct AMFDump AMFDump;
  65. typedef struct AMFDumpVtbl
  66. {
  67. // AMFInterface interface
  68. amf_long (AMF_STD_CALL *Acquire)(AMFDump* pThis);
  69. amf_long (AMF_STD_CALL *Release)(AMFDump* pThis);
  70. enum AMF_RESULT (AMF_STD_CALL *QueryInterface)(AMFDump* pThis, const struct AMFGuid *interfaceID, void** ppInterface);
  71. // AMFDump interface
  72. const wchar_t* (AMF_STD_CALL *GetDumpBasePath)(AMFDump* pThis) const; // Get application dump base path
  73. AMF_RESULT (AMF_STD_CALL *SetDumpBasePath)(AMFDump* pThis, const wchar_t* path); // Set application dump base path
  74. // Enable/disable input and/or output stream dumps
  75. bool (AMF_STD_CALL *IsInputDumpEnabled)(AMFDump* pThis) const;
  76. AMF_RESULT (AMF_STD_CALL *EnableInputDump)(AMFDump* pThis, bool enabled);
  77. const wchar_t* (AMF_STD_CALL *GetInputDumpFullName)(AMFDump* pThis) const; // Get full name of dump file
  78. // Enable/disable input and/or output stream dumps
  79. bool (AMF_STD_CALL *IsOutputDumpEnabled)(AMFDump* pThis) const;
  80. AMF_RESULT (AMF_STD_CALL *EnableOutputDump)(AMFDump* pThis, bool enabled);
  81. const wchar_t* (AMF_STD_CALL *GetOutputDumpFullName)(AMFDump* pThis) const; // Get full name of dump file
  82. // When enabled, each new application session will create a subfolder with a time stamp in the base path tree (disabled by default)
  83. bool (AMF_STD_CALL *IsPerSessionDumpEnabled)(AMFDump* pThis) const;
  84. void (AMF_STD_CALL *EnablePerSessionDump)(AMFDump* pThis, bool enabled);
  85. } AMFDumpVtbl;
  86. struct AMFDump
  87. {
  88. const AMFDumpVtbl *pVtbl;
  89. };
  90. #endif // #if defined(__cplusplus)
  91. #if defined(__cplusplus)
  92. } // namespace
  93. #endif
  94. #endif //AMF_Dump_h