Commit 7e48e81c authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/components/camera/Camera): provide values for video input/output

parent 7cc5c65c
......@@ -147,8 +147,8 @@ void CallModel::setPausedByUser (bool status) {
}
bool CallModel::getVideoInputEnabled () const {
// TODO
return false;
shared_ptr<linphone::CallParams> params = m_linphone_call->getRemoteParams();
return params && params->videoEnabled() && getStatus() == CallStatusConnected;
}
void CallModel::setVideoInputEnabled (bool status) {
......@@ -156,8 +156,8 @@ void CallModel::setVideoInputEnabled (bool status) {
}
bool CallModel::getVideoOutputEnabled () const {
// TODO
return false;
shared_ptr<linphone::CallParams> params = m_linphone_call->getCurrentParams();
return params && params->videoEnabled() && getStatus() == CallStatusConnected;
}
void CallModel::setVideoOutputEnabled (bool status) {
......
......@@ -12,12 +12,12 @@ class CallModel : public QObject {
Q_PROPERTY(QString sipAddress READ getSipAddress CONSTANT);
Q_PROPERTY(CallStatus status READ getStatus NOTIFY statusChanged);
Q_PROPERTY(bool isOutgoing READ isOutgoing CONSTANT);
Q_PROPERTY(int duration READ getDuration CONSTANT);
Q_PROPERTY(float quality READ getQuality CONSTANT);
Q_PROPERTY(int duration READ getDuration CONSTANT); // Constant but called with a timer in qml.
Q_PROPERTY(float quality READ getQuality CONSTANT); // Same idea.
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
Q_PROPERTY(bool pausedByUser READ getPausedByUser WRITE setPausedByUser NOTIFY statusChanged);
Q_PROPERTY(bool videoInputEnabled READ getVideoInputEnabled WRITE setVideoInputEnabled NOTIFY videoInputEnabled);
Q_PROPERTY(bool videoOutputEnabled READ getVideoOutputEnabled WRITE setVideoOutputEnabled NOTIFY videoOutputEnabled);
Q_PROPERTY(bool videoInputEnabled READ getVideoInputEnabled WRITE setVideoInputEnabled NOTIFY statusChanged);
Q_PROPERTY(bool videoOutputEnabled READ getVideoOutputEnabled WRITE setVideoOutputEnabled NOTIFY statusChanged);
public:
enum CallStatus {
......@@ -46,8 +46,6 @@ public:
signals:
void statusChanged (CallStatus status);
void microMutedChanged (bool status);
void videoInputEnabled (bool status);
void videoOutputEnabled (bool status);
private:
QString getSipAddress () const;
......
......@@ -42,6 +42,7 @@ CameraRenderer::CameraRenderer (const Camera *camera) : m_camera(camera) {}
QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize &size) {
QOpenGLFramebufferObjectFormat format;
format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
format.setInternalTextureFormat(GL_RGBA8);
format.setSamples(4);
ContextInfo *context_info = m_camera->m_context_info;
......
......@@ -113,7 +113,7 @@ Rectangle {
Component.onCompleted: {
var updateDuration = function () {
text = Utils .formatElapsedTime(call.duration)
text = Utils.formatElapsedTime(call.duration)
Utils.setTimeout(elapsedTime, 1000, updateDuration)
}
......
linphone @ 9551c911
Subproject commit 75cd64d0bc04a8b38dfae2b2b6cdd0299607deef
Subproject commit 9551c9118a660453a3d01f2ffee8ae8750be66be
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment