Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Newbie question on _mfxSession structure

Jeff_W_
Beginner
273 Views

Hello,

I have a question about the _mfxSession structure definition.  In the mfxvideo.h file, there is typedef that defines mfxSession as a pointer to a _mfxSession structure.  It's defined as follows:

typedef struct _mfxSession *mfxSession;

Can someone tell me where and/or how _mfxSession is defined?

To use the SDK you really don't care per se, however, I'm trying to expose the API to a scripting language and am struggling to figure out how to expose the structure definition since I cannot find it in any of the SDK header files.

Thanks in advance,

Jeff 

 

0 Kudos
2 Replies
OTorg
New Contributor III
273 Views

"typedef struct _mfxSession *mfxSession" construction is a way of typing void*. It can be treated as an identifier of some "black box". DWORD_PTR or void* could be used for such purpose, but DWORD_PTR/void* is a less secure approach (I mean the c/c++ language). With "typedef struct _X* X" you can not assign identifier of X essence to identifier of Y essence.

0 Kudos
Anthony_P_Intel
Employee
273 Views

Thanks for good/accurate answer.

Jeff, I suspect your scripting language has some examples of how to treat generic "handles" that are type casted in this fashion.

0 Kudos
Reply