1dnl default elements used for tests and such
2
3dnl AG_GST_DEFAULT_ELEMENTS
4
5AC_DEFUN([AG_GST_DEFAULT_ELEMENTS],
6[
7  dnl decide on default elements
8  dnl FIXME: describe where exactly this gets used
9  dnl FIXME: decide if it's a problem that this could point to sinks from
10  dnl        depending plugin modules
11  dnl FIXME: when can we just use autoaudiosrc and autovideosrc?
12  DEFAULT_AUDIOSINK="autoaudiosink"
13  DEFAULT_VIDEOSINK="autovideosink"
14  DEFAULT_AUDIOSRC="alsasrc"
15  DEFAULT_VIDEOSRC="v4l2src"
16  DEFAULT_VISUALIZER="goom"
17  case "$host" in
18    *-sun-* | *pc-solaris* )
19      DEFAULT_AUDIOSRC="sunaudiosrc"
20      ;;
21    *-darwin* )
22      DEFAULT_AUDIOSRC="osxaudiosrc"
23      ;;
24  esac
25
26  dnl Default audio sink
27  AC_ARG_WITH(default-audiosink,
28    AC_HELP_STRING([--with-default-audiosink], [specify default audio sink]),
29    [
30      case "${withval}" in
31        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosink) ;;
32        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-audiosink) ;;
33        *)   DEFAULT_AUDIOSINK="${withval}" ;;
34      esac
35    ],
36    [
37      DEFAULT_AUDIOSINK="$DEFAULT_AUDIOSINK"
38    ] dnl Default value as determined above
39  )
40  AC_MSG_NOTICE(Using $DEFAULT_AUDIOSINK as default audio sink)
41  AC_SUBST(DEFAULT_AUDIOSINK)
42  AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK, "$DEFAULT_AUDIOSINK",
43    [Default audio sink])
44
45  dnl Default audio source
46  AC_ARG_WITH(default-audiosrc,
47    AC_HELP_STRING([--with-default-audiosrc], [specify default audio source]),
48    [
49      case "${withval}" in
50        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosrc) ;;
51        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-audiosrc) ;;
52        *)   DEFAULT_AUDIOSRC="${withval}" ;;
53      esac
54    ],
55    [
56      DEFAULT_AUDIOSRC="$DEFAULT_AUDIOSRC"
57    ] dnl Default value as determined above
58  )
59  AC_MSG_NOTICE(Using $DEFAULT_AUDIOSRC as default audio source)
60  AC_SUBST(DEFAULT_AUDIOSRC)
61  AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC, "$DEFAULT_AUDIOSRC",
62    [Default audio source])
63
64  dnl Default video sink
65  AC_ARG_WITH(default-videosink,
66    AC_HELP_STRING([--with-default-videosink], [specify default video sink]),
67    [
68      case "${withval}" in
69        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-videosink) ;;
70        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-videosink) ;;
71        *)   DEFAULT_VIDEOSINK="${withval}" ;;
72      esac
73    ],
74    [
75      DEFAULT_VIDEOSINK="$DEFAULT_VIDEOSINK"
76    ] dnl Default value as determined above
77  )
78  AC_MSG_NOTICE(Using $DEFAULT_VIDEOSINK as default video sink)
79  AC_SUBST(DEFAULT_VIDEOSINK)
80  AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK, "$DEFAULT_VIDEOSINK",
81    [Default video sink])
82
83  dnl Default video source
84  AC_ARG_WITH(default-videosrc,
85    AC_HELP_STRING([--with-default-videosrc], [specify default video source]),
86    [
87      case "${withval}" in
88        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-videosrc) ;;
89        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-videosrc) ;;
90        *)   DEFAULT_VIDEOSRC="${withval}" ;;
91      esac
92    ],
93    [
94      DEFAULT_VIDEOSRC="$DEFAULT_VIDEOSRC"
95    ] dnl Default value as determined above
96  )
97  AC_MSG_NOTICE(Using $DEFAULT_VIDEOSRC as default video source)
98  AC_SUBST(DEFAULT_VIDEOSRC)
99  AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC, "$DEFAULT_VIDEOSRC",
100    [Default video source])
101
102    dnl Default visualizer
103  AC_ARG_WITH(default-visualizer,
104    AC_HELP_STRING([--with-default-visualizer], [specify default visualizer]),
105    [
106      case "${withval}" in
107        yes) AC_MSG_ERROR(bad value ${withval} for --with-default-visualizer) ;;
108        no)  AC_MSG_ERROR(bad value ${withval} for --with-default-visualizer) ;;
109        *)   DEFAULT_VISUALIZER="${withval}" ;;
110      esac
111    ],
112    [
113      DEFAULT_VISUALIZER="$DEFAULT_VISUALIZER"
114    ] dnl Default value as determined above
115  )
116  AC_MSG_NOTICE(Using $DEFAULT_VISUALIZER as default visualizer)
117  AC_SUBST(DEFAULT_VISUALIZER)
118  AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER, "$DEFAULT_VISUALIZER",
119    [Default visualizer])
120])
121