[gstreamermm] Gst::Pipeline: wrapped missing enums, added simple test



commit 7ff7799f8b879db6a0e3f8b17215f513bcf31bcf
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Thu Aug 14 13:42:47 2014 +0200

    Gst::Pipeline: wrapped missing enums, added simple test
    
        * gstreamer/src/pipeline.hg: wrapped PipelineFlags enum
        * tests/Makefile.am:
        * tests/test-pipeline.cc: added very simple test
        * .gitignore: added pipeline output file to ignored list

 .gitignore                |    1 +
 gstreamer/src/pipeline.hg |    3 ++-
 tests/Makefile.am         |    2 ++
 tests/test-pipeline.cc    |   20 ++++++++++++++++++++
 4 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a6a385b..84eb5bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -486,6 +486,7 @@ tests/test-ghostpad
 tests/test-init
 tests/test-miniobject
 tests/test-pad
+tests/test-pipeline
 tests/test-query
 tests/test-structure
 tests/test-taglist
diff --git a/gstreamer/src/pipeline.hg b/gstreamer/src/pipeline.hg
index f31ee75..13e28cb 100644
--- a/gstreamer/src/pipeline.hg
+++ b/gstreamer/src/pipeline.hg
@@ -24,6 +24,7 @@ _DEFS(gstreamermm,gst)
 
 namespace Gst
 {
+_WRAP_ENUM(GstPipelineFlags, PipelineFlags)
 
 class Bus;
 
@@ -74,7 +75,7 @@ class Bus;
  * PAUSED and resumed as well as set the new stream time to 0 when the seek
  * succeeded.
  *
- * Last reviewed on 2006-03-12 (0.10.5)
+ * Last reviewed on 2014-08-14 (1.2.4)
  * @ingroup GstBaseClasses
  */
 class Pipeline : public Bin 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 25fdef5..33a442f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,6 +26,7 @@ check_PROGRAMS = test-caps test-buffer test-bus test-caps test-pad \
                  test-query test-structure test-taglist test-plugin-appsink \
                  test-plugin-appsrc test-plugin-register test-plugin-pushsrc \
                  test-regression-bininpipeline test-regression-binplugin \
+                 test-pipeline \
                  test-regression-rewritefile test-regression-seekonstartup \
                  test-regression-videoduration
 
@@ -44,6 +45,7 @@ test_ghostpad_SOURCES         = test-ghostpad.cc $(TEST_MAIN_SOURCE)
 test_init_SOURCES                      = test-init.cc $(TEST_MAIN_SOURCE)
 test_miniobject_SOURCES                = test-miniobject.cc $(TEST_MAIN_SOURCE)
 test_pad_SOURCES                       = test-pad.cc $(TEST_MAIN_SOURCE)
+test_pipeline_SOURCES                  = test-pipeline.cc $(TEST_MAIN_SOURCE)
 test_query_SOURCES                     = test-query.cc $(TEST_MAIN_SOURCE)
 test_structure_SOURCES         = test-structure.cc $(TEST_MAIN_SOURCE)
 test_taglist_SOURCES           = test-taglist.cc $(TEST_MAIN_SOURCE)
diff --git a/tests/test-pipeline.cc b/tests/test-pipeline.cc
new file mode 100644
index 0000000..9e23ec9
--- /dev/null
+++ b/tests/test-pipeline.cc
@@ -0,0 +1,20 @@
+/*
+ * test-pipeline.cc
+ *
+ *  Created on: Aug 14, 2014
+ *      Author: m.kolny
+ */
+
+#include <gtest/gtest.h>
+#include <gstreamermm.h>
+
+using namespace Gst;
+
+TEST(PipelineTest, ShouldCorrectCreatePipelineWithSpecyficName)
+{
+  Glib::ustring name = "pipeline-name";
+  Glib::RefPtr<Pipeline> pipeline = Pipeline::create(name);
+
+  ASSERT_STREQ(name.c_str(), pipeline->get_name().c_str());
+  ASSERT_EQ(1, pipeline->get_refcount());
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]