I have Librtmp.dll in the debug folder where my exe is generated. The header and auxillary code files are available in my project and included as shown below.
Using this include.... i can use librtmp with intellisense.
extern "C" {
#include "libavcodec/avcodec.h"
#include "libavdevice/avdevice.h"
#include "libavfilter/avfilter.h"
#include "libavformat/avformat.h"
#include "libavutil/avutil.h"
#include "librtmp/rtmp.h"
}
Here is the code example that is being used.
RTMP *r;
char uri[]="rtmp://localhost:1935/live/desktop";
r = RTMP_Alloc();
RTMP_Init(r);
RTMP_SetupURL(r, (char*)uri);
RTMP_EnableWrite(r);
RTMP_Connect(r, NULL);
RTMP_ConnectStream(r,0);
VS2012
IntelliSense: argument of type "RTMP *" is incompatible with parameter of type "RTMP *"
This occurs at this point first. Then once again, for each follow r variable.
r = RTMP_Alloc();
Some reading has suggested using a typedef.
Understanding typedefs for function pointers in C
This lead to...
typedef (RTMP*)(RTMP* rtmp);
However, Visual Studio just laughed at me... shaking it's head wondering if i even knew what i was doing.
IntelliSense: declaration of a member with the same name as its class
Any clues or ideas would be useful.
Thank you.
UPDATE - COMPLETE CODE
extern "C" {
#include "libavcodec/avcodec.h"
#include "libavdevice/avdevice.h"
#include "libavfilter/avfilter.h"
#include "libavformat/avformat.h"
#include "libavutil/avutil.h"
}
#include "librtmp/rtmp.h"
class RTMP
{
RTMP()
{
}
~RTMP()
{
}
typedef (RTMP*)(RTMP* rtmp);
void RTMP::Run()
{
//Code
//Init RTMP code
RTMP *r;
char uri[]="rtmp://localhost:1935/live/desktop";
r = RTMP_Alloc();
RTMP_Init(r);
RTMP_SetupURL(r, (char*)uri);
RTMP_EnableWrite(r);
RTMP_Connect(r, NULL);
RTMP_ConnectStream(r,0);
}
};