RFX_CONTEXT* rfx;
NSC_CONTEXT* nsc;
+#ifdef WITH_GFX_H264
H264_CONTEXT* h264;
+#endif
CLEAR_CONTEXT* clear;
PROGRESSIVE_CONTEXT* progressive;
BITMAP_PLANAR_CONTEXT* planar;
{
UINT16 surfaceId;
rdpCodecs* codecs;
+#ifdef WITH_GFX_H264
H264_CONTEXT *h264;
+#endif
UINT32 width;
UINT32 height;
BYTE* data;
i++;
#endif
- return (i > 0);
+ return TRUE;
}
{
int i;
+ if (!h264)
+ return FALSE;
+
+ h264->subsystem = NULL;
+
InitOnceExecuteOnce(&subsystems_once, h264_register_subsystems, NULL, NULL);
for (i = 0; i < MAX_SUBSYSTEMS; i++)
{
- if (subSystems[i]->Init(h264))
+ const H264_CONTEXT_SUBSYSTEM* subsystem = &subSystems[i];
+ if (!subsystem->Init)
+ break;
+
+ if (subsystem->Init(h264))
{
- h264->subsystem = subSystems[i];
+ h264->subsystem = subsystem;
return TRUE;
}
}
}
}
+#ifdef WITH_GFX_H264
if ((flags & (FREERDP_CODEC_AVC420 | FREERDP_CODEC_AVC444)) && !codecs->h264)
{
if (!(codecs->h264 = h264_context_new(FALSE)))
return FALSE;
}
}
+#endif
return freerdp_client_codecs_reset(codecs, flags, width, height);
}
}
}
+#ifdef WITH_GFX_H264
if (flags & (FREERDP_CODEC_AVC420 | FREERDP_CODEC_AVC444))
{
if (codecs->h264)
rc &= h264_context_reset(codecs->h264, width, height);
}
}
+#endif
return rc;
}
codecs->nsc = NULL;
}
+#ifdef WITH_GFX_H264
if (codecs->h264)
{
h264_context_free(codecs->h264);
codecs->h264 = NULL;
}
+#endif
if (codecs->clear)
{
RdpgfxClientContext* context,
const RDPGFX_SURFACE_COMMAND* cmd)
{
+#ifdef WITH_GFX_H264
INT32 rc;
UINT status = CHANNEL_RC_OK;
UINT32 i;
}
return status;
+#else
+ return ERROR_NOT_SUPPORTED;
+#endif
}
/**
static UINT gdi_SurfaceCommand_AVC444(rdpGdi* gdi, RdpgfxClientContext* context,
const RDPGFX_SURFACE_COMMAND* cmd)
{
+#ifdef WITH_GFX_H264
INT32 rc;
UINT status = CHANNEL_RC_OK;
UINT32 i;
free(regionRects);
return status;
+#else
+ return ERROR_NOT_SUPPORTED;
+#endif
}
/**
if (surface)
{
+#ifdef WITH_GFX_H264
h264_context_free(surface->h264);
+#endif
region16_uninit(&surface->invalidRegion);
codecs = surface->codecs;
_aligned_free(surface->data);