Set media.name to '*'.
[harmattan/cameraplus] / lib / qtcamscanner.cpp
index 95f3b4d..2a56139 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
@@ -40,13 +40,13 @@ public:
 
 void QtCamScannerPrivate::scanEnum() {
   // Too bad there's no way to get the values of an enum without creating the element :(
-  GstElement *elem = gst_element_factory_make(conf->videoSource().toAscii(), NULL);
+  GstElement *elem = gst_element_factory_make(conf->videoSource().toLatin1(), NULL);
   if (!elem) {
     return;
   }
 
   GParamSpec *spec = g_object_class_find_property(G_OBJECT_GET_CLASS(elem),
-                                                 conf->deviceScannerProperty().toAscii());
+                                                 conf->deviceScannerProperty().toLatin1());
   if (!spec) {
     gst_object_unref(elem);
     return;
@@ -82,7 +82,7 @@ void QtCamScannerPrivate::scanV4l2() {
     struct v4l2_capability cap;
     memset(&cap, 0x0, sizeof(cap));
 
-    int fd = open(dev.toLocal8Bit().data(), O_RDONLY);
+    int fd = open(dev.toLocal8Bit().constData(), O_RDONLY);
     if (fd == -1) {
       continue;
     }