int shadow_encoder_prepare(rdpShadowEncoder* encoder, UINT32 codecs) { int status; if ((codecs & SHADOW_CODEC_REMOTEFX) && !(encoder->codecs & SHADOW_CODEC_REMOTEFX)) { status = shadow_encoder_init_rfx(encoder); if (status < 0) return -1; } if ((codecs & SHADOW_CODEC_NSCODEC) && !(encoder->codecs & SHADOW_CODEC_NSCODEC)) { status = shadow_encoder_init_nsc(encoder); if (status < 0) return -1; } if ((codecs & SHADOW_CODEC_BITMAP) && !(encoder->codecs & SHADOW_CODEC_BITMAP)) { status = shadow_encoder_init_bitmap(encoder); if (status < 0) return -1; } return 1; }
int shadow_encoder_prepare(rdpShadowEncoder* encoder, UINT32 codecs) { int status; if ((codecs & FREERDP_CODEC_REMOTEFX) && !(encoder->codecs & FREERDP_CODEC_REMOTEFX)) { status = shadow_encoder_init_rfx(encoder); if (status < 0) return -1; } if ((codecs & FREERDP_CODEC_NSCODEC) && !(encoder->codecs & FREERDP_CODEC_NSCODEC)) { status = shadow_encoder_init_nsc(encoder); if (status < 0) return -1; } if ((codecs & FREERDP_CODEC_PLANAR) && !(encoder->codecs & FREERDP_CODEC_PLANAR)) { status = shadow_encoder_init_planar(encoder); if (status < 0) return -1; } if ((codecs & FREERDP_CODEC_INTERLEAVED) && !(encoder->codecs & FREERDP_CODEC_INTERLEAVED)) { status = shadow_encoder_init_interleaved(encoder); if (status < 0) return -1; } if ((codecs & FREERDP_CODEC_AVC420) && !(encoder->codecs & FREERDP_CODEC_AVC420)) { status = shadow_encoder_init_h264(encoder); if (status < 0) return -1; } return 1; }