VirtualBox

Changeset 24490 in vbox


Ignore:
Timestamp:
Nov 9, 2009 11:23:35 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54575
Message:

Saved state screenshot API stubs (xTracker 4364).

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r24464 r24490  
    405405        uint32_t cy = 0;
    406406
    407         /* @todo pfnTakeScreenshot is probably callable from any thread, because it uses the VGA device lock. */
    408         int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)that->mpDrv->pUpPort->pfnTakeScreenshot, 5,
    409                                  that->mpDrv->pUpPort, &pu8Data, &cbData, &cx, &cy);
     407        /* SSM code is executed on EMT(0), therefore no need to use VMR3ReqCallWait. */
     408        int rc = that->mpDrv->pUpPort->pfnTakeScreenshot (that->mpDrv->pUpPort, &pu8Data, &cbData, &cx, &cy);
    410409
    411410        if (RT_SUCCESS(rc))
     
    668667
    669668#if 0
    670     rc = SSMR3RegisterExternal(pVM, "DisplayScreenshot", 0 /*uInstance*/, sSSMDisplayScreenshotVer, 0 /*cbGuess*/,
     669    /* uInstance is an arbitrary value greater than 1024. Such a value will ensure a quick seek in saved state file. */
     670    rc = SSMR3RegisterExternal(pVM, "DisplayScreenshot", 1100 /*uInstance*/, sSSMDisplayScreenshotVer, 0 /*cbGuess*/,
    671671                               NULL, NULL, NULL,
    672672                               NULL, displaySSMSaveScreenshot, NULL,
  • trunk/src/VBox/Main/MachineImpl.cpp

    r24460 r24490  
    38913891}
    38923892
     3893STDMETHODIMP Machine::QuerySavedThumbnailSize(ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
     3894{
     3895    return setError (E_NOTIMPL, tr ("This feature is not implemented"));
     3896}
     3897
     3898STDMETHODIMP Machine::ReadSavedThumbnail(BYTE *aAddress, ULONG aSize)
     3899{
     3900    return setError (E_NOTIMPL, tr ("This feature is not implemented"));
     3901}
     3902
     3903STDMETHODIMP Machine::ReadSavedThumbnailToArray(ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData))
     3904{
     3905    return setError (E_NOTIMPL, tr ("This feature is not implemented"));
     3906}
     3907
     3908STDMETHODIMP Machine::QuerySavedScreenshotPNGSize(ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
     3909{
     3910    return setError (E_NOTIMPL, tr ("This feature is not implemented"));
     3911}
     3912
     3913STDMETHODIMP Machine::ReadSavedScreenshotPNG(BYTE *aAddress, ULONG aSize)
     3914{
     3915    return setError (E_NOTIMPL, tr ("This feature is not implemented"));
     3916}
     3917
     3918STDMETHODIMP Machine::ReadSavedScreenshotPNGToArray(ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData))
     3919{
     3920    return setError (E_NOTIMPL, tr ("This feature is not implemented"));
     3921}
     3922
    38933923// public methods for internal purposes
    38943924/////////////////////////////////////////////////////////////////////////////
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r24464 r24490  
    40974097  <interface
    40984098     name="IMachine" extends="$unknown"
    4099      uuid="e2e5bab4-16ff-4ef4-b9df-f0b4433c1d1b"
     4099     uuid="25472915-3da2-42f6-82f2-70a3bc74d73c"
    41004100     wsmap="managed"
    41014101     >
     
    57625762      </param>
    57635763    </method>
     5764
     5765    <method name="querySavedThumbnailSize">
     5766      <desc>
     5767        Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
     5768      </desc>
     5769      <param name="size" type="unsigned long" dir="out">
     5770        <desc>
     5771          Size of buffer required to store the bitmap.
     5772        </desc>
     5773      </param>
     5774      <param name="width" type="unsigned long" dir="out">
     5775        <desc>
     5776          Bitmap width.
     5777        </desc>
     5778      </param>
     5779      <param name="height" type="unsigned long" dir="out">
     5780        <desc>
     5781          Bitmap height.
     5782        </desc>
     5783      </param>
     5784    </method>
     5785
     5786    <method name="readSavedThumbnail">
     5787      <desc>
     5788        Reads a saved thumbnail bitmap from saved state.
     5789        A pixel consists of 4 bytes in order: B, G, R, 0.
     5790
     5791        <note>This API can be used only by the COM/XPCOM C++ API as it
     5792            requires pointer support. Use <link to="#readSavedThumbnailToArray" />
     5793            with other language bindings.
     5794        </note>
     5795      </desc>
     5796      <param name="address" type="octet" mod="ptr" dir="in">
     5797        <desc>
     5798          Buffer allocated by caller. Size must be at least equal
     5799          to value returned by querySavedThumbnailSize.
     5800        </desc>
     5801      </param>
     5802      <param name="size" type="unsigned long" dir="in">
     5803        <desc>
     5804          Size of buffer allocated by caller. If the buffer is too small,
     5805          the method fails.
     5806        </desc>
     5807      </param>
     5808    </method>
     5809
     5810    <method name="readSavedThumbnailToArray">
     5811      <desc>
     5812        Thumbnail is retrieved to an array of bytes in uncompressed 32-bit RGBA format.
     5813        A pixel consists of 4 bytes in order: R, G, B, 0xFF.
     5814
     5815        This API is slow, but could be the only option to get image
     5816        for scriptable languages not allowed to manipulate with addresses
     5817        directly.
     5818      </desc>
     5819      <param name="width" type="unsigned long" dir="out">
     5820        <desc>
     5821          Bitmap width.
     5822        </desc>
     5823      </param>
     5824      <param name="height" type="unsigned long" dir="out">
     5825        <desc>
     5826          Bitmap height.
     5827        </desc>
     5828      </param>
     5829      <param name="data" type="octet" dir="return" safearray="yes">
     5830        <desc>
     5831          Array with resulting bitmap data.
     5832        </desc>
     5833      </param>
     5834    </method>
     5835
     5836    <method name="querySavedScreenshotPNGSize">
     5837      <desc>
     5838        Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
     5839      </desc>
     5840      <param name="size" type="unsigned long" dir="out">
     5841        <desc>
     5842          Size of buffer required to store the PNG binary data.
     5843        </desc>
     5844      </param>
     5845      <param name="width" type="unsigned long" dir="out">
     5846        <desc>
     5847          Image width.
     5848        </desc>
     5849      </param>
     5850      <param name="height" type="unsigned long" dir="out">
     5851        <desc>
     5852          Image height.
     5853        </desc>
     5854      </param>
     5855    </method>
     5856
     5857    <method name="readSavedScreenshotPNG">
     5858      <desc>
     5859        Reads a saved screenshot in PNG format from saved state.
     5860
     5861        <note>This API can be used only by the COM/XPCOM C++ API as it
     5862            requires pointer support. Use <link to="#readSavedScreenshotPNGToArray" />
     5863            with other language bindings.
     5864        </note>
     5865      </desc>
     5866      <param name="address" type="octet" mod="ptr" dir="in">
     5867        <desc>
     5868          Buffer allocated by caller. Size must be at least equal
     5869          to value returned by querySavedScreenshotPNGSize.
     5870        </desc>
     5871      </param>
     5872      <param name="size" type="unsigned long" dir="in">
     5873        <desc>
     5874          Size of buffer allocated by caller. If the buffer is too small,
     5875          the method fails.
     5876        </desc>
     5877      </param>
     5878    </method>
     5879
     5880    <method name="readSavedScreenshotPNGToArray">
     5881      <desc>
     5882        Screenshot in PNG format is retrieved to an array of bytes.
     5883
     5884        This API is slow, but could be the only option to get image
     5885        for scriptable languages not allowed to manipulate with addresses
     5886        directly.
     5887      </desc>
     5888      <param name="width" type="unsigned long" dir="out">
     5889        <desc>
     5890          Image width.
     5891        </desc>
     5892      </param>
     5893      <param name="height" type="unsigned long" dir="out">
     5894        <desc>
     5895          Image height.
     5896        </desc>
     5897      </param>
     5898      <param name="data" type="octet" dir="return" safearray="yes">
     5899        <desc>
     5900          Array with resulting PNG data.
     5901        </desc>
     5902      </param>
     5903    </method>
    57645904</interface>
    57655905
  • trunk/src/VBox/Main/include/MachineImpl.h

    r24315 r24490  
    629629    STDMETHOD(COMSETTER(FirmwareType)) (FirmwareType_T  aFirmware);
    630630
     631    STDMETHOD(QuerySavedThumbnailSize)(ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
     632    STDMETHOD(ReadSavedThumbnail)(BYTE *aAddress, ULONG aSize);
     633    STDMETHOD(ReadSavedThumbnailToArray)(ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
     634    STDMETHOD(QuerySavedScreenshotPNGSize)(ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
     635    STDMETHOD(ReadSavedScreenshotPNG)(BYTE *aAddress, ULONG aSize);
     636    STDMETHOD(ReadSavedScreenshotPNGToArray)(ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
     637
    631638    // public methods only for internal purposes
    632639
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