Changeset 55854 in vbox
- Timestamp:
- May 13, 2015 2:40:26 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
doc/manual/en_US/SDKRef.xml (modified) (1 diff)
-
src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp (modified) (1 diff)
-
src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp (modified) (2 diffs)
-
src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp (modified) (1 diff)
-
src/VBox/Main/idl/VirtualBox.xidl (modified) (3 diffs)
-
src/VBox/Main/include/MachineImpl.h (modified) (2 diffs)
-
src/VBox/Main/src-server/MachineImpl.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/SDKRef.xml
r55800 r55854 4194 4194 <computeroutput>bitmapFormat</computeroutput>. As a consequence of this, 4195 4195 IMachine::ReadSavedThumbnailPNGToArray() has been removed. 4196 </para></listitem> 4197 4198 <listitem><para> 4199 IMachine::QuerySavedScreenshotPNGSize() has been renamed to 4200 IMachine::QuerySavedScreenshotInfo() which also returns 4201 an array of available screenshot formats. 4202 </para></listitem> 4203 4204 <listitem><para> 4205 IMachine::ReadSavedScreenshotPNGToArray() has been renamed to 4206 IMachine::ReadSavedScreenshotToArray() which has a new parameter 4207 <computeroutput>bitmapFormat</computeroutput>. 4208 </para></listitem> 4209 4210 <listitem><para> 4211 IMachine::QuerySavedThumbnailSize() has been removed. 4196 4212 </para></listitem> 4197 4213 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.cpp
r52958 r55854 76 76 QVector <BYTE> thumbData = machine.ReadSavedThumbnailToArray (0, KBitmapFormat_BGR0, width, height); 77 77 mThumbnail = thumbData.size() != 0 ? QPixmap::fromImage (QImage (thumbData.data(), width, height, QImage::Format_RGB32).copy()) : QPixmap(); 78 QVector <BYTE> screenData = machine.ReadSavedScreenshot PNGToArray (0, width, height);78 QVector <BYTE> screenData = machine.ReadSavedScreenshotToArray (0, KBitmapFormat_PNG, width, height); 79 79 mScreenshot = screenData.size() != 0 ? QPixmap::fromImage (QImage::fromData (screenData.data(), screenData.size(), "PNG")) : QPixmap(); 80 80 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r55845 r55854 647 647 /* If there is a preview image saved, 648 648 * we will resize the framebuffer to the size of that image: */ 649 ULONG u Buffer = 0, uWidth = 0, uHeight = 0;650 machine().QuerySavedScreenshotPNGSize(0, uBuffer, uWidth, uHeight);651 if ( uBuffer> 0)649 ULONG uWidth = 0, uHeight = 0; 650 QVector<KBitmapFormat> formats = machine().QuerySavedScreenshotInfo(0, uWidth, uHeight); 651 if (formats.size() > 0) 652 652 { 653 653 /* Init with the screenshot size: */ … … 1030 1030 /* Acquire the screen-data from the saved-state: */ 1031 1031 ULONG uWidth = 0, uHeight = 0; 1032 const QVector<BYTE> screenData = machine().ReadSavedScreenshot PNGToArray(0, uWidth, uHeight);1032 const QVector<BYTE> screenData = machine().ReadSavedScreenshotToArray(0, KBitmapFormat_PNG, uWidth, uHeight); 1033 1033 1034 1034 /* Make sure there is saved-state screen-data: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp
r55819 r55854 207 207 /* Use the screenshot from saved-state if possible: */ 208 208 ULONG uGuestWidth = 0, uGuestHeight = 0; 209 QVector<BYTE> screenData = m_machine.ReadSavedScreenshot PNGToArray(0, uGuestWidth, uGuestHeight);209 QVector<BYTE> screenData = m_machine.ReadSavedScreenshotToArray(0, KBitmapFormat_PNG, uGuestWidth, uGuestHeight); 210 210 211 211 /* Make sure screen-data is OK: */ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r55807 r55854 4170 4170 <interface 4171 4171 name="IMachine" extends="$unknown" 4172 uuid=" 77a44043-a68a-4ef9-ac26-e9567b1e6bbc"4172 uuid="feb138aa-dbce-4a89-8ec0-380fc7ec4913" 4173 4173 wsmap="managed" 4174 4174 wrap-hint-server-addinterfaces="IInternalMachineControl" … … 7037 7037 </method> 7038 7038 7039 <method name=" querySavedThumbnailSize">7040 <desc> 7041 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.7039 <method name="readSavedThumbnailToArray"> 7040 <desc> 7041 Thumbnail is retrieved to an array of bytes in the requested format. 7042 7042 </desc> 7043 7043 <param name="screenId" type="unsigned long" dir="in"> 7044 7044 <desc> 7045 Saved guest screen to read from. 7046 </desc> 7047 </param> 7048 <param name="bitmapFormat" type="BitmapFormat" dir="in"> 7049 <desc> 7050 The requested format. 7051 </desc> 7052 </param> 7053 <param name="width" type="unsigned long" dir="out"> 7054 <desc> 7055 Bitmap width. 7056 </desc> 7057 </param> 7058 <param name="height" type="unsigned long" dir="out"> 7059 <desc> 7060 Bitmap height. 7061 </desc> 7062 </param> 7063 <param name="data" type="octet" safearray="yes" dir="return"> 7064 <desc> 7065 Array with resulting bitmap data. 7066 </desc> 7067 </param> 7068 </method> 7069 7070 <method name="querySavedScreenshotInfo"> 7071 <desc> 7072 Returns available formats and size of the screenshot from saved state. 7073 </desc> 7074 <param name="screenId" type="unsigned long" dir="in"> 7075 <desc> 7045 7076 Saved guest screen to query info from. 7046 7077 </desc> 7047 7078 </param> 7048 <param name="size" type="unsigned long" dir="out">7049 <desc>7050 Size of buffer required to store the bitmap.7051 </desc>7052 </param>7053 7079 <param name="width" type="unsigned long" dir="out"> 7054 7080 <desc> 7055 Bitmapwidth.7081 Image width. 7056 7082 </desc> 7057 7083 </param> 7058 7084 <param name="height" type="unsigned long" dir="out"> 7059 7085 <desc> 7060 Bitmap height. 7061 </desc> 7062 </param> 7063 </method> 7064 7065 <method name="readSavedThumbnailToArray"> 7066 <desc> 7067 Thumbnail is retrieved to an array of bytes in the requested format. 7086 Image height. 7087 </desc> 7088 </param> 7089 <param name="bitmapFormats" type="BitmapFormat" safearray="yes" dir="return"> 7090 <desc> 7091 Formats supported by readSavedScreenshotToArray. 7092 </desc> 7093 </param> 7094 </method> 7095 7096 <method name="readSavedScreenshotToArray"> 7097 <desc> 7098 Screenshot in requested format is retrieved to an array of bytes. 7068 7099 </desc> 7069 7100 <param name="screenId" type="unsigned long" dir="in"> … … 7079 7110 <param name="width" type="unsigned long" dir="out"> 7080 7111 <desc> 7081 Bitmapwidth.7112 Image width. 7082 7113 </desc> 7083 7114 </param> 7084 7115 <param name="height" type="unsigned long" dir="out"> 7085 7116 <desc> 7086 Bitmap height.7087 </desc>7088 </param>7089 <param name="data" type="octet" safearray="yes" dir="return">7090 <desc>7091 Array with resulting bitmap data.7092 </desc>7093 </param>7094 </method>7095 7096 <method name="querySavedScreenshotPNGSize">7097 <desc>7098 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.7099 </desc>7100 <param name="screenId" type="unsigned long" dir="in">7101 <desc>7102 Saved guest screen to query info from.7103 </desc>7104 </param>7105 <param name="size" type="unsigned long" dir="out">7106 <desc>7107 Size of buffer required to store the PNG binary data.7108 </desc>7109 </param>7110 <param name="width" type="unsigned long" dir="out">7111 <desc>7112 Image width.7113 </desc>7114 </param>7115 <param name="height" type="unsigned long" dir="out">7116 <desc>7117 7117 Image height. 7118 7118 </desc> 7119 7119 </param> 7120 </method>7121 7122 <method name="readSavedScreenshotPNGToArray">7123 <desc>7124 Screenshot in PNG format is retrieved to an array of bytes.7125 </desc>7126 <param name="screenId" type="unsigned long" dir="in">7127 <desc>7128 Saved guest screen to read from.7129 </desc>7130 </param>7131 <param name="width" type="unsigned long" dir="out">7132 <desc>7133 Image width.7134 </desc>7135 </param>7136 <param name="height" type="unsigned long" dir="out">7137 <desc>7138 Image height.7139 </desc>7140 </param>7141 7120 <param name="data" type="octet" dir="return" safearray="yes"> 7142 7121 <desc> 7143 Array with resulting PNGdata.7122 Array with resulting image data. 7144 7123 </desc> 7145 7124 </param> -
trunk/src/VBox/Main/include/MachineImpl.h
r55807 r55854 1157 1157 ULONG *aHeight, 1158 1158 BOOL *aEnabled); 1159 HRESULT querySavedThumbnailSize(ULONG aScreenId,1160 ULONG *aSize,1161 ULONG *aWidth,1162 ULONG *aHeight);1163 1159 HRESULT readSavedThumbnailToArray(ULONG aScreenId, 1164 1160 BitmapFormat_T aBitmapFormat, … … 1166 1162 ULONG *aHeight, 1167 1163 std::vector<BYTE> &aData); 1168 HRESULT querySavedScreenshotPNGSize(ULONG aScreenId, 1169 ULONG *aSize, 1170 ULONG *aWidth, 1171 ULONG *aHeight); 1172 HRESULT readSavedScreenshotPNGToArray(ULONG aScreenId, 1173 ULONG *aWidth, 1174 ULONG *aHeight, 1175 std::vector<BYTE> &aData); 1164 HRESULT querySavedScreenshotInfo(ULONG aScreenId, 1165 ULONG *aWidth, 1166 ULONG *aHeight, 1167 std::vector<BitmapFormat_T> &aBitmapFormats); 1168 HRESULT readSavedScreenshotToArray(ULONG aScreenId, 1169 BitmapFormat_T aBitmapFormat, 1170 ULONG *aWidth, 1171 ULONG *aHeight, 1172 std::vector<BYTE> &aData); 1173 1176 1174 HRESULT hotPlugCPU(ULONG aCpu); 1177 1175 HRESULT hotUnplugCPU(ULONG aCpu); -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r55835 r55854 6370 6370 } 6371 6371 6372 HRESULT Machine::querySavedThumbnailSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)6373 {6374 if (aScreenId != 0)6375 return E_NOTIMPL;6376 6377 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);6378 6379 uint8_t *pu8Data = NULL;6380 uint32_t cbData = 0;6381 uint32_t u32Width = 0;6382 uint32_t u32Height = 0;6383 6384 int vrc = readSavedDisplayScreenshot(mSSData->strStateFilePath, 0 /* u32Type */, &pu8Data, &cbData, &u32Width, &u32Height);6385 6386 if (RT_FAILURE(vrc))6387 return setError(VBOX_E_IPRT_ERROR,6388 tr("Saved screenshot data is not available (%Rrc)"),6389 vrc);6390 6391 *aSize = cbData;6392 *aWidth = u32Width;6393 *aHeight = u32Height;6394 6395 freeSavedDisplayScreenshot(pu8Data);6396 6397 return S_OK;6398 }6399 6400 6372 HRESULT Machine::readSavedThumbnailToArray(ULONG aScreenId, BitmapFormat_T aBitmapFormat, 6401 6373 ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData) … … 6492 6464 } 6493 6465 6494 HRESULT Machine::querySavedScreenshotPNGSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight) 6466 HRESULT Machine::querySavedScreenshotInfo(ULONG aScreenId, 6467 ULONG *aWidth, 6468 ULONG *aHeight, 6469 std::vector<BitmapFormat_T> &aBitmapFormats) 6495 6470 { 6496 6471 if (aScreenId != 0) … … 6511 6486 vrc); 6512 6487 6513 *aSize = cbData;6514 6488 *aWidth = u32Width; 6515 6489 *aHeight = u32Height; 6490 aBitmapFormats.resize(1); 6491 aBitmapFormats[0] = BitmapFormat_PNG; 6516 6492 6517 6493 freeSavedDisplayScreenshot(pu8Data); … … 6520 6496 } 6521 6497 6522 HRESULT Machine::readSavedScreenshotPNGToArray(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData) 6498 HRESULT Machine::readSavedScreenshotToArray(ULONG aScreenId, 6499 BitmapFormat_T aBitmapFormat, 6500 ULONG *aWidth, 6501 ULONG *aHeight, 6502 std::vector<BYTE> &aData) 6523 6503 { 6524 6504 if (aScreenId != 0) 6505 return E_NOTIMPL; 6506 6507 if (aBitmapFormat != BitmapFormat_PNG) 6525 6508 return E_NOTIMPL; 6526 6509
Note:
See TracChangeset
for help on using the changeset viewer.

