ekiga r6012 - in trunk: . lib/engine/vidinput/ptlib
- From: mschneid svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6012 - in trunk: . lib/engine/vidinput/ptlib
- Date: Sat, 1 Mar 2008 17:36:29 +0000 (GMT)
Author: mschneid
Date: Sat Mar 1 17:36:28 2008
New Revision: 6012
URL: http://svn.gnome.org/viewvc/ekiga?rev=6012&view=rev
Log:
Added frame size check for ptlib sources.
Modified:
trunk/ChangeLog
trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp
trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h
Modified: trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp
==============================================================================
--- trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp (original)
+++ trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp Sat Mar 1 17:36:28 2008
@@ -49,6 +49,7 @@
current_state.contrast = 127;
current_state.opened = false;
input_device = NULL;
+ expectedFrameSize = 0;
}
void GMVidInputManager_ptlib::get_vidinput_devices(std::vector <Ekiga::VidInputDevice> & vidinput_devices)
@@ -106,6 +107,7 @@
current_state.width = width;
current_state.height = height;
current_state.fps = fps;
+ expectedFrameSize = (width * height * 3) >> 1;
pvideo_format = (PVideoDevice::VideoFormat)current_state.format;
input_device = PVideoInputDevice::CreateOpenedDevice (current_state.vidinput_device.source, current_state.vidinput_device.device, FALSE);
@@ -166,6 +168,9 @@
if (input_device)
input_device->GetFrameData ((BYTE*)data, &I);
+
+ if (I != expectedFrameSize)
+ PTRACE(1, "GMVidInputManager_ptlib\tExpected a frame of " << expectedFrameSize << " bytes but got " << I << " bytes");
}
void GMVidInputManager_ptlib::set_colour (unsigned colour)
Modified: trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h
==============================================================================
--- trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h (original)
+++ trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h Sat Mar 1 17:36:28 2008
@@ -89,6 +89,7 @@
protected:
Ekiga::ServiceCore & core;
Ekiga::Runtime & runtime;
+ unsigned expectedFrameSize;
PVideoInputDevice *input_device;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]