[gstreamermm] Tests: replace plugins from gst-plugins-good by core plugins
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Tests: replace plugins from gst-plugins-good by core plugins
- Date: Thu, 26 Feb 2015 02:02:20 +0000 (UTC)
commit 45c16c84f710cbdac6ab58802b240ae1b843ee46
Author: Marcin Kolny <marcin kolny gmail com>
Date: Thu Feb 26 02:58:04 2015 +0100
Tests: replace plugins from gst-plugins-good by core plugins
Minimum requirement to build gstreamermm in maintainer mode is gstreamer
and gst-plugins-base. So plugins from other packages can't be used in
tests. Moreover, core plugins are sufficient for tests.
* tests/regression/test-regression-bininpipeline.cc: replace jpg codecs with
queues.
* tests/regression/test-regression-binplugin.cc: jpg encoder is replaced
with queue.
* tests/regression/test-regression-seekonstartup.cc: replace
autovideosink with ximagesink plugin.
* tests/test-caps.cc: use capsfilter instead of multifilesrc.
tests/regression/test-regression-bininpipeline.cc | 20 ++++++++++----------
tests/regression/test-regression-binplugin.cc | 2 +-
tests/regression/test-regression-seekonstartup.cc | 2 +-
tests/test-caps.cc | 2 +-
4 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/tests/regression/test-regression-bininpipeline.cc
b/tests/regression/test-regression-bininpipeline.cc
index 11c6e7f..2f2dcea 100644
--- a/tests/regression/test-regression-bininpipeline.cc
+++ b/tests/regression/test-regression-bininpipeline.cc
@@ -18,20 +18,20 @@ class CustomBin : public Bin
{
private:
RefPtr<FileSrc> source_file;
- RefPtr<Element> png_decoder;
+ RefPtr<Element> queue;
RefPtr<GhostPad> src_pad;
protected:
explicit CustomBin(const Glib::ustring& name)
: Bin(name)
{
source_file = FileSrc::create("source-file");
- png_decoder = ElementFactory::create_element("pngdec");
+ queue = ElementFactory::create_element("queue");
add(source_file);
- add(png_decoder);
- source_file->link(png_decoder);
+ add(queue);
+ source_file->link(queue);
- src_pad = add_ghost_pad(png_decoder, "src", "src");
+ src_pad = add_ghost_pad(queue, "src", "src");
src_pad->set_active(true);
}
public:
@@ -69,7 +69,7 @@ bool on_bus_message(const RefPtr<Bus>&, const Glib::RefPtr<Message>& message)
return true;
}
-TEST(BinInPipelineRegressionTest,
CustomBinShouldCorrectEncodeImageAndOtherElementsShouldEncodeItToJPGAndWriteToFile)
+TEST(BinInPipelineRegressionTest, CustomBinShouldCorrectPassThroughImage)
{
Glib::ustring input_png = "resources/input-image.png",
output_jpg = "resources/test-regression-bininpipeline-output-image.jpg";
@@ -78,15 +78,15 @@ TEST(BinInPipelineRegressionTest, CustomBinShouldCorrectEncodeImageAndOtherEleme
ASSERT_TRUE(mainloop);
RefPtr<CustomBin> custom_bin = CustomBin::create("file-png-decoder");
ASSERT_TRUE(custom_bin);
- RefPtr<Element> jpg_encoder = ElementFactory::create_element("jpegenc");
- ASSERT_TRUE(jpg_encoder);
+ RefPtr<Element> queue = ElementFactory::create_element("queue");
+ ASSERT_TRUE(queue);
RefPtr<FileSink> file_sink = FileSink::create("file-sink");
ASSERT_TRUE(file_sink);
RefPtr<Pipeline> pipeline = Pipeline::create("image-converter-pipeline");
ASSERT_TRUE(custom_bin);
- ASSERT_NO_THROW(pipeline->add(custom_bin)->add(jpg_encoder)->add(file_sink));
- ASSERT_NO_THROW(custom_bin->link(jpg_encoder)->link(file_sink));
+ ASSERT_NO_THROW(pipeline->add(custom_bin)->add(queue)->add(file_sink));
+ ASSERT_NO_THROW(custom_bin->link(queue)->link(file_sink));
Glib::RefPtr<Gst::Bus> bus = pipeline->get_bus();
ASSERT_TRUE(bus);
diff --git a/tests/regression/test-regression-binplugin.cc b/tests/regression/test-regression-binplugin.cc
index e17f3e6..5a25f68 100644
--- a/tests/regression/test-regression-binplugin.cc
+++ b/tests/regression/test-regression-binplugin.cc
@@ -48,7 +48,7 @@ TEST(BinPluginRegressionTest, DISABLED_ShouldDecodeAndEncodeFile)
ASSERT_TRUE(mainloop);
RefPtr<Element> pluginbin = Gst::ElementFactory::create_element("pluginbin", "sample-pluginbin");
ASSERT_TRUE(pluginbin);
- RefPtr<Element> jpg_encoder = ElementFactory::create_element("jpegenc");
+ RefPtr<Element> jpg_encoder = ElementFactory::create_element("queue");
ASSERT_TRUE(jpg_encoder);
RefPtr<FileSink> file_sink = FileSink::create("file-sink");
ASSERT_TRUE(file_sink);
diff --git a/tests/regression/test-regression-seekonstartup.cc
b/tests/regression/test-regression-seekonstartup.cc
index 4dc17e5..5e0fb82 100644
--- a/tests/regression/test-regression-seekonstartup.cc
+++ b/tests/regression/test-regression-seekonstartup.cc
@@ -126,7 +126,7 @@ TEST(RegressionSeekOnStartupTest, SeekToPositionWhenPipelineStarts)
RefPtr<Element> src = ElementFactory::create_element("uridecodebin"),
csp = ElementFactory::create_element("videoconvert"),
vs = ElementFactory::create_element("videoscale"),
- sink = ElementFactory::create_element("autovideosink");
+ sink = ElementFactory::create_element("ximagesink");
ASSERT_TRUE(src);
ASSERT_TRUE(csp);
diff --git a/tests/test-caps.cc b/tests/test-caps.cc
index f3bed1d..d35b0bd 100644
--- a/tests/test-caps.cc
+++ b/tests/test-caps.cc
@@ -103,7 +103,7 @@ TEST_F(CapsTest, GetNonExistingValue)
TEST_F(CapsTest, SetCapsToElement)
{
- Glib::RefPtr<Element> element = ElementFactory::create_element("multifilesrc", "source");
+ Glib::RefPtr<Element> element = ElementFactory::create_element("capsfilter", "filter");
const char* str_caps = "image/jpeg, framerate=(fraction)2/1";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]