2020-08-14 16:58:22 +00:00
|
|
|
#ifndef TGCALLS_ANDROID_CONTEXT_H
|
|
|
|
#define TGCALLS_ANDROID_CONTEXT_H
|
|
|
|
|
|
|
|
#include "PlatformContext.h"
|
|
|
|
|
|
|
|
#include <jni.h>
|
|
|
|
|
|
|
|
namespace tgcalls {
|
|
|
|
|
|
|
|
class AndroidContext final : public PlatformContext {
|
|
|
|
public:
|
2020-12-24 05:36:01 +00:00
|
|
|
AndroidContext(JNIEnv *env, jobject instance);
|
2020-08-14 16:58:22 +00:00
|
|
|
~AndroidContext() override;
|
|
|
|
|
|
|
|
jobject getJavaCapturer();
|
2020-12-24 05:36:01 +00:00
|
|
|
jobject getJavaInstance();
|
2020-08-14 16:58:22 +00:00
|
|
|
jclass getJavaCapturerClass();
|
|
|
|
|
2020-12-24 05:36:01 +00:00
|
|
|
void setJavaInstance(JNIEnv *env, jobject instance);
|
|
|
|
|
2020-08-14 16:58:22 +00:00
|
|
|
private:
|
|
|
|
jclass VideoCameraCapturerClass = nullptr;
|
|
|
|
jobject javaCapturer = nullptr;
|
2020-12-24 05:36:01 +00:00
|
|
|
jobject javaInstance = nullptr;
|
2020-08-14 16:58:22 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace tgcalls
|
|
|
|
|
|
|
|
#endif
|