[Spice-devel] [PATCH spice-server] Define a new interface for Qemu to pass EGL display
Marc-André Lureau
mlureau at redhat.com
Wed Feb 22 11:35:05 UTC 2017
Hi
----- Original Message -----
> The new interface pass directly the EGL display to make
> possible to extract texture data if necessary.
> Also allows to use the same device using hardware
> encoders.
I would like to see how this is going to be used before amending it, but a few questions below:
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/red-qxl.c | 10 ++++++++++
> server/spice-qxl.h | 3 +++
> server/spice-server.syms | 5 +++++
> 3 files changed, 18 insertions(+)
>
> diff --git a/server/red-qxl.c b/server/red-qxl.c
> index b6b3770..367a428 100644
> --- a/server/red-qxl.c
> +++ b/server/red-qxl.c
> @@ -60,6 +60,8 @@ struct QXLState {
> RedsState *reds;
> RedWorker *worker;
>
> + void *egl_display;
> +
Why not use EGLDisplay type?
> pthread_mutex_t scanout_mutex;
> SpiceMsgDisplayGlScanoutUnix scanout;
> struct AsyncCommand *gl_draw_async;
> @@ -865,6 +867,14 @@ void red_qxl_put_gl_scanout(QXLInstance *qxl,
> SpiceMsgDisplayGlScanoutUnix *scan
> }
>
> SPICE_GNUC_VISIBLE
> +void spice_qxl_gl_setup(QXLInstance *qxl,
> + void *egl_display)
> +{
> + QXLState *qxl_state = qxl->st;
> + qxl_state->egl_display = egl_display;
> +}
I would rather name the function spice_qxl_set_egl_display()
> +
> +SPICE_GNUC_VISIBLE
> void spice_qxl_gl_scanout(QXLInstance *qxl,
> int fd,
> uint32_t width, uint32_t height,
> diff --git a/server/spice-qxl.h b/server/spice-qxl.h
> index b8910bf..07da0dc 100644
> --- a/server/spice-qxl.h
> +++ b/server/spice-qxl.h
> @@ -114,6 +114,9 @@ void spice_qxl_gl_draw_async(QXLInstance *instance,
> uint32_t x, uint32_t y,
> uint32_t w, uint32_t h,
> uint64_t cookie);
> +/* since spice 0.13.4 */
> +void spice_qxl_gl_setup(QXLInstance *instance,
> + void *egl_display);
>
> typedef struct QXLDrawArea {
> uint8_t *buf;
> diff --git a/server/spice-server.syms b/server/spice-server.syms
> index edf04a4..8aeb40f 100644
> --- a/server/spice-server.syms
> +++ b/server/spice-server.syms
> @@ -173,3 +173,8 @@ SPICE_SERVER_0.13.2 {
> global:
> spice_server_set_video_codecs;
> } SPICE_SERVER_0.13.1;
> +
> +SPICE_SERVER_0.13.4 {
> +global:
> + spice_qxl_gl_setup;
> +} SPICE_SERVER_0.13.2;
> --
> 2.9.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list