summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <kiagiadakis.george@gmail.com>2009-07-13 21:58:08 +0300
committerGeorge Kiagiadakis <kiagiadakis.george@gmail.com>2009-07-13 21:58:08 +0300
commit0454aaf42bf98a4ab7077d19e7df3e6db34316cf (patch)
treed3c2c65445f852f4093815742dea239732344aca /examples
parent7122b21913b9aae30d05841acfcf37db0826d4a7 (diff)
Move to shared pointer architecture.
All classes now have protected contructors and static functions that act as constructors returning a QSharedPointer holding the class instance. All QObject parents where dropped as they don't make sense with this architecture.
Diffstat (limited to 'examples')
-rw-r--r--examples/echo/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/echo/main.cpp b/examples/echo/main.cpp
index f91b5f0..f5ac3da 100644
--- a/examples/echo/main.cpp
+++ b/examples/echo/main.cpp
@@ -34,19 +34,19 @@ int main(int argc, char **argv)
QCoreApplication app(argc, argv);
qGstInit(&argc, &argv);
- QGstPipeline pipeline;
+ QGstPipelinePtr pipeline = QGstPipeline::newPipeline();
- QGstElement *src = QGstElementFactory::make("autoaudiosrc");
- QGstElement *sink = QGstElementFactory::make("autoaudiosink");
+ QGstElementPtr src = QGstElementFactory::make("autoaudiosrc");
+ QGstElementPtr sink = QGstElementFactory::make("autoaudiosink");
- pipeline << src << sink;
+ *pipeline << src << sink;
QGstElement::link(src, sink);
- pipeline.setState(QGstElement::Playing);
+ pipeline->setState(QGstElement::Playing);
signal(SIGINT, sighandler);
int result = app.exec();
- pipeline.setState(QGstElement::Null);
+ pipeline->setState(QGstElement::Null);
return result;
}