mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[core,codecs] add stringify helper
add freerdp_codec_id_to_str to get a string representation of a given codec id
This commit is contained in:
@@ -276,3 +276,21 @@ void freerdp_client_codecs_free(rdpCodecs* codecs)
|
||||
|
||||
free(codecs);
|
||||
}
|
||||
|
||||
const char* freerdp_codec_id_to_str(enum RDP_CODEC_ID id)
|
||||
{
|
||||
#define ENTRY(x) \
|
||||
case x: \
|
||||
return #x
|
||||
switch (id)
|
||||
{
|
||||
ENTRY(RDP_CODEC_ID_NONE);
|
||||
ENTRY(RDP_CODEC_ID_NSCODEC);
|
||||
ENTRY(RDP_CODEC_ID_JPEG);
|
||||
ENTRY(RDP_CODEC_ID_REMOTEFX);
|
||||
ENTRY(RDP_CODEC_ID_IMAGE_REMOTEFX);
|
||||
default:
|
||||
return "RDP_CODEC_ID_UNKNOWN";
|
||||
}
|
||||
#undef ENTRY
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user