diff options
author | Sebastien Vincent <seb@jitsi.org> | 2010-06-03 14:18:55 +0000 |
---|---|---|
committer | Sebastien Vincent <seb@jitsi.org> | 2010-06-03 14:18:55 +0000 |
commit | 7d41786c85fadf0b01b163f2f56600d9f1ddd4cd (patch) | |
tree | 253179d779fd053dfe5f92d24e6feed313b58c6c /src/native/windows | |
parent | faa3a7ca59efe6e4747087ee94818e6f2a29294e (diff) | |
download | jitsi-7d41786c85fadf0b01b163f2f56600d9f1ddd4cd.zip jitsi-7d41786c85fadf0b01b163f2f56600d9f1ddd4cd.tar.gz jitsi-7d41786c85fadf0b01b163f2f56600d9f1ddd4cd.tar.bz2 |
Fix a bug in DirectShow when changing webcam resolution and add I420 format support.
Diffstat (limited to 'src/native/windows')
4 files changed, 17 insertions, 5 deletions
diff --git a/src/native/windows/directshow/ds_capture_device.cpp b/src/native/windows/directshow/ds_capture_device.cpp index 9546c35..4a27ad4 100644 --- a/src/native/windows/directshow/ds_capture_device.cpp +++ b/src/native/windows/directshow/ds_capture_device.cpp @@ -394,10 +394,7 @@ void DSCaptureDevice::initSupportedFormats() format.pixelFormat = mediaType->subtype.Data1;
format.mediaType = mediaType->subtype;
- if(format.pixelFormat != 0x30323449)
- {
- m_formats.push_back(format);
- }
+ m_formats.push_back(format);
}
}
}
diff --git a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.cpp b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.cpp index b86e6e7..dfa2ae8 100644 --- a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.cpp +++ b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.cpp @@ -238,6 +238,7 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_D fmt.pixelFormat = (unsigned long)f;
dev->setFormat(fmt);
+ dev->start();
}
}
diff --git a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.cpp b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.cpp index 989256d..44a1f53 100644 --- a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.cpp +++ b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.cpp @@ -3,7 +3,7 @@ #include <windows.h>
#include <dshow.h>
-#include <wmcodecdsp.h>
+#include <uuids.h>
JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getRGB24PixelFormat
(JNIEnv *, jclass)
@@ -119,3 +119,9 @@ JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_ return MEDIASUBTYPE_YVYU.Data1;
}
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getI420PixelFormat
+ (JNIEnv *, jclass)
+{
+ return 0x30323449; //MEDIASUBTYPE_I420.Data1;
+}
+
diff --git a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.h b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.h index 1e23fa1..b5aa8d2 100644 --- a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.h +++ b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.h @@ -159,6 +159,14 @@ JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_ JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYVYUPixelFormat
(JNIEnv *, jclass);
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getI420PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getI420PixelFormat
+ (JNIEnv *, jclass);
+
#ifdef __cplusplus
}
#endif
|