2020-08-14 16:58:22 +00:00
|
|
|
#ifndef TGCALLS_ANDROID_CONTEXT_H
|
|
|
|
#define TGCALLS_ANDROID_CONTEXT_H
|
|
|
|
|
|
|
|
#include "PlatformContext.h"
|
|
|
|
|
|
|
|
#include <jni.h>
|
2021-03-19 10:25:58 +00:00
|
|
|
#include <voip/tgcalls/group/GroupInstanceImpl.h>
|
2020-08-14 16:58:22 +00:00
|
|
|
|
|
|
|
namespace tgcalls {
|
|
|
|
|
|
|
|
class AndroidContext final : public PlatformContext {
|
|
|
|
public:
|
2021-06-25 00:43:10 +00:00
|
|
|
AndroidContext(JNIEnv *env, jobject instance, bool screencast);
|
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);
|
|
|
|
|
2021-08-31 19:06:39 +00:00
|
|
|
std::vector<std::shared_ptr<BroadcastPartTask>> audioStreamTasks;
|
|
|
|
std::vector<std::shared_ptr<BroadcastPartTask>> videoStreamTasks;
|
2021-06-25 00:43:10 +00:00
|
|
|
std::vector<std::shared_ptr<RequestMediaChannelDescriptionTask>> descriptionTasks;
|
2021-03-19 10:25:58 +00:00
|
|
|
|
2020-08-14 16:58:22 +00:00
|
|
|
private:
|
2021-06-25 00:43:10 +00:00
|
|
|
jclass VideoCapturerDeviceClass = nullptr;
|
2020-08-14 16:58:22 +00:00
|
|
|
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
|