int shadow_encoder_init_interleaved(rdpShadowEncoder* encoder) { if (!encoder->interleaved) encoder->interleaved = bitmap_interleaved_context_new(TRUE); if (!encoder->interleaved) return -1; encoder->codecs |= FREERDP_CODEC_INTERLEAVED; return 1; }
static int shadow_encoder_init_interleaved(rdpShadowEncoder* encoder) { if (!encoder->interleaved) encoder->interleaved = bitmap_interleaved_context_new(TRUE); if (!encoder->interleaved) goto fail; if (!bitmap_interleaved_context_reset(encoder->interleaved)) goto fail; encoder->codecs |= FREERDP_CODEC_INTERLEAVED; return 1; fail: bitmap_interleaved_context_free(encoder->interleaved); return -1; }
BOOL freerdp_client_codecs_prepare(rdpCodecs* codecs, UINT32 flags) { if ((flags & FREERDP_CODEC_INTERLEAVED) && !codecs->interleaved) { if (!(codecs->interleaved = bitmap_interleaved_context_new(FALSE))) { WLog_ERR(TAG, "Failed to create interleaved codec context"); return FALSE; } } if ((flags & FREERDP_CODEC_PLANAR) && !codecs->planar) { if (!(codecs->planar = freerdp_bitmap_planar_context_new(FALSE, 64, 64))) { WLog_ERR(TAG, "Failed to create planar bitmap codec context"); return FALSE; } } if ((flags & FREERDP_CODEC_NSCODEC) && !codecs->nsc) { if (!(codecs->nsc = nsc_context_new())) { WLog_ERR(TAG, "Failed to create nsc codec context"); return FALSE; } } if ((flags & FREERDP_CODEC_REMOTEFX) && !codecs->rfx) { if (!(codecs->rfx = rfx_context_new(FALSE))) { WLog_ERR(TAG, "Failed to create rfx codec context"); return FALSE; } } if ((flags & FREERDP_CODEC_CLEARCODEC) && !codecs->clear) { if (!(codecs->clear = clear_context_new(FALSE))) { WLog_ERR(TAG, "Failed to create clear codec context"); return FALSE; } } if (flags & FREERDP_CODEC_ALPHACODEC) { } if ((flags & FREERDP_CODEC_PROGRESSIVE) && !codecs->progressive) { if (!(codecs->progressive = progressive_context_new(FALSE))) { WLog_ERR(TAG, "Failed to create progressive codec context"); return FALSE; } } if ((flags & (FREERDP_CODEC_AVC420 | FREERDP_CODEC_AVC444)) && !codecs->h264) { if (!(codecs->h264 = h264_context_new(FALSE))) { WLog_ERR(TAG, "Failed to create h264 codec context"); return FALSE; } } return TRUE; }