mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-18 14:07:30 +00:00
d83a3d71bc
Merge in RedPhone // FREEBIE
72 lines
2.0 KiB
C++
72 lines
2.0 KiB
C++
/* DO NOT EDIT THIS FILE - it is machine generated */
|
|
#include <jni.h>
|
|
/* Header for class org_thoughtcrime_redphone_audio_CallAudioManager2 */
|
|
|
|
#ifndef _Included_org_thoughtcrime_redphone_audio_CallAudioManager2
|
|
#define _Included_org_thoughtcrime_redphone_audio_CallAudioManager2
|
|
#ifdef __cplusplus
|
|
|
|
#include <pthread.h>
|
|
|
|
#include "SrtpStream.h"
|
|
#include "Clock.h"
|
|
|
|
class CallAudioManager {
|
|
|
|
private:
|
|
volatile int running;
|
|
int finished;
|
|
SLObjectItf engineObject;
|
|
SLEngineItf engineEngine;
|
|
AudioCodec audioCodec;
|
|
RtpAudioSender audioSender;
|
|
RtpAudioReceiver audioReceiver;
|
|
WebRtcJitterBuffer webRtcJitterBuffer;
|
|
Clock clock;
|
|
MicrophoneReader microphoneReader;
|
|
AudioPlayer audioPlayer;
|
|
struct sockaddr *sockAddr;
|
|
pthread_cond_t condition;
|
|
pthread_mutex_t mutex;
|
|
|
|
public:
|
|
|
|
CallAudioManager(int androidSdkVersion, int socketFd, struct sockaddr *sockAddr, int sockAddrLen,
|
|
SrtpStreamParameters *senderParameters, SrtpStreamParameters *receiverParameters);
|
|
~CallAudioManager();
|
|
int init();
|
|
|
|
int start();
|
|
void stop();
|
|
|
|
void setMute(int muteEnabled);
|
|
int isFinished();
|
|
};
|
|
|
|
extern "C" {
|
|
#endif
|
|
/*
|
|
* Class: org_thoughtcrime_redphone_audio_CallAudioManager
|
|
* Method: create
|
|
*/
|
|
JNIEXPORT jlong JNICALL Java_org_thoughtcrime_redphone_audio_CallAudioManager_create
|
|
(JNIEnv *, jobject, jint, jint, jstring, jint,
|
|
jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray);
|
|
|
|
JNIEXPORT void JNICALL Java_org_thoughtcrime_redphone_audio_CallAudioManager_start
|
|
(JNIEnv *, jobject, jlong);
|
|
|
|
JNIEXPORT void JNICALL Java_org_thoughtcrime_redphone_audio_CallAudioManager_stop
|
|
(JNIEnv *, jobject, jlong);
|
|
|
|
JNIEXPORT void JNICALL Java_org_thoughtcrime_redphone_audio_CallAudioManager_setMute
|
|
(JNIEnv *, jobject, jlong, jboolean);
|
|
|
|
JNIEXPORT void JNICALL Java_org_thoughtcrime_redphone_audio_CallAudioManager_dispose
|
|
(JNIEnv *, jobject, jlong);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|