#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>
+#ifndef ENCODER
+#define ENCODER "lamemp3enc"
+#endif
+
#ifndef GST_DISABLE_PARSE
GST_START_TEST (test_format)
pipe_str = g_strdup_printf ("audiotestsrc num-buffers=1 "
"! audio/x-raw, rate=22050, channels=1 "
- "! lamemp3enc bitrate=24 ! audio/mpeg,rate=22050 ! fakesink");
+ "! " ENCODER " bitrate=24 ! audio/mpeg,rate=22050 ! fakesink");
bin = gst_parse_launch (pipe_str, &error);
fail_unless (bin != NULL, "Error parsing pipeline: %s",
pipe_str = g_strdup_printf ("audiotestsrc num-buffers=1 "
"! audio/x-raw,rate=48000,channels=1 "
"! audioresample "
- "! lamemp3enc ! audio/mpeg,rate=(int){22050,44100} ! fakesink");
+ "! " ENCODER " ! audio/mpeg,rate=(int){22050,44100} ! fakesink");
bin = gst_parse_launch (pipe_str, &error);
fail_unless (bin != NULL, "Error parsing pipeline: %s",
static Suite *
lame_suite (void)
{
- Suite *s = suite_create ("lame");
+ Suite *s = suite_create (ENCODER);
TCase *tc_chain = tcase_create ("general");
suite_add_tcase (s, tc_chain);
--- /dev/null
+/* GStreamer unit test for twolame
+ * Copyright (C) 2007 Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/* pretty lame, I know */
+#define ENCODER "twolamemp2enc"
+#include "lame.c"