//
|
// Created by lilin on 2019-12-10.
|
//
|
|
#ifndef BARESIP_BARESIP_H
|
#define BARESIP_BARESIP_H
|
|
|
#include <string>
|
#include "JavaListener.h"
|
#include "pthread.h"
|
#include "../AndroidLog.h"
|
|
#include "FrameQueue.h"
|
|
#include "re.h"
|
#include "rem.h"
|
#include "baresip.h"
|
|
extern "C" {
|
|
#include <libavformat/avformat.h>
|
#include <libavdevice/avdevice.h>
|
#include <libavcodec/avcodec.h>
|
#include <libavutil/pixdesc.h>
|
#include <libavutil/imgutils.h>
|
#include <libavutil/time.h>
|
#include <libswscale/swscale.h>
|
|
#include <bcg729/encoder.h>
|
#include <bcg729/decoder.h>
|
}
|
|
class BaresipObj {
|
|
public:
|
JavaListener *javaListener;
|
pthread_t baresipthread;
|
int baresipstate=0;//1 is ok
|
struct ua *bareua=NULL;
|
struct call *barecall=NULL;
|
struct play *bareplay = NULL;
|
FrameQueue *frameQueue=NULL;
|
|
public:
|
BaresipObj(JavaListener *javaListener);
|
~BaresipObj();
|
void startbaresip();
|
void baresipreg(const char *sipaddress);
|
void baresipjie();
|
void baresipgua();
|
int baresipcall(const char *sipaddress);
|
int baresipcallv(const char *sipaddress);
|
|
int bareisreg();
|
|
void stopbaresip();
|
};
|
|
|
#endif //BARESIP_BARESIP_H
|