Switch toolbar animation to opacity
[harmattan/cameraplus] / lib / qtcamdevice.cpp
index bf9dd54..38da29b 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 #include "qtcammode.h"
 #include "qtcamimagemode.h"
 #include "qtcamvideomode.h"
-
-// TODO: we want the ability to change the image and video gep from the app.
+#include "qtcamnotifications.h"
+#include "gst/gstcopy.h"
+#include "qtcampropertysetter.h"
+#include "qtcamanalysisbin.h"
 
 QtCamDevice::QtCamDevice(QtCamConfig *config, const QString& name,
                         const QVariant& id, QObject *parent) :
   QObject(parent), d_ptr(new QtCamDevicePrivate) {
 
+  static gboolean register_copy = TRUE;
+  if (register_copy) {
+    qt_cam_copy_register();
+    register_copy = FALSE;
+  }
+
   d_ptr->q_ptr = this;
   d_ptr->name = name;
   d_ptr->id = id;
@@ -46,8 +54,18 @@ QtCamDevice::QtCamDevice(QtCamConfig *config, const QString& name,
     return;
   }
 
+  d_ptr->propertySetter = new QtCamPropertySetter(d_ptr);
+
   d_ptr->createAndAddElement(d_ptr->conf->audioSource(), "audio-source", "QtCameraAudioSrc");
-  d_ptr->createAndAddVideoSource();
+  if (!d_ptr->conf->wrapperVideoSource().isEmpty() &&
+      !d_ptr->conf->wrapperVideoSourceProperty().isEmpty()) {
+    d_ptr