Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
b4739025
Commit
b4739025
authored
Apr 25, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/sound-player/SoundPlayer): handle end of file
parent
94665113
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
AssistantModel.cpp
linphone-desktop/src/components/assistant/AssistantModel.cpp
+1
-0
SoundPlayer.cpp
linphone-desktop/src/components/sound-player/SoundPlayer.cpp
+21
-0
SoundPlayer.hpp
linphone-desktop/src/components/sound-player/SoundPlayer.hpp
+5
-1
No files found.
linphone-desktop/src/components/assistant/AssistantModel.cpp
View file @
b4739025
...
...
@@ -37,6 +37,7 @@ public:
mAssistant
=
assistant
;
}
private:
void
onCreateAccount
(
const
shared_ptr
<
linphone
::
AccountCreator
>
&
,
linphone
::
AccountCreatorStatus
status
,
...
...
linphone-desktop/src/components/sound-player/SoundPlayer.cpp
View file @
b4739025
...
...
@@ -25,10 +25,31 @@
#include "SoundPlayer.hpp"
using
namespace
std
;
// =============================================================================
class
SoundPlayer
::
Handlers
:
public
linphone
::
PlayerListener
{
public:
Handlers
(
SoundPlayer
*
soundPlayer
)
{
mSoundPlayer
=
soundPlayer
;
}
private:
void
onEofReached
(
const
shared_ptr
<
linphone
::
Player
>
&
)
override
{
mSoundPlayer
->
stop
();
}
SoundPlayer
*
mSoundPlayer
;
};
// -----------------------------------------------------------------------------
SoundPlayer
::
SoundPlayer
(
QObject
*
parent
)
:
QObject
(
parent
)
{
mHandlers
=
make_shared
<
SoundPlayer
::
Handlers
>
(
this
);
mInternalPlayer
=
CoreManager
::
getInstance
()
->
getCore
()
->
createLocalPlayer
(
""
,
""
,
nullptr
);
mInternalPlayer
->
setListener
(
mHandlers
);
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/components/sound-player/SoundPlayer.hpp
View file @
b4739025
...
...
@@ -34,6 +34,8 @@ namespace linphone {
}
class
SoundPlayer
:
public
QObject
{
class
Handlers
;
Q_OBJECT
;
Q_PROPERTY
(
QString
source
READ
getSource
WRITE
setSource
NOTIFY
sourceChanged
);
...
...
@@ -81,9 +83,11 @@ private:
int
getDuration
()
const
;
std
::
shared_ptr
<
linphone
::
Player
>
mInternalPlayer
;
QString
mSource
;
PlaybackState
mPlaybackState
=
StoppedState
;
std
::
shared_ptr
<
linphone
::
Player
>
mInternalPlayer
;
std
::
shared_ptr
<
Handlers
>
mHandlers
;
};
#endif // SOUND_PLAYER_H_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment