Changeset 85856 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Aug 21, 2020 9:06:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/RecordingStream.cpp
r82968 r85856 24 24 #include <iprt/path.h> 25 25 26 #if VBOX_RECORDING_DUMP 27 # include <iprt/formats/bmp.h> 28 #endif 29 26 30 #include "Recording.h" 27 31 #include "RecordingUtils.h" 28 32 #include "WebMWriter.h" 29 33 30 #ifdef VBOX_RECORDING_DUMP31 #pragma pack(push)32 #pragma pack(1)33 typedef struct34 {35 uint16_t uMagic;36 uint32_t uSize;37 uint16_t uReserved1;38 uint16_t uReserved2;39 uint32_t uOffBits;40 } RECORDINGBMPHDR, *PRECORDINGBMPHDR;41 AssertCompileSize(RECORDINGBMPHDR, 14);42 43 typedef struct44 {45 uint32_t uSize;46 uint32_t uWidth;47 uint32_t uHeight;48 uint16_t uPlanes;49 uint16_t uBitCount;50 uint32_t uCompression;51 uint32_t uSizeImage;52 uint32_t uXPelsPerMeter;53 uint32_t uYPelsPerMeter;54 uint32_t uClrUsed;55 uint32_t uClrImportant;56 } RECORDINGBMPDIBHDR, *PRECORDINGBMPDIBHDR;57 AssertCompileSize(RECORDINGBMPDIBHDR, 40);58 59 #pragma pack(pop)60 #endif /* VBOX_RECORDING_DUMP */61 34 62 35 RecordingStream::RecordingStream(RecordingContext *a_pCtx) … … 664 637 665 638 #ifdef VBOX_RECORDING_DUMP 666 RECORDINGBMPHDRbmpHdr;639 BMPINFO bmpHdr; 667 640 RT_ZERO(bmpHdr); 668 641 669 RECORDINGBMPDIBHDR bmpDIBHdr;642 WINHDR bmpDIBHdr; 670 643 RT_ZERO(bmpDIBHdr); 671 644 672 bmpHdr. uMagic = 0x4d42; /* Magic */673 bmpHdr. uSize = (uint32_t)(sizeof(RECORDINGBMPHDR) + sizeof(RECORDINGBMPDIBHDR) + (w * h * uBytesPerPixel));674 bmpHdr. uOffBits = (uint32_t)(sizeof(RECORDINGBMPHDR) + sizeof(RECORDINGBMPDIBHDR));675 676 bmpDIBHdr. uSize = sizeof(RECORDINGBMPDIBHDR);677 bmpDIBHdr. uWidth = w;678 bmpDIBHdr. uHeight = h;679 bmpDIBHdr. uPlanes = 1;680 bmpDIBHdr. uBitCount = uBPP;681 bmpDIBHdr. uXPelsPerMeter = 5000;682 bmpDIBHdr. uYPelsPerMeter = 5000;645 bmpHdr.Type = BMP_HDR_MAGIC; 646 bmpHdr.FileSize = (uint32_t)(sizeof(BMPINFO) + sizeof(WINHDR) + (w * h * uBytesPerPixel)); 647 bmpHdr.Offset = (uint32_t)(sizeof(BMPINFO) + sizeof(WINHDR)); 648 649 bmpDIBHdr.Size = sizeof(WINHDR); 650 bmpDIBHdr.Width = w; 651 bmpDIBHdr.Height = h; 652 bmpDIBHdr.Planes = 1; 653 bmpDIBHdr.BitCount = uBPP; 654 bmpDIBHdr.XPelsPerMeter = 5000; 655 bmpDIBHdr.YPelsPerMeter = 5000; 683 656 684 657 char szFileName[RTPATH_MAX];
Note:
See TracChangeset
for help on using the changeset viewer.