sysdeps: split out GStreamer API compatibility glue to "gstcompat.h".

This commit is contained in:
Gwenole Beauchesne 2013-03-20 18:12:18 +01:00
parent 87624fd6c8
commit 833ebf9cae
3 changed files with 37 additions and 6 deletions

View file

@ -103,6 +103,7 @@ libgstvaapi_source_h = \
libgstvaapi_source_priv_h = \
glibcompat.h \
gstcompat.h \
gstvaapi_priv.h \
gstvaapicodec_objects.h \
gstvaapicompat.h \

View file

@ -0,0 +1,35 @@
/*
* gstcompat.h - Compatibility glue for GStreamer
*
* Copyright (C) 2013 Intel Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef GST_COMPAT_H
#define GST_COMPAT_H
#include <gst/gst.h>
/* GstVideoOverlayComposition */
#include <gst/video/video-overlay-composition.h>
#ifndef HAVE_GST_VIDEO_OVERLAY_HWCAPS
#define gst_video_overlay_rectangle_get_flags(rect) (0)
#define gst_video_overlay_rectangle_get_global_alpha(rect) (1.0f)
#endif
#endif /* GST_COMPAT_H */

View file

@ -31,11 +31,6 @@
#include <string.h>
#include "glibcompat.h"
/* <gst/video/video-overlay-composition.h> compatibility glue */
#ifndef HAVE_GST_VIDEO_OVERLAY_HWCAPS
# define gst_video_overlay_rectangle_get_flags(rect) (0)
# define gst_video_overlay_rectangle_get_global_alpha(rect) (1.0f)
#endif
#include "gstcompat.h"
#endif /* SYSDEPS_H */