1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-04 18:47:48 +01:00
libtgvoip/os/android/VideoSourceAndroid.cpp
Grishka b1a0b3d94a 2.3
- Nonblocking sockets
- Better ShittyInternetMode
- Fixed a bunch of bugs
- Probably added some new bugs too
2018-11-09 18:44:01 +03:00

42 lines
824 B
C++

//
// Created by Grishka on 12.08.2018.
//
#include "VideoSourceAndroid.h"
#include "JNIUtilities.h"
#include "../../logging.h"
using namespace tgvoip;
using namespace tgvoip::video;
extern JavaVM* sharedJVM;
VideoSourceAndroid::VideoSourceAndroid(jobject jobj) : javaObject(jobj){
}
VideoSourceAndroid::~VideoSourceAndroid(){
jni::DoWithJNI([this](JNIEnv* env){
env->DeleteGlobalRef(javaObject);
});
}
void VideoSourceAndroid::Start(){
}
void VideoSourceAndroid::Stop(){
}
void VideoSourceAndroid::SendFrame(Buffer frame, uint32_t flags){
callback(frame, flags);
}
void VideoSourceAndroid::SetStreamParameters(std::vector<Buffer> csd, unsigned int width, unsigned int height){
LOGD("Video stream parameters: %d x %d", width, height);
this->width=width;
this->height=height;
this->csd=std::move(csd);
}