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
686166e5e2
commit
25e36cb988
@ -97,7 +97,10 @@ MediaEngineWebRTC::EnumerateVideoDevices(nsTArray<nsRefPtr<MediaEngineVideoSourc
|
|||||||
JNIEnv *env;
|
JNIEnv *env;
|
||||||
jint res = jvm->AttachCurrentThread(&env, NULL);
|
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);
|
env->DeleteGlobalRef(context);
|
||||||
#endif
|
#endif
|
||||||
@ -230,7 +233,10 @@ MediaEngineWebRTC::EnumerateAudioDevices(nsTArray<nsRefPtr<MediaEngineAudioSourc
|
|||||||
JNIEnv *env;
|
JNIEnv *env;
|
||||||
jvm->AttachCurrentThread(&env, NULL);
|
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);
|
env->DeleteGlobalRef(context);
|
||||||
#endif
|
#endif
|
||||||
|
@ -152,7 +152,10 @@ MediaConduitErrorCode WebrtcAudioConduit::Init(WebrtcAudioConduit *other)
|
|||||||
}
|
}
|
||||||
jvm->AttachCurrentThread(&env, NULL);
|
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);
|
env->DeleteGlobalRef(context);
|
||||||
#endif
|
#endif
|
||||||
|
@ -115,7 +115,10 @@ MediaConduitErrorCode WebrtcVideoConduit::Init()
|
|||||||
}
|
}
|
||||||
jvm->AttachCurrentThread(&env, NULL);
|
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);
|
env->DeleteGlobalRef(context);
|
||||||
#endif
|
#endif
|
||||||
|
@ -145,15 +145,22 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
WebrtcVideoConduit():
|
WebrtcVideoConduit():
|
||||||
mVideoEngine(NULL),
|
mVideoEngine(nullptr),
|
||||||
mTransport(NULL),
|
mTransport(nullptr),
|
||||||
mRenderer(NULL),
|
mRenderer(nullptr),
|
||||||
mEngineTransmitting(false),
|
mEngineTransmitting(false),
|
||||||
mEngineReceiving(false),
|
mEngineReceiving(false),
|
||||||
mEngineRendererStarted(false),
|
mEngineRendererStarted(false),
|
||||||
mChannel(-1),
|
mChannel(-1),
|
||||||
mCapId(-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