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
2009afcd
Commit
2009afcd
authored
3 years ago
by
Aline Gondim Santos
Committed by
Sébastien Blin
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
videpInput: fit to new api
Change-Id: I7f2bf6038d1b9313bd86f9b0a39b2573b97038a1
parent
3b0dab58
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/api/avmodel.h
+6
-3
6 additions, 3 deletions
src/api/avmodel.h
src/avmodel.cpp
+11
-11
11 additions, 11 deletions
src/avmodel.cpp
src/qtwrapper/videomanager_wrap.h
+7
-16
7 additions, 16 deletions
src/qtwrapper/videomanager_wrap.h
with
24 additions
and
30 deletions
src/api/avmodel.h
+
6
−
3
View file @
2009afcd
...
...
@@ -194,7 +194,7 @@ public:
* Start a local recorder and return it path.
* @param audioOnly
*/
Q_INVOKABLE
QString
startLocalRecorder
(
const
bool
&
audioOnly
)
const
;
Q_INVOKABLE
QString
startLocal
Media
Recorder
(
const
QString
&
videoInputId
)
const
;
/**
* Get the current recording path
* @return recording path
...
...
@@ -237,12 +237,15 @@ public:
Q_INVOKABLE
void
setRecordQuality
(
const
int
&
quality
)
const
;
/**
* Start preview renderer. This will start the camera
* @param resource
* @return sinkId
*/
Q_INVOKABLE
void
startPreview
();
Q_INVOKABLE
QString
startPreview
(
const
QString
&
resource
);
/**
* Stop preview renderer and the camera.
* @param resource
*/
Q_INVOKABLE
void
stopPreview
();
Q_INVOKABLE
void
stopPreview
(
const
QString
&
resource
);
/**
* Get a renderer from a call
* @param id the callid or "local"
...
...
This diff is collapsed.
Click to expand it.
src/avmodel.cpp
+
11
−
11
View file @
2009afcd
...
...
@@ -292,8 +292,8 @@ AVModel::setDeviceSettings(video::Settings& settings)
if
(
pimpl_
->
renderers_
[
video
::
PREVIEW_RENDERER_ID
])
{
if
(
pimpl_
->
renderers_
[
video
::
PREVIEW_RENDERER_ID
]
->
isRendering
()
&&
pimpl_
->
renderers_
.
size
()
==
1
)
{
stopPreview
();
startPreview
();
stopPreview
(
video
::
PREVIEW_RENDERER_ID
);
startPreview
(
video
::
PREVIEW_RENDERER_ID
);
}
}
}
...
...
@@ -452,10 +452,10 @@ AVModel::stopLocalRecorder(const QString& path) const
}
QString
AVModel
::
startLocalRecorder
(
const
bool
&
audioOnly
)
const
AVModel
::
startLocal
Media
Recorder
(
const
QString
&
videoInputId
)
const
{
const
QString
path
=
pimpl_
->
getRecordingPath
();
const
QString
finalPath
=
VideoManager
::
instance
().
startLocalRecorder
(
audioOnly
,
path
);
const
QString
finalPath
=
VideoManager
::
instance
().
startLocal
Media
Recorder
(
videoInputId
,
path
);
return
finalPath
;
}
...
...
@@ -516,16 +516,16 @@ AVModel::useAVFrame(bool useAVFrame)
}
}
void
AVModel
::
startPreview
()
QString
AVModel
::
startPreview
(
const
QString
&
resource
)
{
VideoManager
::
instance
().
startCamera
(
);
return
QString
(
VideoManager
::
instance
().
openVideoInput
(
resource
.
toStdString
()).
c_str
()
);
}
void
AVModel
::
stopPreview
()
AVModel
::
stopPreview
(
const
QString
&
resource
)
{
VideoManager
::
instance
().
stopCamera
(
);
VideoManager
::
instance
().
closeVideoInput
(
resource
.
toStdString
()
);
}
const
video
::
Renderer
&
...
...
@@ -549,7 +549,7 @@ AVModel::setInputFile(const QString& uri, const QString& callId)
.
arg
(
QUrl
(
uri
).
toLocalFile
())
:
DRing
::
Media
::
VideoProtocolPrefix
::
NONE
;
if
(
callId
.
isEmpty
())
{
VideoManager
::
instance
().
switch
Input
(
resource
);
VideoManager
::
instance
().
openVideo
Input
(
resource
.
toStdString
()
);
}
else
{
CallManager
::
instance
().
switchInput
(
callId
,
resource
);
}
...
...
@@ -593,7 +593,7 @@ AVModel::switchInputTo(const QString& id, const QString& callId)
resource
=
QString
(
DRing
::
Media
::
VideoProtocolPrefix
::
NONE
);
}
if
(
callId
.
isEmpty
())
{
VideoManager
::
instance
().
switch
Input
(
resource
);
VideoManager
::
instance
().
openVideo
Input
(
resource
.
toStdString
()
);
}
else
{
CallManager
::
instance
().
switchInput
(
callId
,
resource
);
}
...
...
This diff is collapsed.
Click to expand it.
src/qtwrapper/videomanager_wrap.h
+
7
−
16
View file @
2009afcd
...
...
@@ -162,17 +162,17 @@ public Q_SLOTS: // METHODS
#endif
}
void
startCamera
(
)
std
::
string
openVideoInput
(
const
std
::
string
&
resource
)
{
#ifdef ENABLE_VIDEO
DRing
::
startCamera
(
);
return
DRing
::
openVideoInput
(
resource
);
#endif
}
void
stopCamera
(
)
void
closeVideoInput
(
const
std
::
string
&
resource
)
{
#ifdef ENABLE_VIDEO
DRing
::
stopCamera
(
);
DRing
::
closeVideoInput
(
resource
);
#endif
}
...
...
@@ -180,16 +180,6 @@ public Q_SLOTS: // METHODS
void
stopAudioDevice
()
{
DRing
::
stopAudioDevice
();
}
bool
switchInput
(
const
QString
&
resource
)
{
#ifdef ENABLE_VIDEO
return
DRing
::
switchInput
(
resource
.
toStdString
());
#else
Q_UNUSED
(
resource
)
return
false
;
#endif
}
void
registerSinkTarget
(
const
QString
&
sinkID
,
const
DRing
::
SinkTarget
&
target
)
{
#ifdef ENABLE_VIDEO
...
...
@@ -219,9 +209,10 @@ public Q_SLOTS: // METHODS
void
stopLocalRecorder
(
const
QString
&
path
)
{
DRing
::
stopLocalRecorder
(
path
.
toStdString
());
}
QString
startLocalRecorder
(
bool
audioOnly
,
const
QString
&
path
)
QString
startLocal
Media
Recorder
(
const
QString
&
videoInputId
,
const
QString
&
path
)
{
return
QString
::
fromStdString
(
DRing
::
startLocalRecorder
(
audioOnly
,
path
.
toStdString
()));
return
QString
::
fromStdString
(
DRing
::
startLocalMediaRecorder
(
videoInputId
.
toStdString
(),
path
.
toStdString
()));
}
MapStringString
getRenderer
(
const
QString
&
id
)
...
...
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