QJNIEnvironmentPrivate env;
callMethod<void>("prepare");
if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
return false;
}
QJNIEnvironmentPrivate env;
callMethod<void>("start");
if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
return false;
}
{
QJNIEnvironmentPrivate env;
callMethod<void>("stop");
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setAudioChannels(int numChannels)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setAudioEncoder", "(I)V", int(encoder));
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setAudioEncodingBitRate(int bitRate)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setAudioSource", "(I)V", int(source));
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setCamera(JCamera *camera)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setVideoEncoder", "(I)V", int(encoder));
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setVideoEncodingBitRate(int bitRate)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setVideoFrameRate", "(I)V", rate);
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setVideoSize(const QSize &size)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setVideoSize", "(II)V", size.width(), size.height());
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setVideoSource(VideoSource source)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setVideoSource", "(I)V", int(source));
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setOrientationHint(int degrees)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setOrientationHint", "(I)V", degrees);
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setOutputFormat(OutputFormat format)
{
QJNIEnvironmentPrivate env;
callMethod<void>("setOutputFormat", "(I)V", int(format));
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
void JMediaRecorder::setOutputFile(const QString &path)
callMethod<void>("setOutputFile",
"(Ljava/lang/String;)V",
QJNIObjectPrivate::fromString(path).object());
- if (env->ExceptionCheck())
+ if (env->ExceptionCheck()) {
+#ifdef QT_DEBUG
+ env->ExceptionDescribe();
+#endif
env->ExceptionClear();
+ }
}
static JNINativeMethod methods[] = {