projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move qt_cam_copy_register to QtCamera
[harmattan/cameraplus]
/
lib
/
qtcamdevice_p.h
diff --git
a/lib/qtcamdevice_p.h
b/lib/qtcamdevice_p.h
index
aae2b33
..
c8c09fb
100644
(file)
--- a/
lib/qtcamdevice_p.h
+++ b/
lib/qtcamdevice_p.h
@@
-3,7
+3,7
@@
/*!
* This file is part of CameraPlus.
*
/*!
* 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
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@
-43,6
+43,7
@@
public:
cameraBin(0),
videoSource(0),
wrapperVideoSource(0),
cameraBin(0),
videoSource(0),
wrapperVideoSource(0),
+ sink(0),
image(0),
video(0),
active(0),
image(0),
video(0),
active(0),
@@
-55,7
+56,7
@@
public:
}
GstElement *createAndAddElement(const QString& elementName, const char *prop, const char *name) {
}
GstElement *createAndAddElement(const QString& elementName, const char *prop, const char *name) {
- GstElement *elem = gst_element_factory_make(elementName.to
Ascii
(), name);
+ GstElement *elem = gst_element_factory_make(elementName.to
Latin1
(), name);
if (!elem) {
qWarning() << "Failed to create" << elementName;
return 0;
if (!elem) {
qWarning() << "Failed to create" << elementName;
return 0;
@@
-105,22
+106,18
@@
public:
if (videoSource) {
if (conf->deviceScannerType() == SCANNER_TYPE_ENUM) {
int dev = id.toInt();
if (videoSource) {
if (conf->deviceScannerType() == SCANNER_TYPE_ENUM) {
int dev = id.toInt();
- g_object_set(videoSource, conf->deviceScannerProperty().to
Ascii
().constData(), dev, NULL);
+ g_object_set(videoSource, conf->deviceScannerProperty().to
Latin1
().constData(), dev, NULL);
}
else {
QString dev = id.toString();
}
else {
QString dev = id.toString();
- g_object_set(videoSource, conf->deviceScannerProperty().to
Ascii
().constData(),
- dev.to
Ascii
().constData(), NULL);
+ g_object_set(videoSource, conf->deviceScannerProperty().to
Latin1
().constData(),
+ dev.to
Latin1
().constData(), NULL);
}
}
}
bool setViewfinderSink() {
}
}
}
bool setViewfinderSink() {
- GstElement *sink = 0;
- g_object_get(cameraBin, "viewfinder-sink", &sink, NULL);
-
if (sink) {
if (sink) {
- gst_object_unref(sink);
return true;
}
return true;
}
@@
-173,7
+170,7
@@
public:
void setAudioCaptureCaps() {
QString captureCaps = conf->audioCaptureCaps();
if (!captureCaps.isEmpty()) {
void setAudioCaptureCaps() {
QString captureCaps = conf->audioCaptureCaps();
if (!captureCaps.isEmpty()) {
- GstCaps *caps = gst_caps_from_string(captureCaps.to
Ascii
().data());
+ GstCaps *caps = gst_caps_from_string(captureCaps.to
Latin1
().data());
if (caps) {
g_object_set(cameraBin, "audio-capture-caps", caps, NULL);
gst_caps_unref(caps);
if (caps) {
g_object_set(cameraBin, "audio-capture-caps", caps, NULL);
gst_caps_unref(caps);
@@
-181,13
+178,18
@@
public:
}
}
}
}
- bool isWrapperReady() {
- if (!wrapperVideoSource) {
+ bool isReadyForCapture() {
+ GstElement *src = videoSource;
+ if (wrapperVideoSource) {
+ src = wrapperVideoSource;
+ }
+
+ if (!src) {
return false;
}
gboolean ready = FALSE;
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;
}
return ready == TRUE;
}
@@
-220,6
+222,7
@@
public:
GstElement *cameraBin;
GstElement *videoSource;
GstElement *wrapperVideoSource;
GstElement *cameraBin;
GstElement *videoSource;
GstElement *wrapperVideoSource;
+ GstElement *sink;
QtCamImageMode *image;
QtCamVideoMode *video;
QtCamImageMode *image;
QtCamVideoMode *video;