Changeset 47416 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jul 26, 2013 6:55:18 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 87566
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/UsbWebcamInterface.cpp
r45029 r47416 51 51 52 52 53 static DECLCALLBACK(void) drvEmWebcamReady(PPDMIWEBCAMDOWN pInterface, 54 bool fReady) 55 { 56 PEMWEBCAMDRV pThis = RT_FROM_MEMBER(pInterface, EMWEBCAMDRV, IWebcamDown); 57 NOREF(pThis); 58 NOREF(fReady); 59 } 60 53 61 static DECLCALLBACK(int) drvEmWebcamControl(PPDMIWEBCAMDOWN pInterface, 54 62 void *pvUser, … … 270 278 if (mpDrv && mpDrv->pIWebcamUp) 271 279 { 272 mpDrv->pIWebcamUp->pfnWebcamUpFrame(mpDrv->pIWebcamUp, 273 mpRemote->u64DeviceId, 274 (const uint8_t *)pFrame, 275 cbFrame); 280 if ( cbFrame >= sizeof(VRDEVIDEOINPAYLOADHDR) 281 && cbFrame >= pFrame->u8HeaderLength) 282 { 283 uint32_t cbImage = cbFrame - pFrame->u8HeaderLength; 284 const uint8_t *pu8Image = cbImage > 0? (const uint8_t *)pFrame + pFrame->u8HeaderLength: NULL; 285 286 mpDrv->pIWebcamUp->pfnWebcamUpFrame(mpDrv->pIWebcamUp, 287 mpRemote->u64DeviceId, 288 (PDMIWEBCAM_FRAMEHDR *)pFrame, 289 pFrame->u8HeaderLength, 290 pu8Image, 291 cbImage); 292 } 276 293 } 277 294 } … … 380 397 pDrvIns->IBase.pfnQueryInterface = drvQueryInterface; 381 398 399 pThis->IWebcamDown.pfnWebcamDownReady = drvEmWebcamReady; 382 400 pThis->IWebcamDown.pfnWebcamDownControl = drvEmWebcamControl; 383 401
Note:
See TracChangeset
for help on using the changeset viewer.