blob: 02a17b5c391563221998ff2f15ccf7cf78cc4906 [file] [log] [blame]
Tim-Philipp Müller001e08e2013-08-16 14:12:32 +01001#!/bin/bash
2
3#prefix=/usr/local
4
5fail_on_error=true
6#fail_on_error=false
7
8output=tail
9#output=cat
10
11set -e
12
13for 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 \
Xabier Rodriguez Calvar0341f042016-07-26 19:14:40 +020051 video-blend.h video-overlay-composition.h videodirection.h"
Tim-Philipp Müller001e08e2013-08-16 14:12:32 +010052 fi
53
54CFLAGS=`pkg-config --cflags gstreamer-1.0 gstreamer-$lib-1.0`
55CFLAGS="$CFLAGS -DGST_USE_UNSTABLE_API"
56
57for 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>
65EOF
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>
74EOF
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>
82EOF
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
86done # for each file
87
88done # for each lib