Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
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
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
db072646
Commit
db072646
authored
3 years ago
by
Kateryna Kostiuk
Committed by
Adrien Béraud
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
player: fix close player signature
Change-Id: I9f435dc52218222ccbfae1fb507f13a8cb71f6f7
parent
71b4d7a3
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/client/videomanager.cpp
+3
-3
3 additions, 3 deletions
src/client/videomanager.cpp
src/client/videomanager.h
+5
-3
5 additions, 3 deletions
src/client/videomanager.h
src/jami/videomanager_interface.h
+8
-7
8 additions, 7 deletions
src/jami/videomanager_interface.h
with
16 additions
and
13 deletions
src/client/videomanager.cpp
+
3
−
3
View file @
db072646
...
@@ -570,9 +570,9 @@ pausePlayer(const std::string& id, bool pause)
...
@@ -570,9 +570,9 @@ pausePlayer(const std::string& id, bool pause)
}
}
bool
bool
closePlayer
(
const
std
::
string
&
id
)
close
Media
Player
(
const
std
::
string
&
id
)
{
{
return
jami
::
closePlayer
(
id
);
return
jami
::
close
Media
Player
(
id
);
}
}
bool
bool
...
@@ -758,7 +758,7 @@ pausePlayer(const std::string& id, bool pause)
...
@@ -758,7 +758,7 @@ pausePlayer(const std::string& id, bool pause)
}
}
bool
bool
closePlayer
(
const
std
::
string
&
id
)
close
Media
Player
(
const
std
::
string
&
id
)
{
{
return
Manager
::
instance
().
getVideoManager
().
mediaPlayers
.
erase
(
id
)
>
0
;
return
Manager
::
instance
().
getVideoManager
().
mediaPlayers
.
erase
(
id
)
>
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/client/videomanager.h
+
5
−
3
View file @
db072646
...
@@ -57,7 +57,8 @@ public:
...
@@ -57,7 +57,8 @@ public:
std
::
map
<
std
::
string
,
std
::
weak_ptr
<
video
::
VideoInput
>
,
std
::
less
<>>
videoInputs
;
std
::
map
<
std
::
string
,
std
::
weak_ptr
<
video
::
VideoInput
>
,
std
::
less
<>>
videoInputs
;
std
::
mutex
audioMutex
;
std
::
mutex
audioMutex
;
bool
hasRunningPlayers
();
bool
hasRunningPlayers
();
std
::
shared_ptr
<
video
::
VideoInput
>
getVideoInput
(
std
::
string_view
id
)
const
{
std
::
shared_ptr
<
video
::
VideoInput
>
getVideoInput
(
std
::
string_view
id
)
const
{
auto
input
=
videoInputs
.
find
(
id
);
auto
input
=
videoInputs
.
find
(
id
);
return
input
==
videoInputs
.
end
()
?
nullptr
:
input
->
second
.
lock
();
return
input
==
videoInputs
.
end
()
?
nullptr
:
input
->
second
.
lock
();
}
}
...
@@ -65,11 +66,12 @@ public:
...
@@ -65,11 +66,12 @@ public:
video
::
VideoDeviceMonitor
&
getVideoDeviceMonitor
();
video
::
VideoDeviceMonitor
&
getVideoDeviceMonitor
();
std
::
shared_ptr
<
AudioInput
>
getAudioInput
(
const
std
::
string
&
id
);
std
::
shared_ptr
<
AudioInput
>
getAudioInput
(
const
std
::
string
&
id
);
std
::
shared_ptr
<
video
::
VideoInput
>
getVideoInput
(
const
std
::
string
&
id
,
video
::
VideoInputMode
inputMode
=
video
::
VideoInputMode
::
Undefined
);
std
::
shared_ptr
<
video
::
VideoInput
>
getVideoInput
(
const
std
::
string
&
id
,
video
::
VideoInputMode
inputMode
=
video
::
VideoInputMode
::
Undefined
);
std
::
string
createMediaPlayer
(
const
std
::
string
&
path
);
std
::
string
createMediaPlayer
(
const
std
::
string
&
path
);
std
::
shared_ptr
<
MediaPlayer
>
getMediaPlayer
(
const
std
::
string
&
id
);
std
::
shared_ptr
<
MediaPlayer
>
getMediaPlayer
(
const
std
::
string
&
id
);
bool
pausePlayer
(
const
std
::
string
&
id
,
bool
pause
);
bool
pausePlayer
(
const
std
::
string
&
id
,
bool
pause
);
bool
closePlayer
(
const
std
::
string
&
id
);
bool
close
Media
Player
(
const
std
::
string
&
id
);
bool
mutePlayerAudio
(
const
std
::
string
&
id
,
bool
mute
);
bool
mutePlayerAudio
(
const
std
::
string
&
id
,
bool
mute
);
bool
playerSeekToTime
(
const
std
::
string
&
id
,
int
time
);
bool
playerSeekToTime
(
const
std
::
string
&
id
,
int
time
);
int64_t
getPlayerPosition
(
const
std
::
string
&
id
);
int64_t
getPlayerPosition
(
const
std
::
string
&
id
);
...
...
This diff is collapsed.
Click to expand it.
src/jami/videomanager_interface.h
+
8
−
7
View file @
db072646
...
@@ -154,7 +154,6 @@ private:
...
@@ -154,7 +154,6 @@ private:
void
setGeometry
(
int
format
,
int
width
,
int
height
)
noexcept
;
void
setGeometry
(
int
format
,
int
width
,
int
height
)
noexcept
;
};
};
/* FrameBuffer is a generic video frame container */
/* FrameBuffer is a generic video frame container */
struct
DRING_PUBLIC
FrameBuffer
struct
DRING_PUBLIC
FrameBuffer
{
{
...
@@ -165,7 +164,9 @@ struct DRING_PUBLIC FrameBuffer
...
@@ -165,7 +164,9 @@ struct DRING_PUBLIC FrameBuffer
int
height
{
0
};
// frame height
int
height
{
0
};
// frame height
std
::
vector
<
uint8_t
>
storage
;
std
::
vector
<
uint8_t
>
storage
;
// If set, new frame will be written to this buffer instead
// If set, new frame will be written to this buffer instead
std
::
unique_ptr
<
AVFrame
,
void
(
*
)(
AVFrame
*
)
>
avframe
{
nullptr
,
[](
AVFrame
*
frame
)
{
av_frame_free
(
&
frame
);
}};
std
::
unique_ptr
<
AVFrame
,
void
(
*
)(
AVFrame
*
)
>
avframe
{
nullptr
,
[](
AVFrame
*
frame
)
{
av_frame_free
(
&
frame
);
}};
};
};
struct
DRING_PUBLIC
SinkTarget
struct
DRING_PUBLIC
SinkTarget
...
@@ -199,7 +200,7 @@ DRING_PUBLIC std::string openVideoInput(const std::string& path);
...
@@ -199,7 +200,7 @@ DRING_PUBLIC std::string openVideoInput(const std::string& path);
DRING_PUBLIC
bool
closeVideoInput
(
const
std
::
string
&
id
);
DRING_PUBLIC
bool
closeVideoInput
(
const
std
::
string
&
id
);
DRING_PUBLIC
std
::
string
createMediaPlayer
(
const
std
::
string
&
path
);
DRING_PUBLIC
std
::
string
createMediaPlayer
(
const
std
::
string
&
path
);
DRING_PUBLIC
std
::
string
closeMediaPlayer
(
const
std
::
string
&
id
);
DRING_PUBLIC
bool
closeMediaPlayer
(
const
std
::
string
&
id
);
DRING_PUBLIC
bool
pausePlayer
(
const
std
::
string
&
id
,
bool
pause
);
DRING_PUBLIC
bool
pausePlayer
(
const
std
::
string
&
id
,
bool
pause
);
DRING_PUBLIC
bool
mutePlayerAudio
(
const
std
::
string
&
id
,
bool
mute
);
DRING_PUBLIC
bool
mutePlayerAudio
(
const
std
::
string
&
id
,
bool
mute
);
DRING_PUBLIC
bool
playerSeekToTime
(
const
std
::
string
&
id
,
int
time
);
DRING_PUBLIC
bool
playerSeekToTime
(
const
std
::
string
&
id
,
int
time
);
...
@@ -209,13 +210,13 @@ DRING_PUBLIC void registerSinkTarget(const std::string& sinkId, const SinkTarget
...
@@ -209,13 +210,13 @@ DRING_PUBLIC void registerSinkTarget(const std::string& sinkId, const SinkTarget
DRING_PUBLIC
void
registerAVSinkTarget
(
const
std
::
string
&
sinkId
,
const
AVSinkTarget
&
target
);
DRING_PUBLIC
void
registerAVSinkTarget
(
const
std
::
string
&
sinkId
,
const
AVSinkTarget
&
target
);
DRING_PUBLIC
std
::
map
<
std
::
string
,
std
::
string
>
getRenderer
(
const
std
::
string
&
callId
);
DRING_PUBLIC
std
::
map
<
std
::
string
,
std
::
string
>
getRenderer
(
const
std
::
string
&
callId
);
DRING_PUBLIC
std
::
string
startLocalMediaRecorder
(
const
std
::
string
&
videoInputId
,
const
std
::
string
&
filepath
);
DRING_PUBLIC
std
::
string
startLocalMediaRecorder
(
const
std
::
string
&
videoInputId
,
const
std
::
string
&
filepath
);
DRING_PUBLIC
void
stopLocalRecorder
(
const
std
::
string
&
filepath
);
DRING_PUBLIC
void
stopLocalRecorder
(
const
std
::
string
&
filepath
);
#if defined(__ANDROID__) || defined(RING_UWP) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
#if defined(__ANDROID__) || defined(RING_UWP) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
DRING_PUBLIC
void
addVideoDevice
(
DRING_PUBLIC
void
addVideoDevice
(
const
std
::
string
&
node
,
const
std
::
string
&
node
,
const
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>&
devInfo
=
{});
const
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>&
devInfo
=
{});
DRING_PUBLIC
void
removeVideoDevice
(
const
std
::
string
&
node
);
DRING_PUBLIC
void
removeVideoDevice
(
const
std
::
string
&
node
);
DRING_PUBLIC
VideoFrame
*
getNewFrame
(
std
::
string_view
id
);
DRING_PUBLIC
VideoFrame
*
getNewFrame
(
std
::
string_view
id
);
DRING_PUBLIC
void
publishFrame
(
std
::
string_view
id
);
DRING_PUBLIC
void
publishFrame
(
std
::
string_view
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