Fix build if ORC is not installed

This commit is contained in:
Thijs Vermeir 2010-06-15 09:40:18 +02:00
parent 3d91d93f32
commit 330d78f4ff
2 changed files with 16 additions and 14 deletions

View file

@ -25,7 +25,7 @@
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#if HAVE_ORC
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
@ -296,16 +296,17 @@ change_context (GstPostProc * postproc, gint width, gint height)
mmx_flags = orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
altivec_flags =
orc_target_get_default_flags (orc_target_get_by_name ("altivec"));
#else
mmx_flags = 0;
altivec_flags = 0;
#endif
ppflags = (mmx_flags & ORC_TARGET_MMX_MMX ? PP_CPU_CAPS_MMX : 0)
| (mmx_flags & ORC_TARGET_MMX_MMXEXT ? PP_CPU_CAPS_MMX2 : 0)
| (mmx_flags & ORC_TARGET_MMX_3DNOW ? PP_CPU_CAPS_3DNOW : 0)
| (altivec_flags & ORC_TARGET_ALTIVEC_ALTIVEC ? PP_CPU_CAPS_ALTIVEC :
0);
#else
mmx_flags = 0;
altivec_flags = 0;
ppflags = 0;
#endif
postproc->context = pp_get_context (width, height, PP_FORMAT_420 | ppflags);
postproc->width = width;
postproc->height = height;
@ -895,7 +896,7 @@ plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (postproc_debug, "postproc", 0,
"video postprocessing elements");
#if HAVE_ORC
#ifdef HAVE_ORC
orc_init ();
#endif

View file

@ -33,7 +33,7 @@
#include <gst/base/gstbasetransform.h>
#include <gst/video/video.h>
#if HAVE_ORC
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
@ -635,15 +635,16 @@ gst_ffmpegscale_set_caps (GstBaseTransform * trans, GstCaps * incaps,
mmx_flags = orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
altivec_flags =
orc_target_get_default_flags (orc_target_get_by_name ("altivec"));
#else
mmx_flags = 0;
altivec_flags = 0;
#endif
swsflags = (mmx_flags & ORC_TARGET_MMX_MMX ? SWS_CPU_CAPS_MMX : 0)
| (mmx_flags & ORC_TARGET_MMX_MMXEXT ? SWS_CPU_CAPS_MMX2 : 0)
| (mmx_flags & ORC_TARGET_MMX_3DNOW ? SWS_CPU_CAPS_3DNOW : 0)
| (altivec_flags & ORC_TARGET_ALTIVEC_ALTIVEC ? SWS_CPU_CAPS_ALTIVEC : 0);
#else
mmx_flags = 0;
altivec_flags = 0;
swsflags = 0;
#endif
scale->ctx = sws_getContext (scale->in_width, scale->in_height,
scale->in_pixfmt, scale->out_width, scale->out_height, scale->out_pixfmt,
@ -803,7 +804,7 @@ plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (ffmpegscale_debug, "ffvideoscale", 0,
"video scaling element");
#if HAVE_ORC
#ifdef HAVE_ORC
orc_init ();
#endif