be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync/* $Id$ */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync/** @file
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * webcaminfs - interfaces between dev and driver.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync/*
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * Copyright (C) 2011-2013 Oracle Corporation
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync *
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * available from http://www.virtualbox.org. This file is free software;
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * you can redistribute it and/or modify it under the terms of the GNU
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * General Public License (GPL) as published by the Free Software
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync *
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * The contents of this file may alternatively be used under the terms
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * of the Common Development and Distribution License Version 1.0
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * VirtualBox OSE distribution, in which case the provisions of the
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * CDDL are applicable instead of those of the GPL.
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync *
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * You may elect to license modified versions of this file under the
010ad423d45c61ef874fa1602d46459a798b54d2vboxsync * terms and conditions of either the GPL or the CDDL or both.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync#ifndef ___VBox_vmm_pdmwebcaminfs_h
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync#define ___VBox_vmm_pdmwebcaminfs_h
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsynctypedef struct PDMIWEBCAM_DEVICEDESC PDMIWEBCAM_DEVICEDESC;
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsynctypedef struct PDMIWEBCAM_CTRLHDR PDMIWEBCAM_CTRLHDR;
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsynctypedef struct PDMIWEBCAM_FRAMEHDR PDMIWEBCAM_FRAMEHDR;
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync#define PDMIWEBCAMDOWN_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsynctypedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsynctypedef struct PDMIWEBCAMDOWN
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync{
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync /*
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * The PDM device is ready to get webcam notifications.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync *
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * @param pInterface Pointer to the interface.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * @param fReady Whether the device is ready.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync */
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync DECLR3CALLBACKMEMBER(void, pfnWebcamDownReady, (PPDMIWEBCAMDOWN pInterface,
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync bool fReady));
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync /*
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * Send a control request to the webcam.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * Async response will be returned by pfnWebcamUpControl callback.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync *
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pInterface Pointer to the interface.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pvUser The callers context.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pCtrl The control data.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param cbCtrl The size of the control data.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl, (PPDMIWEBCAMDOWN pInterface,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync void *pvUser,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint64_t u64DeviceId,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync const PDMIWEBCAM_CTRLHDR *pCtrl,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint32_t cbCtrl));
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync} PDMIWEBCAMDOWN;
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync#define PDMIWEBCAMUP_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsynctypedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsynctypedef struct PDMIWEBCAMUP
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync{
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync /*
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * A webcam is available.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync *
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pInterface Pointer to the interface.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pDeviceDesc The device description.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param cbDeviceDesc The size of the device description.
1acf60ed9c490056043f7bfa524f2de1a431ab10vboxsync * @param u32Version The remote video input protocol version.
1acf60ed9c490056043f7bfa524f2de1a431ab10vboxsync * @param fu32Capabilities The remote video input protocol capabilities.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint64_t u64DeviceId,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
1acf60ed9c490056043f7bfa524f2de1a431ab10vboxsync uint32_t cbDeviceDesc,
1acf60ed9c490056043f7bfa524f2de1a431ab10vboxsync uint32_t u32Version,
1acf60ed9c490056043f7bfa524f2de1a431ab10vboxsync uint32_t fu32Capabilities));
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync /*
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * The webcam is not available anymore.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync *
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pInterface Pointer to the interface.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint64_t u64DeviceId));
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync /*
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * There is a control response or a control change for the webcam.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync *
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pInterface Pointer to the interface.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param fResponse True if this is a response for a previous pfnWebcamDownControl call.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pvUser The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pCtrl The control data.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param cbCtrl The size of the control data.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync bool fResponse,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync void *pvUser,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint64_t u64DeviceId,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync const PDMIWEBCAM_CTRLHDR *pCtrl,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint32_t cbCtrl));
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync /*
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * A new frame.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync *
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param pInterface Pointer to the interface.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * @param pHeader Payload header.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * @param cbHeader Size of the payload header.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * @param pvFrame Frame (image) data.
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync * @param cbFrame Size of the image data.
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync */
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint64_t u64DeviceId,
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync PDMIWEBCAM_FRAMEHDR *pHeader,
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync uint32_t cbHeader,
a05a2534a4aeaed368d626a462d856c0d352c97dvboxsync const void *pvFrame,
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync uint32_t cbFrame));
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync} PDMIWEBCAMUP;
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync
be6308f59a5d362fe8bcb4e77644a7e9fd95dbd4vboxsync#endif