VirtualBox

Changeset 62821 in vbox for trunk/include


Ignore:
Timestamp:
Aug 1, 2016 2:56:47 PM (8 years ago)
Author:
vboxsync
Message:

UsbWebcam cleanups, part 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmwebcaminfs.h

    r62476 r62821  
    11/* $Id$ */
    2 
    32/** @file
    43 * webcaminfs - interfaces between dev and driver.
     
    2928#define ___VBox_vmm_pdmwebcaminfs_h
    3029
     30#include <VBox/types.h>
    3131
    32 typedef struct PDMIWEBCAM_DEVICEDESC PDMIWEBCAM_DEVICEDESC;
    33 typedef struct PDMIWEBCAM_CTRLHDR PDMIWEBCAM_CTRLHDR;
    34 typedef struct PDMIWEBCAM_FRAMEHDR PDMIWEBCAM_FRAMEHDR;
     32struct VRDEVIDEOINDEVICEDESC;
     33struct VRDEVIDEOINPAYLOADHDR;
     34struct VRDEVIDEOINCTRLHDR;
    3535
    3636
    37 #define PDMIWEBCAMDOWN_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
     37/** @defgroup grp_pdm_ifs_webcam    PDM Web Camera Interfaces
     38 * @ingroup grp_pdm_interfaces
     39 * @{
     40 */
     41
     42/** Pointer to the web camera driver up interface. */
    3843typedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
     44/**
     45 * Web camera driver up interface.
     46 * @todo correct name.
     47 */
    3948typedef struct PDMIWEBCAMDOWN
    4049{
    41     /*
     50    /**
    4251     * The PDM device is ready to get webcam notifications.
    4352     *
     
    4756    DECLR3CALLBACKMEMBER(void, pfnWebcamDownReady,(PPDMIWEBCAMDOWN pInterface, bool fReady));
    4857
    49     /*
     58    /**
    5059     * Send a control request to the webcam.
     60     *
    5161     * Async response will be returned by pfnWebcamUpControl callback.
    5262     *
    53      * @param pInterface  Pointer to the interface.
    54      * @param pvUser      The callers context.
    55      * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
    56      * @param pCtrl       The control data.
    57      * @param cbCtrl      The size of the control data.
     63     * @returns VBox status code.
     64     * @param pInterface    Pointer to the interface.
     65     * @param pvUser        The callers context.
     66     * @param idDevice      Unique id for the reported webcam assigned by the driver.
     67     * @param pCtrl         The control data.
     68     * @param cbCtrl        The size of the control data.
    5869     */
    59     DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl,(PPDMIWEBCAMDOWN pInterface, void *pvUser, uint64_t u64DeviceId,
    60                                                     const PDMIWEBCAM_CTRLHDR *pCtrl, uint32_t cbCtrl));
     70    DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl,(PPDMIWEBCAMDOWN pInterface, void *pvUser, uint64_t idDevice,
     71                                                    struct VRDEVIDEOINCTRLHDR const *pCtrl, uint32_t cbCtrl));
    6172} PDMIWEBCAMDOWN;
     73/** Interface ID for PDMIWEBCAMDOWN. */
     74#define PDMIWEBCAMDOWN_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
    6275
    63 
    64 #define PDMIWEBCAMUP_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
     76/** Pointer to the web camera driver/device down interface. */
    6577typedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
     78/**
     79 * Web camera driver/device down interface.
     80 * @todo correct name.
     81 */
    6682typedef struct PDMIWEBCAMUP
    6783{
    68     /*
     84    /**
    6985     * A webcam is available.
    7086     *
    71      * @param pInterface   Pointer to the interface.
    72      * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
    73      * @param pDeviceDesc  The device description.
    74      * @param cbDeviceDesc The size of the device description.
    75      * @param u32Version   The remote video input protocol version.
    76      * @param fu32Capabilities The remote video input protocol capabilities.
     87     * @returns VBox status code.
     88     * @param   pInterface      Pointer to the interface.
     89     * @param   idDevice        Unique id for the reported webcam assigned by the driver.
     90     * @param   pDeviceDesc     The device description.
     91     * @param   cbDeviceDesc    The size of the device description.
     92     * @param   uVersion        The remote video input protocol version.
     93     * @param   fCapabilities   The remote video input protocol capabilities.
    7794     */
    78     DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface, uint64_t u64DeviceId,
    79                                                    const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
    80                                                    uint32_t cbDeviceDesc, uint32_t u32Version, uint32_t fu32Capabilities));
     95    DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface, uint64_t idDevice,
     96                                                   struct VRDEVIDEOINDEVICEDESC const *pDeviceDesc, uint32_t cbDeviceDesc,
     97                                                   uint32_t uVersion, uint32_t fCapabilities));
    8198
    82     /*
     99    /**
    83100     * The webcam is not available anymore.
    84101     *
    85      * @param pInterface   Pointer to the interface.
    86      * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
     102     * @param   pInterface      Pointer to the interface.
     103     * @param   idDevice        Unique id for the reported webcam assigned by the
     104     *                          driver.
    87105     */
    88     DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface, uint64_t u64DeviceId));
     106    DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface, uint64_t idDevice));
    89107
    90     /*
     108    /**
    91109     * There is a control response or a control change for the webcam.
    92110     *
    93      * @param pInterface   Pointer to the interface.
    94      * @param fResponse    True if this is a response for a previous pfnWebcamDownControl call.
    95      * @param pvUser       The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
    96      * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
    97      * @param pCtrl        The control data.
    98      * @param cbCtrl       The size of the control data.
     111     * @param   pInterface      Pointer to the interface.
     112     * @param   fResponse       True if this is a response for a previous pfnWebcamDownControl call.
     113     * @param   pvUser          The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
     114     * @param   idDevice        Unique id for the reported webcam assigned by the
     115     *                          driver.
     116     * @param   pCtrl           The control data (defined in VRDE).
     117     * @param   cbCtrl          The size of the control data.
    99118     */
    100119    DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface, bool fResponse, void *pvUser,
    101                                                    uint64_t u64DeviceId, const PDMIWEBCAM_CTRLHDR *pCtrl, uint32_t cbCtrl));
     120                                                   uint64_t idDevice, struct VRDEVIDEOINCTRLHDR const *pCtrl, uint32_t cbCtrl));
    102121
    103     /*
     122    /**
    104123     * A new frame.
    105124     *
    106      * @param pInterface   Pointer to the interface.
    107      * @param u64DeviceId  Unique id for the reported webcam assigned by the driver.
    108      * @param pHeader      Payload header.
    109      * @param cbHeader     Size of the payload header.
    110      * @param pvFrame      Frame (image) data.
    111      * @param cbFrame      Size of the image data.
     125     * @param   pInterface      Pointer to the interface.
     126     * @param   idDevice        Unique id for the reported webcam assigned by the driver.
     127     * @param   pHeader         Payload header (defined in VRDE).
     128     * @param   cbHeader        Size of the payload header.
     129     * @param   pvFrame         Frame (image) data.
     130     * @param   cbFrame         Size of the image data.
    112131     */
    113     DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface, uint64_t u64DeviceId, PDMIWEBCAM_FRAMEHDR *pHeader,
    114                                                  uint32_t cbHeader, const void *pvFrame, uint32_t cbFrame));
     132    DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface, uint64_t idDevice,
     133                                                 struct VRDEVIDEOINPAYLOADHDR const *pHeader, uint32_t cbHeader,
     134                                                 const void *pvFrame, uint32_t cbFrame));
    115135} PDMIWEBCAMUP;
     136/** Interface ID for PDMIWEBCAMUP. */
     137#define PDMIWEBCAMUP_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
     138
     139/** @} */
    116140
    117141#endif
     142
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette