[jitsi-dev] Crash with Microsoft LifeCam NX3000


#1

Hey

Today I tried to use my Microsoft Lifecam NX3000 (a gift from attending a Microsoft Event...) but Jitsi crashed:

Grabber::SampleCB causes the crash because sample->GetActualDataLength() is less than the expected amount of data when the image is being flipped. A consistency check should probably be added here, as it might be the case that the available data is less than the expected amount anyway.

The root cause however lies in DSCaptureDevice::setFormat. Although the call to streamConfig->SetFormat(mediaType) returns S_OK, the format is in fact not being set (check by calling GetFormat again afterwards). Now whether this is documented or not, we should somehow cope with that. A thread in Microsoft's Discussion Forums [1] points to the solution: don't modify the resolution of an obtained AM_MEDIA_TYPE but supply one matching the desired format - obtained via GetStreamCaps().

If someone wants to debug on my machine - feel free to contact me directly.

Regards,
Ingo

[1] http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/6ae459fe-3423-4f82-a41a-4fe51f639bd3


#2

Hi,

Thanks. We will try to modify and test with the GetStreamCaps way.

Regards,

···

--
Seb

Le 03/03/2011 20:22, Bauersachs Ingo a �crit :

Hey

Today I tried to use my Microsoft Lifecam NX3000 (a gift from attending a Microsoft Event...) but Jitsi crashed:

Grabber::SampleCB causes the crash because sample->GetActualDataLength() is less than the expected amount of data when the image is being flipped. A consistency check should probably be added here, as it might be the case that the available data is less than the expected amount anyway.

The root cause however lies in DSCaptureDevice::setFormat. Although the call to streamConfig->SetFormat(mediaType) returns S_OK, the format is in fact not being set (check by calling GetFormat again afterwards). Now whether this is documented or not, we should somehow cope with that. A thread in Microsoft's Discussion Forums [1] points to the solution: don't modify the resolution of an obtained AM_MEDIA_TYPE but supply one matching the desired format - obtained via GetStreamCaps().

If someone wants to debug on my machine - feel free to contact me directly.

Regards,
Ingo

[1] http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/6ae459fe-3423-4f82-a41a-4fe51f639bd3


#3

Hi Ingo,

We have modified directshow DLL to use MediaType from IAMStreamConfig::GetStreamCaps() in SVN revision 8339.

Can you please tell us if it works for you now ?

Regards,

···

--
Seb

On 04/03/2011 08:40, Sebastien Vincent wrote:

Hi,

Thanks. We will try to modify and test with the GetStreamCaps way.

Regards,
--
Seb

Le 03/03/2011 20:22, Bauersachs Ingo a �crit :

Hey

Today I tried to use my Microsoft Lifecam NX3000 (a gift from attending a Microsoft Event...) but Jitsi crashed:

Grabber::SampleCB causes the crash because sample->GetActualDataLength() is less than the expected amount of data when the image is being flipped. A consistency check should probably be added here, as it might be the case that the available data is less than the expected amount anyway.

The root cause however lies in DSCaptureDevice::setFormat. Although the call to streamConfig->SetFormat(mediaType) returns S_OK, the format is in fact not being set (check by calling GetFormat again afterwards). Now whether this is documented or not, we should somehow cope with that. A thread in Microsoft's Discussion Forums [1] points to the solution: don't modify the resolution of an obtained AM_MEDIA_TYPE but supply one matching the desired format - obtained via GetStreamCaps().

If someone wants to debug on my machine - feel free to contact me directly.

Regards,
Ingo

[1] http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/6ae459fe-3423-4f82-a41a-4fe51f639bd3


#4

Hey Seb

We have modified directshow DLL to use MediaType from
IAMStreamConfig::GetStreamCaps() in SVN revision 8339.

Can you please tell us if it works for you now ?

Works like a charm, many thanks!

Ingo