Merge lp:~phablet-team/qtubuntu-media/fix-1506953 into lp:qtubuntu-media

Proposed by Jim Hodapp
Status: Merged
Approved by: Konrad Zapałowicz
Approved revision: 114
Merged at revision: 111
Proposed branch: lp:~phablet-team/qtubuntu-media/fix-1506953
Merge into: lp:qtubuntu-media
Diff against target: 438 lines (+164/-34)
8 files modified
debian/control (+1/-1)
src/aal/aalmediaplayerservice.cpp (+79/-8)
src/aal/aalmediaplayerservice.h (+4/-1)
src/aal/aalmediaplaylistcontrol.cpp (+55/-19)
src/aal/aalmediaplaylistprovider.cpp (+2/-4)
src/aal/aalvideorenderercontrol.cpp (+8/-1)
tests/unit/service.cpp (+12/-0)
tests/unit/service.h (+3/-0)
To merge this branch: bzr merge lp:~phablet-team/qtubuntu-media/fix-1506953
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) code Approve
Review via email: mp+300533@code.launchpad.net

Commit message

Register for media-hub service unregister/register signals and raise an error to the client application when media-hub-server unregisters and then re-registers on dbus. This will allow the client to handle this event as it deems appropriate.

Description of the change

Register for media-hub service unregister/register signals and raise an error to the client application when media-hub-server unregisters and then re-registers on dbus. This will allow the client to handle this event as it deems appropriate.

To post a comment you must log in.
112. By Jim Hodapp

Merge with upstream

113. By Jim Hodapp

Clean up unnecessary debug statements

114. By Jim Hodapp

Another unnessary debug statement

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

LGTM

review: Approve (code)
115. By Jim Hodapp

Some additional protection from unhandled exceptions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-07-11 01:04:02 +0000
+++ debian/control 2016-07-20 21:27:06 +0000
@@ -9,7 +9,7 @@
9 libgl1-mesa-dev | libgl-dev,9 libgl1-mesa-dev | libgl-dev,
10 libgles2-mesa-dev,10 libgles2-mesa-dev,
11 libhybris-dev (>= 0.1.0+git20131207+e452e83-0ubuntu13),11 libhybris-dev (>= 0.1.0+git20131207+e452e83-0ubuntu13),
12 libmedia-hub-dev (>= 4.4.0),12 libmedia-hub-dev (>= 4.5.0),
13 libpulse-dev,13 libpulse-dev,
14 libqt5opengl5-dev,14 libqt5opengl5-dev,
15 libqtubuntu-media-signals-dev (>= 0.3+15.04.20150618.1-0ubuntu1),15 libqtubuntu-media-signals-dev (>= 0.3+15.04.20150618.1-0ubuntu1),
1616
=== modified file 'src/aal/aalmediaplayerservice.cpp'
--- src/aal/aalmediaplayerservice.cpp 2016-06-09 18:34:21 +0000
+++ src/aal/aalmediaplayerservice.cpp 2016-07-20 21:27:06 +0000
@@ -63,13 +63,42 @@
63core::Signal<void> the_void;63core::Signal<void> the_void;
64}64}
6565
66class EmptySink : public core::ubuntu::media::video::Sink
67{
68public:
69 EmptySink(std::uint32_t gl_texture)
70 {
71 Q_UNUSED(gl_texture);
72 }
73
74 const core::Signal<void>& frame_available() const override
75 {
76 static const core::Signal<void> frame_available;
77 return frame_available;
78 }
79
80 bool transformation_matrix(float* matrix) const override
81 {
82 Q_UNUSED(matrix);
83 return false;
84 }
85
86 bool swap_buffers() const override
87 {
88 return false;
89 }
90};
91
92
66AalMediaPlayerService::AalMediaPlayerService(QObject *parent)93AalMediaPlayerService::AalMediaPlayerService(QObject *parent)
67 :94 :
68 QMediaService(parent),95 QMediaService(parent),
69 m_hubPlayerSession(NULL),96 m_hubPlayerSession(nullptr),
70 m_playbackStatusChangedConnection(the_void.connect([](){})),97 m_playbackStatusChangedConnection(the_void.connect([](){})),
71 m_errorConnection(the_void.connect([](){})),98 m_errorConnection(the_void.connect([](){})),
72 m_endOfStreamConnection(the_void.connect([](){})),99 m_endOfStreamConnection(the_void.connect([](){})),
100 m_serviceDisconnectedConnection(the_void.connect([](){})),
101 m_serviceReconnectedConnection(the_void.connect([](){})),
73 m_bufferingStatusChangedConnection(the_void.connect([](){})),102 m_bufferingStatusChangedConnection(the_void.connect([](){})),
74 m_mediaPlayerControl(nullptr),103 m_mediaPlayerControl(nullptr),
75 m_videoOutput(nullptr),104 m_videoOutput(nullptr),
@@ -79,7 +108,7 @@
79 m_videoOutputReady(false),108 m_videoOutputReady(false),
80 m_firstPlayback(true),109 m_firstPlayback(true),
81 m_cachedDuration(0),110 m_cachedDuration(0),
82 m_mediaPlaylist(NULL),111 m_mediaPlaylist(nullptr),
83 m_bufferPercent(0),112 m_bufferPercent(0),
84 m_doReattachSession(false)113 m_doReattachSession(false)
85#ifdef MEASURE_PERFORMANCE114#ifdef MEASURE_PERFORMANCE
@@ -100,10 +129,12 @@
100 :129 :
101 QMediaService(parent),130 QMediaService(parent),
102 m_hubService(service),131 m_hubService(service),
103 m_hubPlayerSession(NULL),132 m_hubPlayerSession(nullptr),
104 m_playbackStatusChangedConnection(the_void.connect([](){})),133 m_playbackStatusChangedConnection(the_void.connect([](){})),
105 m_errorConnection(the_void.connect([](){})),134 m_errorConnection(the_void.connect([](){})),
106 m_endOfStreamConnection(the_void.connect([](){})),135 m_endOfStreamConnection(the_void.connect([](){})),
136 m_serviceDisconnectedConnection(the_void.connect([](){})),
137 m_serviceReconnectedConnection(the_void.connect([](){})),
107 m_bufferingStatusChangedConnection(the_void.connect([](){})),138 m_bufferingStatusChangedConnection(the_void.connect([](){})),
108 m_mediaPlayerControl(nullptr),139 m_mediaPlayerControl(nullptr),
109 m_videoOutput(nullptr),140 m_videoOutput(nullptr),
@@ -113,7 +144,7 @@
113 m_videoOutputReady(false),144 m_videoOutputReady(false),
114 m_firstPlayback(true),145 m_firstPlayback(true),
115 m_cachedDuration(0),146 m_cachedDuration(0),
116 m_mediaPlaylist(NULL),147 m_mediaPlaylist(nullptr),
117 m_bufferPercent(0),148 m_bufferPercent(0),
118 m_doReattachSession(false)149 m_doReattachSession(false)
119 #ifdef MEASURE_PERFORMANCE150 #ifdef MEASURE_PERFORMANCE
@@ -133,6 +164,8 @@
133{164{
134 m_errorConnection.disconnect();165 m_errorConnection.disconnect();
135 m_playbackStatusChangedConnection.disconnect();166 m_playbackStatusChangedConnection.disconnect();
167 m_serviceDisconnectedConnection.disconnect();
168 m_serviceReconnectedConnection.disconnect();
136169
137 if (m_audioRoleControl)170 if (m_audioRoleControl)
138 deleteAudioRoleControl();171 deleteAudioRoleControl();
@@ -160,11 +193,13 @@
160 // it again. If we don't do this connectSignals() will never be able to attach193 // it again. If we don't do this connectSignals() will never be able to attach
161 // to the relevant signals.194 // to the relevant signals.
162 m_endOfStreamConnection.disconnect();195 m_endOfStreamConnection.disconnect();
196 m_serviceDisconnectedConnection.disconnect();
197 m_serviceReconnectedConnection.disconnect();
163198
164 if (!newMediaPlayer())199 if (!newMediaPlayer())
165 qWarning() << "Failed to create a new media player backend. Video playback will not function." << endl;200 qWarning() << "Failed to create a new media player backend. Video playback will not function." << endl;
166201
167 if (m_hubPlayerSession == NULL)202 if (m_hubPlayerSession == nullptr)
168 {203 {
169 qWarning() << "Could not finish contructing new AalMediaPlayerService instance since m_hubPlayerSession is NULL";204 qWarning() << "Could not finish contructing new AalMediaPlayerService instance since m_hubPlayerSession is NULL";
170 return;205 return;
@@ -262,7 +297,7 @@
262 // changes297 // changes
263 m_sessionUuid = m_hubPlayerSession->uuid();298 m_sessionUuid = m_hubPlayerSession->uuid();
264 } catch (const std::runtime_error &e) {299 } catch (const std::runtime_error &e) {
265 qWarning() << "Failed to retrieve the current player's uuid: " << e.what() << endl;300 qWarning() << "Failed to retrieve the current player's uuid: " << e.what();
266 return false;301 return false;
267 }302 }
268303
@@ -271,13 +306,19 @@
271306
272std::shared_ptr<core::ubuntu::media::video::Sink> AalMediaPlayerService::createVideoSink(uint32_t texture_id)307std::shared_ptr<core::ubuntu::media::video::Sink> AalMediaPlayerService::createVideoSink(uint32_t texture_id)
273{308{
274 if (m_hubPlayerSession == NULL)309 if (m_hubPlayerSession == nullptr)
275 throw std::runtime_error310 throw std::runtime_error
276 {311 {
277 "Cannot create a video sink without a valid media-hub player session"312 "Cannot create a video sink without a valid media-hub player session"
278 };313 };
279314
280 auto sink = m_hubPlayerSession->create_gl_texture_video_sink(texture_id);315 std::shared_ptr<core::ubuntu::media::video::Sink> sink;
316 try {
317 sink = m_hubPlayerSession->create_gl_texture_video_sink(texture_id);
318 } catch (const std::runtime_error &e) {
319 qWarning() << "Failed to create a new video sink:" << e.what();
320 return core::ubuntu::media::video::Sink::Ptr{new EmptySink(0)};
321 }
281 m_videoOutputReady = true;322 m_videoOutputReady = true;
282323
283 return sink;324 return sink;
@@ -782,6 +823,20 @@
782 }823 }
783}824}
784825
826void AalMediaPlayerService::onServiceDisconnected()
827{
828 qDebug() << Q_FUNC_INFO;
829 m_mediaPlayerControl->setState(QMediaPlayer::StoppedState);
830 m_mediaPlayerControl->setMediaStatus(QMediaPlayer::NoMedia);
831}
832
833void AalMediaPlayerService::onServiceReconnected()
834{
835 qDebug() << Q_FUNC_INFO;
836 const QString errStr = "Player session is no longer valid since the service restarted.";
837 m_mediaPlayerControl->error(QMediaPlayer::ServiceMissingError, errStr);
838}
839
785void AalMediaPlayerService::onBufferingChanged()840void AalMediaPlayerService::onBufferingChanged()
786{841{
787 Q_EMIT m_mediaPlayerControl->bufferStatusChanged(m_bufferPercent);842 Q_EMIT m_mediaPlayerControl->bufferStatusChanged(m_bufferPercent);
@@ -822,6 +877,22 @@
822 Q_EMIT playbackComplete();877 Q_EMIT playbackComplete();
823 });878 });
824 }879 }
880
881 if (!m_serviceDisconnectedConnection.is_connected())
882 {
883 m_serviceDisconnectedConnection = m_hubService->service_disconnected().connect([this]()
884 {
885 QMetaObject::invokeMethod(this, "onServiceDisconnected", Qt::QueuedConnection);
886 });
887 }
888
889 if (!m_serviceReconnectedConnection.is_connected())
890 {
891 m_serviceReconnectedConnection = m_hubService->service_reconnected().connect([this]()
892 {
893 QMetaObject::invokeMethod(this, "onServiceReconnected", Qt::QueuedConnection);
894 });
895 }
825}896}
826897
827void AalMediaPlayerService::disconnectSignals()898void AalMediaPlayerService::disconnectSignals()
828899
=== modified file 'src/aal/aalmediaplayerservice.h'
--- src/aal/aalmediaplayerservice.h 2016-06-08 09:17:31 +0000
+++ src/aal/aalmediaplayerservice.h 2016-07-20 21:27:06 +0000
@@ -113,6 +113,8 @@
113public Q_SLOTS:113public Q_SLOTS:
114 void onPlaybackStatusChanged();114 void onPlaybackStatusChanged();
115 void onApplicationStateChanged(Qt::ApplicationState state);115 void onApplicationStateChanged(Qt::ApplicationState state);
116 void onServiceDisconnected();
117 void onServiceReconnected();
116 void onBufferingChanged();118 void onBufferingChanged();
117119
118protected:120protected:
@@ -138,7 +140,6 @@
138140
139 // Signals the proper QMediaPlayer::Error from a core::ubuntu::media::Error141 // Signals the proper QMediaPlayer::Error from a core::ubuntu::media::Error
140 void signalQMediaPlayerError(const core::ubuntu::media::Player::Error &error);142 void signalQMediaPlayerError(const core::ubuntu::media::Player::Error &error);
141
142 void onError(const core::ubuntu::media::Player::Error &error);143 void onError(const core::ubuntu::media::Player::Error &error);
143144
144 inline QString playbackStatusStr(const core::ubuntu::media::Player::PlaybackStatus &status);145 inline QString playbackStatusStr(const core::ubuntu::media::Player::PlaybackStatus &status);
@@ -148,6 +149,8 @@
148 core::Connection m_playbackStatusChangedConnection;149 core::Connection m_playbackStatusChangedConnection;
149 core::Connection m_errorConnection;150 core::Connection m_errorConnection;
150 core::Connection m_endOfStreamConnection;151 core::Connection m_endOfStreamConnection;
152 core::Connection m_serviceDisconnectedConnection;
153 core::Connection m_serviceReconnectedConnection;
151 core::Connection m_bufferingStatusChangedConnection;154 core::Connection m_bufferingStatusChangedConnection;
152155
153 AalMediaPlayerControl *m_mediaPlayerControl;156 AalMediaPlayerControl *m_mediaPlayerControl;
154157
=== modified file 'src/aal/aalmediaplaylistcontrol.cpp'
--- src/aal/aalmediaplaylistcontrol.cpp 2016-01-13 16:45:28 +0000
+++ src/aal/aalmediaplaylistcontrol.cpp 2016-07-20 21:27:06 +0000
@@ -49,7 +49,6 @@
4949
50AalMediaPlaylistControl::~AalMediaPlaylistControl()50AalMediaPlaylistControl::~AalMediaPlaylistControl()
51{51{
52 qDebug() << Q_FUNC_INFO;
53 disconnect_signals();52 disconnect_signals();
54}53}
5554
@@ -180,7 +179,12 @@
180QMediaPlaylist::PlaybackMode AalMediaPlaylistControl::playbackMode() const179QMediaPlaylist::PlaybackMode AalMediaPlaylistControl::playbackMode() const
181{180{
182 QMediaPlaylist::PlaybackMode currentMode = QMediaPlaylist::Sequential;181 QMediaPlaylist::PlaybackMode currentMode = QMediaPlaylist::Sequential;
183 const auto loopStatus = m_hubPlayerSession->loop_status();182 media::Player::LoopStatus loopStatus = media::Player::LoopStatus::none;
183 try {
184 loopStatus = m_hubPlayerSession->loop_status();
185 } catch (const std::runtime_error &e) {
186 qWarning() << "Failed to go to get loop_status: " << e.what();
187 }
184 switch (loopStatus)188 switch (loopStatus)
185 {189 {
186 case media::Player::LoopStatus::none:190 case media::Player::LoopStatus::none:
@@ -196,10 +200,14 @@
196 qWarning() << "Unknown loop status: " << loopStatus;200 qWarning() << "Unknown loop status: " << loopStatus;
197 }201 }
198202
199 // Shuffle overrides loopStatus since in the media-hub API random is not part of loop_status203 try {
200 // like it's all one for QMediaPlaylist::PlaybackMode204 // Shuffle overrides loopStatus since in the media-hub API random is not part of loop_status
201 if (m_hubPlayerSession->shuffle())205 // like it's all one for QMediaPlaylist::PlaybackMode
202 currentMode = QMediaPlaylist::Random;206 if (m_hubPlayerSession->shuffle())
207 currentMode = QMediaPlaylist::Random;
208 } catch (const std::runtime_error &e) {
209 qWarning() << "Failed to get current shuffle mode: " << e.what();
210 }
203211
204 return currentMode;212 return currentMode;
205}213}
@@ -211,34 +219,58 @@
211 {219 {
212 case QMediaPlaylist::CurrentItemOnce:220 case QMediaPlaylist::CurrentItemOnce:
213 qDebug() << "PlaybackMode: CurrentItemOnce";221 qDebug() << "PlaybackMode: CurrentItemOnce";
214 m_hubPlayerSession->shuffle() = false;222 try {
223 m_hubPlayerSession->shuffle() = false;
224 } catch (const std::runtime_error &e) {
225 qWarning() << "Failed to set shuffle mode: " << e.what();
226 }
215 qWarning() << "No media-hub equivalent for QMediaPlaylist::CurrentItemOnce";227 qWarning() << "No media-hub equivalent for QMediaPlaylist::CurrentItemOnce";
216 break;228 break;
217 case QMediaPlaylist::CurrentItemInLoop:229 case QMediaPlaylist::CurrentItemInLoop:
218 qDebug() << "PlaybackMode: CurrentItemInLoop";230 qDebug() << "PlaybackMode: CurrentItemInLoop";
219 m_hubPlayerSession->shuffle() = false;231 try {
220 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::track;232 m_hubPlayerSession->shuffle() = false;
233 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::track;
234 } catch (const std::runtime_error &e) {
235 qWarning() << "Failed to set shuffle mode/loop_status: " << e.what();
236 }
221 break;237 break;
222 case QMediaPlaylist::Sequential:238 case QMediaPlaylist::Sequential:
223 qDebug() << "PlaybackMode: Sequential";239 qDebug() << "PlaybackMode: Sequential";
224 m_hubPlayerSession->shuffle() = false;240 try {
225 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::none;241 m_hubPlayerSession->shuffle() = false;
242 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::none;
243 } catch (const std::runtime_error &e) {
244 qWarning() << "Failed to set shuffle mode/loop_status: " << e.what();
245 }
226 break;246 break;
227 case QMediaPlaylist::Loop:247 case QMediaPlaylist::Loop:
228 qDebug() << "PlaybackMode: Loop";248 qDebug() << "PlaybackMode: Loop";
229 m_hubPlayerSession->shuffle() = false;249 try {
230 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::playlist;250 m_hubPlayerSession->shuffle() = false;
251 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::playlist;
252 } catch (const std::runtime_error &e) {
253 qWarning() << "Failed to set shuffle mode/loop_status: " << e.what();
254 }
231 break;255 break;
232 case QMediaPlaylist::Random:256 case QMediaPlaylist::Random:
233 qDebug() << "PlaybackMode: Random";257 qDebug() << "PlaybackMode: Random";
234 m_hubPlayerSession->shuffle() = true;258 try {
235 // FIXME: Until pad.lv/1518157 (RandomAndLoop playbackMode) is259 m_hubPlayerSession->shuffle() = true;
236 // fixed set Random to be always looping due to pad.lv/1531296260 // FIXME: Until pad.lv/1518157 (RandomAndLoop playbackMode) is
237 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::playlist;261 // fixed set Random to be always looping due to pad.lv/1531296
262 m_hubPlayerSession->loop_status() = media::Player::LoopStatus::playlist;
263 } catch (const std::runtime_error &e) {
264 qWarning() << "Failed to set shuffle mode/loop_status: " << e.what();
265 }
238 break;266 break;
239 default:267 default:
240 qWarning() << "Unknown playback mode: " << mode;268 qWarning() << "Unknown playback mode: " << mode;
241 m_hubPlayerSession->shuffle() = false;269 try {
270 m_hubPlayerSession->shuffle() = false;
271 } catch (const std::runtime_error &e) {
272 qWarning() << "Failed to get current shuffle mode: " << e.what();
273 }
242 }274 }
243275
244 Q_EMIT playbackModeChanged(mode);276 Q_EMIT playbackModeChanged(mode);
@@ -313,7 +345,11 @@
313 if (playbackMode() == QMediaPlaylist::Sequential)345 if (playbackMode() == QMediaPlaylist::Sequential)
314 {346 {
315 qDebug() << "Repeat is off, so stopping playback";347 qDebug() << "Repeat is off, so stopping playback";
316 m_hubPlayerSession->stop();348 try {
349 m_hubPlayerSession->stop();
350 } catch (std::runtime_error &e) {
351 qWarning() << "FATAL: Failed to stop playback:" << e.what();
352 }
317 }353 }
318 }354 }
319}355}
320356
=== modified file 'src/aal/aalmediaplaylistprovider.cpp'
--- src/aal/aalmediaplaylistprovider.cpp 2016-02-22 16:10:09 +0000
+++ src/aal/aalmediaplaylistprovider.cpp 2016-07-20 21:27:06 +0000
@@ -48,7 +48,6 @@
4848
49AalMediaPlaylistProvider::~AalMediaPlaylistProvider()49AalMediaPlaylistProvider::~AalMediaPlaylistProvider()
50{50{
51 qDebug() << Q_FUNC_INFO;
52 disconnect_signals();51 disconnect_signals();
53}52}
5453
@@ -414,9 +413,8 @@
414413
415 try {414 try {
416 m_hubTrackList = m_hubPlayerSession->track_list();415 m_hubTrackList = m_hubPlayerSession->track_list();
417 }416 } catch (std::runtime_error &e) {
418 catch (std::runtime_error &e) {417 qWarning() << "FATAL: Failed to retrieve the current player session TrackList:" << e.what();
419 qWarning() << "FATAL: Failed to retrieve the current player session TrackList: " << e.what();
420 }418 }
421419
422 /* Disconnect first to avoid duplicated calls */420 /* Disconnect first to avoid duplicated calls */
423421
=== modified file 'src/aal/aalvideorenderercontrol.cpp'
--- src/aal/aalvideorenderercontrol.cpp 2015-06-18 16:17:21 +0000
+++ src/aal/aalvideorenderercontrol.cpp 2016-07-20 21:27:06 +0000
@@ -103,7 +103,8 @@
103#endif103#endif
104{104{
105 // Get notified when qtvideo-node creates a GL texture105 // Get notified when qtvideo-node creates a GL texture
106 connect(SharedSignal::instance(), SIGNAL(textureCreated(unsigned int)), this, SLOT(onTextureCreated(unsigned int)));106 connect(SharedSignal::instance(), SIGNAL(textureCreated(unsigned int)),
107 this, SLOT(onTextureCreated(unsigned int)));
107 connect(SharedSignal::instance(), SIGNAL(glConsumerSet()), this, SLOT(onGLConsumerSet()));108 connect(SharedSignal::instance(), SIGNAL(glConsumerSet()), this, SLOT(onGLConsumerSet()));
108 connect(m_service, SIGNAL(playbackComplete()), this, SLOT(playbackComplete()));109 connect(m_service, SIGNAL(playbackComplete()), this, SLOT(playbackComplete()));
109}110}
@@ -274,6 +275,12 @@
274 if (m_textureId == 0) {275 if (m_textureId == 0) {
275 m_textureId = static_cast<GLuint>(textureID);276 m_textureId = static_cast<GLuint>(textureID);
276 m_videoSink = m_service->createVideoSink(textureID);277 m_videoSink = m_service->createVideoSink(textureID);
278 if (not m_videoSink)
279 {
280 qWarning() << "Failed to create a new video sink with texture ID ("
281 << textureID << "), m_videoSink is a nullptr";
282 return;
283 }
277284
278 // Connect callback so that frames are rendered after decoding285 // Connect callback so that frames are rendered after decoding
279 m_frameAvailableConnection.reset(new core::Connection(m_videoSink->frame_available().connect(286 m_frameAvailableConnection.reset(new core::Connection(m_videoSink->frame_available().connect(
280287
=== modified file 'tests/unit/service.cpp'
--- tests/unit/service.cpp 2016-05-03 14:41:12 +0000
+++ tests/unit/service.cpp 2016-07-20 21:27:06 +0000
@@ -58,6 +58,18 @@
58{58{
59}59}
6060
61const core::Signal<void>& TestService::service_disconnected() const
62{
63 static const core::Signal<void> s;
64 return s;
65}
66
67const core::Signal<void>& TestService::service_reconnected() const
68{
69 static const core::Signal<void> s;
70 return s;
71}
72
61}73}
62}74}
63}75}
6476
=== modified file 'tests/unit/service.h'
--- tests/unit/service.h 2016-05-03 14:41:12 +0000
+++ tests/unit/service.h 2016-07-20 21:27:06 +0000
@@ -51,6 +51,9 @@
51 virtual std::shared_ptr<Player> create_fixed_session(const std::string& name, const Player::Configuration&);51 virtual std::shared_ptr<Player> create_fixed_session(const std::string& name, const Player::Configuration&);
52 virtual std::shared_ptr<Player> resume_session(Player::PlayerKey);52 virtual std::shared_ptr<Player> resume_session(Player::PlayerKey);
53 virtual void pause_other_sessions(Player::PlayerKey);53 virtual void pause_other_sessions(Player::PlayerKey);
54
55 virtual const core::Signal<void>& service_disconnected() const;
56 virtual const core::Signal<void>& service_reconnected() const;
54};57};
55}58}
56}59}

Subscribers

People subscribed via source and target branches

to all changes: