pdmwebcaminfs.h revision 1acf60ed9c490056043f7bfa524f2de1a431ab10
2N/A/* $Id$ */
2N/A
2N/A/** @file
2N/A * webcaminfs - interfaces between dev and driver.
2N/A */
2N/A
2N/A/*
2N/A * Copyright (C) 2011-2013 Oracle Corporation
2N/A *
2N/A * This file is part of VirtualBox Open Source Edition (OSE), as
2N/A * available from http://www.virtualbox.org. This file is free software;
2N/A * you can redistribute it and/or modify it under the terms of the GNU
2N/A * General Public License (GPL) as published by the Free Software
2N/A * Foundation, in version 2 as it comes in the "COPYING" file of the
2N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2N/A *
2N/A * The contents of this file may alternatively be used under the terms
2N/A * of the Common Development and Distribution License Version 1.0
2N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
2N/A * VirtualBox OSE distribution, in which case the provisions of the
2N/A * CDDL are applicable instead of those of the GPL.
2N/A *
2N/A * You may elect to license modified versions of this file under the
2N/A * terms and conditions of either the GPL or the CDDL or both.
2N/A */
2N/A
2N/A#ifndef ___VBox_vmm_pdmwebcaminfs_h
2N/A#define ___VBox_vmm_pdmwebcaminfs_h
2N/A
2N/A
2N/Atypedef struct PDMIWEBCAM_DEVICEDESC PDMIWEBCAM_DEVICEDESC;
2N/Atypedef struct PDMIWEBCAM_CTRLHDR PDMIWEBCAM_CTRLHDR;
2N/A
2N/A
2N/A#define PDMIWEBCAMDOWN_IID "0846959f-8b4a-4b2c-be78-9903b2ae9de5"
2N/Atypedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
2N/Atypedef struct PDMIWEBCAMDOWN
2N/A{
2N/A /*
2N/A * Send a control request to the webcam.
2N/A * Async response will be returned by pfnWebcamUpControl callback.
2N/A *
2N/A * @param pInterface Pointer to the interface.
2N/A * @param pvUser The callers context.
2N/A * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
2N/A * @param pCtrl The control data.
2N/A * @param cbCtrl The size of the control data.
2N/A */
2N/A DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl, (PPDMIWEBCAMDOWN pInterface,
2N/A void *pvUser,
2N/A uint64_t u64DeviceId,
2N/A const PDMIWEBCAM_CTRLHDR *pCtrl,
2N/A uint32_t cbCtrl));
2N/A} PDMIWEBCAMDOWN;
2N/A
2N/A
2N/A#define PDMIWEBCAMUP_IID "476c5d41-7bd1-4997-825e-722a72577af3"
2N/Atypedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
2N/Atypedef struct PDMIWEBCAMUP
2N/A{
2N/A /*
2N/A * A webcam is available.
2N/A *
2N/A * @param pInterface Pointer to the interface.
2N/A * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
2N/A * @param pDeviceDesc The device description.
2N/A * @param cbDeviceDesc The size of the device description.
2N/A * @param u32Version The remote video input protocol version.
2N/A * @param fu32Capabilities The remote video input protocol capabilities.
2N/A */
2N/A DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface,
2N/A uint64_t u64DeviceId,
2N/A const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
2N/A uint32_t cbDeviceDesc,
2N/A uint32_t u32Version,
2N/A uint32_t fu32Capabilities));
2N/A
2N/A /*
2N/A * The webcam is not available anymore.
2N/A *
2N/A * @param pInterface Pointer to the interface.
2N/A * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
2N/A */
2N/A DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface,
2N/A uint64_t u64DeviceId));
2N/A
2N/A /*
2N/A * There is a control response or a control change for the webcam.
2N/A *
2N/A * @param pInterface Pointer to the interface.
2N/A * @param fResponse True if this is a response for a previous pfnWebcamDownControl call.
2N/A * @param pvUser The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
2N/A * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
2N/A * @param pCtrl The control data.
2N/A * @param cbCtrl The size of the control data.
2N/A */
2N/A DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface,
2N/A bool fResponse,
2N/A void *pvUser,
2N/A uint64_t u64DeviceId,
2N/A const PDMIWEBCAM_CTRLHDR *pCtrl,
2N/A uint32_t cbCtrl));
2N/A
2N/A /*
2N/A * A new frame.
2N/A *
2N/A * @param pInterface Pointer to the interface.
2N/A * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
2N/A * @param pu8Frame The frame data including the payload header and the image data.
2N/A * @param cbFrame The size of the frame data.
2N/A */
2N/A DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface,
2N/A uint64_t u64DeviceId,
2N/A const uint8_t *pu8Frame,
2N/A uint32_t cbFrame));
2N/A} PDMIWEBCAMUP;
2N/A
2N/A#endif
2N/A