Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Newbie question on _mfxSession structure

Jeff_W_
Beginner
109 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
109 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.

Anthony_P_Intel
Employee
109 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.

Reply