mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tests: add basic unit test for twolame as well
This commit is contained in:
parent
60b6128d0c
commit
9cc395a589
5 changed files with 46 additions and 3 deletions
|
@ -281,6 +281,12 @@ else
|
|||
check_taglib =
|
||||
endif
|
||||
|
||||
if USE_TWOLAME
|
||||
check_twolame = pipelines/twolame
|
||||
else
|
||||
check_twolame =
|
||||
endif
|
||||
|
||||
if USE_PLUGIN_UDP
|
||||
check_udp = \
|
||||
elements/udpsink \
|
||||
|
@ -391,6 +397,7 @@ check_PROGRAMS = \
|
|||
$(check_soup) \
|
||||
$(check_spectrum) \
|
||||
$(check_taglib) \
|
||||
$(check_twolame) \
|
||||
$(check_udp) \
|
||||
$(check_videobox) \
|
||||
$(check_videocrop) \
|
||||
|
|
|
@ -155,3 +155,11 @@
|
|||
fun:gst_lamemp3enc_sink_event
|
||||
}
|
||||
|
||||
{
|
||||
<twolame Conditional jump or move depends on uninitialised values>
|
||||
Memcheck:Cond
|
||||
...
|
||||
fun:psycho_3
|
||||
fun:encode_frame
|
||||
}
|
||||
|
||||
|
|
2
tests/check/pipelines/.gitignore
vendored
2
tests/check/pipelines/.gitignore
vendored
|
@ -1,6 +1,8 @@
|
|||
.dirstamp
|
||||
effectv
|
||||
flacdec
|
||||
lame
|
||||
twolame
|
||||
simple-launch-lines
|
||||
tagschecking
|
||||
wavenc
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#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)
|
||||
|
@ -35,7 +39,7 @@ 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",
|
||||
|
@ -76,7 +80,7 @@ GST_START_TEST (test_caps_proxy)
|
|||
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",
|
||||
|
@ -111,7 +115,7 @@ GST_END_TEST;
|
|||
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);
|
||||
|
|
22
tests/check/pipelines/twolame.c
Normal file
22
tests/check/pipelines/twolame.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* 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"
|
Loading…
Reference in a new issue