From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 36 ++++++++++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 14 +++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f694cf8bbc..c0e4992f24 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1266,6 +1266,41 @@ qemuDomainGraphicsPrivateDispose(void *obj) } +static virClassPtr qemuDomainVideoPrivateClass; +static void qemuDomainVideoPrivateDispose(void *obj); + +static int +qemuDomainVideoPrivateOnceInit(void) +{ + if (!VIR_CLASS_NEW(qemuDomainVideoPrivate, virClassForObject())) + return -1; + + return 0; +} + +VIR_ONCE_GLOBAL_INIT(qemuDomainVideoPrivate); + +static virObjectPtr +qemuDomainVideoPrivateNew(void) +{ + qemuDomainVideoPrivatePtr priv; + + if (qemuDomainVideoPrivateInitialize() < 0) + return NULL; + + if (!(priv = virObjectNew(qemuDomainVideoPrivateClass))) + return NULL; + + return (virObjectPtr) priv; +} + + +static void +qemuDomainVideoPrivateDispose(void *obj ATTRIBUTE_UNUSED) +{ +} + + /* qemuDomainSecretPlainSetup: * @secinfo: Pointer to secret info * @usageType: The virSecretUsageType @@ -3461,6 +3496,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = { .chrSourceNew = qemuDomainChrSourcePrivateNew, .vsockNew = qemuDomainVsockPrivateNew, .graphicsNew = qemuDomainGraphicsPrivateNew, + .videoNew = qemuDomainVideoPrivateNew, .parse = qemuDomainObjPrivateXMLParse, .format = qemuDomainObjPrivateXMLFormat, .getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque, diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index d097f23342..1b51b27134 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -497,7 +497,19 @@ struct _qemuDomainVsockPrivate { }; -#define QEMU_DOMAIN_GRAPHICS_PRIVATE(dev) \ +#define QEMU_DOMAIN_VIDEO_PRIVATE(dev) \ + ((qemuDomainVideoPrivatePtr) (dev)->privateData) + +typedef struct _qemuDomainVideoPrivate qemuDomainVideoPrivate; +typedef qemuDomainVideoPrivate *qemuDomainVideoPrivatePtr; +struct _qemuDomainVideoPrivate { + virObject parent; + + bool tmp_to_remove; +}; + + +#define QEMU_DOMAIN_GRAPHICS_PRIVATE(dev) \ ((qemuDomainGraphicsPrivatePtr) (dev)->privateData) typedef struct _qemuDomainGraphicsPrivate qemuDomainGraphicsPrivate; -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list