Refactor and rename isWrapperReady to isReadyForCapture()
[harmattan/cameraplus] / lib / qtcamdevice_p.h
index 3334cb4..b0cb65d 100644 (file)
@@ -181,13 +181,18 @@ public:
     }
   }
 
-  bool isWrapperReady() {
-    if (!wrapperVideoSource) {
+  bool isReadyForCapture() {
+    GstElement *src = videoSource;
+    if (wrapperVideoSource) {
+      src = wrapperVideoSource;
+    }
+
+    if (!src) {
       return false;
     }
 
     gboolean ready = FALSE;
-    g_object_get(wrapperVideoSource, "ready-for-capture", &ready, NULL);
+    g_object_get(src, "ready-for-capture", &ready, NULL);
 
     return ready == TRUE;
   }