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
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
7c0af2d2
Commit
7c0af2d2
authored
10 years ago
by
Alexandre Lision
Browse files
Options
Downloads
Patches
Plain Diff
fix video signals
ENABLE_VIDEO was not set in qtwrapper lib
parent
00f68d7c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/qtwrapper/CMakeLists.txt
+3
-2
3 additions, 2 deletions
src/qtwrapper/CMakeLists.txt
src/qtwrapper/videomanager_wrap.cpp
+61
-0
61 additions, 0 deletions
src/qtwrapper/videomanager_wrap.cpp
src/qtwrapper/videomanager_wrap.h
+43
-26
43 additions, 26 deletions
src/qtwrapper/videomanager_wrap.h
with
107 additions
and
28 deletions
src/qtwrapper/CMakeLists.txt
+
3
−
2
View file @
7c0af2d2
...
...
@@ -17,7 +17,9 @@ FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE
(
Ring REQUIRED
)
set
(
libqtwrapper_LIB_SRCS
instancemanager.cpp
)
instancemanager.cpp
videomanager_wrap.cpp
)
INCLUDE_DIRECTORIES
(
SYSTEM
${
Qt5Core_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
...
...
@@ -31,4 +33,3 @@ TARGET_LINK_LIBRARIES( qtwrapper
${
QT_QTCORE_LIBRARY
}
${
ring_BIN
}
)
This diff is collapsed.
Click to expand it.
src/qtwrapper/videomanager_wrap.cpp
0 → 100644
+
61
−
0
View file @
7c0af2d2
#include
"videomanager_wrap.h"
VideoManagerInterface
::
VideoManagerInterface
()
{
#ifdef ENABLE_VIDEO
proxy
=
new
VideoManagerSignalProxy
(
this
);
sender
=
new
VideoManagerProxySender
();
QObject
::
connect
(
sender
,
&
VideoManagerProxySender
::
deviceEvent
,
proxy
,
&
VideoManagerSignalProxy
::
slotDeviceEvent
);
QObject
::
connect
(
sender
,
&
VideoManagerProxySender
::
startedDecoding
,
proxy
,
&
VideoManagerSignalProxy
::
slotStartedDecoding
);
QObject
::
connect
(
sender
,
&
VideoManagerProxySender
::
stoppedDecoding
,
proxy
,
&
VideoManagerSignalProxy
::
slotStoppedDecoding
);
using
DRing
::
exportable_callback
;
using
DRing
::
VideoSignal
;
videoHandlers
=
{
exportable_callback
<
VideoSignal
::
DeviceEvent
>
(
[
this
]
()
{
emit
sender
->
deviceEvent
();
}),
exportable_callback
<
VideoSignal
::
DecodingStarted
>
(
[
this
]
(
const
std
::
string
&
id
,
const
std
::
string
&
shmPath
,
int
width
,
int
height
,
bool
isMixer
)
{
emit
sender
->
startedDecoding
(
QString
(
id
.
c_str
()),
QString
(
shmPath
.
c_str
()),
width
,
height
,
isMixer
);
}),
exportable_callback
<
VideoSignal
::
DecodingStopped
>
(
[
this
]
(
const
std
::
string
&
id
,
const
std
::
string
&
shmPath
,
bool
isMixer
)
{
emit
sender
->
stoppedDecoding
(
QString
(
id
.
c_str
()),
QString
(
shmPath
.
c_str
()),
isMixer
);
})
};
#endif
}
VideoManagerInterface
::~
VideoManagerInterface
()
{
}
VideoManagerSignalProxy
::
VideoManagerSignalProxy
(
VideoManagerInterface
*
parent
)
:
QObject
(
parent
),
m_pParent
(
parent
)
{}
void
VideoManagerSignalProxy
::
slotDeviceEvent
()
{
QTimer
::
singleShot
(
0
,
[
=
]
{
emit
m_pParent
->
deviceEvent
();
});
}
void
VideoManagerSignalProxy
::
slotStartedDecoding
(
const
QString
&
id
,
const
QString
&
shmPath
,
int
width
,
int
height
,
bool
isMixer
)
{
QTimer
::
singleShot
(
0
,
[
=
]
{
emit
m_pParent
->
startedDecoding
(
id
,
shmPath
,
width
,
height
,
isMixer
);
});
}
void
VideoManagerSignalProxy
::
slotStoppedDecoding
(
const
QString
&
id
,
const
QString
&
shmPath
,
bool
isMixer
)
{
QTimer
::
singleShot
(
0
,
[
=
]
{
emit
m_pParent
->
stoppedDecoding
(
id
,
shmPath
,
isMixer
);
});
}
This diff is collapsed.
Click to expand it.
src/qtwrapper/videomanager_wrap.h
+
43
−
26
View file @
7c0af2d2
...
...
@@ -20,7 +20,9 @@
#define VIDEO_DBUS_INTERFACE_H
#include
<QtCore/QObject>
#include
<QtCore/QCoreApplication>
#include
<QtCore/QByteArray>
#include
<QtCore/QThread>
#include
<QtCore/QList>
#include
<QtCore/QMap>
#include
<QtCore/QString>
...
...
@@ -33,6 +35,37 @@
#include
"typedefs.h"
#include
"conversions_wrap.hpp"
class
VideoManagerInterface
;
class
VideoManagerSignalProxy
:
public
QObject
{
Q_OBJECT
public:
VideoManagerSignalProxy
(
VideoManagerInterface
*
parent
);
public
Q_SLOTS
:
void
slotDeviceEvent
();
void
slotStartedDecoding
(
const
QString
&
id
,
const
QString
&
shmPath
,
int
width
,
int
height
,
bool
isMixer
);
void
slotStoppedDecoding
(
const
QString
&
id
,
const
QString
&
shmPath
,
bool
isMixer
);
private:
VideoManagerInterface
*
m_pParent
;
};
class
VideoManagerProxySender
:
public
QObject
{
Q_OBJECT
friend
class
VideoManagerInterface
;
public:
Q_SIGNALS:
void
deviceEvent
();
void
startedDecoding
(
const
QString
&
id
,
const
QString
&
shmPath
,
int
width
,
int
height
,
bool
isMixer
);
void
stoppedDecoding
(
const
QString
&
id
,
const
QString
&
shmPath
,
bool
isMixer
);
};
/*
* Proxy class for interface org.ring.Ring.VideoManager
*/
...
...
@@ -40,36 +73,20 @@ class VideoManagerInterface: public QObject
{
Q_OBJECT
friend
class
VideoManagerSignalProxy
;
public:
VideoManagerInterface
()
{
VideoManagerInterface
();
~
VideoManagerInterface
();
#ifdef ENABLE_VIDEO
using
DRing
::
exportable_callback
;
using
DRing
::
VideoSignal
;
videoHandlers
=
{
exportable_callback
<
VideoSignal
::
DeviceEvent
>
(
[
this
]
()
{
QTimer
::
singleShot
(
0
,
[
this
]
{
emit
this
->
deviceEvent
();
});
}),
exportable_callback
<
VideoSignal
::
DecodingStarted
>
(
[
this
]
(
const
std
::
string
&
id
,
const
std
::
string
&
shmPath
,
int
width
,
int
height
,
bool
isMixer
)
{
QTimer
::
singleShot
(
0
,
[
this
,
id
,
shmPath
,
width
,
height
,
isMixer
]
{
emit
this
->
startedDecoding
(
QString
(
id
.
c_str
()),
QString
(
shmPath
.
c_str
()),
width
,
height
,
isMixer
);
});
}),
exportable_callback
<
VideoSignal
::
DecodingStopped
>
(
[
this
]
(
const
std
::
string
&
id
,
const
std
::
string
&
shmPath
,
bool
isMixer
)
{
QTimer
::
singleShot
(
0
,
[
this
,
id
,
shmPath
,
isMixer
]
{
emit
this
->
stoppedDecoding
(
QString
(
id
.
c_str
()),
QString
(
shmPath
.
c_str
()),
isMixer
);
});
})
};
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
DRing
::
CallbackWrapperBase
>>
videoHandlers
;
#endif
}
~
VideoManagerInterface
()
{}
private:
VideoManagerSignalProxy
*
proxy
;
VideoManagerProxySender
*
sender
;
#ifdef ENABLE_VIDEO
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
DRing
::
CallbackWrapperBase
>>
videoHandlers
;
...
...
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