From: jinhyung.jo Date: Thu, 12 Jul 2012 11:06:37 +0000 (+0900) Subject: [Title] Fixed some bugs for camera on Windows. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1528^2~120^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75d72da0d45d8d2e6786efdeae0ad6a74c52af68;p=sdk%2Femulator%2Fqemu.git [Title] Fixed some bugs for camera on Windows. [Type] Bug Fix [Module] Emulatorj / Multimedia / Camera [Priority] Major [CQ#] N_SE-3228, N_SE-1664 [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 acd1ee73b3..85bcce9d90 100644 --- a/tizen/src/hw/maru_camera_win32_pci.c +++ b/tizen/src/hw/maru_camera_win32_pci.c @@ -1343,6 +1343,10 @@ static STDMETHODIMP SetDefaultValues(void) DeleteMediaType(pmtConfig); } } + if (iFormat >= iCount) { + ERR("Maybe connected webcam does not support %ld x %ld resolution.\n", g_dwWidth, g_dwHeight); + hr = E_FAIL; + } } pSConfig->lpVtbl->Release(pSConfig); return hr; @@ -1375,6 +1379,9 @@ static STDMETHODIMP SetResolution(LONG width, LONG height) pvi->AvgTimePerFrame = g_dwAvgInterval; pvi->bmiHeader.biSizeImage = ((width * pvi->bmiHeader.biBitCount) >> 3 ) * height; hr = vsc->lpVtbl->SetFormat(vsc, pmt); + if (hr != S_OK) { + ERR("failed to set the resolution.(w:%ld, h:%ld), Maybe connected webcam does not support the resolution.\n", width, height); + } } DeleteMediaType(pmt); } @@ -1481,6 +1488,8 @@ void marucam_device_open(MaruCamState* state) ERR("SetDefaultValues\n"); goto error_failed; } + cur_frame_idx = 0; + cur_fmt_idx = 0; INFO("Open successfully!!!\n"); return;