| 1 | #ifndef TGCALLS_ANDROID_CONTEXT_H |
| 2 | #define TGCALLS_ANDROID_CONTEXT_H |
| 3 | |
| 4 | #include "PlatformContext.h" |
| 5 | |
| 6 | #include <jni.h> |
| 7 | #include <voip/tgcalls/group/GroupInstanceImpl.h> |
| 8 | |
| 9 | namespace tgcalls { |
| 10 | |
| 11 | class AndroidContext final : public PlatformContext { |
| 12 | public: |
| 13 | AndroidContext(JNIEnv *env, jobject instance, bool screencast); |
| 14 | ~AndroidContext() override; |
| 15 | |
| 16 | jobject getJavaCapturer(); |
| 17 | jobject getJavaInstance(); |
| 18 | jclass getJavaCapturerClass(); |
| 19 | |
| 20 | void setJavaInstance(JNIEnv *env, jobject instance); |
| 21 | |
| 22 | std::vector<std::shared_ptr<BroadcastPartTask>> audioStreamTasks; |
| 23 | std::vector<std::shared_ptr<BroadcastPartTask>> videoStreamTasks; |
| 24 | std::vector<std::shared_ptr<RequestMediaChannelDescriptionTask>> descriptionTasks; |
| 25 | |
| 26 | private: |
| 27 | jclass VideoCapturerDeviceClass = nullptr; |
| 28 | jobject javaCapturer = nullptr; |
| 29 | jobject javaInstance = nullptr; |
| 30 | |
| 31 | }; |
| 32 | |
| 33 | } // namespace tgcalls |
| 34 | |
| 35 | #endif |
| 36 | |