1 /*############################################################################
2 # Copyright (C) Intel Corporation
4 # SPDX-License-Identifier: MIT
5 ############################################################################*/
7 #include "windows/mfx_dispatcher.h"
10 // implement a table with functions names
13 #pragma GCC diagnostic ignored "-Wunused-function"
17 #define FUNCTION(return_value, func_name, formal_param_list, actual_param_list) \
18 { #func_name, API_VERSION },
20 const FUNCTION_DESCRIPTION APIFunc[eVideoFuncTotal] = {
21 { "MFXInit", { { 0, 1 } } }, { "MFXClose", { { 0, 1 } } },
22 { "MFXQueryIMPL", { { 0, 1 } } }, { "MFXQueryVersion", { { 0, 1 } } },
24 { "MFXJoinSession", { { 1, 1 } } }, { "MFXDisjoinSession", { { 1, 1 } } },
25 { "MFXCloneSession", { { 1, 1 } } }, { "MFXSetPriority", { { 1, 1 } } },
26 { "MFXGetPriority", { { 1, 1 } } },
28 { "MFXInitEx", { { 14, 1 } } },
30 #include "windows/mfx_exposed_functions_list.h"
33 // new functions for API >= 2.0
34 const FUNCTION_DESCRIPTION APIVideoFunc2[eVideoFunc2Total] = {
35 { "MFXQueryImplsDescription", { { 0, 2 } } },
36 { "MFXReleaseImplDescription", { { 0, 2 } } },
37 { "MFXMemory_GetSurfaceForVPP", { { 0, 2 } } },
38 { "MFXMemory_GetSurfaceForEncode", { { 0, 2 } } },
39 { "MFXMemory_GetSurfaceForDecode", { { 0, 2 } } },
40 { "MFXInitialize", { { 0, 2 } } },
42 { "MFXMemory_GetSurfaceForVPPOut", { { 1, 2 } } },
43 { "MFXVideoDECODE_VPP_Init", { { 1, 2 } } },
44 { "MFXVideoDECODE_VPP_DecodeFrameAsync", { { 1, 2 } } },
45 { "MFXVideoDECODE_VPP_Reset", { { 1, 2 } } },
46 { "MFXVideoDECODE_VPP_GetChannelParam", { { 1, 2 } } },
47 { "MFXVideoDECODE_VPP_Close", { { 1, 2 } } },
48 { "MFXVideoVPP_ProcessFrameAsync", { { 1, 2 } } },
51 // static section of the file
55 // declare pseudo-functions.
56 // they are used as default values for call-tables.
59 mfxStatus pseudoMFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session) {
60 // touch unreferenced parameters
65 return MFX_ERR_UNKNOWN;
67 } // mfxStatus pseudoMFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session)
69 mfxStatus pseudoMFXClose(mfxSession session) {
70 // touch unreferenced parameters
73 return MFX_ERR_UNKNOWN;
75 } // mfxStatus pseudoMFXClose(mfxSession session)
77 mfxStatus pseudoMFXJoinSession(mfxSession session, mfxSession child_session) {
78 // touch unreferenced parameters
82 return MFX_ERR_UNKNOWN;
84 } // mfxStatus pseudoMFXJoinSession(mfxSession session, mfxSession child_session)
86 mfxStatus pseudoMFXCloneSession(mfxSession session, mfxSession *clone) {
87 // touch unreferenced parameters
91 return MFX_ERR_UNKNOWN;
93 } // mfxStatus pseudoMFXCloneSession(mfxSession session, mfxSession *clone)
95 void SuppressWarnings(...) {
96 // this functions is suppose to suppress warnings.
97 // Actually it does nothing.
99 } // void SuppressWarnings(...)
102 #define FUNCTION(return_value, func_name, formal_param_list, actual_param_list) \
103 return_value pseudo##func_name formal_param_list { \
104 SuppressWarnings actual_param_list; \
105 return MFX_ERR_UNKNOWN; \
108 #include "windows/mfx_exposed_functions_list.h" // NOLINT(build/include)