int shadow_encoder_reset(rdpShadowEncoder* encoder) { int status; UINT32 codecs = encoder->codecs; rdpContext* context = (rdpContext*) encoder->client; rdpSettings* settings = context->settings; status = shadow_encoder_uninit(encoder); if (status < 0) return -1; status = shadow_encoder_init(encoder); if (status < 0) return -1; status = shadow_encoder_prepare(encoder, codecs); if (status < 0) return -1; encoder->fps = 16; encoder->maxFps = 32; encoder->frameId = 0; encoder->lastAckframeId = 0; encoder->frameAck = settings->SurfaceFrameMarkerEnabled; return 1; }
rdpShadowEncoder* shadow_encoder_new(rdpShadowClient* client) { rdpShadowEncoder* encoder; rdpShadowServer* server = client->server; encoder = (rdpShadowEncoder*) calloc(1, sizeof(rdpShadowEncoder)); if (!encoder) return NULL; encoder->client = client; encoder->server = server; encoder->fps = 16; encoder->maxFps = 32; if (shadow_encoder_init(encoder) < 0) { free(encoder); return NULL; } return encoder; }
int shadow_encoder_reset(rdpShadowEncoder* encoder) { int status; UINT32 codecs = encoder->codecs; status = shadow_encoder_uninit(encoder); if (status < 0) return -1; status = shadow_encoder_init(encoder); if (status < 0) return -1; status = shadow_encoder_prepare(encoder, codecs); if (status < 0) return -1; return 1; }
rdpShadowEncoder* shadow_encoder_new(rdpShadowServer* server) { rdpShadowEncoder* encoder; encoder = (rdpShadowEncoder*) calloc(1, sizeof(rdpShadowEncoder)); if (!encoder) return NULL; encoder->server = server; encoder->fps = 16; encoder->maxFps = 32; encoder->width = server->screen->width; encoder->height = server->screen->height; if (shadow_encoder_init(encoder) < 0) return NULL; return encoder; }