Hi,
I am trying to send rdp content via fastpath update_send_bitmap_update to
Lync clients from my own app. It worked when I tried with sending color
blocks in 32bpp. But when I changed to sending 16 bits per pixel, it
stopped working.

I'm using this version of freerdp:
https://github.com/FreeRDP/FreeRDP/tree/stable-1.1

I have tried with/without disabling compression and that both worked fine
for 32bpp.

Any idea why that might be? 2 versions I used to draw the bitmap see below.

Thanks a lot!

Cheers,
Simon


Worked (32bpp):
  uint32_t width  = 32;
  uint32_t height = 32;
  uint32_t size       = width * height * 4;
  BYTE * rgb_data     = (BYTE*)malloc(size);
  uint32_t rgbColour  = 0xFFFFFFFF;
  BYTE * rgb_p = rgb_data;

  for (uint32_t u=0; u<size; u+=4)
  {
    memcpy(rgb_p, &rgbColour, sizeof(rgbColour));
    rgb_p+=4;
  }

  uint32_t x = 0;
  uint32_t y = 0;
  BITMAP_DATA bitmap_data;

  memset(&bitmap_data, 0, sizeof(bitmap_data));


  bitmap_data.destLeft          = x;
  bitmap_data.destTop           = y;
  bitmap_data.destRight         = bitmap_data.destLeft + width;
  bitmap_data.destBottom      = bitmap_data.destTop + height;
  bitmap_data.width             = width;
  bitmap_data.height            = height;
  bitmap_data.bitmapDataStream  = rgb_data;
  bitmap_data.bitmapLength      = size;
  bitmap_data.bitsPerPixel      = 32;


  BITMAP_UPDATE bitmap_update;
  bitmap_update.count       = 1;
  bitmap_update.number      = 1;
  bitmap_update.rectangles  = &bitmap_data;

  update->BitmapUpdate(rdp_context, &bitmap_update);

  free(rgb_data);


Didn't work(16bpp):
  uint32_t width  = 32;
  uint32_t height = 32;
  uint32_t size       = width * height * 2;
  BYTE * rgb_data     = (BYTE*)malloc(size);
  uint32_t rgbColour  = 0xFFFFFFFF;
  BYTE * rgb_p = rgb_data;

  for (uint32_t u=0; u<size; u+=2)
  {
    memcpy(rgb_p, &rgbColour, sizeof(rgbColour));
    rgb_p+=2;
  }


  uint32_t x = 0;
  uint32_t y = 0;
  BITMAP_DATA bitmap_data;

  memset(&bitmap_data, 0, sizeof(bitmap_data));

  bitmap_data.destLeft          = x;
  bitmap_data.destTop           = y;
  bitmap_data.destRight         = bitmap_data.destLeft + width;
  bitmap_data.destBottom      = bitmap_data.destTop + height;
  bitmap_data.width             = width;
  bitmap_data.height            = height;
  bitmap_data.bitmapDataStream  = rgb_data;
  bitmap_data.bitmapLength      = size;
  bitmap_data.bitsPerPixel      = 16;


  BITMAP_UPDATE bitmap_update;

  bitmap_update.count       = 1;
  bitmap_update.number      = 1;
  bitmap_update.rectangles  = &bitmap_data;

  update->BitmapUpdate(rdp_context, &bitmap_update);

  free(rgb_data);
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
FreeRDP-devel mailing list
FreeRDP-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to