summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2011-01-21 16:32:55 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2011-01-21 16:32:55 +0200
commita8276f00f96ea322dd2aaf6d1b2e2861640df832 (patch)
tree6b2a7fb706965471c189aecae6b49a8f0a84a1f1
parentfd62e23f6ffcd7cf3e13d71ca3c301f45d3aa567 (diff)
Use the variadic Bin::add() method in a few places to give a good example to users.
-rw-r--r--examples/recorder/main.cpp5
-rw-r--r--tests/manual/qwidgetvideosinktest.cpp3
2 files changed, 2 insertions, 6 deletions
diff --git a/examples/recorder/main.cpp b/examples/recorder/main.cpp
index 5ec00d0..66c31a4 100644
--- a/examples/recorder/main.cpp
+++ b/examples/recorder/main.cpp
@@ -245,10 +245,7 @@ void Recorder::start()
sink->setProperty("location", m_ui.outputFileEdit->text());
m_pipeline = QGst::Pipeline::create();
- m_pipeline->add(audioSrcBin);
- m_pipeline->add(videoSrcBin);
- m_pipeline->add(mux);
- m_pipeline->add(sink);
+ m_pipeline->add(audioSrcBin, videoSrcBin, mux, sink);
//link elements
QGst::PadPtr audioPad = mux->getRequestPad("sink_%d");
diff --git a/tests/manual/qwidgetvideosinktest.cpp b/tests/manual/qwidgetvideosinktest.cpp
index d0da26f..06bb5d0 100644
--- a/tests/manual/qwidgetvideosinktest.cpp
+++ b/tests/manual/qwidgetvideosinktest.cpp
@@ -57,8 +57,7 @@ QWidgetVideoSinkTest::QWidgetVideoSinkTest(QWidget *parent, Qt::WindowFlags f)
throw std::runtime_error("Unable to initialize the required elements");
}
- m_pipeline->add(src);
- m_pipeline->add(m_sink);
+ m_pipeline->add(src, m_sink);
src->link(m_sink);
//GValue of G_TYPE_POINTER can only be set as void* in the bindings