mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 863290 - Correctly detect failure to initialize Android capture objects. r=jesup
This commit is contained in:
parent
4b295e95c7
commit
1d3b7048f5
@ -97,7 +97,10 @@ MediaEngineWebRTC::EnumerateVideoDevices(nsTArray<nsRefPtr<MediaEngineVideoSourc
|
||||
JNIEnv *env;
|
||||
jint res = jvm->AttachCurrentThread(&env, NULL);
|
||||
|
||||
webrtc::VideoEngine::SetAndroidObjects(jvm, (void*)context);
|
||||
if (webrtc::VideoEngine::SetAndroidObjects(jvm, (void*)context) != 0) {
|
||||
LOG(("VieCapture:SetAndroidObjects Failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
env->DeleteGlobalRef(context);
|
||||
#endif
|
||||
@ -230,7 +233,10 @@ MediaEngineWebRTC::EnumerateAudioDevices(nsTArray<nsRefPtr<MediaEngineAudioSourc
|
||||
JNIEnv *env;
|
||||
jvm->AttachCurrentThread(&env, NULL);
|
||||
|
||||
webrtc::VoiceEngine::SetAndroidObjects(jvm, (void*)context);
|
||||
if (webrtc::VoiceEngine::SetAndroidObjects(jvm, (void*)context) != 0) {
|
||||
LOG(("VoiceEngine:SetAndroidObjects Failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
env->DeleteGlobalRef(context);
|
||||
#endif
|
||||
|
@ -152,7 +152,10 @@ MediaConduitErrorCode WebrtcAudioConduit::Init(WebrtcAudioConduit *other)
|
||||
}
|
||||
jvm->AttachCurrentThread(&env, NULL);
|
||||
|
||||
webrtc::VoiceEngine::SetAndroidObjects(jvm, (void*)context);
|
||||
if (webrtc::VoiceEngine::SetAndroidObjects(jvm, (void*)context) != 0) {
|
||||
CSFLogError(logTag, "%s Unable to set Android objects", __FUNCTION__);
|
||||
return kMediaConduitSessionNotInited;
|
||||
}
|
||||
|
||||
env->DeleteGlobalRef(context);
|
||||
#endif
|
||||
|
@ -115,7 +115,10 @@ MediaConduitErrorCode WebrtcVideoConduit::Init()
|
||||
}
|
||||
jvm->AttachCurrentThread(&env, NULL);
|
||||
|
||||
webrtc::VideoEngine::SetAndroidObjects(jvm, (void*)context);
|
||||
if (webrtc::VideoEngine::SetAndroidObjects(jvm, (void*)context) != 0) {
|
||||
CSFLogError(logTag, "%s: could not set Android objects", __FUNCTION__);
|
||||
return kMediaConduitSessionNotInited;
|
||||
}
|
||||
|
||||
env->DeleteGlobalRef(context);
|
||||
#endif
|
||||
|
@ -145,15 +145,22 @@ public:
|
||||
|
||||
|
||||
WebrtcVideoConduit():
|
||||
mVideoEngine(NULL),
|
||||
mTransport(NULL),
|
||||
mRenderer(NULL),
|
||||
mVideoEngine(nullptr),
|
||||
mTransport(nullptr),
|
||||
mRenderer(nullptr),
|
||||
mEngineTransmitting(false),
|
||||
mEngineReceiving(false),
|
||||
mEngineRendererStarted(false),
|
||||
mChannel(-1),
|
||||
mCapId(-1),
|
||||
mCurSendCodecConfig(NULL)
|
||||
mCurSendCodecConfig(nullptr),
|
||||
mPtrViEBase(nullptr),
|
||||
mPtrViECapture(nullptr),
|
||||
mPtrViECodec(nullptr),
|
||||
mPtrViENetwork(nullptr),
|
||||
mPtrViERender(nullptr),
|
||||
mPtrExtCapture(nullptr),
|
||||
mPtrRTP(nullptr)
|
||||
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user