tests: interactive: test-effect-switch: use autovideosink
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-base / tests / interactive / test-header-compile
1 #!/bin/bash
2
3 #prefix=/usr/local
4
5 fail_on_error=true
6 #fail_on_error=false
7
8 output=tail
9 #output=cat
10
11 set -e
12
13 for lib in allocators app audio fft pbutils riff rtp rtsp sdp tag video ; do
14   #files=$(cd ${prefix}/include/gstreamer-1.0/ && find . -name '*.h')
15   if test $lib = "allocators"; then
16     files="allocators.h gstdmabuf.h"
17   elif test $lib = "app"; then
18     files="app.h gstappsrc.h gstappsink.h"
19   elif test $lib = "audio"; then
20     files="audio.h audio-format.h audio-channels.h audio-info.h \
21            gstaudioringbuffer.h gstaudioclock.h gstaudiofilter.h \
22            gstaudiocdsrc.h gstaudiodecoder.h gstaudioencoder.h \
23            gstaudiobasesink.h gstaudiobasesrc.h gstaudiometa.h \
24            gstaudiosink.h gstaudiosrc.h streamvolume.h gstaudioiec61937.h"
25   elif test $lib = "fft"; then
26     files="fft.h gstfft.h gstffts16.h gstffts32.h gstfftf32.h gstfftf64.h"
27   elif test $lib = "pbutils"; then
28     files="pbutils.h codec-utils.h descriptions.h  encoding-profile.h \
29            encoding-target.h install-plugins.h missing-plugins.h \
30            gstdiscoverer.h"
31   elif test $lib = "riff"; then
32     files="riff.h riff-ids.h riff-media.h riff-read.h"
33   elif test $lib = "rtp"; then
34     files="rtp.h gstrtpbuffer.h gstrtcpbuffer.h gstrtppayloads.h \
35            gstrtphdrext.h gstrtpbaseaudiopayload.h gstrtpbasepayload.h \
36            gstrtpbasedepayload.h"
37   elif test $lib = "rtsp"; then
38     files="rtsp.h gstrtsp.h gstrtsptransport.h gstrtspurl.h \
39            gstrtspmessage.h gstrtspconnection.h gstrtspdefs.h \
40            gstrtspextension.h gstrtsprange.h"
41   elif test $lib = "sdp"; then
42     files="sdp.h gstsdp.h gstsdpmessage.h"
43   elif test $lib = "tag"; then
44     files="tag.h gsttagdemux.h gsttagmux.h xmpwriter.h"
45   elif test $lib = "video"; then
46     files="colorbalance.h colorbalancechannel.h navigation.h video.h \
47            video-event.h video-format.h video-chroma.h video-color.h \
48            video-info.h video-frame.h gstvideosink.h gstvideofilter.h \
49            gstvideometa.h gstvideopool.h videoorientation.h videooverlay.h \
50            gstvideodecoder.h gstvideoencoder.h gstvideoutils.h \
51            video-blend.h video-overlay-composition.h videodirection.h"
52   fi
53
54 CFLAGS=`pkg-config --cflags gstreamer-1.0 gstreamer-$lib-1.0`
55 CFLAGS="$CFLAGS -DGST_USE_UNSTABLE_API"
56
57 for each in $files ; do
58   each="gst/$lib/$each"
59   echo Testing $each...
60   rm -f test.o
61   cat >test.c <<-EOF
62 #include <glib.h>
63 #include <gst/gst.h>
64 #include <$each>
65 EOF
66   cc $CFLAGS -Wall -Werror -c test.c -o test.o 2>&1 | tail
67   $fail_on_error && test ! -f test.o && exit 1
68
69   echo Testing $each "(no gst)..."
70   rm -f test.o
71   cat >test.c <<-EOF
72 #include <glib.h>
73 #include <$each>
74 EOF
75   cc $CFLAGS -Wall -Werror -c test.c -o test.o 2>&1 | tail
76   $fail_on_error && test ! -f test.o && exit 1
77
78   echo Testing $each "(no glib)..."
79   rm -f test.o
80   cat >test.c <<-EOF
81 #include <$each>
82 EOF
83   cc $CFLAGS -Wall -Werror -c test.c -o test.o 2>&1 | tail
84   $fail_on_error && test ! -f test.o && exit 1
85
86 done # for each file
87
88 done # for each lib