diff --git a/campcaster/bin/postInstallStation.sh b/campcaster/bin/postInstallStation.sh index de6e6645f..699347d87 100755 --- a/campcaster/bin/postInstallStation.sh +++ b/campcaster/bin/postInstallStation.sh @@ -424,7 +424,7 @@ export LD_LIBRARY_PATH=$install_lib # is this needed here? export GST_REGISTRY=$install_etc/gst-registry.xml export GST_PLUGIN_PATH=$install_lib:$gstreamer_dir rm -f ${GST_REGISTRY} -rm -f $install_var/cache/gstreamer-0.8/registry.xml +rm -f $install_var/cache/gstreamer-0.10/registry.xml $install_bin/gst-register diff --git a/campcaster/etc/portage/media-libs/gst-plugins/Manifest b/campcaster/etc/portage/media-libs/gst-plugins/Manifest deleted file mode 100644 index 241f364ae..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/Manifest +++ /dev/null @@ -1,7 +0,0 @@ -MD5 230cec8bdd27a33315b67c3eb5cd59f7 gst-plugins-0.8.10-r1.ebuild 2151 -MD5 14463cc56953050a6161f55a1abb9228 files/adder-query.patch 1754 -MD5 d05851db15053a9e5b1c114dfecabbf4 files/adder-duration-fix.patch 1102 -MD5 36f4a0bacb3d1f85c78525f4a1e46fe5 files/switch-fix.patch 1434 -MD5 9f833bb88c0c1d6b9c2b0bdf20f47e4e files/adder-caps-property.patch 9086 -MD5 e5a6b80e2dfc0bf36559f4663fb90e25 files/digest-gst-plugins-0.8.10-r1 72 -MD5 0fd59e0dd0c56f118ccc1a5309cb69b8 files/typefind-smil.patch 2783 diff --git a/campcaster/etc/portage/media-libs/gst-plugins/files/adder-caps-property.patch b/campcaster/etc/portage/media-libs/gst-plugins/files/adder-caps-property.patch deleted file mode 100644 index 81d8eca83..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/files/adder-caps-property.patch +++ /dev/null @@ -1,290 +0,0 @@ ---- gst-plugins-0.8.10/gst/adder/gstadder.h 2005-05-17 10:41:43.000000000 +0200 -+++ gst-plugins-0.8.10-livesupport/gst/adder/gstadder.h 2005-08-26 10:58:46.000000000 +0200 -@@ -65,6 +65,8 @@ - - GstPad *srcpad; - -+ GstCaps *caps; -+ - /* keep track of the sinkpads */ - guint numsinkpads; - GSList *input_channels; ---- gst-plugins-0.8.10/gst/adder/gstadder.c 2005-06-14 18:38:01.000000000 +0200 -+++ gst-plugins-0.8.10-livesupport/gst/adder/gstadder.c 2005-08-26 12:07:30.000000000 +0200 -@@ -64,7 +64,8 @@ - { - ARG_0, - ARG_NUM_PADS, -- ARG_EOS -+ ARG_EOS, -+ ARG_CAPS - /* FILL ME */ - }; - -@@ -86,6 +87,7 @@ - - static void gst_adder_class_init (GstAdderClass * klass); - static void gst_adder_init (GstAdder * adder); -+static void gst_adder_dispose (GObject * object); - - static void gst_adder_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); -@@ -101,6 +103,8 @@ - /* we do need a loop function */ - static void gst_adder_loop (GstElement * element); - -+static void gst_adder_set_caps(GstAdder * adder, -+ const GstCaps * caps); - static GstCaps *gst_adder_get_caps (GstPad * pad); - - static GstElementClass *parent_class = NULL; -@@ -131,13 +135,11 @@ - static GstPadLinkReturn - gst_adder_link (GstPad * pad, const GstCaps * caps) - { -- GstAdder *adder; -- const char *media_type; -- const GList *pads; -- GstStructure *structure; -- GstPadLinkReturn ret; -- GstElement *element; -- const GSList *links; -+ GstAdder * adder; -+ const GList * pads; -+ GstPadLinkReturn ret; -+ GstElement * element; -+ GSList * links; - - g_return_val_if_fail (caps != NULL, GST_PAD_LINK_REFUSED); - g_return_val_if_fail (pad != NULL, GST_PAD_LINK_REFUSED); -@@ -145,41 +147,42 @@ - element = GST_PAD_PARENT (pad); - adder = GST_ADDER (element); - -- pads = gst_element_get_pad_list (element); -- while (pads) { -- GstPad *otherpad = GST_PAD (pads->data); -- -- if (otherpad != pad) { -- ret = gst_pad_try_set_caps (otherpad, caps); -- if (ret == GST_PAD_LINK_REFUSED || -- (otherpad == adder->srcpad && GST_PAD_LINK_FAILED (ret))) { -- return ret; -+ if (adder->caps != NULL) { -+ pads = gst_element_get_pad_list (element); -+ while (pads) { -+ GstPad *otherpad = GST_PAD (pads->data); -+ -+ if (otherpad != pad) { -+ ret = gst_pad_try_set_caps (otherpad, adder->caps); -+ if (ret == GST_PAD_LINK_REFUSED || -+ (otherpad == adder->srcpad && GST_PAD_LINK_FAILED (ret))) { -+ return ret; -+ } - } -+ pads = g_list_next (pads); -+ } -+ } else { -+ pads = gst_element_get_pad_list (element); -+ while (pads) { -+ GstPad *otherpad = GST_PAD (pads->data); -+ -+ if (otherpad != pad) { -+ ret = gst_pad_try_set_caps (otherpad, caps); -+ if (ret == GST_PAD_LINK_REFUSED || -+ (otherpad == adder->srcpad && GST_PAD_LINK_FAILED (ret))) { -+ return ret; -+ } -+ } -+ pads = g_list_next (pads); - } -- pads = g_list_next (pads); -- } - -- structure = gst_caps_get_structure (caps, 0); -- media_type = gst_structure_get_name (structure); -- if (strcmp (media_type, "audio/x-raw-int") == 0) { -- GST_DEBUG ("parse_caps sets adder to format int"); -- adder->format = GST_ADDER_FORMAT_INT; -- gst_structure_get_int (structure, "width", &adder->width); -- gst_structure_get_int (structure, "depth", &adder->depth); -- gst_structure_get_int (structure, "endianness", &adder->endianness); -- gst_structure_get_boolean (structure, "signed", &adder->is_signed); -- gst_structure_get_int (structure, "channels", &adder->channels); -- gst_structure_get_int (structure, "rate", &adder->rate); -- } else if (strcmp (media_type, "audio/x-raw-float") == 0) { -- GST_DEBUG ("parse_caps sets adder to format float"); -- adder->format = GST_ADDER_FORMAT_FLOAT; -- gst_structure_get_int (structure, "width", &adder->width); -- gst_structure_get_int (structure, "channels", &adder->channels); -- gst_structure_get_int (structure, "rate", &adder->rate); -+ /* set our caps, if all try_set_caps succeeded */ -+ gst_adder_set_caps(adder, caps); -+ - } - - for (links = adder->input_channels; -- links != NULL; links = g_slist_next (links)) { -+ links != NULL; links = g_slist_next (links)) { - GstAdderInputChannel *input = (GstAdderInputChannel *) links->data; - - if (input->sinkpad == pad) { -@@ -200,6 +203,8 @@ - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - -+ gobject_class->dispose = gst_adder_dispose; -+ - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_adder_src_template)); - gst_element_class_add_pad_template (gstelement_class, -@@ -217,6 +222,11 @@ - "generate an EOS when all input channels did", FALSE, - G_PARAM_READWRITE)); - -+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CAPS, -+ g_param_spec_pointer ("caps", "pad capabilities", -+ "fix all adder capabilities to supplied value", -+ G_PARAM_READWRITE)); -+ - gobject_class->get_property = gst_adder_get_property; - gobject_class->set_property = gst_adder_set_property; - -@@ -226,6 +236,44 @@ - } - - static void -+gst_adder_set_caps(GstAdder * adder, -+ const GstCaps * caps) -+{ -+ GstStructure * structure; -+ const char * media_type; -+ -+ if (adder == NULL || !GST_IS_ADDER(adder) -+ || caps == NULL || !GST_IS_CAPS(caps)) { -+ -+ return; -+ } -+ if (adder->caps != NULL) { -+ gst_caps_free(adder->caps); -+ } -+ -+ adder->caps = gst_caps_copy(caps); -+ -+ structure = gst_caps_get_structure (adder->caps, 0); -+ media_type = gst_structure_get_name (structure); -+ if (strcmp (media_type, "audio/x-raw-int") == 0) { -+ GST_DEBUG ("parse_caps sets adder to format int"); -+ adder->format = GST_ADDER_FORMAT_INT; -+ gst_structure_get_int (structure, "width", &adder->width); -+ gst_structure_get_int (structure, "depth", &adder->depth); -+ gst_structure_get_int (structure, "endianness", &adder->endianness); -+ gst_structure_get_boolean (structure, "signed", &adder->is_signed); -+ gst_structure_get_int (structure, "channels", &adder->channels); -+ gst_structure_get_int (structure, "rate", &adder->rate); -+ } else if (strcmp (media_type, "audio/x-raw-float") == 0) { -+ GST_DEBUG ("parse_caps sets adder to format float"); -+ adder->format = GST_ADDER_FORMAT_FLOAT; -+ gst_structure_get_int (structure, "width", &adder->width); -+ gst_structure_get_int (structure, "channels", &adder->channels); -+ gst_structure_get_int (structure, "rate", &adder->rate); -+ } -+} -+ -+static void - gst_adder_init (GstAdder * adder) - { - adder->srcpad = -@@ -238,6 +286,8 @@ - - adder->format = GST_ADDER_FORMAT_UNSET; - -+ adder->caps = NULL; -+ - /* keep track of the sinkpads requested */ - - adder->numsinkpads = 0; -@@ -246,6 +296,18 @@ - adder->eos = FALSE; - } - -+static void -+gst_adder_dispose(GObject * object) -+{ -+ GstAdder * adder = GST_ADDER(object); -+ -+ g_return_if_fail(GST_IS_ADDER(adder)); -+ if (adder->caps) { -+ gst_caps_free(adder->caps); -+ } -+ G_OBJECT_CLASS(parent_class)->dispose(object); -+} -+ - static GstPad * - gst_adder_request_new_pad (GstElement * element, GstPadTemplate * templ, - const gchar * unused) -@@ -339,6 +401,9 @@ - case ARG_EOS: - g_value_set_boolean (value, adder->eos); - break; -+ case ARG_CAPS: -+ g_value_set_pointer (value, adder->caps); -+ break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; -@@ -360,6 +425,9 @@ - case ARG_EOS: - adder->eos = g_value_get_boolean (value); - break; -+ case ARG_CAPS: -+ gst_adder_set_caps(adder, g_value_get_pointer(value)); -+ break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; -@@ -613,23 +681,28 @@ - gst_adder_get_caps (GstPad * pad) - { - GstAdder *adder = GST_ADDER (gst_pad_get_parent (pad)); -- GstCaps *caps = gst_caps_new_any (); -- GstCaps *tmp, *res; -- GstPad *otherpad; -- const GList *pads; -- -- for (pads = gst_element_get_pad_list (GST_ELEMENT (adder)); -- pads != NULL; pads = pads->next) { -- otherpad = GST_PAD (pads->data); -- -- tmp = gst_pad_get_allowed_caps (otherpad); -- res = gst_caps_intersect (caps, tmp); -- gst_caps_free (tmp); -- gst_caps_free (caps); -- caps = res; -- } - -- return caps; -+ if (adder->caps != NULL) { -+ return gst_caps_copy(adder->caps); -+ } else { -+ GstCaps *caps = gst_caps_new_any (); -+ GstCaps *tmp, *res; -+ GstPad *otherpad; -+ const GList *pads; -+ -+ for (pads = gst_element_get_pad_list (GST_ELEMENT (adder)); -+ pads != NULL; pads = pads->next) { -+ otherpad = GST_PAD (pads->data); -+ -+ tmp = gst_pad_get_allowed_caps (otherpad); -+ res = gst_caps_intersect (caps, tmp); -+ gst_caps_free (tmp); -+ gst_caps_free (caps); -+ caps = res; -+ } -+ -+ return caps; -+ } - } - - static gboolean diff --git a/campcaster/etc/portage/media-libs/gst-plugins/files/adder-duration-fix.patch b/campcaster/etc/portage/media-libs/gst-plugins/files/adder-duration-fix.patch deleted file mode 100644 index 5ec07ede9..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/files/adder-duration-fix.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- gst-plugins-0.8.9/gst/adder/gstadder.c 2005-06-29 14:45:17.000000000 +0200 -+++ gst-plugins-0.8.9-livesupport/gst/adder/gstadder.c 2005-06-29 14:42:05.000000000 +0200 -@@ -558,14 +558,19 @@ - } - - if (valid_inputs > 0 || adder->eos == FALSE) { -+ gint64 delta; -+ gint64 duration; -+ -+ delta = (adder->format == GST_ADDER_FORMAT_FLOAT) -+ ? GST_BUFFER_SIZE (buf_out) / adder->width / adder->channels -+ : GST_BUFFER_SIZE (buf_out) * 8 / adder->width / adder->channels; -+ duration = delta * GST_SECOND / adder->rate; -+ - GST_BUFFER_TIMESTAMP (buf_out) = adder->timestamp; -- if (adder->format == GST_ADDER_FORMAT_FLOAT) -- adder->offset += -- GST_BUFFER_SIZE (buf_out) / adder->width / adder->channels; -- else -- adder->offset += -- GST_BUFFER_SIZE (buf_out) * 8 / adder->width / adder->channels; -- adder->timestamp = adder->offset * GST_SECOND / adder->rate; -+ GST_BUFFER_DURATION (buf_out) = duration; -+ -+ adder->offset += delta; -+ adder->timestamp += duration; - - /* send it out */ - GST_LOG ("pushing buf_out"); diff --git a/campcaster/etc/portage/media-libs/gst-plugins/files/adder-query.patch b/campcaster/etc/portage/media-libs/gst-plugins/files/adder-query.patch deleted file mode 100644 index 12add8ffc..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/files/adder-query.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- gst-plugins-0.8.10/gst/adder/gstadder.c 2005-09-07 16:24:18.000000000 +0200 -+++ gst-plugins-0.8.10-livesupport/gst/adder/gstadder.c 2005-09-07 16:22:40.000000000 +0200 -@@ -107,6 +107,11 @@ - const GstCaps * caps); - static GstCaps *gst_adder_get_caps (GstPad * pad); - -+static gboolean gst_adder_query(GstPad * pad, -+ GstQueryType type, -+ GstFormat * format, -+ gint64 * value); -+ - static GstElementClass *parent_class = NULL; - - /* static guint gst_adder_signals[LAST_SIGNAL] = { 0 }; */ -@@ -283,6 +288,7 @@ - gst_element_set_loop_function (GST_ELEMENT (adder), gst_adder_loop); - gst_pad_set_getcaps_function (adder->srcpad, gst_adder_get_caps); - gst_pad_set_link_function (adder->srcpad, gst_adder_link); -+ gst_pad_set_query_function (adder->srcpad, gst_adder_query); - - adder->format = GST_ADDER_FORMAT_UNSET; - -@@ -654,6 +660,31 @@ - } - - -+static gboolean gst_adder_query(GstPad * pad, -+ GstQueryType type, -+ GstFormat * format, -+ gint64 * value) -+{ -+ GstAdder * adder; -+ -+ adder = GST_ADDER(gst_pad_get_parent(pad)); -+ if (!GST_IS_ADDER(adder)) { -+ return FALSE; -+ } -+ -+ if (pad != adder->srcpad) { -+ return gst_pad_query_default(pad, type, format, value); -+ } -+ -+ if (type != GST_QUERY_POSITION || *format != GST_FORMAT_TIME) { -+ return gst_pad_query_default(pad, type, format, value); -+ } -+ -+ *value = adder->timestamp; -+ return TRUE; -+} -+ -+ - static GstElementStateReturn - gst_adder_change_state (GstElement * element) - { diff --git a/campcaster/etc/portage/media-libs/gst-plugins/files/digest-gst-plugins-0.8.10-r1 b/campcaster/etc/portage/media-libs/gst-plugins/files/digest-gst-plugins-0.8.10-r1 deleted file mode 100644 index 511a32be2..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/files/digest-gst-plugins-0.8.10-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 99f36ba2b91015a23d3c20a8f424b232 gst-plugins-0.8.10.tar.bz2 2397528 diff --git a/campcaster/etc/portage/media-libs/gst-plugins/files/switch-fix.patch b/campcaster/etc/portage/media-libs/gst-plugins/files/switch-fix.patch deleted file mode 100644 index 0b083cb61..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/files/switch-fix.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- gst-plugins-0.8.9/gst/switch/gstswitch.c 2005-04-14 18:26:47.000000000 +0200 -+++ gst-plugins-0.8.9-livesupport/gst/switch/gstswitch.c 2005-06-18 11:26:19.000000000 +0200 -@@ -241,15 +241,23 @@ - GstEvent *event = GST_EVENT (data); - - GST_LOG_OBJECT (gstswitch, -- "handling event from active pad %p", switchpad->sinkpad); -+ "handling event of type %d from active pad %p", -+ GST_EVENT_TYPE(GST_EVENT(data)), -+ switchpad->sinkpad); - /* Handling event */ - gst_pad_event_default (switchpad->sinkpad, event); - } else { -- /* Pushing active sinkpad data to srcpad */ -- GST_LOG_OBJECT (gstswitch, -- "pushing data from active pad %p to %p", -- switchpad->sinkpad, gstswitch->srcpad); -- gst_pad_push (gstswitch->srcpad, data); -+ if (GST_PAD_IS_ACTIVE(GST_PAD_PEER(gstswitch->srcpad))) { -+ /* Pushing active sinkpad data to srcpad */ -+ GST_LOG_OBJECT (gstswitch, -+ "pushing data from active pad %p to %p", -+ switchpad->sinkpad, gstswitch->srcpad); -+ gst_pad_push (gstswitch->srcpad, data); -+ } else { -+ /* the peer has become inactive, put us into EOS state */ -+ GST_LOG_OBJECT(gstswitch, "peer pad inactivated, going to eos"); -+ gst_element_set_eos(GST_ELEMENT(gstswitch)); -+ } - } - - /* Mark this data as forwarded so that it won't get unrefed on next poll */ diff --git a/campcaster/etc/portage/media-libs/gst-plugins/files/typefind-smil.patch b/campcaster/etc/portage/media-libs/gst-plugins/files/typefind-smil.patch deleted file mode 100644 index 5d3167014..000000000 --- a/campcaster/etc/portage/media-libs/gst-plugins/files/typefind-smil.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- gst-plugins-0.8.9/gst/typefind/gsttypefindfunctions.c 2005-05-17 10:41:47.000000000 +0200 -+++ gst-plugins-0.8.9-livesupport/gst/typefind/gsttypefindfunctions.c 2005-06-22 18:46:33.000000000 +0200 -@@ -132,6 +132,66 @@ - } - } - -+/*** application/smil *********************************************************/ -+ -+static GstStaticCaps smil_caps = GST_STATIC_CAPS ("application/smil"); -+ -+#define SMIL_CAPS (gst_static_caps_get(&smil_caps)) -+static void -+smil_type_find (GstTypeFind * tf, gpointer unused) -+{ -+ guint8 *data = gst_type_find_peek (tf, 0, BUFFER_SIZE); -+ guint pos = 0; -+ guint offset = 0; -+ -+ if (data) { -+ /* look for the XMLDec, -+ * see XML spec 2.8, Prolog and Document Type Declaration -+ * http://www.w3.org/TR/2004/REC-xml-20040204/#sec-prolog-dtd -+ */ -+ /* we know that BUFFER_SIZE > strlen(" element */ -+ while (data) { -+ while (*data != '<') { -+ INC_BUFFER; -+ } -+ -+ INC_BUFFER; -+ if (!g_ascii_isalpha(*data)) { -+ /* if not alphabetic, it's a PI or an element / attribute declaration -+ * like =media-libs/gstreamer-0.8.10 - >=gnome-base/gconf-2" - -DEPEND="${RDEPEND} - >=sys-devel/gettext-0.11.5 - >=dev-util/pkgconfig-0.9" - -PDEPEND="oss? ( >=media-plugins/gst-plugins-oss-${PV} ) - alsa? ( >=media-plugins/gst-plugins-alsa-${PV} ) - esd? ( >=media-plugins/gst-plugins-esd-${PV} )" - -# we need x for the x overlay to get linked -GST_PLUGINS_BUILD="x xshm" - -# overrides the eclass -src_unpack() { - - unpack ${A} - cd ${S} - epatch ${FILESDIR}/adder-caps-property.patch - epatch ${FILESDIR}/adder-duration-fix.patch - epatch ${FILESDIR}/adder-query.patch - epatch ${FILESDIR}/switch-fix.patch - epatch ${FILESDIR}/typefind-smil.patch -} - -src_compile() { - - elibtoolize - - # gst doesnt handle optimisations well - strip-flags - replace-flags "-O3" "-O2" - filter-flags "-fprefetch-loop-arrays" # see bug 22249 - if use alpha || use amd64 || use ia64 || use hppa; then - append-flags -fPIC - fi - - gst-plugins_src_configure - - emake || die - -} - -# override eclass -src_install() { - - gnome2_src_install - -} - -DOCS="AUTHORS INSTALL README RELEASE TODO" - -pkg_postinst () { - - gnome2_pkg_postinst - gst-plugins_pkg_postinst - - echo "" - einfo "The Gstreamer plugins setup has changed quite a bit on Gentoo," - einfo "applications now should provide the basic plugins needed." - echo "" - einfo "The new seperate plugins are all named 'gst-plugins-'." - einfo "To get a listing of currently available plugins execute 'emerge -s gst-plugins-'." - einfo "In most cases it shouldn't be needed though to emerge extra plugins." - -} - -pkg_postrm() { - - gnome2_pkg_postrm - gst-plugins_pkg_postrm - -} diff --git a/campcaster/etc/portage/media-plugins/gst-plugins-mad/Manifest b/campcaster/etc/portage/media-plugins/gst-plugins-mad/Manifest deleted file mode 100644 index b5d6a3bb7..000000000 --- a/campcaster/etc/portage/media-plugins/gst-plugins-mad/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -MD5 5675251f4f6bd25fbf54f809816140ac gst-plugins-mad-0.8.10-r1.ebuild 421 -MD5 e5a6b80e2dfc0bf36559f4663fb90e25 files/digest-gst-plugins-mad-0.8.10-r1 72 -MD5 9b4b87c7c0e1bf243ebc6def2f62c971 files/id3demuxbin-pad-free-fix.patch 551 diff --git a/campcaster/etc/portage/media-plugins/gst-plugins-mad/files/digest-gst-plugins-mad-0.8.10-r1 b/campcaster/etc/portage/media-plugins/gst-plugins-mad/files/digest-gst-plugins-mad-0.8.10-r1 deleted file mode 100644 index 511a32be2..000000000 --- a/campcaster/etc/portage/media-plugins/gst-plugins-mad/files/digest-gst-plugins-mad-0.8.10-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 99f36ba2b91015a23d3c20a8f424b232 gst-plugins-0.8.10.tar.bz2 2397528 diff --git a/campcaster/etc/portage/media-plugins/gst-plugins-mad/files/id3demuxbin-pad-free-fix.patch b/campcaster/etc/portage/media-plugins/gst-plugins-mad/files/id3demuxbin-pad-free-fix.patch deleted file mode 100644 index ffa6c7089..000000000 --- a/campcaster/etc/portage/media-plugins/gst-plugins-mad/files/id3demuxbin-pad-free-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- gst-plugins-0.8.9/ext/mad/gstid3demuxbin.c 2005-04-10 22:24:17.000000000 +0200 -+++ gst-plugins-0.8.9-livesupport/ext/mad/gstid3demuxbin.c 2005-06-22 10:45:31.000000000 +0200 -@@ -188,7 +188,11 @@ - gst_id3demux_bin_remove_pad (GstId3DemuxBin * id3) - { - if (id3->srcpad) { -- gst_element_remove_pad (GST_ELEMENT (id3), id3->srcpad); -+ GstPad * pad = gst_element_get_pad(GST_ELEMENT(id3), "src"); -+ -+ if (pad && pad == id3->srcpad) { -+ gst_element_remove_pad (GST_ELEMENT (id3), id3->srcpad); -+ } - id3->srcpad = NULL; - } - } diff --git a/campcaster/etc/portage/media-plugins/gst-plugins-mad/gst-plugins-mad-0.8.10-r1.ebuild b/campcaster/etc/portage/media-plugins/gst-plugins-mad/gst-plugins-mad-0.8.10-r1.ebuild deleted file mode 100644 index e169dbbb1..000000000 --- a/campcaster/etc/portage/media-plugins/gst-plugins-mad/gst-plugins-mad-0.8.10-r1.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header$ - -inherit gst-plugins eutils - -KEYWORDS="alpha amd64 ~arm hppa ia64 -mips ppc ppc64 sparc x86" -IUSE="" - -RDEPEND=">=media-libs/libmad-0.15.1b - >=media-libs/libid3tag-0.15" - -DEPEND="${RDEPEND} - dev-util/pkgconfig" - -src_unpack() { - - unpack ${A} - cd ${S} - epatch ${FILESDIR}/id3demuxbin-pad-free-fix.patch -} - diff --git a/campcaster/etc/portage/media-radio/livesupport/files/prefix-as-make-variable.patch b/campcaster/etc/portage/media-radio/livesupport/files/prefix-as-make-variable.patch index 869c49e6c..cf8862017 100644 --- a/campcaster/etc/portage/media-radio/livesupport/files/prefix-as-make-variable.patch +++ b/campcaster/etc/portage/media-radio/livesupport/files/prefix-as-make-variable.patch @@ -96,20 +96,6 @@ diff -Naur livesupport-1.0/modules/getid3/etc/Makefile.in livesupport-1.0-gentoo USR_INCLUDE_DIR = ${USR_DIR}/include USR_VAR_DIR = ${USR_DIR}/var -diff -Naur livesupport-1.0/modules/gstreamerElements/etc/Makefile.in livesupport-1.0-gentoo/modules/gstreamerElements/etc/Makefile.in ---- livesupport-1.0/modules/gstreamerElements/etc/Makefile.in 2005-09-21 11:57:28.000000000 +0200 -+++ livesupport-1.0-gentoo/modules/gstreamerElements/etc/Makefile.in 2005-09-21 11:56:57.000000000 +0200 -@@ -56,7 +56,9 @@ - REAL_BASE_DIR=$(shell cd ${BASE_DIR}; pwd) - - --USR_DIR = @prefix@ -+prefix = @prefix@ -+ -+USR_DIR = ${prefix} - USR_INCLUDE_DIR = ${USR_DIR}/include - USR_BIN_DIR = ${USR_DIR}/bin - USR_LIB_DIR = ${USR_DIR}/lib diff -Naur livesupport-1.0/modules/htmlUI/etc/Makefile.in livesupport-1.0-gentoo/modules/htmlUI/etc/Makefile.in --- livesupport-1.0/modules/htmlUI/etc/Makefile.in 2005-08-10 00:03:11.000000000 +0200 +++ livesupport-1.0-gentoo/modules/htmlUI/etc/Makefile.in 2005-09-21 11:56:57.000000000 +0200 diff --git a/campcaster/etc/portage/media-radio/livesupport/files/taglib-curl-icu.patch b/campcaster/etc/portage/media-radio/livesupport/files/taglib-curl-icu.patch index 6dab04de3..a980a38c9 100644 --- a/campcaster/etc/portage/media-radio/livesupport/files/taglib-curl-icu.patch +++ b/campcaster/etc/portage/media-radio/livesupport/files/taglib-curl-icu.patch @@ -185,31 +185,6 @@ diff -Naur --exclude=.svn --exclude=tmp --exclude=lib --exclude=Makefile --exclu ${TAGLIB_CFLAGS} \ ${LIBXMLPP_CFLAGS} \ -I${USR_INCLUDE_DIR} \ -diff -Naur --exclude=.svn --exclude=tmp --exclude=lib --exclude=Makefile --exclude=var --exclude=doc --exclude=src livesupport/modules/gstreamerElements/etc/configure.ac livesupport-x/modules/gstreamerElements/etc/configure.ac ---- livesupport/modules/gstreamerElements/etc/configure.ac 2005-09-20 12:46:18.000000000 +0200 -+++ livesupport-x/modules/gstreamerElements/etc/configure.ac 2005-09-19 17:11:47.000000000 +0200 -@@ -63,6 +63,9 @@ - AC_SUBST(GSTREAMER_CFLAGS) - AC_SUBST(GSTREAMER_LIBS) - -+AC_PATH_PROG(GST_REGISTER, gst-register-0.8) -+AC_SUBST(GST_REGISTER) -+ - - dnl----------------------------------------------------------------------------- - dnl enable compilaton for code coverage data -diff -Naur --exclude=.svn --exclude=tmp --exclude=lib --exclude=Makefile --exclude=var --exclude=doc --exclude=src livesupport/modules/gstreamerElements/etc/Makefile.in livesupport-x/modules/gstreamerElements/etc/Makefile.in ---- livesupport/modules/gstreamerElements/etc/Makefile.in 2005-09-20 12:46:18.000000000 +0200 -+++ livesupport-x/modules/gstreamerElements/etc/Makefile.in 2005-09-19 17:06:03.000000000 +0200 -@@ -74,7 +74,7 @@ - - GSTREAMER_CFLAGS=@GSTREAMER_CFLAGS@ - GSTREAMER_LIBS=@GSTREAMER_LIBS@ --GST_REGISTER=${USR_BIN_DIR}/gst-register -+GST_REGISTER=@GST_REGISTER@ - - TEST_RESULTS = ${DOC_DIR}/testResults.xml - # the text result XSLT has to be relative to the test result file, e.g. TMP_DIR diff -Naur --exclude=.svn --exclude=tmp --exclude=lib --exclude=Makefile --exclude=var --exclude=doc --exclude=src livesupport/modules/playlistExecutor/etc/acinclude.m4 livesupport-x/modules/playlistExecutor/etc/acinclude.m4 --- livesupport/modules/playlistExecutor/etc/acinclude.m4 2005-09-20 12:45:15.000000000 +0200 +++ livesupport-x/modules/playlistExecutor/etc/acinclude.m4 2005-09-19 17:25:54.000000000 +0200 diff --git a/campcaster/etc/portage/media-radio/livesupport/livesupport-1.0.ebuild b/campcaster/etc/portage/media-radio/livesupport/livesupport-1.0.ebuild index 215ecb14d..df41e2ea0 100644 --- a/campcaster/etc/portage/media-radio/livesupport/livesupport-1.0.ebuild +++ b/campcaster/etc/portage/media-radio/livesupport/livesupport-1.0.ebuild @@ -53,11 +53,7 @@ DEPEND=">=dev-db/unixODBC-2.2 >=dev-cpp/libxmlpp-2.8.1 =dev-db/libodbc++-0.2.3-r2 =dev-libs/xmlrpc++-0.7 - =media-libs/gst-plugins-0.8.10-r1 =media-libs/taglib-1.3.1-r3 - =media-plugins/gst-plugins-mad-0.8.10-r1 - =media-plugins/gst-plugins-ogg-0.8.10 - =media-libs/gstreamer-0.8.10" src_unpack() { unpack ${A} diff --git a/campcaster/src/modules/gstreamerElements/bin/gen_coverage_data.sh b/campcaster/src/modules/gstreamerElements/bin/gen_coverage_data.sh deleted file mode 100755 index 966aafb0b..000000000 --- a/campcaster/src/modules/gstreamerElements/bin/gen_coverage_data.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2004 Media Development Loan Fund -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# To report bugs, send an e-mail to bugs@campware.org -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# Author : $Author$ -# Version : $Revision$ -# Location : $URL$ -#------------------------------------------------------------------------------- -#------------------------------------------------------------------------------- -# This script generates code coverage data for the module -#------------------------------------------------------------------------------- -module="Campcaster GstreamerElements" - -reldir=`dirname $0`/.. -basedir=`cd $reldir; pwd;` -bindir=$basedir/bin -docdir=$basedir/doc -tmpdir=$basedir/tmp - -usrdir=`cd $basedir/../../../usr; pwd;` - -coverage_report_dir=$docdir/coverage - -raw_coverage_file=$tmpdir/raw_coverage.info -coverage_file=$tmpdir/coverage.info - -lcov=$usrdir/bin/lcov -genhtml=$usrdir/bin/genhtml - - -cd $basedir - -#------------------------------------------------------------------------------- -# Re-configure with covarege collection enabled, compile and run the tests -#------------------------------------------------------------------------------- -$bindir/autogen.sh --enable-coverage -make clean -make check - -#------------------------------------------------------------------------------- -# Generate some symlinks so that the sources are visible from tmpdir -#------------------------------------------------------------------------------- -ln -s $basedir/include $tmpdir/include -ln -s $basedir/src $tmpdir/src - - -#------------------------------------------------------------------------------- -# Use lcov to generate an HTML report on the coverage data -#------------------------------------------------------------------------------- -$lcov -d $tmpdir -c > $raw_coverage_file -$lcov -e $raw_coverage_file "$tmpdir/*" > $coverage_file -rm -rf $coverage_report_dir -mkdir -p $coverage_report_dir -$genhtml -t "$module" -o $coverage_report_dir $coverage_file - - -#------------------------------------------------------------------------------- -# Clean up -#------------------------------------------------------------------------------- -rm -f $tmpdir/include -rm -f $tmpdir/src diff --git a/campcaster/src/modules/gstreamerElements/bin/play.sh b/campcaster/src/modules/gstreamerElements/bin/play.sh deleted file mode 100755 index 71c4fca1e..000000000 --- a/campcaster/src/modules/gstreamerElements/bin/play.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (c) 2004 Media Development Loan Fund -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# To report bugs, send an e-mail to bugs@campware.org -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# Author : $Author$ -# Version : $Revision$ -# Location : $URL$ -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Play an audio file by using gstreamer and autoplugging. -#------------------------------------------------------------------------------- - -# assume we're in $basedir/bin -reldir=`dirname $0`/.. -basedir=`cd $reldir; pwd;` -test -z "$basedir" && basedir=. -usrdir=`cd $basedir/../../../usr; pwd;` - -bindir=$basedir/bin -etcdir=$basedir/etc -libdir=$basedir/lib -tmpdir=$basedir/tmp - -play=$tmpdir/play - - -export CPPFLAGS="-I$usrdir/include" -export LDFLAGS="-L$usrdir/lib" -export PKG_CONFIG_PATH="$usrdir/lib/pkgconfig" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$usrdir/lib" -export GST_PLUGIN_PATH="$libdir" - - -if [ ! -f $play ]; then - echo "first build the play executable by issuing the following command:"; - echo ""; - echo "make all"; - - exit -1; -fi - - -$play "$*" - diff --git a/campcaster/src/modules/gstreamerElements/etc/Makefile.in b/campcaster/src/modules/gstreamerElements/etc/Makefile.in deleted file mode 100644 index f6fd7f81a..000000000 --- a/campcaster/src/modules/gstreamerElements/etc/Makefile.in +++ /dev/null @@ -1,277 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2004 Media Development Loan Fund -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# To report bugs, send an e-mail to bugs@campware.org -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# Author : $Author$ -# Version : $Revision$ -# Location : $URL$ -# -# @configure_input@ -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# General command definitions -#------------------------------------------------------------------------------- -MKDIR = mkdir -p -RM = rm -f -RMDIR = rm -rf -DOXYGEN = doxygen -CP = cp -f - - -#------------------------------------------------------------------------------- -# Basic directory and file definitions -#------------------------------------------------------------------------------- -PACKAGE_NAME = @PACKAGE_NAME@ - -BASE_DIR = @builddir@ -DOC_DIR = ${BASE_DIR}/doc -DOXYGEN_DIR = ${DOC_DIR}/doxygen -COVERAGE_DIR = ${DOC_DIR}/coverage -ETC_DIR = ${BASE_DIR}/etc -INCLUDE_DIR = ${BASE_DIR}/include -LIB_DIR = ${BASE_DIR}/lib -SRC_DIR = ${BASE_DIR}/src -TMP_DIR = ${BASE_DIR}/tmp -VAR_DIR = ${BASE_DIR}/var - -REAL_BASE_DIR=$(shell cd ${BASE_DIR}; pwd) - - -prefix = @prefix@ - -USR_DIR = ${prefix} -USR_INCLUDE_DIR = ${USR_DIR}/include -USR_BIN_DIR = ${USR_DIR}/bin -USR_LIB_DIR = ${USR_DIR}/lib - -MODULES_DIR = ${BASE_DIR}/.. - -CORE_DIR = ${MODULES_DIR}/core -CORE_INCLUDE_DIR = ${CORE_DIR}/include -CORE_LIB_DIR = ${CORE_DIR}/lib -CORE_LIB = livesupport_core -CORE_LIB_FILE = ${CORE_LIB_DIR}/lib${CORE_LIB}.a - -VPATH = ${SRC_DIR} - -BOOST_CFLAGS=@BOOST_CPPFLAGS@ -BOOST_LIBS=@BOOST_LDFLAGS@ -BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@ - -GSTREAMER_CFLAGS=@GSTREAMER_CFLAGS@ -GSTREAMER_LIBS=@GSTREAMER_LIBS@ -GST_REGISTER=@GST_REGISTER@ - -TEST_RESULTS = ${DOC_DIR}/testResults.xml -# the text result XSLT has to be relative to the test result file, e.g. TMP_DIR -TEST_XSLT = ../etc/testResultToHtml.xsl - -GSTREAMER_ELEMENTS_LIB = livesupport_gstreamerelements -GSTREAMER_ELEMENTS_LIB_FILE = ${LIB_DIR}/lib${GSTREAMER_ELEMENTS_LIB}.a - -ONESHOT_READER_LIB = livesupport_oneshotreader -ONESHOT_READER_LIB_FILE = ${LIB_DIR}/lib${ONESHOT_READER_LIB}.so -MINIMAL_AUDIO_SMIL_LIB = livesupport_minimalaudiosmil -MINIMAL_AUDIO_SMIL_LIB_FILE = ${LIB_DIR}/lib${MINIMAL_AUDIO_SMIL_LIB}.so -PARTIAL_PLAY_LIB = livesupport_partialplay -PARTIAL_PLAY_LIB_FILE = ${LIB_DIR}/lib${PARTIAL_PLAY_LIB}.so -SWITCHER_LIB = livesupport_switcher -SWITCHER_LIB_FILE = ${LIB_DIR}/lib${SWITCHER_LIB}.so - -TEST_RUNNER = ${TMP_DIR}/testRunner -PLAY = ${TMP_DIR}/play - -DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config - -export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH} -export GST_PLUGIN_PATH=${REAL_BASE_DIR}/lib - - -#------------------------------------------------------------------------------- -# Configuration parameters -#------------------------------------------------------------------------------- -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \ - -pedantic -Wall -std=c99 -Wno-long-long \ - -fPIC -DPIC \ - ${GSTREAMER_CFLAGS} \ - -I${USR_INCLUDE_DIR} \ - -I${INCLUDE_DIR} -I${TMP_DIR} -CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \ - -Wall -Wno-long-long \ - ${BOOST_CFLAGS} \ - ${GSTREAMER_CFLAGS} \ - -I${USR_INCLUDE_DIR} \ - -I${CORE_INCLUDE_DIR} \ - -I${INCLUDE_DIR} -I${TMP_DIR} -GST_LDFLAGS = @LDFLAGS@ ${GSTREAMER_LIBS} \ - -L${USR_LIB_DIR} \ - -L${LIB_DIR} -LDFLAGS = @LDFLAGS@ ${GSTREAMER_LIBS} \ - ${BOOST_LIBS} \ - -L${USR_LIB_DIR} \ - -L${CORE_LIB_DIR} \ - -L${LIB_DIR} - - -#------------------------------------------------------------------------------- -# Dependencies -#------------------------------------------------------------------------------- -GSTREAMER_ELEMENTS_LIB_OBJS = ${TMP_DIR}/seek.o \ - ${TMP_DIR}/util.o \ - ${TMP_DIR}/seek-pack.o \ - ${TMP_DIR}/autoplug.o \ - ${TMP_DIR}/smil-util.o - -ONESHOT_READER_LIB_OBJS = ${TMP_DIR}/oneshot-reader.o - -MINIMAL_AUDIO_SMIL_LIB_OBJS = ${TMP_DIR}/minimal-audio-smil.o - -PARTIAL_PLAY_LIB_OBJS = ${TMP_DIR}/partial-play.o - -SWITCHER_LIB_OBJS = ${TMP_DIR}/switcher.o - -TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ - ${TMP_DIR}/AutoplugTest.o -DONT_TEST= ${TMP_DIR}/AutoplugTest.o \ - ${TMP_DIR}/SeekTest.o \ - ${TMP_DIR}/SwitcherTest.o \ - ${TMP_DIR}/SeekPackTest.o \ - ${TMP_DIR}/PartialPlayTest.o \ - ${TMP_DIR}/OneshotReaderTest.o \ - ${TMP_DIR}/MinimalAudioSmilTest.o - -TEST_RUNNER_LIBS = -l${GSTREAMER_ELEMENTS_LIB} -l${CORE_LIB} \ - ${BOOST_DATE_TIME_LIB} \ - -lcppunit -ldl -lxmlrpc++ - -PLAY_OBJS = ${TMP_DIR}/play.o - -PLAY_LIBS = -l${GSTREAMER_ELEMENTS_LIB} -l${CORE_LIB} - - -#------------------------------------------------------------------------------- -# Targets -#------------------------------------------------------------------------------- -.PHONY: all dir_setup doc clean docclean depclean distclean check install - -all: dir_setup ${GSTREAMER_ELEMENTS_LIB_FILE} \ - ${ONESHOT_READER_LIB_FILE} \ - ${MINIMAL_AUDIO_SMIL_LIB_FILE} \ - ${PARTIAL_PLAY_LIB_FILE} \ - ${SWITCHER_LIB_FILE} \ - ${PLAY} \ - gst_register - -dir_setup: ${TMP_DIR} ${DOXYGEN_DIR} - - -gst_register: - ${GST_REGISTER} > /dev/null 2>&1 - -doc: - ${DOXYGEN} ${DOXYGEN_CONFIG} - -clean: - ${RM} ${GSTREAMER_ELEMENTS_LIB_OBJS} ${GSTREAMER_ELEMENTS_LIB_FILE} - ${RM} ${ONESHOT_READER_LIB_OBJS} ${ONESHOT_READER_LIB_FILE} - ${RM} ${MINIMAL_AUDIO_SMIL_LIB_OBJS} ${MINIMAL_AUDIO_SMIL_LIB_FILE} - ${RM} ${PARTIAL_PLAY_LIB_OBJS} ${PARTIAL_PLAY_LIB_FILE} - ${RM} ${SWITCHER_LIB_OBJS} ${SWITCHER_LIB_FILE} - ${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER_RES} ${TEST_RUNNER} - ${RM} ${PLAY_OBJS} ${PLAY} - ${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info - -docclean: - ${RMDIR} ${DOXYGEN_DIR}/html - ${RMDIR} ${COVERAGE_DIR}/* - ${RM} ${TEST_RESULTS} - -depclean: clean - -distclean: clean docclean - ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* ${TMP_DIR}/ac*.m4 - -check: all ${TEST_RUNNER} - ${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT} - -install: all - ${MKDIR} ${USR_INCLUDE_DIR}/LiveSupport/GstreamerElements - ${CP} ${INCLUDE_DIR}/LiveSupport/GstreamerElements/*.h \ - ${USR_INCLUDE_DIR}/LiveSupport/GstreamerElements - ${CP} ${GSTREAMER_ELEMENTS_LIB_FILE} \ - ${ONESHOT_READER_LIB_FILE} \ - ${MINIMAL_AUDIO_SMIL_LIB_FILE} \ - ${PARTIAL_PLAY_LIB_FILE} \ - ${SWITCHER_LIB_FILE} \ - ${USR_LIB_DIR} - -GST_PLUGIN_PATH=${USR_LIB_DIR} ${GST_REGISTER} - - -#------------------------------------------------------------------------------- -# Specific targets -#------------------------------------------------------------------------------- -${GSTREAMER_ELEMENTS_LIB_FILE}: ${GSTREAMER_ELEMENTS_LIB_OBJS} - ${AR} crus $@ $^ - -${ONESHOT_READER_LIB_FILE}: ${ONESHOT_READER_LIB_OBJS} \ - ${GSTREAMER_ELEMENTS_LIB_FILE} - ${CC} -shared -o $@ $^ ${GST_LDFLAGS} - -${MINIMAL_AUDIO_SMIL_LIB_FILE}: ${MINIMAL_AUDIO_SMIL_LIB_OBJS} \ - ${GSTREAMER_ELEMENTS_LIB_FILE} - ${CC} -shared -o $@ $^ ${GST_LDFLAGS} - -${PARTIAL_PLAY_LIB_FILE}: ${PARTIAL_PLAY_LIB_OBJS} \ - ${GSTREAMER_ELEMENTS_LIB_FILE} - ${CC} -shared -o $@ $^ ${GST_LDFLAGS} - -${SWITCHER_LIB_FILE}: ${SWITCHER_LIB_OBJS} \ - ${GSTREAMER_ELEMENTS_LIB_FILE} - ${CC} -shared -o $@ $^ ${GST_LDFLAGS} - -${TMP_DIR}: - ${MKDIR} ${TMP_DIR} - -${DOXYGEN_DIR}: - ${MKDIR} ${DOXYGEN_DIR} - -${TEST_RUNNER}: ${CORE_LIB_FILE} ${GSTREAMER_ELEMENTS_LIB_FILE} \ - ${TEST_RUNNER_OBJS} - ${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS} - -${PLAY}: ${CORE_LIB_FILE} ${GSTREAMER_ELEMENTS_LIB_FILE} ${PLAY_OBJS} - ${CXX} ${LDFLAGS} -o $@ ${PLAY_OBJS} ${PLAY_LIBS} - -${CORE_LIB_FILE}: - ${MAKE} -C ${CORE_DIR} - - -#------------------------------------------------------------------------------- -# Pattern rules -#------------------------------------------------------------------------------- -${TMP_DIR}/%.o : ${SRC_DIR}/%.c - ${CC} ${CPPFLAGS} ${CFLAGS} -c -o $@ $< - -${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx - ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $< - diff --git a/campcaster/src/modules/gstreamerElements/etc/acinclude.m4 b/campcaster/src/modules/gstreamerElements/etc/acinclude.m4 deleted file mode 100644 index 22f99febd..000000000 --- a/campcaster/src/modules/gstreamerElements/etc/acinclude.m4 +++ /dev/null @@ -1,407 +0,0 @@ -dnl----------------------------------------------------------------------------- -dnl Copyright (c) 2004 Media Development Loan Fund -dnl -dnl This file is part of the Campcaster project. -dnl http://campcaster.campware.org/ -dnl To report bugs, send an e-mail to bugs@campware.org -dnl -dnl Campcaster is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Campcaster is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Campcaster; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl -dnl Author : $Author$ -dnl Version : $Revision$ -dnl Location : $URL$ -dnl----------------------------------------------------------------------------- - -dnl----------------------------------------------------------------------------- -dnl Macro to check for available modules using pkg-conf -dnl -dnl usage: -dnl PKG_CHECK_MODULES(GSTUFF,[gtk+-2.0 >= 1.3], action-if, action-not) -dnl -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -dnl -dnl This function was taken from the glade-- project -dnl----------------------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) - - -dnl----------------------------------------------------------------------------- -dnl Macro to check for C++ namespaces -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ac_cxx_namespaces.html -dnl -dnl usage: -dnl If the compiler can prevent names clashes using namespaces, -dnl define HAVE_NAMESPACES. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - - -dnl----------------------------------------------------------------------------- -dnl Test for the Boost C++ libraries of a particular version (or newer). -dnl for more information on boost, see http://www.boost.org/ -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ax_boost_base.html -dnl -dnl usage: -dnl If no path to the installed boost library is given the macro searches -dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT -dnl environment variable. Further documentation is available at -dnl http://randspringer.de/boost/index.html -dnl -dnl This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS) -dnl and sets: HAVE_BOOST -dnl -dnl Modified for Campcaster: -dnl * --with-boost default changed to Yes; -dnl * if the library is not found, it does not die, just prints "no", leaves -dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS -dnl variables to ""; -dnl * ${prefix} is prepended to the search path. -dnl -dnl Author: Thomas Porschberg -dnl -dnl License: -dnl Copyright © 2006 Thomas Porschberg -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - for ac_boost_path in /usr /usr/local /opt ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - BOOST_LDFLAGS="-L$best_path/lib" - - if test "x$BOOST_ROOT" != "x"; then - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "$succeeded" != "yes" ; then - BOOST_CPPFLAGS="" - BOOST_LDFLAGS="" - AC_MSG_RESULT(no) - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" -fi - -]) - - -dnl----------------------------------------------------------------------------- -dnl Test for Date_Time library from the Boost C++ libraries. -dnl for more information on boost, see http://www.boost.org/ -dnl for more information on this macro, see -dnl http://autoconf-archive.cryp.to/ax_boost_date_time.html -dnl -dnl usage: -dnl The macro requires a preceding call to AX_BOOST_BASE. -dnl Further documentation is available at -dnl . -dnl -dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB) -dnl and sets: HAVE_BOOST_DATE_TIME -dnl -dnl Modified for Campcaster: -dnl * --with-boost-date-time default changed to Yes. -dnl * added some more recognized suffixes to the library's name, incl. "-st". -dnl -dnl Authors: -dnl Thomas Porschberg -dnl Michael Tindal -dnl -dnl License: -dnl Copyright © 2006 Thomas Porschberg -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. -dnl----------------------------------------------------------------------------- -AC_DEFUN([AX_BOOST_DATE_TIME], -[ - AC_ARG_WITH([boost-date-time], - AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@], - [use the Date_Time library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_date_time_lib="" - else - want_boost="yes" - ax_boost_user_date_time_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Date_Time library is available, - ax_cv_boost_date_time, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include ]], - [[using namespace boost::gregorian; date d(2002,Jan,10); - return 0; - ]]), - ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_date_time" = "xyes"; then - AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available]) - BN=boost_date_time - if test "x$ax_boost_user_date_time_lib" = "x"; then - for ax_lib in $BN $BN-st $BN-mt $BN-mt-s $BN-s \ - $BN-$CC $BN-$CC-st $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \ - lib$BN lib$BN-st lib$BN-mt lib$BN-mt-s lib$BN-s \ - lib$BN-$CC lib$BN-$CC-st lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \ - $BN-mgw $BN-mgw $BN-mgw-st $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do - AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break], - [link_date_time="no"]) - done - else - for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do - AC_CHECK_LIB($ax_lib, main, - [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break], - [link_date_time="no"]) - done - - fi - if test "x$link_date_time" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) - diff --git a/campcaster/src/modules/gstreamerElements/etc/configure.ac b/campcaster/src/modules/gstreamerElements/etc/configure.ac deleted file mode 100644 index 218d5287d..000000000 --- a/campcaster/src/modules/gstreamerElements/etc/configure.ac +++ /dev/null @@ -1,122 +0,0 @@ -dnl----------------------------------------------------------------------------- -dnl Copyright (c) 2004 Media Development Loan Fund -dnl -dnl This file is part of the Campcaster project. -dnl http://campcaster.campware.org/ -dnl To report bugs, send an e-mail to bugs@campware.org -dnl -dnl Campcaster is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl Campcaster is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with Campcaster; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl -dnl Author : $Author$ -dnl Version : $Revision$ -dnl Location : $URL$ -dnl----------------------------------------------------------------------------- - -dnl----------------------------------------------------------------------------- -dnl NOTE: Run all configure related scripts from the tmp directory of the -dnl project. -dnl This is due to the fact that configure spreads a lot of trash around, -dnl like atom4te cache directories, config.* files, etc. into the directory -dnl it is being run from. We clearly don't want these in our base directory. -dnl----------------------------------------------------------------------------- -AC_INIT(GstreamerElements, 0.0, bugs@campware.org) -AC_PREREQ(2.59) -AC_COPYRIGHT([Copyright (c) 2004 Media Development Loan Fund under the GNU GPL]) -AC_REVISION($Revision$) - -AC_CONFIG_SRCDIR(../src/oneshot-reader.c) - -AC_CONFIG_HEADERS(configure.h) -AC_PROG_CC() -AC_PROG_CXX() - -AC_CHECK_HEADERS(string.h getopt.h sys/time.h) - - -dnl----------------------------------------------------------------------------- -dnl specify whether debug info should be compiled into the executable -dnl----------------------------------------------------------------------------- -AC_SUBST(CXXFLAGS) - -AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], [compile with debug info (no)]), - [], - [enable_debug=no]) - -if test "x${enable_debug}" = "xyes"; then - CXXFLAGS="-g -O0" - AC_DEFINE( YDEBUG, 1, [Debug is on] ) -else - CXXFLAGS="-O3" -fi - - -AC_MSG_RESULT([using compiler options: ${CXXFLAGS}]) - - -dnl----------------------------------------------------------------------------- -dnl specify the pkg-config path -dnl----------------------------------------------------------------------------- -AC_ARG_WITH([pkg-config-path], - AC_HELP_STRING([--with-pkg-config-path], - [use the pkg-config path (prefix/lib/pkgconfig)]), - [PKG_CONFIG_PATH=${withval}], - [PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:$PKG_CONFIG_PATH]) - -AC_MSG_RESULT([using pkg-config path: ${PKG_CONFIG_PATH}]) - -export PKG_CONFIG_PATH - -export PATH=${prefix}/bin:${PATH} - -AX_BOOST_BASE([1.33.1]) -if test "x${BOOST_CPPFLAGS}" != "x"; then - AX_BOOST_DATE_TIME - if test "x${BOOST_DATE_TIME_LIB}" = "x"; then - AC_MSG_ERROR([Boost date-time library not found]) - fi -else - AC_MSG_ERROR([Boost library >= 1.33.1 not found]) -fi - -PKG_CHECK_MODULES(GSTREAMER,[gstreamer-0.8 >= 0.8]) -AC_SUBST(GSTREAMER_CFLAGS) -AC_SUBST(GSTREAMER_LIBS) - -AC_PATH_PROG(GST_REGISTER, gst-register-0.8) -AC_SUBST(GST_REGISTER) - - -dnl----------------------------------------------------------------------------- -dnl enable compilaton for code coverage data -dnl----------------------------------------------------------------------------- -AC_SUBST(COVERAGE_CXXFLAGS) - -AC_ARG_ENABLE( coverage, -[ --enable-coverage enable code coverage data generaton (no) ], - ENABLE_COVERAGE=${enableval}, ENABLE_COVERAGE="no" ) - -if test "x${ENABLE_COVERAGE}" == "xyes" ; then - COVERAGE_CXXFLAGS="-fprofile-arcs -ftest-coverage" - AC_MSG_RESULT([compiling in code coverage mode]) -else - AC_MSG_RESULT([not compiling in code coverage mode]) -fi - - -AC_CONFIG_FILES(../Makefile:../etc/Makefile.in) - -AC_OUTPUT() diff --git a/campcaster/src/modules/gstreamerElements/etc/doxygen.config b/campcaster/src/modules/gstreamerElements/etc/doxygen.config deleted file mode 100644 index 897efc0d7..000000000 --- a/campcaster/src/modules/gstreamerElements/etc/doxygen.config +++ /dev/null @@ -1,1144 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2004 Media Development Loan Fund -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# To report bugs, send an e-mail to bugs@campware.org -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# Author : $Author$ -# Version : $Revision$ -# Location : $URL$ -#------------------------------------------------------------------------------- - -# Doxyfile 1.3.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Campcaster - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 0.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/doxygen - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = YES - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include src - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = include - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/campcaster/src/modules/gstreamerElements/include/LiveSupport/GstreamerElements/autoplug.h b/campcaster/src/modules/gstreamerElements/include/LiveSupport/GstreamerElements/autoplug.h deleted file mode 100644 index aa492abd3..000000000 --- a/campcaster/src/modules/gstreamerElements/include/LiveSupport/GstreamerElements/autoplug.h +++ /dev/null @@ -1,98 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef LiveSupport_GstreamerElements_Autoplug_h -#define LiveSupport_GstreamerElements_Autoplug_h - -/** - * @file - * Functions for autoplugging gstreamer elements based on their MIME types. - * - * @author $Author$ - * @version $Revision$ - */ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* ============================================================ include files */ - -#include - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - - -/* ====================================================== function prototypes */ - -/** - * Autoplug a source element, that contains some form of audio. - * The result will be a gstreamer element, that is linked with - * source, and produces raw audio on its src pad as it output. - * - * @param source the source to autoplug. - * @param name the name of the new element. - * @param caps the capabilities expected from the returned element, - * on its src pad. - * @return a gstreamer element already linked to source, that produces - * the audio provided by source in audio/x-raw-int or - * audio/x-raw-float format, as needed. - */ -GstElement * -ls_gst_autoplug_plug_source(GstElement * source, - const gchar * name, - const GstCaps * caps); - -/** - * Return the current position in a previously autoplugged element. - * This is a workaround function, as querying the element returned by - * ls_gst_autoplug_plug_source() with the standard gstreamer calls - * will not give satisfactory results. - * - * @param element a GstElement that was returned by a previous call to - * ls_gst_autoplug_plug_source() - * @return the current position, in nanoseconds - */ -gint64 -ls_gst_autoplug_get_position(GstElement * element); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LiveSupport_GstreamerElements_Autoplug_h */ - diff --git a/campcaster/src/modules/gstreamerElements/lib/.keepme b/campcaster/src/modules/gstreamerElements/lib/.keepme deleted file mode 100644 index e0808fa16..000000000 --- a/campcaster/src/modules/gstreamerElements/lib/.keepme +++ /dev/null @@ -1 +0,0 @@ -keep me diff --git a/campcaster/src/modules/gstreamerElements/src/AutoplugTest.cxx b/campcaster/src/modules/gstreamerElements/src/AutoplugTest.cxx deleted file mode 100644 index cf503e975..000000000 --- a/campcaster/src/modules/gstreamerElements/src/AutoplugTest.cxx +++ /dev/null @@ -1,540 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include - -#include "LiveSupport/GstreamerElements/autoplug.h" -#include "AutoplugTest.h" - - -using namespace boost::posix_time; -using namespace LiveSupport::Core; -using namespace LiveSupport::GstreamerElements; - - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(AutoplugTest); - -/** - * Define this if time statistics should be printed while running tests. - */ -#undef PRINT_TIMES - -/** - * Define this if time statistics should be printed for each iteration. - */ -#undef PRINT_ITERATION_TIMES - - -/** - * An mp3 test file. - */ -static const char * mp3TestFile = "var/5seccounter.mp3"; - -/** - * A 48 kHz mp3 test file. - */ -static const char * mp3_48kHzTestFile = "var/48kHz.mp3"; - -/** - * An ogg vorbis test file. - */ -static const char * oggTestFile = "var/5seccounter.ogg"; - -/** - * A 160kb/s ogg vorbis test file. - */ -static const char * ogg160kbpsTestFile = "var/d160.ogg"; - -/** - * A SMIL test file. - */ -static const char * smilTestFile = "var/simple.smil"; - -/** - * A SMIL test file, containing an ogg vorbis file. - */ -static const char * oggSmilFile = "var/simple-ogg.smil"; - -/** - * A file we can't plug. - */ -static const char * badFile = "src/AutoplugTest.cxx"; - -/** - * A very short file. - */ -static const char * shortFile = "var/test-short.mp3"; - -/** - * A SMIL file referring to a very short file. - */ -static const char * shortSmilFile = "var/short.smil"; - -/** - * An embedded SMIL file. - */ -static const char * embeddedSmilFile = "var/embedded.smil"; - -/** - * A sequentially looking SMIL file. - */ -static const char * sequentialSmilFile = "var/sequentialSmil.smil"; - -/** - * A long (in time) playlist - */ -static const char * longSmilFile = "var/bach.smil"; - - -/* =============================================== local function prototypes */ - -/** - * Signal handler for the eos event of the autoplug element. - * - * @param element the element emitting the eos signal - * @param userData pointer to the container bin of the switcher. - */ -static void -eos_signal_handler(GstElement * element, - gpointer userData); - - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Play an audio file - *----------------------------------------------------------------------------*/ -gint64 -AutoplugTest :: playFile(const char * audioFile) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * source; - GstElement * decoder; - GstElement * sink; - GstCaps * caps; - gint64 timePlayed; - - /* initialize GStreamer */ - gst_init(0, 0); - - caps = gst_caps_new_simple("audio/x-raw-int", - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "channels", G_TYPE_INT, 2, - "rate", G_TYPE_INT, 44100, - NULL); - - /* create elements */ - pipeline = gst_pipeline_new("audio-player"); - source = gst_element_factory_make("filesrc", "source"); - sink = gst_element_factory_make("alsasink", "alsa-output"); - - g_object_set(G_OBJECT(source), "location", audioFile, NULL); - - decoder = ls_gst_autoplug_plug_source(source, "decoder", caps); - - if (!decoder) { - gst_object_unref(GST_OBJECT(sink)); - gst_object_unref(GST_OBJECT(source)); - gst_object_unref(GST_OBJECT(pipeline)); - - return 0LL; - } - - g_signal_connect(decoder, "eos", G_CALLBACK(eos_signal_handler), pipeline); - - gst_element_link(decoder, sink); - gst_bin_add_many(GST_BIN(pipeline), source, decoder, sink, NULL); - - gst_element_set_state(source, GST_STATE_PAUSED); - gst_element_set_state(decoder, GST_STATE_PAUSED); - gst_element_set_state(sink, GST_STATE_PAUSED); - gst_element_set_state(pipeline, GST_STATE_PLAYING); - - while (gst_bin_iterate(GST_BIN(pipeline))) { -#ifdef PRINT_ITERATION_TIMES - timePlayed = ls_gst_autoplug_get_position(decoder); - std::cerr << "iteration time: " << timePlayed << std::endl; -#endif - } - - timePlayed = ls_gst_autoplug_get_position(decoder); - - /* clean up nicely */ - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT(pipeline)); - - return timePlayed; -} - - -/*------------------------------------------------------------------------------ - * eos signal handler for the switcher element - *----------------------------------------------------------------------------*/ -static void -eos_signal_handler(GstElement * element, - gpointer userData) -{ - GstElement * container = GST_ELEMENT(userData); - - g_return_if_fail(container != NULL); - g_return_if_fail(GST_IS_ELEMENT(container)); - - // set the container into eos state - gst_element_set_eos(container); -} - - -/*------------------------------------------------------------------------------ - * Open an audio file - *----------------------------------------------------------------------------*/ -Ptr::Ref -AutoplugTest :: openFile(const char * audioFile) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * source; - GstElement * decoder; - GstElement * sink; - GstCaps * caps; - Ptr::Ref start; - Ptr::Ref end; - Ptr::Ref duration; - - /* initialize GStreamer */ - gst_init(0, 0); - - caps = gst_caps_new_simple("audio/x-raw-int", - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "channels", G_TYPE_INT, 2, - "rate", G_TYPE_INT, 44100, - NULL); - - start = TimeConversion::now(); - - /* create elements */ - pipeline = gst_pipeline_new("audio-player"); - source = gst_element_factory_make("filesrc", "source"); - sink = gst_element_factory_make("alsasink", "alsa-output"); - - g_object_set(G_OBJECT(source), "location", audioFile, NULL); - - decoder = ls_gst_autoplug_plug_source(source, "decoder", caps); - - if (!decoder) { - gst_object_unref(GST_OBJECT(sink)); - gst_object_unref(GST_OBJECT(source)); - gst_object_unref(GST_OBJECT(pipeline)); - - return duration; - } - - gst_element_link(decoder, sink); - gst_bin_add_many(GST_BIN(pipeline), source, decoder, sink, NULL); - - gst_element_set_state(source, GST_STATE_PAUSED); - gst_element_set_state(decoder, GST_STATE_PAUSED); - gst_element_set_state(sink, GST_STATE_PAUSED); - gst_element_set_state(pipeline, GST_STATE_PLAYING); - - gst_bin_iterate(GST_BIN(pipeline)); - - end = TimeConversion::now(); - - /* clean up nicely */ - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT(pipeline)); - - duration.reset(new time_duration(*end - *start)); - - return duration; -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3TestFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a 48kHz mp3 file - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: mp3_48kHzTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3_48kHzTestFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 12.1 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 12.3 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * An ogg vorbis test. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: oggVorbisTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggTestFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * An ogg vorbis test. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: oggVorbis160kbpsTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(ogg160kbpsTestFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.1 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 2.4 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A SMIL test. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: smilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilTestFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test somethign we can't plug. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: negativeTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(badFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed == 0LL); -} - - -/*------------------------------------------------------------------------------ - * Test on a very short file. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: shortTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(shortFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 1.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 2.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test on a SMIL file referring to a very short file. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: shortSmilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(shortSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 1.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 2.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * See how long it takes to open some playlists - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: playlistOpenTest(void) - throw (CPPUNIT_NS::Exception) -{ - Ptr::Ref duration; - - duration = openFile(mp3TestFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << mp3TestFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(oggTestFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << oggTestFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(smilTestFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << smilTestFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(oggSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << oggSmilFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(shortSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << shortSmilFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(embeddedSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << embeddedSmilFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(sequentialSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << sequentialSmilFile << ": " - << *duration << std::endl; -#endif - - duration = openFile(longSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << longSmilFile << ": " - << *duration << std::endl; -#endif -} - - -/*------------------------------------------------------------------------------ - * A test to see if play duration is reported properly. - *----------------------------------------------------------------------------*/ -void -AutoplugTest :: playDurationTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 duration; - - duration = playFile(mp3TestFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << mp3TestFile << ": " - << duration << std::endl; -#endif - - duration = playFile(sequentialSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << sequentialSmilFile << ": " - << duration << std::endl; -#endif - - duration = playFile(embeddedSmilFile); -#ifdef PRINT_TIMES - std::cerr << "duration for " << embeddedSmilFile << ": " - << duration << std::endl; -#endif -} - diff --git a/campcaster/src/modules/gstreamerElements/src/AutoplugTest.h b/campcaster/src/modules/gstreamerElements/src/AutoplugTest.h deleted file mode 100644 index 40727d5d3..000000000 --- a/campcaster/src/modules/gstreamerElements/src/AutoplugTest.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef AutoplugTest_h -#define AutoplugTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - -#include -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -using namespace LiveSupport::Core; -using namespace boost::posix_time; - - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the partialplay gstreamer element. - * - * @author $Author$ - * @version $Revision$ - */ -class AutoplugTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(AutoplugTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(mp3_48kHzTest); - CPPUNIT_TEST(oggVorbisTest); - CPPUNIT_TEST(oggVorbis160kbpsTest); - CPPUNIT_TEST(smilTest); - CPPUNIT_TEST(negativeTest); - CPPUNIT_TEST(shortTest); - CPPUNIT_TEST(shortSmilTest); - CPPUNIT_TEST(playlistOpenTest); - CPPUNIT_TEST(playDurationTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Play a specific file. - * - * @param audioFile the audio file to play. - * @return the number of milliseconds played. - * @exception CPPUNIT_NS::Exception on test failures. - */ - gint64 - playFile(const char * audioFile) - throw (CPPUNIT_NS::Exception); - - /** - * Open a specific file. Used to measure the time it takes to - * open files. - * - * @param audioFile the audio file to play. - * @return the amount of time it took to open the file. - * @exception CPPUNIT_NS::Exception on test failures. - */ - Ptr::Ref - openFile(const char * audioFile) - throw (CPPUNIT_NS::Exception); - - - protected: - - /** - * A simple smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test a 48kHz mp3 file - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3_48kHzTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test an Ogg Vorbis file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test a 160 kb/s Ogg Vorbis file. - * See http://bugs.campware.org/view.php?id=1421 for details. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbis160kbpsTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test a SMIL file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A negative test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - negativeTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test on a very short file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - shortTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test on a SMIL file referring to a very short file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - shortSmilTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to open playlists, for seeing how long it takes to open - * them. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - playlistOpenTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to see if play duration is reported properly. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - playDurationTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // AutoplugTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/MinimalAudioSmilTest.cxx b/campcaster/src/modules/gstreamerElements/src/MinimalAudioSmilTest.cxx deleted file mode 100644 index 934f2891e..000000000 --- a/campcaster/src/modules/gstreamerElements/src/MinimalAudioSmilTest.cxx +++ /dev/null @@ -1,402 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_STRING_H -#include -#else -#error need string.h -#endif - - -#include -#include - -#include - -#include "MinimalAudioSmilTest.h" - - -using namespace LiveSupport::GstreamerElements; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(MinimalAudioSmilTest); - -/** - * A simple smil file. - */ -static const char * simpleFile = "var/simple.smil"; - -/** - * A simple smil file with clipBegin and clipEnd attributes - */ -static const char * simpleClipBeginFile = - "var/simple-clipBegin.smil"; - -/** - * A simple smil file with clipBegin and clipEnd attributes - */ -static const char * simpleClipBeginEndFile = - "var/simple-clipBegin-clipEnd.smil"; - -/** - * A parallel smil file. - */ -static const char * parallelFile = "var/parallel.smil"; - - -/** - * A parallel smil file with clipBegin and clipEnd attributes. - */ -static const char * parallelClipBeginEndFile = - "var/parallel-clipBegin-clipEnd.smil"; - -/** - * A SMIL file containing an Ogg Vorbis file. - */ -static const char * oggVorbisSmilFile = "var/simple-ogg.smil"; - -/** - * A SMIL file containing another SMIL file. - */ -static const char * embeddedSmilFile = "var/embedded.smil"; - -/** - * A SMIL file containing sound animation. - */ -static const char * soundAnimationSmilFile = "var/animateSound.smil"; - -/** - * A SMIL file containing sound animation with two parallel files. - */ -static const char * soundAnimationParallelSmilFile = - "var/animateSoundParallel.smil"; - -/** - * A SMIL file containing sound animation in effect of a fade in / out. - */ -static const char * fadeInOutSmilFile = "var/fadeInOut.smil"; - -/** - * A SMIL file containing sound animation in effect of a fade in / out, - * with two overlapping audio files. - */ -static const char * fadeInOutParallelSmilFile = - "var/fadeInOutParallel.smil"; - -/** - * A SMIL file containing several audio elements in a par, that in effect - * play sequentially. - */ -static const char * sequentialSmilFile = - "var/sequentialSmil.smil"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Play a SMIL file. - *----------------------------------------------------------------------------*/ -gint64 -MinimalAudioSmilTest :: playSmilFile(const char * smilFile) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * filesrc; - GstElement * smil; - GstElement * sink; - GstFormat format; - gint64 timePlayed; - - /* initialization */ - gst_init(0, 0); - - /* create elements */ - pipeline = gst_pipeline_new("pipeline"); - filesrc = gst_element_factory_make("filesrc", "filesource"); - smil = gst_element_factory_make("minimalaudiosmil", "smil"); - sink = gst_element_factory_make("alsasink", "audiosink"); - - g_object_set(G_OBJECT(filesrc), "location", smilFile, NULL); - - /* link everything together */ - gst_element_link_many(filesrc, smil, sink, NULL); - gst_bin_add_many(GST_BIN(pipeline), filesrc, smil, sink, NULL); - - /* run */ - gst_element_set_state(pipeline, GST_STATE_PLAYING); - while (gst_bin_iterate(GST_BIN(pipeline))); - - format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); - - /* clean up */ - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT(pipeline)); - - return timePlayed; -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(simpleFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple test with clipBegin attribute - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: simpleClipBeginTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(simpleClipBeginFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple test with clipBegin and clipEnd attributes - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: simpleClipBeginEndTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(simpleClipBeginEndFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test SMIL elements - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: parallelTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(parallelFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 7.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 8.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test SMIL elements with clipBegin and clipEnd attributes - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: parallelClipBeginEndTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(parallelClipBeginEndFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 7.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 8.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a SMIL file pointing to an Ogg Vorbis file. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: oggVorbisTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(oggVorbisSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a SMIL file pointing to another SMIL file. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: embeddedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(embeddedSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 9.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 10.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a SMIL file containing sound level animation. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: soundAnimationTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(soundAnimationSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a SMIL file containing sound level animation with two files in - * parallel. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: soundAnimationParallelTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(soundAnimationParallelSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a SMIL file containing sound level animation resulting in a fade - * in / fade out effect. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: fadeInOutTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(fadeInOutSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Test a SMIL file containing sound level animation resulting in a fade - * in / fade out effect, with two parallel files - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: fadeInOutParallelTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(fadeInOutParallelSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A sequential par element test. - *----------------------------------------------------------------------------*/ -void -MinimalAudioSmilTest :: sequentialSmilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playSmilFile(sequentialSmilFile); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 34.7 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 35.0 * GST_SECOND); -} - diff --git a/campcaster/src/modules/gstreamerElements/src/MinimalAudioSmilTest.h b/campcaster/src/modules/gstreamerElements/src/MinimalAudioSmilTest.h deleted file mode 100644 index 15f77b9ce..000000000 --- a/campcaster/src/modules/gstreamerElements/src/MinimalAudioSmilTest.h +++ /dev/null @@ -1,222 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef MinimalAudioSmilTest_h -#define MinimalAudioSmilTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the partialplay gstreamer element. - * - * @author $Author$ - * @version $Revision$ - */ -class MinimalAudioSmilTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(MinimalAudioSmilTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST(simpleClipBeginTest); - CPPUNIT_TEST(simpleClipBeginEndTest); - CPPUNIT_TEST(parallelTest); - CPPUNIT_TEST(parallelClipBeginEndTest); - CPPUNIT_TEST(oggVorbisTest); -// disabled because this test hangs on some systems -// CPPUNIT_TEST(embeddedTest); - CPPUNIT_TEST(soundAnimationTest); - CPPUNIT_TEST(soundAnimationParallelTest); - CPPUNIT_TEST(fadeInOutTest); - CPPUNIT_TEST(fadeInOutParallelTest); - CPPUNIT_TEST(sequentialSmilTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Play a smil file. - * - * @param smilFile the name of the smil file to play. - * @return the number of milliseconds played. - * @exception CPPUNIT_NS::Exception on test failures. - */ - gint64 - playSmilFile(const char * smilFile) - throw (CPPUNIT_NS::Exception); - - - protected: - - /** - * A simple smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple test with clipBegin attribute. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - simpleClipBeginTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple test with clipBegin and clipEnd attributes. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - simpleClipBeginEndTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test on elements in a SMIL file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - parallelTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test on elements in a SMIL file, with clipBegin and - * clipEnd attributes. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - parallelClipBeginEndTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple test with a SMIL file referring to an Ogg Vorbis file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test looking at an embedded SMIL file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - embeddedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test sound level animation. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - soundAnimationTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test sound level animation with two parallel elements. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - soundAnimationParallelTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test fade in / fade out using sound level animation. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - fadeInOutTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test fade in / fade out using sound level animation, - * with two parallel audio files. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - fadeInOutParallelTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A sequential par element test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - sequentialSmilTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // MinimalAudioSmilTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/OneshotReaderTest.cxx b/campcaster/src/modules/gstreamerElements/src/OneshotReaderTest.cxx deleted file mode 100644 index 3ab67856c..000000000 --- a/campcaster/src/modules/gstreamerElements/src/OneshotReaderTest.cxx +++ /dev/null @@ -1,146 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_STRING_H -#include -#else -#error need string.h -#endif - - -#include -#include -#include - -#include - -#include "OneshotReaderTest.h" - - -using namespace LiveSupport::GstreamerElements; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(OneshotReaderTest); - -static const char * testFile = "var/oneshotReader.input"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -OneshotReaderTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -OneshotReaderTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -OneshotReaderTest :: firstTest(void) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * filesrc; - GstElement * oneshot; - GstElement * bin; - guint8 * contents; - guint length; - char * verifyContents; - std::ifstream ifs; - - /* initialize GStreamer */ - gst_init(0, 0); - - /* create elements */ - pipeline = gst_pipeline_new ("my_pipeline"); - - filesrc = gst_element_factory_make("filesrc", "my_filesource"); - oneshot = gst_element_factory_make("oneshotreader", "oneshot"); - bin = gst_bin_new("bin"); - - g_object_set(G_OBJECT(filesrc), "location", testFile, NULL); - - gst_bin_add(GST_BIN(bin), oneshot); - gst_element_add_ghost_pad(bin, - gst_element_get_pad(oneshot, "sink"), - "sink"); - - /* link everything together */ - gst_element_link_many(filesrc, bin, NULL); - gst_bin_add_many(GST_BIN(pipeline), filesrc, bin, NULL); - - /* run */ - gst_element_set_state(pipeline, GST_STATE_PLAYING); - // well, actually don't run, by setting to state PLAYING, - // we already have what we're looking for. - while (gst_bin_iterate(GST_BIN(pipeline))); - - g_object_get(G_OBJECT(oneshot), "contents", &contents, NULL); - g_object_get(G_OBJECT(oneshot), "length", &length, NULL); - - // read in the file contents with an ifstream, and see if - // we get the same - verifyContents = new char[length]; - ifs.open(testFile); - CPPUNIT_ASSERT(ifs.good()); - ifs.read(verifyContents, length); - CPPUNIT_ASSERT(!memcmp(contents, verifyContents, length)); - - /* clean up */ - delete[] verifyContents; - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT(pipeline)); -} - diff --git a/campcaster/src/modules/gstreamerElements/src/OneshotReaderTest.h b/campcaster/src/modules/gstreamerElements/src/OneshotReaderTest.h deleted file mode 100644 index 67e4a7495..000000000 --- a/campcaster/src/modules/gstreamerElements/src/OneshotReaderTest.h +++ /dev/null @@ -1,106 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef OneshotReaderTest_h -#define OneshotReaderTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the partialplay gstreamer element. - * - * @author $Author$ - * @version $Revision$ - */ -class OneshotReaderTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(OneshotReaderTest); - CPPUNIT_TEST(firstTest); - CPPUNIT_TEST_SUITE_END(); - - protected: - - /** - * A simple smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - firstTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // OneshotReaderTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/PartialPlayTest.cxx b/campcaster/src/modules/gstreamerElements/src/PartialPlayTest.cxx deleted file mode 100644 index e0cb6fb80..000000000 --- a/campcaster/src/modules/gstreamerElements/src/PartialPlayTest.cxx +++ /dev/null @@ -1,267 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include - -#include "PartialPlayTest.h" - - -using namespace LiveSupport::GstreamerElements; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(PartialPlayTest); - -/** - * An mp3 test file. - */ -static const char * mp3File = "var/5seccounter.mp3"; - -/** - * An ogg vorbis test file. - */ -static const char * oggVorbisFile = "var/5seccounter.ogg"; - -/** - * A SMIL test file. - */ -static const char * smilFile = "var/simple.smil"; - - -/* =============================================== local function prototypes */ - -/** - * Signal handler for the eos event of the switcher element. - * - * @param element the element emitting the eos signal - * @param userData pointer to the container bin of the switcher. - */ -static void -eos_signal_handler(GstElement * element, - gpointer userData); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -gint64 -PartialPlayTest :: playFile(const char * audioFile, - const char * config) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * filter; - GstElement * sink; - GstFormat format; - gint64 timePlayed; - - /* initialize GStreamer */ - gst_init(0, 0); - - /* create elements */ - pipeline = gst_pipeline_new("audio-player"); - filter = gst_element_factory_make("partialplay", "partialplay"); - sink = gst_element_factory_make("alsasink", "alsa-output"); - - /* set filename property on the file source */ - g_object_set(G_OBJECT(filter), "location", audioFile, NULL); - g_object_set(G_OBJECT(filter), "config", config, NULL); - g_signal_connect(filter, "eos", G_CALLBACK(eos_signal_handler), pipeline); - - gst_element_link(filter, sink); - - gst_bin_add_many(GST_BIN(pipeline), filter, sink, NULL); - - gst_element_set_state(filter, GST_STATE_READY); - gst_element_set_state(sink, GST_STATE_READY); - gst_element_set_state(pipeline, GST_STATE_PLAYING); - - while (gst_bin_iterate(GST_BIN(pipeline))); - - format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); - - /* clean up nicely */ - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT (pipeline)); - - return timePlayed; -} - - -/*------------------------------------------------------------------------------ - * eos signal handler for the switcher element - *----------------------------------------------------------------------------*/ -static void -eos_signal_handler(GstElement * element, - gpointer userData) -{ - GstElement * container = GST_ELEMENT(userData); - - g_return_if_fail(container != NULL); - g_return_if_fail(GST_IS_ELEMENT(container)); - - // set the container into eos state - gst_element_set_eos(container); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: mp3Test(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3File, "2s;1s-4s"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Open ended test - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: mp3OpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3File, "2s;2s-"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: oggVorbisTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggVorbisFile, "2s;1s-4s"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Open ended test - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: oggVorbisOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggVorbisFile, "2s;2s-"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: smilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilFile, "2s;1s-4s"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Open ended test - *----------------------------------------------------------------------------*/ -void -PartialPlayTest :: smilOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilFile, "2s;2s-"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - diff --git a/campcaster/src/modules/gstreamerElements/src/PartialPlayTest.h b/campcaster/src/modules/gstreamerElements/src/PartialPlayTest.h deleted file mode 100644 index 0882b4e0d..000000000 --- a/campcaster/src/modules/gstreamerElements/src/PartialPlayTest.h +++ /dev/null @@ -1,167 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef PartialPlayTest_h -#define PartialPlayTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the partialplay gstreamer element. - * - * @author $Author$ - * @version $Revision$ - */ -class PartialPlayTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(PartialPlayTest); - CPPUNIT_TEST(mp3Test); - CPPUNIT_TEST(mp3OpenEndedTest); - CPPUNIT_TEST(oggVorbisTest); - CPPUNIT_TEST(oggVorbisOpenEndedTest); - CPPUNIT_TEST(smilTest); - CPPUNIT_TEST(smilOpenEndedTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Play a file, with a specific partial play config. - * - * @param audioFile the file to play - * @param config the partial play config to use when playing the file - * @return the number of milliseconds played. - * @exception CPPUNIT_NS::Exception on test failures. - */ - gint64 - playFile(const char * audioFile, - const char * config) - throw (CPPUNIT_NS::Exception); - - - protected: - - /** - * A simple mp3 smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3Test(void) throw (CPPUNIT_NS::Exception); - - /** - * An open ended mp3 play test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3OpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple ogg vorbis smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisTest(void) throw (CPPUNIT_NS::Exception); - - /** - * An open ended ogg vorbis play test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple SMIL smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilTest(void) throw (CPPUNIT_NS::Exception); - - /** - * An open ended SMIL play test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // PartialPlayTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/SeekPackTest.cxx b/campcaster/src/modules/gstreamerElements/src/SeekPackTest.cxx deleted file mode 100644 index 0be83b94f..000000000 --- a/campcaster/src/modules/gstreamerElements/src/SeekPackTest.cxx +++ /dev/null @@ -1,370 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include - -#include "seek-pack.h" -#include "SeekPackTest.h" - - -using namespace LiveSupport::GstreamerElements; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(SeekPackTest); - -/** - * An mp3 test file. - */ -static const char * mp3File = "var/5seccounter.mp3"; - -/** - * An ogg vorbis test file. - */ -static const char * oggVorbisFile = "var/5seccounter.ogg"; - -/** - * A smil test file. - */ -static const char * smilFile = "var/simple.smil"; - - -/* =============================================== local function prototypes */ - -/** - * Signal handler for the eos event of the switcher element. - * - * @param element the element emitting the eos signal - * @param userData pointer to the container bin of the switcher. - */ -static void -eos_signal_handler(GstElement * element, - gpointer userData); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -gint64 -SeekPackTest :: playFile(const char * audioFile, - gint64 silenceDuration, - gint64 playFrom, - gint64 playTo) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * source; - LivesupportSeekPack * seekPack; - GstCaps * caps; - GstElement * sink; - GstFormat format; - gint64 timePlayed; - - /* initialize GStreamer */ - gst_init(0, 0); - - caps = gst_caps_new_simple("audio/x-raw-int", - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "channels", G_TYPE_INT, 2, - "rate", G_TYPE_INT, 44100, - NULL); - - /* create elements */ - pipeline = gst_pipeline_new("audio-player"); - source = gst_element_factory_make("filesrc", "filesource"); - seekPack = livesupport_seek_pack_new("seekPack", caps); - sink = gst_element_factory_make("alsasink", "alsaoutput"); - - /* set filename property on the file source */ - g_object_set(G_OBJECT (source), "location", audioFile, NULL); - - livesupport_seek_pack_init(seekPack, - source, - silenceDuration, - playFrom, - playTo); - g_signal_connect(seekPack->bin, - "eos", - G_CALLBACK(eos_signal_handler), - pipeline); - - livesupport_seek_pack_link(seekPack, sink); - - livesupport_seek_pack_add_to_bin(seekPack, GST_BIN(pipeline)); - gst_bin_add(GST_BIN(pipeline), sink); - - gst_element_set_state(sink, GST_STATE_READY); - livesupport_seek_pack_set_state(seekPack, GST_STATE_PLAYING); - gst_element_set_state(pipeline, GST_STATE_PLAYING); - - while (gst_bin_iterate(GST_BIN(pipeline))); - - format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); - - /* clean up nicely */ - gst_element_set_state(pipeline, GST_STATE_NULL); - livesupport_seek_pack_destroy(seekPack); - gst_object_unref(GST_OBJECT(pipeline)); - - return timePlayed; -} - - -/*------------------------------------------------------------------------------ - * eos signal handler for the switcher element - *----------------------------------------------------------------------------*/ -static void -eos_signal_handler(GstElement * element, - gpointer userData) -{ - GstElement * container = GST_ELEMENT(userData); - - g_return_if_fail(container != NULL); - g_return_if_fail(GST_IS_ELEMENT(container)); - - // set the container into eos state - gst_element_set_eos(container); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: mp3Test(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3File, - 2LL * GST_SECOND, - 1LL * GST_SECOND, - 3LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A test with no silence. - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: mp3NoSilenceTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3File, - 0LL * GST_SECOND, - 1LL * GST_SECOND, - 3LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 1.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 2.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Open ended test - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: mp3OpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3File, - 2LL * GST_SECOND, - 1LL * GST_SECOND, - -1LL); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 5.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 6.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple test with an ogg vorbis file - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: oggVorbisTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggVorbisFile, - 2LL * GST_SECOND, - 1LL * GST_SECOND, - 3LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A no silence test with an ogg vorbis file - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: oggVorbisNoSilenceTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggVorbisFile, - 0LL * GST_SECOND, - 1LL * GST_SECOND, - 3LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 1.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 2.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * An open ended test with an ogg vorbis file - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: oggVorbisOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggVorbisFile, - 2LL * GST_SECOND, - 1LL * GST_SECOND, - -1LL); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple test with a SMIL file - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: smilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilFile, - 2LL * GST_SECOND, - 1LL * GST_SECOND, - 3LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple test with a SMIL file, without silence - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: smilNoSilenceTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilFile, - 0LL * GST_SECOND, - 1LL * GST_SECOND, - 3LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 1.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 2.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple test with a SMIL file, playing until EOS - *----------------------------------------------------------------------------*/ -void -SeekPackTest :: smilOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilFile, - 2LL * GST_SECOND, - 1LL * GST_SECOND, - -1LL); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - diff --git a/campcaster/src/modules/gstreamerElements/src/SeekPackTest.h b/campcaster/src/modules/gstreamerElements/src/SeekPackTest.h deleted file mode 100644 index 238e94236..000000000 --- a/campcaster/src/modules/gstreamerElements/src/SeekPackTest.h +++ /dev/null @@ -1,199 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef SeekPackTest_h -#define SeekPackTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the SeekPack structure. - * - * @author $Author$ - * @version $Revision$ - */ -class SeekPackTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(SeekPackTest); - CPPUNIT_TEST(mp3Test); - CPPUNIT_TEST(mp3NoSilenceTest); - CPPUNIT_TEST(mp3OpenEndedTest); - CPPUNIT_TEST(oggVorbisTest); - CPPUNIT_TEST(oggVorbisNoSilenceTest); - CPPUNIT_TEST(oggVorbisOpenEndedTest); - CPPUNIT_TEST(smilTest); - CPPUNIT_TEST(smilNoSilenceTest); - CPPUNIT_TEST(smilOpenEndedTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Play a file, with a specific partial play config. - * - * @param audioFile the file to play - * @param silenceDuration the amount of silence before playing - * @param playFrom play the audio file from this offset - * @param playTo play the audio file until this offset, - * or -1LL if until the end. - * @return the number of milliseconds played. - * @exception CPPUNIT_NS::Exception on test failures. - */ - gint64 - playFile(const char * audioFile, - gint64 silenceDuration, - gint64 playFrom, - gint64 playTo) - throw (CPPUNIT_NS::Exception); - - - protected: - - /** - * A simple mp3 smoke test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3Test(void) throw (CPPUNIT_NS::Exception); - - /** - * An mp3 test with no silence. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3NoSilenceTest(void) throw (CPPUNIT_NS::Exception); - - /** - * An open ended mp3 play test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3OpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Try SeekPack on an ogg vorbis file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Try SeekPack on an ogg vorbis file, without playing silence. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisNoSilenceTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Try SeekPack on an ogg vorbis file, playing until EOS. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Try SeekPack on a SMIL file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Try SeekPack on a SMIL file, with no silence in the front. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilNoSilenceTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Try SeekPack on a SMIL file, playing until EOS. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // SeekPackTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/SeekTest.cxx b/campcaster/src/modules/gstreamerElements/src/SeekTest.cxx deleted file mode 100644 index 18924b908..000000000 --- a/campcaster/src/modules/gstreamerElements/src/SeekTest.cxx +++ /dev/null @@ -1,298 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include - -#include "LiveSupport/GstreamerElements/autoplug.h" -#include "seek.h" -#include "SeekTest.h" - - -using namespace LiveSupport::GstreamerElements; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(SeekTest); - -/** - * An mp3 test file. - */ -static const char * mp3File = "var/5seccounter.mp3"; - -/** - * An Ogg Vorbis test file. - */ -static const char * oggVorbisFile = "var/5seccounter.ogg"; - -/** - * An smil test file. - */ -static const char * smilFile = "var/simple.smil"; - - -/* =============================================== local function prototypes */ - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -SeekTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -SeekTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Play an audio file - *----------------------------------------------------------------------------*/ -gint64 -SeekTest :: playFile(const char * audioFile, - gint64 seekTo, - gint64 playTo) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * source; - GstElement * decoder; - GstElement * sink; - GstSeekType seekType; - GstCaps * caps; - GstFormat format; - gint64 timePlayed; - gint64 timeAfterSeek; - gboolean ret; - - /* initialize GStreamer */ - gst_init(0, 0); - - caps = gst_caps_new_simple("audio/x-raw-int", - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "channels", G_TYPE_INT, 2, - "rate", G_TYPE_INT, 44100, - NULL); - - /* create elements */ - seekType = (GstSeekType) (GST_FORMAT_TIME | - GST_SEEK_METHOD_SET | - GST_SEEK_FLAG_FLUSH); - - pipeline = gst_pipeline_new("audio-player"); - source = gst_element_factory_make("filesrc", "source"); - sink = gst_element_factory_make("alsasink", "alsa-output"); - - g_object_set(G_OBJECT(source), "location", audioFile, NULL); - - decoder = ls_gst_autoplug_plug_source(source, "decoder", caps); - - if (!decoder) { - gst_object_unref(GST_OBJECT(sink)); - gst_object_unref(GST_OBJECT(source)); - gst_object_unref(GST_OBJECT(pipeline)); - - return 0LL; - } - - gst_element_link(decoder, sink); - gst_bin_add_many(GST_BIN(pipeline), source, decoder, sink, NULL); - - gst_element_set_state(source, GST_STATE_PLAYING); - gst_element_set_state(decoder, GST_STATE_PAUSED); - gst_element_set_state(sink, GST_STATE_PAUSED); - gst_element_set_state(pipeline, GST_STATE_PLAYING); - - // iterate on the pipline until the played time becomes more than 0 - // as the seek even will only be taken into consideration after that - // by gstreamer - for (timePlayed = 0; - timePlayed == 0 && gst_bin_iterate(GST_BIN(pipeline)); ) { - - format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); - } - - // so, seek now - timeAfterSeek = -1LL; - ret = livesupport_seek(decoder, seekType, seekTo); - CPPUNIT_ASSERT(ret); - - // iterate until playTo is reached - while (gst_bin_iterate(GST_BIN(pipeline))) { - format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); - - if (timeAfterSeek == -1LL && timePlayed > seekTo) { - timeAfterSeek = timePlayed; - } - - if (playTo > 0 && timePlayed > playTo) { - break; - } - } - - /* clean up nicely */ - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT (pipeline)); - - return timePlayed - timeAfterSeek; -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -SeekTest :: mp3Test(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(mp3File, 1LL * GST_SECOND, 4LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Seek and play until the end of the auido file. - *----------------------------------------------------------------------------*/ -void -SeekTest :: mp3OpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - // see http://bugzilla.gnome.org/show_bug.cgi?id=308312 - // as why this seek is not precise - timePlayed = playFile(mp3File, 2LL * GST_SECOND, -1LL); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - -/*------------------------------------------------------------------------------ - * A simple smoke test on an Ogg Vorbis file. - *----------------------------------------------------------------------------*/ -void -SeekTest :: oggVorbisTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(oggVorbisFile, 1LL * GST_SECOND, 4LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Seek and play an ogg vorbis file until the end of the auido file. - *----------------------------------------------------------------------------*/ -void -SeekTest :: oggVorbisOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - // see http://bugzilla.gnome.org/show_bug.cgi?id=308312 - // as why this seek is not precise - timePlayed = playFile(oggVorbisFile, 2LL * GST_SECOND, -1LL); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test on a SMIL file. - *----------------------------------------------------------------------------*/ -void -SeekTest :: smilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFile(smilFile, 1LL * GST_SECOND, 4LL * GST_SECOND); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Seek and play a SMIL file until the end of the auido file. - *----------------------------------------------------------------------------*/ -void -SeekTest :: smilOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - // see http://bugzilla.gnome.org/show_bug.cgi?id=308312 - // as why this seek is not precise - timePlayed = playFile(oggVorbisFile, 2LL * GST_SECOND, -1LL); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - diff --git a/campcaster/src/modules/gstreamerElements/src/SeekTest.h b/campcaster/src/modules/gstreamerElements/src/SeekTest.h deleted file mode 100644 index ec6275b3a..000000000 --- a/campcaster/src/modules/gstreamerElements/src/SeekTest.h +++ /dev/null @@ -1,170 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef SeekTest_h -#define SeekTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the partialplay gstreamer element. - * - * @author $Author$ - * @version $Revision$ - */ -class SeekTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(SeekTest); - CPPUNIT_TEST(mp3Test); - CPPUNIT_TEST(mp3OpenEndedTest); - CPPUNIT_TEST(oggVorbisTest); - CPPUNIT_TEST(oggVorbisOpenEndedTest); - CPPUNIT_TEST(smilTest); - CPPUNIT_TEST(smilOpenEndedTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Play a specific file, from and until a specific timepoint. - * - * @param audioFile the audio file to play. - * @param seekTo before playing, seek to this position. - * @param playTo play until this position, or -1LL if play until - * the end. - * @return the number of milliseconds played. - * @exception CPPUNIT_NS::Exception on test failures. - */ - gint64 - playFile(const char * audioFile, - gint64 seekTo, - gint64 playTo) - throw (CPPUNIT_NS::Exception); - - - protected: - - /** - * A simple mp3 test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3Test(void) throw (CPPUNIT_NS::Exception); - - /** - * A test where an mp3 file is played until its end. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3OpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple ogg vorbis test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test where an ogg vorbis file is played until its end. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple SMIL test. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test where an SMIL file is played until its end. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // SeekTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/SwitcherTest.cxx b/campcaster/src/modules/gstreamerElements/src/SwitcherTest.cxx deleted file mode 100644 index 656f32b8d..000000000 --- a/campcaster/src/modules/gstreamerElements/src/SwitcherTest.cxx +++ /dev/null @@ -1,415 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include -#include - -#include - -#include "LiveSupport/GstreamerElements/autoplug.h" -#include "SwitcherTest.h" - - -using namespace LiveSupport::GstreamerElements; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -CPPUNIT_TEST_SUITE_REGISTRATION(SwitcherTest); - -/** - * An mp3 test file. - */ -static const char * mp3File = "var/5seccounter.mp3"; - -/** - * An ogg vorbis test file. - */ -static const char * oggVorbisFile = "var/5seccounter.ogg"; - -/** - * A SMIL test file. - */ -static const char * smilFile = "var/simple.smil"; - - -/* =============================================== local function prototypes */ - -/** - * Signal handler for the eos event of the switcher element. - * - * @param element the element emitting the eos signal - * @param userData pointer to the container bin of the switcher. - */ -static void -eos_signal_handler(GstElement * element, - gpointer userData); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Set up the test environment - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: setUp(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Clean up the test environment - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: tearDown(void) throw () -{ -} - - -/*------------------------------------------------------------------------------ - * Play an audio file - *----------------------------------------------------------------------------*/ -gint64 -SwitcherTest :: playFiles(const char ** audioFiles, - unsigned int noFiles, - const char * sourceConfig) - throw (CPPUNIT_NS::Exception) -{ - GstElement * pipeline; - GstElement * switcher; - GstElement * sink; - GstCaps * caps; - unsigned int i; - GstFormat format; - gint64 timePlayed; - - /* initialize GStreamer */ - gst_init(0, 0); - - caps = gst_caps_new_simple("audio/x-raw-int", - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "channels", G_TYPE_INT, 2, - "rate", G_TYPE_INT, 44100, - NULL); - - /* create elements */ - pipeline = gst_pipeline_new("audio-player"); - switcher = gst_element_factory_make("switcher", "switcher"); - sink = gst_element_factory_make("alsasink", "alsa-output"); - - for (i = 0; i < noFiles; ++i) { - GstElement * source; - GstElement * decoder; - char str[256]; - gboolean ret; - - g_snprintf(str, 256, "source_%d", i); - source = gst_element_factory_make("filesrc", str); - CPPUNIT_ASSERT(source); - g_object_set(G_OBJECT(source), "location", audioFiles[i], NULL); - - g_snprintf(str, 256, "decoder_%d", i); - decoder = ls_gst_autoplug_plug_source(source, str, caps); - CPPUNIT_ASSERT(decoder); - - ret = gst_element_link(decoder, switcher); - CPPUNIT_ASSERT(ret); - gst_bin_add_many(GST_BIN(pipeline), source, decoder, NULL); - } - - /* link and add the switcher & sink _after_ the decoders above - * otherwise we'll get a: - * "assertion failed: (group->group_links == NULL)" - * error later on when trying to free up the pipeline - * see http://bugzilla.gnome.org/show_bug.cgi?id=309122 - */ - gst_element_link_many(switcher, sink, NULL); - gst_bin_add_many(GST_BIN(pipeline), switcher, sink, NULL); - - g_object_set(G_OBJECT(switcher), "source-config", sourceConfig, NULL); - /* listen for the eos event on switcher, so the pipeline can be stopped */ - g_signal_connect(switcher, "eos", G_CALLBACK(eos_signal_handler), pipeline); - - gst_element_set_state(sink, GST_STATE_PAUSED); - /* set the switcher to PAUSED, as it will give - * "trying to push on unnegotiaded pad" warnings otherwise */ - gst_element_set_state(switcher, GST_STATE_PAUSED); - gst_element_set_state(pipeline, GST_STATE_PLAYING); - - while (gst_bin_iterate(GST_BIN(pipeline))); - - format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); - - /* clean up nicely */ - gst_element_set_state(pipeline, GST_STATE_NULL); - gst_object_unref(GST_OBJECT (pipeline)); - - return timePlayed; -} - - -/*------------------------------------------------------------------------------ - * eos signal handler for the switcher element - *----------------------------------------------------------------------------*/ -static void -eos_signal_handler(GstElement * element, - gpointer userData) -{ - GstElement * container = GST_ELEMENT(userData); - - g_return_if_fail(container != NULL); - g_return_if_fail(GST_IS_ELEMENT(container)); - - // set the container into eos state - gst_element_set_eos(container); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: mp3Test(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(&mp3File, 1, "0[3s]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: mp3OpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(&mp3File, 1, "0[]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: mp3MultipleTest(void) - throw (CPPUNIT_NS::Exception) -{ - const char * testFiles[] = { mp3File, mp3File }; - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(testFiles, 2, "0[2s];1[2s]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: mp3MultipleOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - const char * testFiles[] = { mp3File, mp3File }; - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(testFiles, 2, "0[2s];1[]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 6.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 7.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: oggVorbisTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(&oggVorbisFile, 1, "0[3s]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: oggVorbisOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(&oggVorbisFile, 1, "0[]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: oggVorbisMultipleTest(void) - throw (CPPUNIT_NS::Exception) -{ - const char * testFiles[] = { oggVorbisFile, oggVorbisFile }; - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(testFiles, 2, "0[2s];1[2s]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: oggVorbisMultipleOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - const char * testFiles[] = { oggVorbisFile, oggVorbisFile }; - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(testFiles, 2, "0[2s];1[]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 6.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 7.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * A simple smoke test. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: smilTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(&smilFile, 1, "0[3s]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 2.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 3.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: smilOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(&smilFile, 1, "0[]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 4.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 5.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: smilMultipleTest(void) - throw (CPPUNIT_NS::Exception) -{ - const char * testFiles[] = { smilFile, smilFile }; - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(testFiles, 2, "0[2s];1[2s]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 3.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 4.1 * GST_SECOND); -} - - -/*------------------------------------------------------------------------------ - * Play a file until its end. - *----------------------------------------------------------------------------*/ -void -SwitcherTest :: smilMultipleOpenEndedTest(void) - throw (CPPUNIT_NS::Exception) -{ - const char * testFiles[] = { smilFile, smilFile }; - gint64 timePlayed; - char str[256]; - - timePlayed = playFiles(testFiles, 2, "0[2s];1[]"); - g_snprintf(str, 256, "time played: %" G_GINT64_FORMAT, timePlayed); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed > 6.9 * GST_SECOND); - CPPUNIT_ASSERT_MESSAGE(str, timePlayed < 7.1 * GST_SECOND); -} - - diff --git a/campcaster/src/modules/gstreamerElements/src/SwitcherTest.h b/campcaster/src/modules/gstreamerElements/src/SwitcherTest.h deleted file mode 100644 index 7b39429e5..000000000 --- a/campcaster/src/modules/gstreamerElements/src/SwitcherTest.h +++ /dev/null @@ -1,226 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ -#ifndef SwitcherTest_h -#define SwitcherTest_h - -#ifndef __cplusplus -#error This is a C++ include file -#endif - - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#include - - -namespace LiveSupport { -namespace GstreamerElements { - -/* ================================================================ constants */ - - -/* =================================================================== macros */ - - -/* =============================================================== data types */ - -/** - * Unit test for the partialplay gstreamer element. - * - * @author $Author$ - * @version $Revision$ - */ -class SwitcherTest : public CPPUNIT_NS::TestFixture -{ - CPPUNIT_TEST_SUITE(SwitcherTest); - CPPUNIT_TEST(mp3Test); - CPPUNIT_TEST(mp3OpenEndedTest); - CPPUNIT_TEST(mp3MultipleTest); - CPPUNIT_TEST(mp3MultipleOpenEndedTest); - CPPUNIT_TEST(oggVorbisTest); - CPPUNIT_TEST(oggVorbisOpenEndedTest); - CPPUNIT_TEST(oggVorbisMultipleTest); - CPPUNIT_TEST(oggVorbisMultipleOpenEndedTest); - CPPUNIT_TEST(smilTest); - CPPUNIT_TEST(smilOpenEndedTest); - CPPUNIT_TEST(smilMultipleTest); - CPPUNIT_TEST(smilMultipleOpenEndedTest); - CPPUNIT_TEST_SUITE_END(); - - private: - - /** - * Play audio files, with a specific switcher configuration. - * - * @param audioFiles an array of file names to play - * @param noFiles the size of the audioFiles array. - * @param sourceConfig the source config to use. - * @return the number of milliseconds played. - * @exception CPPUNIT_NS::Exception on test failures. - */ - gint64 - playFiles(const char ** audioFiles, - unsigned int noFiles, - const char * sourceConfig) - throw (CPPUNIT_NS::Exception); - - - protected: - - /** - * A simple smoke test with an mp3 file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3Test(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to play an mp3 file until its end. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3OpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the switcher with multiple mp3 inputs. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3MultipleTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the switcher with multiple mp3 inputs, - * including open-ended ones. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - mp3MultipleOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple smoke test with an ogg vorbis file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to play an ogg vorbis file until its end. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the switcher with multiple ogg vorbis inputs. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisMultipleTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the switcher with multiple ogg vorbis inputs, - * including open-ended ones. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - oggVorbisMultipleOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A simple smoke test with a SMIL file. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilTest(void) throw (CPPUNIT_NS::Exception); - - /** - * A test to play a SMIL file until its end. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the switcher with multiple SMIL inputs. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilMultipleTest(void) throw (CPPUNIT_NS::Exception); - - /** - * Test the switcher with multiple SMIL inputs, - * including open-ended ones. - * - * @exception CPPUNIT_NS::Exception on test failures. - */ - void - smilMultipleOpenEndedTest(void) throw (CPPUNIT_NS::Exception); - - - public: - - /** - * Set up the environment for the test case. - */ - void - setUp(void) throw (); - - /** - * Clean up the environment after the test case. - */ - void - tearDown(void) throw (); -}; - - -/* ================================================= external data structures */ - - -/* ====================================================== function prototypes */ - - -} // namespace GstreamerElements -} // namespace LiveSupport - -#endif // SwitcherTest_h - diff --git a/campcaster/src/modules/gstreamerElements/src/TestRunner.cxx b/campcaster/src/modules/gstreamerElements/src/TestRunner.cxx deleted file mode 100644 index aeece9178..000000000 --- a/campcaster/src/modules/gstreamerElements/src/TestRunner.cxx +++ /dev/null @@ -1,286 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#if HAVE_UNISTD_H -#include -#else -#error "Need unistd.h" -#endif - -#if HAVE_GETOPT_H -#include -#else -#error "Need getopt.h" -#endif - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "LiveSupport/Core/Ptr.h" - - -using namespace LiveSupport::Core; - -/* =================================================== local data structures */ - - -/* ================================================ local constants & macros */ - -/** - * Our copyright notice, should be at most 80 columns - */ -static const char copyrightNotice[] = - "Copyright (c) 2004 Media Development Loan Fund under the GNU GPL"; - -/** - * String describing the short options. - */ -static const char options[] = "ho:s:v"; - -/** - * Structure describing the long options - */ -static const struct option longOptions[] = { - { "help", no_argument, 0, 'h' }, - { "output", required_argument, 0, 'o' }, - { "stylesheet", required_argument, 0, 's' }, - { "version", no_argument, 0, 'v' }, - { 0, 0, 0, 0 } -}; - -/** - * The encoding to use for the output file. - */ -static const std::string encoding = "utf-8"; - -/** - * The output XML file name. - */ -static Ptr::Ref xmlOutFileName; - -/** - * The XSLT attached to the output file. - */ -static Ptr::Ref xsltFileName; - - -/* =============================================== local function prototypes */ - -/** - * Print program version. - * - * @param os the std::ostream to print to. - */ -static void -printVersion ( std::ostream & os ); - -/** - * Print program usage information. - * - * @param invocation the command line command used to invoke this program. - * @param os the std::ostream to print to. - */ -static void -printUsage ( const char invocation[], - std::ostream & os ); - -/** - * Process command line arguments. - * - * @param argc the number of arguments. - * @param argv the arguments themselves. - * @return true of all went well, false in case the program should exit - * after this call. - */ -static bool -processArguments(int argc, char *argv[]); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Run all tests - *----------------------------------------------------------------------------*/ -int -main( int argc, - char * argv[] ) throw () -{ - // initialize the gst parameters - gst_init(&argc, &argv); - - if (!processArguments(argc, argv)) { - return 0; - } - - // Create the event manager and test controller - CPPUNIT_NS::TestResult controller; - - // Add a listener that colllects test result - CPPUNIT_NS::TestResultCollector result; - controller.addListener( &result ); - - // Add a listener that print dots as test run. - CPPUNIT_NS::BriefTestProgressListener progress; - controller.addListener( &progress ); - - // Add the top suite to the test runner - CPPUNIT_NS::TestRunner runner; - runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); - runner.run( controller ); - - // Print test in a compiler compatible format. - CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr ); - outputter.setLocationFormat("%p:%l:"); - outputter.write(); - - // also generate an XML document as an output - std::ofstream xmlOutFile(xmlOutFileName->c_str()); - CPPUNIT_NS::XmlOutputter xmlOutputter(&result, xmlOutFile, encoding); - xmlOutputter.setStandalone(false); - if (xsltFileName) { - xmlOutputter.setStyleSheet(*xsltFileName); - } - xmlOutputter.write(); - xmlOutFile.flush(); - xmlOutFile.close(); - - return result.wasSuccessful() ? 0 : 1; -} - - -/*------------------------------------------------------------------------------ - * Process command line arguments. - *----------------------------------------------------------------------------*/ -static bool -processArguments(int argc, char *argv[]) -{ - int i; - - while ((i = getopt_long(argc, argv, options, longOptions, 0)) != -1) { - switch (i) { - case 'h': - printUsage(argv[0], std::cout); - return false; - - case 'o': - xmlOutFileName.reset(new std::string(optarg)); - break; - - case 's': - xsltFileName.reset(new std::string(optarg)); - break; - - case 'v': - printVersion(std::cout); - return false; - - default: - printUsage(argv[0], std::cout); - return false; - } - } - - if (optind < argc) { - std::cerr << "error processing command line arguments" << std::endl; - printUsage(argv[0], std::cout); - return false; - } - - if (!xmlOutFileName) { - std::cerr << "mandatory option output file name not specified" - << std::endl; - printUsage(argv[0], std::cout); - return false; - } - - std::cerr << "writing output to '" << *xmlOutFileName << '\'' << std::endl; - if (xsltFileName) { - std::cerr << "using XSLT file '" << *xsltFileName << '\'' << std::endl; - } - - return true; -} - - -/*------------------------------------------------------------------------------ - * Print program version. - *----------------------------------------------------------------------------*/ -static void -printVersion ( std::ostream & os ) -{ - os << PACKAGE_NAME << ' ' << PACKAGE_VERSION << std::endl - << "Unit test runner" << std::endl - << copyrightNotice << std::endl; -} - - -/*------------------------------------------------------------------------------ - * Print program usage. - *----------------------------------------------------------------------------*/ -static void -printUsage ( const char invocation[], - std::ostream & os ) -{ - os << PACKAGE_NAME << ' ' << PACKAGE_VERSION << std::endl - << "Unit test runner" << std::endl - << std::endl - << "Usage: " << invocation << " [OPTION]" - << std::endl - << " mandatory options:" << std::endl - << " -o, --output=file.name write test results into this XML file" - << std::endl - << " optional options:" << std::endl - << " -s, --stylesheet specify this XSLT for the output file" - << std::endl - << " this is either an absolute URI, or a" - << std::endl - << " relative path for the output document" - << std::endl - << " -h, --help display this help and exit" << std::endl - << " -v, --version display version information and exit" - << std::endl - << std::endl - << "Report bugs to " << PACKAGE_BUGREPORT << std::endl; -} - diff --git a/campcaster/src/modules/gstreamerElements/src/autoplug.c b/campcaster/src/modules/gstreamerElements/src/autoplug.c deleted file mode 100644 index 310778727..000000000 --- a/campcaster/src/modules/gstreamerElements/src/autoplug.c +++ /dev/null @@ -1,826 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - This code is based on the examples/manual/dynamic.c sample file - provided in the gstreamer-0.8.10 source tarball, which is published - under the GNU LGPL license. - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#include - -#include "LiveSupport/GstreamerElements/autoplug.h" - - -/* =================================================== local data structures */ - -typedef struct _Typefind Typefind; - -/** - * Data structure to hold information related to typefindinf. - */ -struct _Typefind { - GstElement * pipeline; - GstElement * bin; - GstElement * source; - GstElement * typefind; - GstElement * audiosink; - GstElement * sink; - - const GstCaps * caps; - - gulong typefindSignal; - - gboolean done; -}; - -/** - * The list of factories this autoplugger is interested in. - */ -static GList * factories = 0; - -/** - * The reference count for the autoplugger, used to determine if static - * (shared) resources should be freed. - */ -static unsigned int refCount = 0; - - -/* ================================================ local constants & macros */ - - -/* =============================================== local function prototypes */ - -/** - * Handle typefinding error. - * - * @param pipeline the pipeline generating the error. - * @param source the source element with the error - * @param error the error itself. - * @param message the error message. - * @param userData user-specific data. - */ -static void -autoplug_error_handler(GstElement * pipeline, - GstElement * source, - GError * error, - gchar * message, - gpointer userData); - -/** - * Handle event of the typefinder finding a type. - * - * @param typefind the typefind element that found the type. - * @param probability the probability of the find. - * @param caps the found capabilities. - * @param userData user-specific data, a pointer to a related Typefind - * structure. - */ -static void -autoplug_typefound_handler(GstElement * typefind, - gint probability, - GstCaps * caps, - gpointer userData); - -/** - * Initialize a typefind object. - * - * @param typefind the Typefind structure to init. - * @param name the name of the topmost bin element, that will - * be returned at the end of autoplugging. - * @param caps the capabilities expected from the returned element, - * on its src pad. - */ -static void -autoplug_init(Typefind * typefind, - const gchar * name, - const GstCaps * caps); - -/** - * De-initialize a typefind object. - * - * @param typefind the Typefind structure to de-init. - */ -static void -autoplug_deinit(Typefind * typefind); - -/** - * A filter specifying the kind of factories we're interested in. - * - * @param feature the feature to test - * @param userData user-specific data - * @return TRUE if we're interested in the supplied feature, FALSE otherwise - */ -static gboolean -autoplug_feature_filter(GstPluginFeature * feature, - gpointer userData); - -/** - * A comparison function based on the ranks of two features. - * - * @param feature1 one of the features to compare. - * @param feature2 the other feature to compare. - * @return 0 if the two features match in terms of their ranks, - * <0 if feature1 is higher, >0 if feature2 is higher in - * their ranks. - */ -static gint -autoplug_compare_ranks(GstPluginFeature * feature1, - GstPluginFeature * feature2); - -/** - * Type to plug an appropriate element to a pad, according to the specified - * capabilities. - * - * @param typefind the Typefind structure to do the plugging for - * @param pad the pad to plug. - * @param caps the capabilities to plug with. - */ -static void -autoplug_try_to_plug(Typefind * typefind, - GstPad * pad, - const GstCaps * caps); - -/** - * Close a found link. - * - * @param typefind the Typefind structure to do close the link for. - * @param srcpad the source pad to close linking for. - * @param sinkelement the sink element to link the src pad to. - * @param padname the name of sink pad in sinkelement to link srcpad to. - * @param templlist a pad template list (TODO: what's this for?) - */ -static void -autoplug_close_link(Typefind * typefind, - GstPad * srcpad, - GstElement * sinkelement, - const gchar * padname, - const GList * templlist); - -/** - * Handle the event of new pads created on elements with dynamic pads. - * - * @param element the element that the new pad was created on. - * @param pad the new pad. - * @param userData user-specific data. - */ -static void -autoplug_newpad(GstElement * element, - GstPad * pad, - gpointer data); - - -/** - * Remove all typefind elements inside the bin, traversing to lower binds - * if necessary. The pads linked through the removed typefind elements are - * linked directly instead. - * The typefind member of the supplied Typefind object is also removed, - * and changed to NULL. - * - * @param typefind the typefind object to work on. - * @param bin the bin to remove the typefind elements from. - */ -static void -autoplug_remove_typefind_elements(Typefind * typefind, - GstBin * bin); - - -/* ============================================================= module code */ - -/*------------------------------------------------------------------------------ - * Filter the features that we're interested in. - *----------------------------------------------------------------------------*/ -static gboolean -autoplug_feature_filter(GstPluginFeature * feature, - gpointer userData) -{ - GstElementFactory * factory; - const gchar * klass; - guint rank; - const GList * pads; - gboolean good; - - /* we only care about element factories */ - if (!GST_IS_ELEMENT_FACTORY(feature)) { - return FALSE; - } - factory = GST_ELEMENT_FACTORY(feature); - - /* only parsers, demuxers and decoders */ - klass = gst_element_factory_get_klass(factory); - if (g_strrstr(klass, "Demux") == NULL && - g_strrstr(klass, "Decoder") == NULL && - g_strrstr(klass, "Parse") == NULL) { - - return FALSE; - } - - /* select only the factories we care about, which are enough to - * open and plug mp3, ogg vorbis and SMIL */ - good = FALSE; - for (pads = gst_element_factory_get_pad_templates(factory); - pads != NULL; - pads = pads->next) { - - GstPadTemplate * templ = GST_PAD_TEMPLATE(pads->data); - const char * mime; - - if (!GST_IS_PAD_TEMPLATE(templ)) { - continue; - } - /* find the sink template - need an always pad*/ - if (templ->direction != GST_PAD_SINK || - templ->presence != GST_PAD_ALWAYS) { - continue; - } - - if (gst_caps_get_size(templ->caps) <= 0) { - continue; - } - - mime = gst_structure_get_name(gst_caps_get_structure(templ->caps, 0)); - - if (g_strrstr(mime, "application/x-id3") - || g_strrstr(mime, "audio/mpeg") - || g_strrstr(mime, "application/ogg") - || g_strrstr(mime, "audio/x-vorbis") - || g_strrstr(mime, "application/smil")) { - - good = TRUE; - break; - } - } - - if (!good) { - return FALSE; - } - - /* only select elements with autoplugging rank */ - rank = gst_plugin_feature_get_rank(feature); - if (rank < GST_RANK_MARGINAL) { - return FALSE; - } - - return TRUE; -} - - -/*------------------------------------------------------------------------------ - * Compare the ranks of two features. - *----------------------------------------------------------------------------*/ -static gint -autoplug_compare_ranks(GstPluginFeature * feature1, - GstPluginFeature * feature2) -{ - return gst_plugin_feature_get_rank(feature2) - - gst_plugin_feature_get_rank(feature1); -} - - -/*------------------------------------------------------------------------------ - * Initialize a Typefind object, like the factories that we care about. - *----------------------------------------------------------------------------*/ -static void -autoplug_init(Typefind * typefind, - const gchar * name, - const GstCaps * caps) -{ - /* first filter out the interesting element factories */ - if (!factories) { - /* FIXME: this is not thread safe! - * but set factoires to non-zero ASAP to avoid race conditions */ - factories = (GList *) -1; - - factories = gst_registry_pool_feature_filter( - (GstPluginFeatureFilter) autoplug_feature_filter, - FALSE, NULL); - - /* sort them according to their ranks */ - factories = g_list_sort(factories, - (GCompareFunc) autoplug_compare_ranks); - } - - typefind->pipeline = gst_pipeline_new("pipeline"); - typefind->bin = gst_bin_new(name); - typefind->typefind = gst_element_factory_make("typefind", "tf"); - typefind->audiosink = gst_element_factory_make("audioconvert", "audiosink"); - typefind->sink = gst_element_factory_make("fakesink", "fakesink"); - - typefind->caps = caps; - - gst_element_add_ghost_pad(typefind->bin, - gst_element_get_pad(typefind->typefind, "sink"), - "sink"); - gst_bin_add_many(GST_BIN(typefind->bin), - typefind->typefind, - NULL); - - g_signal_connect(typefind->bin, - "error", - G_CALLBACK(autoplug_error_handler), - NULL); - typefind->typefindSignal = g_signal_connect(typefind->typefind, - "have-type", - G_CALLBACK(autoplug_typefound_handler), - typefind); - - gst_element_link(typefind->source, typefind->bin); - gst_bin_add_many(GST_BIN(typefind->pipeline), - typefind->source, - typefind->bin, - NULL); - - typefind->done = FALSE; - - ++refCount; -} - -/*------------------------------------------------------------------------------ - * De-initialize a Typefind object. - *----------------------------------------------------------------------------*/ -static void -autoplug_deinit(Typefind * typefind) -{ - --refCount; - - if (refCount == 0) { - g_list_free(factories); - factories = 0; - } - - gst_element_set_state(typefind->pipeline, GST_STATE_NULL); - if (typefind->typefind) { - g_signal_handler_disconnect(typefind->typefind, - typefind->typefindSignal); - } - - if (typefind->audiosink && !gst_element_get_parent(typefind->audiosink)) { - gst_object_unref(GST_OBJECT(typefind->audiosink)); - } - if (typefind->sink && !gst_element_get_parent(typefind->sink)) { - gst_object_unref(GST_OBJECT(typefind->sink)); - } - gst_object_unref(GST_OBJECT(typefind->pipeline)); -} - - -/*------------------------------------------------------------------------------ - * Handle the event of a new pad being created on an element with - * request pads. - *----------------------------------------------------------------------------*/ -static void -autoplug_newpad(GstElement * element, - GstPad * pad, - gpointer userData) -{ - GstCaps * caps; - Typefind * typefind = (Typefind*) userData; - - g_return_if_fail(typefind != NULL); - - GST_DEBUG("created new pad %s for element %s", - gst_pad_get_name(pad), gst_element_get_name(element)); - caps = gst_pad_get_caps(pad); - autoplug_try_to_plug(typefind, pad, caps); - gst_caps_free(caps); -} - - - -/*------------------------------------------------------------------------------ - * Close the link. - *----------------------------------------------------------------------------*/ -static void -autoplug_close_link(Typefind * typefind, - GstPad * srcpad, - GstElement * sinkelement, - const gchar * padname, - const GList * templlist) -{ - GstPad * pad; - gboolean has_dynamic_pads = FALSE; - GstElement * srcelement; - - srcelement = GST_ELEMENT(gst_pad_get_parent(srcpad)); - - GST_DEBUG("Plugging pad %s:%s to newly created %s:%s", - gst_object_get_name(GST_OBJECT(srcelement)), - gst_pad_get_name(srcpad), - gst_object_get_name(GST_OBJECT(sinkelement)), padname); - - /* add the element to the pipeline and set correct state */ - gst_bin_add(GST_BIN(typefind->bin), sinkelement); - pad = gst_element_get_pad(sinkelement, padname); - - gst_pad_link(srcpad, pad); - - /* FIXME: this is a nasty workaround for lack of time - * the minimalaudiosmil will try to read the input immediately - * from it sink pad as its set to PLAYING state, - * but that will result in a zillion such gstreamer warnings: - * "deadlock detected, disabling group 0xXXXXXX" - * but for example the vorbis demuxer needs to be in PLAYING - * state so that it can dynamically connect its request pads. - * fix this as soon as possible! - */ - if (!(g_strrstr(gst_object_get_name(GST_OBJECT(srcelement)), - "minimalaudiosmil") - || g_strrstr(gst_object_get_name(GST_OBJECT(sinkelement)), - "minimalaudiosmil"))) { - - gst_bin_sync_children_state(GST_BIN(typefind->bin)); - } - - /* if we have static source pads, link those. If we have dynamic - * source pads, listen for new-pad signals on the element */ - for ( ; templlist != NULL; templlist = templlist->next) { - GstPadTemplate *templ = GST_PAD_TEMPLATE (templlist->data); - - /* only sourcepads, no request pads */ - if (templ->direction != GST_PAD_SRC || - templ->presence == GST_PAD_REQUEST) { - continue; - } - - switch (templ->presence) { - case GST_PAD_ALWAYS: { - GstPad * pad = gst_element_get_pad(sinkelement, - templ->name_template); - GstCaps * caps = gst_pad_get_caps(pad); - - /* link */ - autoplug_try_to_plug(typefind, pad, caps); - gst_caps_free(caps); - } break; - - case GST_PAD_SOMETIMES: - has_dynamic_pads = TRUE; - break; - - default: - break; - } - } - - /* listen for newly created pads if this element supports that */ - if (has_dynamic_pads) { - g_signal_connect(sinkelement, - "new-pad", - G_CALLBACK(autoplug_newpad), - typefind); - } -} - - -/*------------------------------------------------------------------------------ - * Try to plug a pad with the specified capabilities. - *----------------------------------------------------------------------------*/ -static void -autoplug_try_to_plug(Typefind * typefind, - GstPad * pad, - const GstCaps * caps) -{ - GstObject * parent = GST_OBJECT(gst_pad_get_parent(pad)); - const gchar * mime; - const GList * item; - - g_return_if_fail(typefind != NULL); - - /* don't plug if we're already plugged */ - if (GST_PAD_IS_LINKED(gst_element_get_pad(typefind->audiosink, "sink"))) { - GST_DEBUG("Omitting link for pad %s:%s because we're already linked", - gst_object_get_name(parent), gst_pad_get_name(pad)); - return; - } - - /* as said above, we only try to plug audio... Omit video */ - mime = gst_structure_get_name(gst_caps_get_structure(caps, 0)); - if (g_strrstr(mime, "video")) { - GST_DEBUG("Omitting link for pad %s:%s because " - "mimetype %s is non-audio\n", - gst_object_get_name(parent), gst_pad_get_name(pad), mime); - return; - } - - /* can it link to the audiopad? */ - /* instead of doing a gst_caps_intersect between caps and the sink - * pad caps of typefind->audiosink, just look at the mime type of caps. - * this is sufficient, as we know that we're linking to an audioconvert - * element, that accepts audio/x-raw-int and audio/x-raw-float */ - if (g_strrstr(mime, "audio/x-raw-int") - || g_strrstr(mime, "audio/x-raw-float")) { - - GST_DEBUG("Found pad to link to audiosink - plugging is now done"); - typefind->done = TRUE; - - autoplug_close_link(typefind, pad, typefind->audiosink, "sink", NULL); - - gst_element_add_ghost_pad(typefind->bin, - gst_element_get_pad(typefind->audiosink, "src"), - "src"); - gst_element_link_filtered(typefind->bin, typefind->sink, - typefind->caps); - gst_bin_add(GST_BIN(typefind->pipeline), typefind->sink); - gst_bin_sync_children_state(GST_BIN(typefind->pipeline)); - - return; - } - - /* try to plug from our list */ - for (item = factories; item != NULL; item = item->next) { - GstElementFactory * factory = GST_ELEMENT_FACTORY(item->data); - const GList * pads; - GstCaps * res; - - for (pads = gst_element_factory_get_pad_templates(factory); - pads != NULL; - pads = pads->next) { - GstPadTemplate * templ = GST_PAD_TEMPLATE(pads->data); - const gchar * templMime; - - if (!GST_IS_PAD_TEMPLATE(templ)) { - continue; - } - /* find the sink template - need an always pad*/ - if (templ->direction != GST_PAD_SINK || - templ->presence != GST_PAD_ALWAYS) { - continue; - } - - /* first check if mime types match */ - templMime = gst_structure_get_name( - gst_caps_get_structure(templ->caps, 0)); - if (!g_strrstr(mime, templMime)) { - continue; - } - /* can it link? */ - res = gst_caps_intersect(caps, templ->caps); - if (res && !gst_caps_is_empty(res)) { - GstElement * element; - const GList * padTemplates; - gchar * templateName; - - /* close link and return */ - gst_caps_free(res); - templateName = g_strdup(templ->name_template); - element = gst_element_factory_create(factory, NULL); - padTemplates = gst_element_factory_get_pad_templates(factory); - autoplug_close_link(typefind, - pad, - element, - templateName, - padTemplates); - g_free(templateName); - return; - } - gst_caps_free(res); - - /* we only check one sink template per factory, so move on to the - * next factory now */ - break; - } - } - - /* if we get here, no item was found */ - GST_DEBUG("No compatible pad found to decode %s on %s:%s", - mime, gst_object_get_name(parent), gst_pad_get_name(pad)); -} - - -/*------------------------------------------------------------------------------ - * Handle the event when a new type was found. - *----------------------------------------------------------------------------*/ -static void -autoplug_typefound_handler(GstElement * typefind, - gint probability, - GstCaps * caps, - gpointer userData) -{ - gchar * str; - Typefind * tf = (Typefind*) userData; - - g_return_if_fail(tf != NULL); - - str = gst_caps_to_string(caps); - GST_DEBUG("Detected media type %s", str); - g_free(str); - - /* actually plug now */ - autoplug_try_to_plug(tf, gst_element_get_pad(typefind, "src"), caps); -} - - -/*------------------------------------------------------------------------------ - * Filter the features that we're interested in. - *----------------------------------------------------------------------------*/ -static void -autoplug_error_handler(GstElement * pipeline, - GstElement * source, - GError * error, - gchar * message, - gpointer userData) -{ - /* TODO: handle error somehow */ - GST_DEBUG("error: %s", message); -} - - -/*------------------------------------------------------------------------------ - * Remove all typefind elements inside the bin, traversing to lower binds - * if necessary. The pads linked to the removed typefind elements are - * linked directly instead. - *----------------------------------------------------------------------------*/ -static void -autoplug_remove_typefind_elements(Typefind * typefind, - GstBin * bin) -{ - GstElement * element; - const GList * elements; - - elements = gst_bin_get_list(GST_BIN(bin)); - while (elements) { - GstElementFactory * factory; - GType type; - - element = (GstElement*) elements->data; - factory = gst_element_get_factory(element); - type = gst_element_factory_get_element_type(factory); - - GST_DEBUG("found factory: %s of type %s, is bin: %d", - gst_element_factory_get_longname(factory), - g_type_name(type), - g_type_is_a(type, GST_TYPE_BIN)); - - if (GST_IS_BIN(element)) { - autoplug_remove_typefind_elements(typefind, GST_BIN(element)); - } else if (g_strrstr(gst_element_factory_get_longname(factory), - "TypeFind")) { - GstPad * tfSinkPad; - GstPad * tfSrcPad; - GstPad * sinkPad; - GstElement * sinkElement; - GstPad * srcPad; - GstElement * srcElement; - GstElement * parent; - GstPad * parentSrcPad; - GstPad * parentSinkPad; - - tfSinkPad = gst_element_get_pad(element, "sink"); - tfSrcPad = gst_element_get_pad(element, "src"); - sinkPad = gst_pad_get_peer(tfSrcPad); - sinkElement = gst_pad_get_parent(sinkPad); - srcPad = gst_pad_get_peer(tfSinkPad); - srcElement = gst_pad_get_parent(srcPad); - parent = (GstElement*) gst_element_get_parent(element); - parentSrcPad = gst_element_get_pad(parent, "src"); - parentSinkPad = gst_element_get_pad(parent, "sink"); - - gst_element_unlink(srcElement, element); - gst_element_unlink(element, sinkElement); - - if (GST_PAD_REALIZE(parentSrcPad) == (GstRealPad*) tfSrcPad) { - /* if the pad we want to relink is ghosted by the container */ - gst_element_remove_pad(parent, parentSrcPad); - gst_element_add_ghost_pad(parent, srcPad, "src"); - gst_element_link(parent, sinkElement); - } else if (GST_PAD_REALIZE(parentSinkPad) == - (GstRealPad*) tfSinkPad) { - /* if the pad we want to relink is ghosted by the container */ - gst_element_remove_pad(parent, parentSinkPad); - gst_element_add_ghost_pad(parent, sinkPad, "sink"); - gst_element_link(srcElement, parent); - } else { - gst_element_link(srcElement, sinkElement); - } - - gst_bin_remove(bin, element); - - if (element == typefind->typefind) { - typefind->typefind = NULL; - } - - /* start iteration from the beginning, as probably the element - * list is invalidated with us removing the typefind element */ - elements = gst_bin_get_list(GST_BIN(bin)); - continue; - } - - elements = elements->next; - } -} - - -/*------------------------------------------------------------------------------ - * Filter the features that we're interested in. - *----------------------------------------------------------------------------*/ -GstElement * -ls_gst_autoplug_plug_source(GstElement * source, - const gchar * name, - const GstCaps * caps) -{ - Typefind typefind; - GstElement * bin; - GValue gvalue = { 0 }; - - /* add an additional ref on the source, as we'll put it in a bin - * and remove it from the bin later, which will decrease the ref by one */ - g_object_ref(source); - - typefind.source = source; - autoplug_init(&typefind, name, caps); - - gst_element_set_state(typefind.audiosink, GST_STATE_PAUSED); - gst_element_set_state(typefind.sink, GST_STATE_PAUSED); - gst_element_set_state(typefind.bin, GST_STATE_PLAYING); - gst_element_set_state(typefind.pipeline, GST_STATE_PLAYING); - - /* run */ - while (!typefind.done && gst_bin_iterate(GST_BIN(typefind.pipeline))); - - /* do an extra iteration, otherwise some gstreamer elements don't get - * properly initialized, like the vorbis element. - * see http://bugs.campware.org/view.php?id=1421 for details */ - g_value_init(&gvalue, G_TYPE_STRING); - gst_element_get_property(typefind.typefind, "caps", &gvalue); - if (g_strrstr("application/ogg", g_value_get_string(&gvalue))) { - gst_bin_iterate(GST_BIN(typefind.pipeline)); - } - - if (!typefind.done) { - autoplug_deinit(&typefind); - return NULL; - } - - /* remove the sink element */ - gst_element_unlink(typefind.bin, typefind.sink); - gst_bin_remove(GST_BIN(typefind.pipeline), typefind.sink); - typefind.sink = NULL; - - /* remove the typefind elements, and re-link with the source */ - autoplug_remove_typefind_elements(&typefind, GST_BIN(typefind.bin)); - gst_element_link(typefind.source, typefind.bin); - - /* destory the pipeline, but keep source and bin */ - g_object_ref(typefind.bin); - gst_bin_remove(GST_BIN(typefind.pipeline), typefind.bin); - - bin = typefind.bin; - - autoplug_deinit(&typefind); - - gst_element_set_state(bin, GST_STATE_PAUSED); - gst_bin_sync_children_state(GST_BIN(bin)); - - return bin; -} - - -/*------------------------------------------------------------------------------ - * Return the current position of an autoplugged element - *----------------------------------------------------------------------------*/ -gint64 -ls_gst_autoplug_get_position(GstElement * element) -{ - GstFormat format; - gint64 position; - - if (!element || !GST_IS_BIN(element)) { - return 0LL; - } - - format = GST_FORMAT_TIME; - if (!gst_element_query(element, GST_QUERY_POSITION, &format, &position) - || format != GST_FORMAT_TIME) { - return 0LL; - } - - return position; -} - diff --git a/campcaster/src/modules/gstreamerElements/src/minimal-audio-smil.c b/campcaster/src/modules/gstreamerElements/src/minimal-audio-smil.c deleted file mode 100644 index f2789f706..000000000 --- a/campcaster/src/modules/gstreamerElements/src/minimal-audio-smil.c +++ /dev/null @@ -1,1028 +0,0 @@ -/*------------------------------------------------------------------------------ - - Copyright (c) 2004 Media Development Loan Fund - - This file is part of the Campcaster project. - http://campcaster.campware.org/ - To report bugs, send an e-mail to bugs@campware.org - - Campcaster is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Campcaster 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Campcaster; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - - Author : $Author$ - Version : $Revision$ - Location : $URL$ - -------------------------------------------------------------------------------*/ - -/* ============================================================ include files */ - -#ifdef HAVE_CONFIG_H -#include "configure.h" -#endif - -#ifdef HAVE_STRING_H -#include -#else -#error need string.h -#endif - - -#include - -#include -#include - -#include "smil-util.h" -#include "minimal-audio-smil.h" - - -/* =================================================== local data structures */ - - -enum { - ARG_0, - ARG_ABORT -}; - - -/** - * ElementFactory information - */ -static GstElementDetails livesupport_minimal_audio_smil_details = - GST_ELEMENT_DETAILS("MinimalAudioSmil", - "Parse/Smil", - "A minimal SMIL player, supporting only audio", - "Akos Maroy "); - -/** - * The parent class. - */ -static GstBinClass * parent_class = NULL; - -/** - * Declaration of the sink pad factory. - */ -static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( - "sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS("application/smil")); - -/** - * Declaration of the source pad factory. - */ -static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ( - "src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS("audio/x-raw-int, " - "width = (int) 16, " - "depth = (int) 16, " - "endianness = (int) BYTE_ORDER, " - "channels = (int) { 1, 2 }, " - "rate = (int) [ 8000, 96000 ]")); - - - -/* ================================================ local constants & macros */ - -#define NSEC_PER_SEC_FLOAT 1000000000.0 - - -#define UNREF_IF_NOT_NULL(gst_object) \ -{ \ - if ((gst_object)) { \ - gst_object_unref(GST_OBJECT(gst_object)); \ - } \ -} - -/** - * The debug definition. - */ -GST_DEBUG_CATEGORY_STATIC(minimal_audio_smil_debug); - -/** - * The plugin definition. - */ -GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "minimalaudiosmil", - "Minimal Audio-only SMIL", - plugin_init, - "$Revision$", - "GPL", - "LiveSupport", - "http://campcaster.campware.org/") - - -/* =============================================== local function prototypes */ - -static void -livesupport_minimal_audio_smil_set_property( GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec ); - - -/** - * Read the sink stream into memory, using a oneshotreader element. - * - * @param smil a MinimalAudioSmil object. - * @param outbuffer the buffer containing the contents of the sink stream. - * (out parameter). must be freed by g_free() after no longer needed. - * @param outlength the length of outbuffer (an out parameter). - */ -static void -read_stream_into_memory(LivesupportMinimalAudioSmil * smil, - guint8 ** outbuffer, - guint32 * outlength); - -/** - * Return the the first "" element of an XML document. - * - * @param document the XML document to return the root element for. - * @return the "" element closes to the document root, - * or NULL if no "" element found. - */ -static xmlNode * -get_body_element(xmlDocPtr document); - -/** - * Handle an "" element. - * - * @param smil a MinimalAudioSmil object. - * @param bin the container to put all the generated elements in. - * @param offset the offset in nanoseconds that the animation should - * begin at. this is usually the begin="xx" attribute value - * of the containing element. - * @param animate the "" element to handle. - * @param namePrefix name prefix to use for generated gstreamer element - * names - * @param index the index of the "" element with respect to it's - * containing element. - * @return a gstreamer element, that if linked after the containing SMIL - * element, performs the animation described by the "" - * SMIL element - */ -static GstElement * -handle_animate_element(LivesupportMinimalAudioSmil * smil, - GstBin * bin, - gint64 offset, - xmlNode * animate, - const gchar * namePrefix, - int index); - -/** - * Signal handler for the eos event of a gstreamer element. - * The handler will set the gstreamer element pointed to by userData - * to eos as well. - * - * @param element the element emitting the eos signal - * @param userData pointer to a gstreamer element to put into eos state. - */ -static void -element_eos_signal_handler(GstElement * element, - gpointer userData); - -/** - * Handle an "