VirtualBox

Changeset 46291 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
May 28, 2013 7:38:04 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86037
Message:

ConsoleVRDPServer: image interface fix and logging updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r46097 r46291  
    17231723    uint32_t h;
    17241724    bool fCreated;
     1725    bool fFallback;
    17251726} H3DORInstance;
     1727
     1728#define H3DORLOG Log
    17261729
    17271730/* static */ DECLCALLBACK(void) ConsoleVRDPServer::H3DORBegin(const void *pvContext, void **ppvInstance,
    17281731                                                              const char *pszFormat)
    17291732{
    1730     LogFlowFunc(("ctx %p\n", pvContext));
    1731 
    1732     H3DORInstance *p = (H3DORInstance *)RTMemAlloc(sizeof (H3DORInstance));
     1733    H3DORLOG(("H3DORBegin: ctx %p [%s]\n", pvContext, pszFormat));
     1734
     1735    H3DORInstance *p = (H3DORInstance *)RTMemAlloc(sizeof(H3DORInstance));
    17331736
    17341737    if (p)
     
    17411744        p->h = 0;
    17421745        p->fCreated = false;
     1746        p->fFallback = false;
    17431747
    17441748        /* Host 3D service passes the actual format of data in this redirect instance.
     
    17561760    }
    17571761
    1758     /* Caller check this for NULL. */
     1762    H3DORLOG(("H3DORBegin: ins %p\n", p));
     1763
     1764    /* Caller checks this for NULL. */
    17591765    *ppvInstance = p;
    17601766}
     
    17631769                                                                 int32_t x, int32_t y, uint32_t w, uint32_t h)
    17641770{
    1765     LogFlowFunc(("ins %p %d,%d %dx%d\n", pvInstance, x, y, w, h));
     1771    H3DORLOG(("H3DORGeometry: ins %p %d,%d %dx%d\n", pvInstance, x, y, w, h));
    17661772
    17671773    H3DORInstance *p = (H3DORInstance *)pvInstance;
     
    17921798            && p->h == h)
    17931799        {
    1794             LogFlowFunc(("geometry not changed\n"));
     1800            H3DORLOG(("H3DORGeometry: geometry not changed\n"));
    17951801            /* Do nothing. Continue using the existing handle. */
    17961802        }
    17971803        else
    17981804        {
    1799             int rc = p->pThis->m_interfaceImage.VRDEImageGeometrySet(p->hImageBitmap, &rect);
     1805            int rc = p->fFallback?
     1806                        rc = VERR_NOT_SUPPORTED: /* Try to go out of fallback mode. */
     1807                        p->pThis->m_interfaceImage.VRDEImageGeometrySet(p->hImageBitmap, &rect);
    18001808            if (RT_SUCCESS(rc))
    18011809            {
     
    18261834                                   */
    18271835        uint32_t fu32CompletionFlags = 0;
     1836        p->fFallback = false;
    18281837        int rc = p->pThis->m_interfaceImage.VRDEImageHandleCreate(p->pThis->mhServer,
    18291838                                                                  &p->hImageBitmap,
     
    18401849        {
    18411850            /* No support for a 3D + WINDOW. Try bitmap updates. */
     1851            H3DORLOG(("H3DORGeometry: Fallback to bitmaps\n"));
    18421852            fu32CompletionFlags = 0;
     1853            p->fFallback = true;
    18431854            rc = p->pThis->m_interfaceImage.VRDEImageHandleCreate(p->pThis->mhServer,
    18441855                                                                  &p->hImageBitmap,
     
    18531864        }
    18541865
     1866        H3DORLOG(("H3DORGeometry: Image handle create %Rrc, flags 0x%RX32\n", rc, fu32CompletionFlags));
     1867
    18551868        if (RT_SUCCESS(rc))
    18561869        {
     
    18721885        }
    18731886    }
     1887
     1888    H3DORLOG(("H3DORGeometry: ins %p completed\n", pvInstance));
    18741889}
    18751890
     
    18771892                                                                      uint32_t cRects, const RTRECT *paRects)
    18781893{
    1879     LogFlowFunc(("ins %p %d\n", pvInstance, cRects));
     1894    H3DORLOG(("H3DORVisibleRegion: ins %p %d\n", pvInstance, cRects));
    18801895
    18811896    H3DORInstance *p = (H3DORInstance *)pvInstance;
     
    19011916                                                       paRects);
    19021917    }
     1918
     1919    H3DORLOG(("H3DORVisibleRegion: ins %p completed\n", pvInstance));
    19031920}
    19041921
     
    19061923                                                              void *pvData, uint32_t cbData)
    19071924{
    1908     LogFlowFunc(("ins %p %p %d\n", pvInstance, pvData, cbData));
     1925    H3DORLOG(("H3DORFrame: ins %p %p %d\n", pvInstance, pvData, cbData));
    19091926
    19101927    H3DORInstance *p = (H3DORInstance *)pvInstance;
     
    19291946                                                &image,
    19301947                                                sizeof(VRDEIMAGEBITMAP));
     1948
     1949    H3DORLOG(("H3DORFrame: ins %p completed\n", pvInstance));
    19311950}
    19321951
    19331952/* static */ DECLCALLBACK(void) ConsoleVRDPServer::H3DOREnd(void *pvInstance)
    19341953{
    1935     LogFlowFunc(("ins %p\n", pvInstance));
     1954    H3DORLOG(("H3DOREnd: ins %p\n", pvInstance));
    19361955
    19371956    H3DORInstance *p = (H3DORInstance *)pvInstance;
     
    19421961
    19431962    RTMemFree(p);
     1963
     1964    H3DORLOG(("H3DOREnd: ins %p completed\n", pvInstance));
    19441965}
    19451966
     
    19481969{
    19491970    int rc = VINF_SUCCESS;
     1971
     1972    H3DORLOG(("H3DORContextProperty: index %d\n", index));
    19501973
    19511974    if (index == H3DOR_PROP_FORMATS)
     
    19691992    }
    19701993
     1994    H3DORLOG(("H3DORContextProperty: %Rrc\n", rc));
    19711995    return rc;
    19721996}
     
    20482072                                                                     uint32_t cbData)
    20492073{
    2050     LogFlowFunc(("pvContext %p, pvUser %p, hVideo %p, u32Id %u, pvData %p, cbData %d\n",
    2051                  pvContext, pvUser, hVideo, u32Id, pvData, cbData));
     2074    H3DORLOG(("H3DOR: VRDEImageCbNotify: pvContext %p, pvUser %p, hVideo %p, u32Id %u, pvData %p, cbData %d\n",
     2075              pvContext, pvUser, hVideo, u32Id, pvData, cbData));
    20522076
    20532077    ConsoleVRDPServer *pServer = static_cast<ConsoleVRDPServer*>(pvContext);
     
    20662090
    20672091        uint32_t u32StreamId = *(uint32_t *)pvData;
    2068         LogFlowFunc(("VRDE_IMAGE_NOTIFY_HANDLE_CREATE u32StreamId %d\n",
    2069                      u32StreamId));
     2092        H3DORLOG(("H3DOR: VRDE_IMAGE_NOTIFY_HANDLE_CREATE u32StreamId %d\n",
     2093                  u32StreamId));
    20702094
    20712095        if (u32StreamId != 0)
     
    20812105    return VINF_SUCCESS;
    20822106}
     2107
     2108#undef H3DORLOG
    20832109
    20842110/* static */ DECLCALLBACK(int) ConsoleVRDPServer::VRDESCardCbNotify(void *pvContext,
Note: See TracChangeset for help on using the changeset viewer.

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