[Spice-devel] [PATCH] Make video-encoder.h self independent

Christophe Fergeau cfergeau at redhat.com
Wed Jun 15 15:18:18 UTC 2016


On Wed, Jun 15, 2016 at 04:09:08PM +0100, Frediano Ziglio wrote:
> gpointer definition was not included causing the header to fails to
> compile if included first.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/video-encoder.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/server/video-encoder.h b/server/video-encoder.h
> index 5522818..1b1e169 100644
> --- a/server/video-encoder.h
> +++ b/server/video-encoder.h
> @@ -79,7 +79,7 @@ struct VideoEncoder {
>      int (*encode_frame)(VideoEncoder *encoder, uint32_t frame_mm_time,
>                          const SpiceBitmap *bitmap,
>                          const SpiceRect *src, int top_down,
> -                        gpointer bitmap_opaque, VideoBuffer** outbuf);
> +                        void *bitmap_opaque, VideoBuffer** outbuf);
>  
>      /*
>       * Bit rate control methods.
> @@ -168,8 +168,8 @@ typedef struct VideoEncoderRateControlCbs {
>      void (*update_client_playback_delay)(void *opaque, uint32_t delay_ms);
>  } VideoEncoderRateControlCbs;
>  
> -typedef void (*bitmap_ref_t)(gpointer data);
> -typedef void (*bitmap_unref_t)(gpointer data);
> +typedef void (*bitmap_ref_t)(void *data);
> +typedef void (*bitmap_unref_t)(void *data);

The C files should be changed too then, otherwise you use gpointer in
one instance, and void * some place else. But I'd just #include <glib.h>
in this file if gpointer is needed.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160615/7636ed6f/attachment.sig>


More information about the Spice-devel mailing list