Fixes a crash of the QTKit video CaptureDevice on Snow Leopard reported by Yana Stamcheva.

cusax-fix
Lyubomir Marinov 16 years ago
parent 0eaeb3900d
commit c4773f01cd

@ -145,7 +145,7 @@ Java_net_java_sip_communicator_impl_neomedia_quicktime_CVPixelBuffer_getBytes__J
* CVPixelBufferGetHeightOfPlane(
pixelBuffer,
planeIndex);
memcpy(buf, cBytes, byteCount);
memcpy((void *) buf, cBytes, byteCount);
byteOffset += byteCount;
}
byteCount = byteOffset;

@ -33,9 +33,9 @@ JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_impl_neomedia_quicktime_Q
/*
* Class: net_java_sip_communicator_impl_neomedia_quicktime_QTCaptureDecompressedVideoOutput
* Method: setAutomaticallyDropsLateVideoFrames
* Signature: (JZ)V
* Signature: (JZ)Z
*/
JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_quicktime_QTCaptureDecompressedVideoOutput_setAutomaticallyDropsLateVideoFrames
JNIEXPORT jboolean JNICALL Java_net_java_sip_communicator_impl_neomedia_quicktime_QTCaptureDecompressedVideoOutput_setAutomaticallyDropsLateVideoFrames
(JNIEnv *, jclass, jlong, jboolean);
/*

@ -69,7 +69,7 @@ Java_net_java_sip_communicator_impl_neomedia_quicktime_QTCaptureDecompressedVide
return (jlong) pixelBufferAttributes;
}
JNIEXPORT void JNICALL
JNIEXPORT jboolean JNICALL
Java_net_java_sip_communicator_impl_neomedia_quicktime_QTCaptureDecompressedVideoOutput_setAutomaticallyDropsLateVideoFrames
(JNIEnv *jniEnv, jclass clazz, jlong ptr,
jboolean automaticallyDropsLateVideoFrames)
@ -82,11 +82,16 @@ Java_net_java_sip_communicator_impl_neomedia_quicktime_QTCaptureDecompressedVide
if ([captureDecompressedVideoOutput
respondsToSelector:@selector(setAutomaticallyDropsLateVideoFrames)])
{
[captureDecompressedVideoOutput
setAutomaticallyDropsLateVideoFrames:
((JNI_TRUE == automaticallyDropsLateVideoFrames) ? YES : NO)];
automaticallyDropsLateVideoFrames
= [captureDecompressedVideoOutput automaticallyDropsLateVideoFrames];
}
[autoreleasePool release];
return automaticallyDropsLateVideoFrames;
}
JNIEXPORT void JNICALL

@ -174,7 +174,7 @@ else if (t.isDataFlavorSupported(uiContactDataFlavor))
if (contact != null)
{
ArrayList inviteList = new ArrayList();
List<String> inviteList = new ArrayList<String>();
inviteList.add(contact);
chatPanel.inviteContacts( currentChatTransport,
inviteList, null);

@ -131,7 +131,7 @@ public class QuickTimeStream
}
automaticallyDropsLateVideoFrames
= false;//captureOutput.setAutomaticallyDropsLateVideoFrames(true);
= captureOutput.setAutomaticallyDropsLateVideoFrames(true);
captureOutput
.setDelegate(
new QTCaptureDecompressedVideoOutput.Delegate()

@ -63,15 +63,16 @@ public NSDictionary pixelBufferAttributes()
private static native long pixelBufferAttributes(long ptr);
public void setAutomaticallyDropsLateVideoFrames(
public boolean setAutomaticallyDropsLateVideoFrames(
boolean automaticallyDropsLateVideoFrames)
{
setAutomaticallyDropsLateVideoFrames(
getPtr(),
automaticallyDropsLateVideoFrames);
return
setAutomaticallyDropsLateVideoFrames(
getPtr(),
automaticallyDropsLateVideoFrames);
}
private static native void setAutomaticallyDropsLateVideoFrames(
private static native boolean setAutomaticallyDropsLateVideoFrames(
long ptr,
boolean automaticallyDropsLateVideoFrames);

Loading…
Cancel
Save