diff options
author | Sebastien Vincent <seb@jitsi.org> | 2010-05-19 18:51:02 +0000 |
---|---|---|
committer | Sebastien Vincent <seb@jitsi.org> | 2010-05-19 18:51:02 +0000 |
commit | dba9eba38d9e89f09396b9d64e9ddc284af3a497 (patch) | |
tree | 7d439f11d464b463344400ee6edd001d1ffe5201 /src/native/windows | |
parent | 06fa9e6933eb8bd7289f34a7e7846b8faacc2da6 (diff) | |
download | jitsi-dba9eba38d9e89f09396b9d64e9ddc284af3a497.zip jitsi-dba9eba38d9e89f09396b9d64e9ddc284af3a497.tar.gz jitsi-dba9eba38d9e89f09396b9d64e9ddc284af3a497.tar.bz2 |
Add support for YUY2, UYVY and NV12 format for native DirectShow devices.
Diffstat (limited to 'src/native/windows')
8 files changed, 381 insertions, 91 deletions
diff --git a/src/native/windows/directshow/Makefile b/src/native/windows/directshow/Makefile index dd14194..67e38d8 100644 --- a/src/native/windows/directshow/Makefile +++ b/src/native/windows/directshow/Makefile @@ -5,11 +5,10 @@ CC = cl /W4 /wd4996 /EHsc /O2
JNI_HEADERS = /I%JAVA_HOME%\include /I%JAVA_HOME%\include\win32
-# DX_HEADERS = /I"C:\Program Files\Microsoft DirectX SDK (February 2010)\Include" /I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include"
LIBS = /link /out:jdirectshow.dll
CFLAGS = $(JNI_HEADERS)
-OBJS = net_java_sip_communicator_impl_neomedia_directshow_DSManager.cpp net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.cpp ds_manager.cpp ds_capture_device.cpp
+OBJS = net_java_sip_communicator_impl_neomedia_directshow_DSManager.cpp net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.cpp net_java_sip_communicator_impl_neomedia_directshow_DSFormat.cpp ds_manager.cpp ds_capture_device.cpp
jdirectshow.dll: clean
$(CC) $(CFLAGS) /LD $(OBJS) $(LIBS) ole32.lib oleaut32.lib user32.lib
diff --git a/src/native/windows/directshow/ds_capture_device.cpp b/src/native/windows/directshow/ds_capture_device.cpp index 938c69e..9546c35 100644 --- a/src/native/windows/directshow/ds_capture_device.cpp +++ b/src/native/windows/directshow/ds_capture_device.cpp @@ -189,7 +189,6 @@ bool DSCaptureDevice::setFormat(const VideoFormat& format) if(!FAILED(ret))
{
VIDEOINFOHEADER* videoFormat = NULL;
- GUID fmt;
size_t bitCount = 0;
/* get the current format and change resolution */
@@ -198,28 +197,31 @@ bool DSCaptureDevice::setFormat(const VideoFormat& format) videoFormat->bmiHeader.biWidth = (LONG)format.width;
videoFormat->bmiHeader.biHeight = (LONG)format.height;
- switch(format.format)
- {
- case ARGB32:
- fmt = MEDIASUBTYPE_ARGB32;
- bitCount = 32;
- break;
- case RGB32:
- fmt = MEDIASUBTYPE_RGB32;
+ if(format.pixelFormat == MEDIASUBTYPE_ARGB32.Data1 ||
+ format.pixelFormat == MEDIASUBTYPE_RGB32.Data1)
+ {
bitCount = 32;
- break;
- case RGB24:
- fmt = MEDIASUBTYPE_RGB24;
+ }
+ else if(format.pixelFormat == MEDIASUBTYPE_RGB24.Data1)
+ {
bitCount = 24;
- break;
- default:
- /* try to set resolution with current color space */
- fmt = mediaType->subtype;
+ }
+ else
+ {
bitCount = videoFormat->bmiHeader.biBitCount;
- break;
}
- mediaType->subtype = fmt;
+ /* find the media type */
+ for(std::list<VideoFormat>::iterator it = m_formats.begin() ;
+ it != m_formats.end() ; ++it)
+ {
+ if(format.pixelFormat == (*it).pixelFormat)
+ {
+ mediaType->subtype = (*it).mediaType;
+ break;
+ }
+ }
+
ret = streamConfig->SetFormat(mediaType);
if(FAILED(ret))
@@ -229,9 +231,9 @@ bool DSCaptureDevice::setFormat(const VideoFormat& format) }
else
{
- m_width = format.width;
- m_height = format.height;
m_bitPerPixel = bitCount;
+ m_format = format;
+ m_format.mediaType = mediaType->subtype;
}
DeleteMediaType(mediaType);
@@ -389,31 +391,21 @@ void DSCaptureDevice::initSupportedFormats() {
format.height = hdr->bmiHeader.biHeight;
format.width = hdr->bmiHeader.biWidth;
+ format.pixelFormat = mediaType->subtype.Data1;
+ format.mediaType = mediaType->subtype;
- if(mediaType->subtype == MEDIASUBTYPE_ARGB32)
- {
- format.format = ARGB32;
- }
- else if(mediaType->subtype == MEDIASUBTYPE_RGB32)
- {
- format.format = RGB32;
- }
- else if(mediaType->subtype == MEDIASUBTYPE_RGB24)
- {
- format.format = RGB24;
- }
-
- m_formats.push_back(format);
+ if(format.pixelFormat != 0x30323449)
+ {
+ m_formats.push_back(format);
+ }
}
}
}
delete allocBytes;
}
-
}
-
std::list<VideoFormat> DSCaptureDevice::getSupportedFormats() const
{
return m_formats;
@@ -481,14 +473,9 @@ bool DSCaptureDevice::stop() return true;
}
-size_t DSCaptureDevice::getWidth()
-{
- return m_width;
-}
-
-size_t DSCaptureDevice::getHeight()
+VideoFormat DSCaptureDevice::getFormat() const
{
- return m_height;
+ return m_format;
}
size_t DSCaptureDevice::getBitPerPixel()
diff --git a/src/native/windows/directshow/ds_capture_device.h b/src/native/windows/directshow/ds_capture_device.h index 0b4ff21..a49859e 100644 --- a/src/native/windows/directshow/ds_capture_device.h +++ b/src/native/windows/directshow/ds_capture_device.h @@ -160,16 +160,10 @@ public: bool stop();
/**
- * \brief Get current width.
- * \return width
+ * \brief Get current format.
+ * \return current format
*/
- size_t getWidth();
-
- /**
- * \brief Get current height.
- * \return height
- */
- size_t getHeight();
+ VideoFormat getFormat() const;
/**
* \brief Get current bit per pixel.
@@ -234,14 +228,9 @@ private: ISampleGrabber* m_sampleGrabber;
/**
- * \brief Current width.
- */
- size_t m_width;
-
- /**
- * \brief Current height.
+ * \brief Current format.
*/
- size_t m_height;
+ VideoFormat m_format;
/**
* \brief Current bit per pixel.
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 3ceb5ea..b86e6e7 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 @@ -80,16 +80,21 @@ public: {
BYTE* data = NULL;
size_t length = 0;
- bool flipImage = true;
+ bool flipImage = false;
size_t width = 0;
size_t height = 0;
size_t bytesPerPixel = 0;
-
+ VideoFormat format = m_dev->getFormat();
/* get width and height */
- width = m_dev->getWidth();
- height = m_dev->getHeight();
+ width = format.width;
+ height = format.height;
bytesPerPixel = m_dev->getBitPerPixel() / 8;
+ /* flip image for RGB content */
+ flipImage = (format.mediaType == MEDIASUBTYPE_ARGB32 ||
+ format.mediaType == MEDIASUBTYPE_RGB32 ||
+ format.mediaType == MEDIASUBTYPE_RGB24);
+
sample->GetPointer(&data);
length = sample->GetActualDataLength();
@@ -223,20 +228,55 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_D {
jfieldID fieldH = env->GetFieldID(clazz, "height", "I");
jfieldID fieldW = env->GetFieldID(clazz, "width", "I");
- jfieldID fieldF = env->GetFieldID(clazz, "colorSpace", "I");
- jint f = env->GetIntField(format, fieldF);
+ jfieldID fieldF = env->GetFieldID(clazz, "pixelFormat", "J");
+ jlong f = env->GetLongField(format, fieldF);
jint w = env->GetIntField(format, fieldW);
jint h = env->GetIntField(format, fieldH);
fmt.width = w;
fmt.height = h;
- fmt.format = (ColorSpace)f;
+ fmt.pixelFormat = (unsigned long)f;
dev->setFormat(fmt);
}
}
/**
+ * \brief Get current format.
+ * \param env JNI environment
+ * \param obj object
+ * \param native pointer
+ * \return current format
+ */
+JNIEXPORT jobject JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice_getFormat
+ (JNIEnv* env, jobject obj, jlong ptr)
+{
+ DSCaptureDevice* dev = reinterpret_cast<DSCaptureDevice*>(ptr);
+ VideoFormat fmt = dev->getFormat();
+ jclass clazzDSFormat = NULL;
+ jmethodID initDSFormat = NULL;
+ jobject ret = NULL;
+
+ /* get DSFormat class to instantiate some object */
+ clazzDSFormat = env->FindClass("net/java/sip/communicator/impl/neomedia/directshow/DSFormat");
+ if(clazzDSFormat == NULL)
+ {
+ return NULL;
+ }
+
+ initDSFormat = env->GetMethodID(clazzDSFormat, "<init>", "(IIJ)V");
+
+ if(initDSFormat == NULL)
+ {
+ return NULL;
+ }
+
+ ret = env->NewObject(clazzDSFormat, initDSFormat, static_cast<size_t>(fmt.width),
+ static_cast<size_t>(fmt.height), static_cast<jlong>(fmt.pixelFormat));
+ return ret;
+}
+
+/**
* \brief Get formats supported by native capture device.
* \param env JNI environment
* \param obj DSCaptureDevice object
@@ -260,7 +300,7 @@ JNIEXPORT jobjectArray JNICALL Java_net_java_sip_communicator_impl_neomedia_dire return NULL;
}
- initDSFormat = env->GetMethodID(clazzDSFormat, "<init>", "(III)V");
+ initDSFormat = env->GetMethodID(clazzDSFormat, "<init>", "(IIJ)V");
if(initDSFormat == NULL)
{
@@ -274,7 +314,7 @@ JNIEXPORT jobjectArray JNICALL Java_net_java_sip_communicator_impl_neomedia_dire {
VideoFormat tmp = (*it);
jobject o = env->NewObject(clazzDSFormat, initDSFormat, static_cast<size_t>(tmp.width),
- static_cast<size_t>(tmp.height), tmp.format);
+ static_cast<size_t>(tmp.height), static_cast<jlong>(tmp.pixelFormat));
if(o == NULL)
{
diff --git a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.h b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.h index 5b8ae62..0ebc0c6 100644 --- a/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.h +++ b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice.h @@ -1,10 +1,3 @@ -/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice */
@@ -48,6 +41,14 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_D /*
* Class: net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice
+ * Method: getFormat
+ * Signature: (J)Lnet/java/sip/communicator/impl/neomedia/directshow/DSFormat;
+ */
+JNIEXPORT jobject JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice_getFormat
+ (JNIEnv *, jobject, jlong);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSCaptureDevice
* Method: getSupportedFormats
* Signature: (J)[Lnet/java/sip/communicator/impl/neomedia/directshow/DSFormat;
*/
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 new file mode 100644 index 0000000..989256d --- /dev/null +++ b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.cpp @@ -0,0 +1,121 @@ +
+#include "net_java_sip_communicator_impl_neomedia_directshow_DSFormat.h"
+
+#include <windows.h>
+#include <dshow.h>
+#include <wmcodecdsp.h>
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getRGB24PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_RGB24.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getRGB32PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_RGB32.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getARGBPixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_ARGB32.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getAYUVPixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_AYUV.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYUY2PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_YUY2.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getUYVYPixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_UYVY.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC1PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_IMC1.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC2PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_IMC2.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC3PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_IMC3.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC4PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_IMC4.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYV12PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_YV12.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getNV12PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_NV12.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIF09PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_IF09.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIYUVPixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_IYUV.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getY211PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_Y211.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getY411PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_Y411.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getY41PPixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_Y41P.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYVU9PixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_YVU9.Data1;
+}
+
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYVYUPixelFormat
+ (JNIEnv *, jclass)
+{
+ return MEDIASUBTYPE_YVYU.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 new file mode 100644 index 0000000..1e23fa1 --- /dev/null +++ b/src/native/windows/directshow/net_java_sip_communicator_impl_neomedia_directshow_DSFormat.h @@ -0,0 +1,165 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class net_java_sip_communicator_impl_neomedia_directshow_DSFormat */
+
+#ifndef _Included_net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+#define _Included_net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getRGB24PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getRGB24PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getRGB32PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getRGB32PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getARGBPixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getARGBPixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getAYUVPixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getAYUVPixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getYUY2PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYUY2PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getUYVYPixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getUYVYPixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getIMC1PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC1PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getIMC2PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC2PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getIMC3PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC3PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getIMC4PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIMC4PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getYV12PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYV12PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getNV12PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getNV12PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getIF09PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIF09PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getIYUVPixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getIYUVPixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getY211PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getY211PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getY411PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getY411PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getY41PPixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getY41PPixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getYVU9PixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYVU9PixelFormat
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_impl_neomedia_directshow_DSFormat
+ * Method: getYVYUPixelFormat
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_directshow_DSFormat_getYVYUPixelFormat
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/native/windows/directshow/video_format.h b/src/native/windows/directshow/video_format.h index 8fa59fa..3907eb1 100644 --- a/src/native/windows/directshow/video_format.h +++ b/src/native/windows/directshow/video_format.h @@ -15,19 +15,6 @@ #define VIDEO_FORMAT_H
/**
- * \struct ColorSpace
- * \brief Color space (RGB, YUV,...).
- */
-enum ColorSpace
-{
- ARGB32 = 0, /**< ARGB color */
- RGB32, /**< RGB on 32-bit (alpha not used) */
- RGB24, /**< RGB on 24 bit */
- UNKNOWN, /**< Unknown color space */
- ANY = -1
-};
-
-/**
* \struct VideoFormat
* \brief Information about video format
*/
@@ -35,7 +22,8 @@ struct VideoFormat {
size_t width; /**< Video width */
size_t height; /**< Video height */
- enum ColorSpace format; /**< Format */
+ unsigned long pixelFormat; /**< Pixel format */
+ GUID mediaType; /**< Media type */
};
#endif /* VIDEO_FORMAT_H */
|