From: jinhyung.jo Date: Wed, 25 Jul 2012 02:58:30 +0000 (+0900) Subject: [Title] fixed a bug does not open the camera device on Windows XP X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1528^2~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c699a2873d79088230abc70ad9030ba0aef3440;p=sdk%2Femulator%2Fqemu.git [Title] fixed a bug does not open the camera device on Windows XP [Type] Bug Fix [Module] Emulator / Camera [Priority] Minor [CQ#] N_SE-4727 [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/hw/maru_camera_win32_pci.c b/tizen/src/hw/maru_camera_win32_pci.c index 85bcce9d90..d32d3f8116 100644 --- a/tizen/src/hw/maru_camera_win32_pci.c +++ b/tizen/src/hw/maru_camera_win32_pci.c @@ -1455,6 +1455,14 @@ void marucam_device_open(MaruCamState* state) MaruCamParam *param = state->param; param->top = 0; + hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); + if (FAILED(hr)) { + ERR("CoInitailizeEx\n"); + ERR("camera device open failed!!!, [HRESULT : 0x%x]\n", hr); + param->errCode = EINVAL; + return; + } + hr = GraphBuilder_Init(); if (FAILED(hr)) { ERR("GraphBuilder_Init\n"); @@ -1496,6 +1504,7 @@ void marucam_device_open(MaruCamState* state) error_failed: CloseInterfaces(); + CoUninitialize(); param->errCode = EINVAL; ERR("camera device open failed!!!, [HRESULT : 0x%x]\n", hr); } @@ -1507,6 +1516,7 @@ void marucam_device_close(MaruCamState* state) param->top = 0; CloseInterfaces(); + CoUninitialize(); INFO("Close successfully!!!\n"); }