Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
433318cc
Commit
433318cc
authored
11 years ago
by
Emmanuel Lepage Vallee
Browse files
Options
Downloads
Patches
Plain Diff
[ #44118 ] Fix rotate left/right buttons
parent
39f2e1b1
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/call.cpp
+11
-0
11 additions, 0 deletions
src/call.cpp
src/call.h
+2
-0
2 additions, 0 deletions
src/call.h
src/videorenderer.cpp
+16
-2
16 additions, 2 deletions
src/videorenderer.cpp
src/videorenderer.h
+10
-5
10 additions, 5 deletions
src/videorenderer.h
with
39 additions
and
7 deletions
src/call.cpp
+
11
−
0
View file @
433318cc
...
@@ -608,6 +608,17 @@ AbstractHistoryBackend* Call::backend() const
...
@@ -608,6 +608,17 @@ AbstractHistoryBackend* Call::backend() const
}
}
///Does this call currently has video
bool
Call
::
hasVideo
()
const
{
#ifdef ENABLE_VIDEO
return
VideoModel
::
instance
()
->
getRenderer
(
this
)
!=
nullptr
;
#else
return
false
;
#endif
}
///Get the current state
///Get the current state
Call
::
State
Call
::
state
()
const
Call
::
State
Call
::
state
()
const
{
{
...
...
This diff is collapsed.
Click to expand it.
src/call.h
+
2
−
0
View file @
433318cc
...
@@ -279,6 +279,7 @@ public:
...
@@ -279,6 +279,7 @@ public:
Q_PROPERTY
(
QString
toHumanStateName
READ
toHumanStateName
)
Q_PROPERTY
(
QString
toHumanStateName
READ
toHumanStateName
)
Q_PROPERTY
(
bool
missed
READ
isMissed
)
Q_PROPERTY
(
bool
missed
READ
isMissed
)
Q_PROPERTY
(
Direction
direction
READ
direction
)
Q_PROPERTY
(
Direction
direction
READ
direction
)
Q_PROPERTY
(
bool
hasVideo
READ
hasVideo
)
Q_PROPERTY
(
Call
::
LegacyHistoryState
historyState
READ
historyState
)
Q_PROPERTY
(
Call
::
LegacyHistoryState
historyState
READ
historyState
)
//Read/write properties
//Read/write properties
...
@@ -329,6 +330,7 @@ public:
...
@@ -329,6 +330,7 @@ public:
bool
isMissed
()
const
;
bool
isMissed
()
const
;
Call
::
Direction
direction
()
const
;
Call
::
Direction
direction
()
const
;
AbstractHistoryBackend
*
backend
()
const
;
AbstractHistoryBackend
*
backend
()
const
;
bool
hasVideo
()
const
;
//Automated function
//Automated function
Call
::
State
stateChanged
(
const
QString
&
newState
);
Call
::
State
stateChanged
(
const
QString
&
newState
);
...
...
This diff is collapsed.
Click to expand it.
src/videorenderer.cpp
+
16
−
2
View file @
433318cc
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
#include
<sys/mman.h>
#include
<sys/mman.h>
#include
<semaphore.h>
#include
<semaphore.h>
#include
<errno.h>
#include
<errno.h>
// #include <linux/time.h>
#include
<time.h>
#ifndef CLOCK_REALTIME
#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0
#define CLOCK_REALTIME 0
...
@@ -265,6 +264,15 @@ void VideoRenderer::timedEvents()
...
@@ -265,6 +264,15 @@ void VideoRenderer::timedEvents()
bool
ok
=
renderToBitmap
();
bool
ok
=
renderToBitmap
();
if
(
ok
==
true
)
{
if
(
ok
==
true
)
{
//Compute the FPS shown to the client
if
(
m_CurrentTime
.
second
()
!=
QTime
::
currentTime
().
second
())
{
m_Fps
=
m_fpsC
;
m_fpsC
=
0
;
m_CurrentTime
=
QTime
::
currentTime
();
}
m_fpsC
++
;
emit
frameUpdated
();
emit
frameUpdated
();
}
}
else
{
else
{
...
@@ -349,6 +357,12 @@ QMutex* VideoRenderer::mutex()
...
@@ -349,6 +357,12 @@ QMutex* VideoRenderer::mutex()
return
m_pMutex
;
return
m_pMutex
;
}
}
///Get the current frame rate of this renderer
int
VideoRenderer
::
fps
()
const
{
return
m_Fps
;
}
/*****************************************************************************
/*****************************************************************************
* *
* *
...
...
This diff is collapsed.
Click to expand it.
src/videorenderer.h
+
10
−
5
View file @
433318cc
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
//Base
//Base
#include
<QtCore/QObject>
#include
<QtCore/QObject>
#include
<QtCore/QTime>
#include
"typedefs.h"
#include
"typedefs.h"
#include
<time.h>
#include
<time.h>
...
@@ -54,6 +55,7 @@ class LIB_EXPORT VideoRenderer : public QObject {
...
@@ -54,6 +55,7 @@ class LIB_EXPORT VideoRenderer : public QObject {
QByteArray
currentFrame
()
;
QByteArray
currentFrame
()
;
Resolution
activeResolution
()
;
Resolution
activeResolution
()
;
QMutex
*
mutex
()
;
QMutex
*
mutex
()
;
int
fps
()
const
;
//Setters
//Setters
void
setResolution
(
QSize
size
);
void
setResolution
(
QSize
size
);
...
@@ -76,6 +78,9 @@ class LIB_EXPORT VideoRenderer : public QObject {
...
@@ -76,6 +78,9 @@ class LIB_EXPORT VideoRenderer : public QObject {
QMutex
*
m_pMutex
;
QMutex
*
m_pMutex
;
QMutex
*
m_pSSMutex
;
QMutex
*
m_pSSMutex
;
QString
m_Id
;
QString
m_Id
;
int
m_fpsC
;
int
m_Fps
;
QTime
m_CurrentTime
;
//Constants
//Constants
static
const
int
TIMEOUT_SEC
=
1
;
// 1 second
static
const
int
TIMEOUT_SEC
=
1
;
// 1 second
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment