[Spice-devel] [PATCH v5 1/5] Compatibility for GStreamer 0.10 for test utility

Christophe Fergeau cfergeau at redhat.com
Fri Jan 20 16:38:42 UTC 2017


On Tue, Jan 10, 2017 at 02:20:37PM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/tests/test-gst.c | 65 ++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 62 insertions(+), 3 deletions(-)
> 
> diff --git a/server/tests/test-gst.c b/server/tests/test-gst.c
> index f88db25..cfc3d4a 100644
> --- a/server/tests/test-gst.c
> +++ b/server/tests/test-gst.c
> @@ -69,6 +69,57 @@ typedef struct {
>      SpiceBitmap *bitmap;
>  } TestFrame;
>  
> +#ifdef HAVE_GSTREAMER_0_10
> +
> +#define VIDEOCONVERT "ffmpegcolorspace"
> +#define BGRx_CAPS "caps=video/x-raw-rgb,bpp=32,depth=24,blue_mask=-16777216,green_mask=16711680,red_mask=65280"
> +
> +typedef GstBuffer GstSample;
> +#define gst_sample_get_buffer(s) (s)
> +#define gst_sample_get_caps(s) GST_BUFFER_CAPS(s)
> +#define gst_sample_unref(s) gst_buffer_unref(s)
> +#define gst_app_sink_pull_sample(s) gst_app_sink_pull_buffer(s)
> +typedef struct {
> +    uint8_t *data;
> +} GstMapInfo;
> +#define GST_MAP_READ 1
> +static inline void
> +gst_buffer_unmap(GstBuffer *buffer, GstMapInfo *mapinfo)
> +{ }
> +
> +static inline gboolean
> +gst_buffer_map(GstBuffer *buffer, GstMapInfo *mapinfo, int flags)
> +{
> +    mapinfo->data = GST_BUFFER_DATA(buffer);
> +    return mapinfo->data != NULL;
> +}

I'd drop the 'inline' keyword from both functions.

Acked-by: Christophe Fergeau <cfergeau at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170120/9e49930d/attachment-0001.sig>


More information about the Spice-devel mailing list