0

I understand typedef function pointer like

typedef   void          (*myType)    ( );
//         ^                ^         ^
//     return type      type name  arguments

myType x;
void myFunc() { std::cout<<"Hello\n"; }
x = &myFunc;

x(); // will print "Hello"

But I am not able to understand this line from OBS Studio source code at
https://github.com/obsproject/libdshowcapture/blob/master/source/external/IVideoCaptureFilter.h

//! Message callback
typedef void (CALLBACK* PFN_VIDEO_CAPTURE_FILTER_NOTIFICATION_CALLBACK)(VIDEO_CAPTURE_FILTER_NOTIFICATION nMessage, void* pData, int nSize, void* pContext);

I am not able to understand why CALLBACK* and PFN_VIDEO_CAPTURE_FILTER_NOTIFICATION_CALLBACK are together in () and what should I understand by this declaration?

Alok
  • 7,734
  • 8
  • 55
  • 100

0 Answers0