0

I have an callback function :

ARCONTROLLER_Device_SetVideoStreamCallbacks (deviceController, decoderConfigCallback, didReceiveFrameCallback, NULL , NULL);

Which decoderConfigCallback and didReceiveFrameCallback are function.

When myproject have only a main.h and a main.cpp and define (without any class declaration)

    eARCONTROLLER_ERROR didReceiveFrameCallback (ARCONTROLLER_Frame_t *frame, void *customData);

 eARCONTROLLER_ERROR decoderConfigCallback (ARCONTROLLER_Stream_Codec_t codec, void *customData);

In .h file . when I call the ARCONTROLLER_Device_SetVideoStreamCallbacks evry thing is ok . but when I'll use a cpp class and do these, I get this error:

invalid use of non-static member function

Rama
  • 3,222
  • 2
  • 11
  • 26
hosh0425
  • 98
  • 1
  • 10
  • 1
    We need to see more code to understand the problem. But pretty sure you are not using classes in your "main only" case, in which case the functions are equivalent to static methods (as they don't rely on an instance of a class) – UnholySheep Feb 10 '17 at 15:19
  • 2
    Please post a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – MikeCAT Feb 10 '17 at 15:24

0 Answers0