JLChen
2020-12-10 a8c5f79b0d93adfa7f23601dd0fee30edc14f0d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// 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