FreeRDP
utils/gfx.c
1 
22 #include <freerdp/utils/gfx.h>
23 #include <freerdp/channels/rdpgfx.h>
24 
25 static const char* RDPGFX_CMDID_STRINGS[] = { "RDPGFX_CMDID_UNUSED_0000",
26  "RDPGFX_CMDID_WIRETOSURFACE_1",
27  "RDPGFX_CMDID_WIRETOSURFACE_2",
28  "RDPGFX_CMDID_DELETEENCODINGCONTEXT",
29  "RDPGFX_CMDID_SOLIDFILL",
30  "RDPGFX_CMDID_SURFACETOSURFACE",
31  "RDPGFX_CMDID_SURFACETOCACHE",
32  "RDPGFX_CMDID_CACHETOSURFACE",
33  "RDPGFX_CMDID_EVICTCACHEENTRY",
34  "RDPGFX_CMDID_CREATESURFACE",
35  "RDPGFX_CMDID_DELETESURFACE",
36  "RDPGFX_CMDID_STARTFRAME",
37  "RDPGFX_CMDID_ENDFRAME",
38  "RDPGFX_CMDID_FRAMEACKNOWLEDGE",
39  "RDPGFX_CMDID_RESETGRAPHICS",
40  "RDPGFX_CMDID_MAPSURFACETOOUTPUT",
41  "RDPGFX_CMDID_CACHEIMPORTOFFER",
42  "RDPGFX_CMDID_CACHEIMPORTREPLY",
43  "RDPGFX_CMDID_CAPSADVERTISE",
44  "RDPGFX_CMDID_CAPSCONFIRM",
45  "RDPGFX_CMDID_UNUSED_0014",
46  "RDPGFX_CMDID_MAPSURFACETOWINDOW",
47  "RDPGFX_CMDID_QOEFRAMEACKNOWLEDGE",
48  "RDPGFX_CMDID_MAPSURFACETOSCALEDOUTPUT",
49  "RDPGFX_CMDID_MAPSURFACETOSCALEDWINDOW" };
50 
51 const char* rdpgfx_get_cmd_id_string(UINT16 cmdId)
52 {
53  if (cmdId <= RDPGFX_CMDID_MAPSURFACETOSCALEDWINDOW)
54  return RDPGFX_CMDID_STRINGS[cmdId];
55  else
56  return "RDPGFX_CMDID_UNKNOWN";
57 }
58 
59 const char* rdpgfx_get_codec_id_string(UINT16 codecId)
60 {
61  switch (codecId)
62  {
63  case RDPGFX_CODECID_UNCOMPRESSED:
64  return "RDPGFX_CODECID_UNCOMPRESSED";
65 
66  case RDPGFX_CODECID_CAVIDEO:
67  return "RDPGFX_CODECID_CAVIDEO";
68 
69  case RDPGFX_CODECID_CLEARCODEC:
70  return "RDPGFX_CODECID_CLEARCODEC";
71 
72  case RDPGFX_CODECID_PLANAR:
73  return "RDPGFX_CODECID_PLANAR";
74 
75  case RDPGFX_CODECID_AVC420:
76  return "RDPGFX_CODECID_AVC420";
77 
78  case RDPGFX_CODECID_AVC444:
79  return "RDPGFX_CODECID_AVC444";
80 
81  case RDPGFX_CODECID_AVC444v2:
82  return "RDPGFX_CODECID_AVC444v2";
83 
84  case RDPGFX_CODECID_ALPHA:
85  return "RDPGFX_CODECID_ALPHA";
86 
87  case RDPGFX_CODECID_CAPROGRESSIVE:
88  return "RDPGFX_CODECID_CAPROGRESSIVE";
89 
90  case RDPGFX_CODECID_CAPROGRESSIVE_V2:
91  return "RDPGFX_CODECID_CAPROGRESSIVE_V2";
92  default:
93  break;
94  }
95 
96  return "RDPGFX_CODECID_UNKNOWN";
97 }