Merge lp:~rsalveti/media-hub/1409125 into lp:media-hub

Proposed by Ricardo Salveti
Status: Merged
Approved by: Jim Hodapp
Approved revision: 110
Merged at revision: 104
Proposed branch: lp:~rsalveti/media-hub/1409125
Merge into: lp:media-hub
Diff against target: 95 lines (+19/-12)
3 files modified
debian/rules (+1/-1)
src/core/media/call-monitor/call_monitor.cpp (+15/-11)
src/core/media/service_implementation.cpp (+3/-0)
To merge this branch: bzr merge lp:~rsalveti/media-hub/1409125
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+246212@code.launchpad.net

Commit message

* service_implementation: adding debug for call started/ended signals
* Make sure account and connection are available when setting up account manager (patch from Gustavo Boiko)
* call_monitor: don't check caps when hooking up on/off signals, until bug 1409125 is fixed
* Enable parallel building

Description of the change

* service_implementation: adding debug for call started/ended signals
* Make sure account and connection are available when setting up account manager (patch from Gustavo Boiko)
* call_monitor: don't check caps when hooking up on/off signals, until bug 1409125 is fixed

To post a comment you must log in.
lp:~rsalveti/media-hub/1409125 updated
108. By Ricardo Salveti

Making log line for call monitor similar to others

109. By Ricardo Salveti

call_monitor: remove debug on connection->status, not necessarily ready during boot

Revision history for this message
Jim Hodapp (jhodapp) :
review: Needs Fixing (code)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~rsalveti/media-hub/1409125 updated
110. By Ricardo Salveti

call_monitor: adding a reference for rev 107 in checkAndAddAccount

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good, thanks!

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/rules'
--- debian/rules 2014-06-27 08:06:14 +0000
+++ debian/rules 2015-01-12 21:36:23 +0000
@@ -14,7 +14,7 @@
14export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.914export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9
1515
16%:16%:
17 dh $@ --fail-missing -- -B build 17 dh $@ --fail-missing --parallel -- -B build
1818
19override_dh_auto_configure:19override_dh_auto_configure:
20 dh_auto_configure -- -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX)20 dh_auto_configure -- -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX)
2121
=== modified file 'src/core/media/call-monitor/call_monitor.cpp'
--- src/core/media/call-monitor/call_monitor.cpp 2015-01-07 22:30:45 +0000
+++ src/core/media/call-monitor/call_monitor.cpp 2015-01-12 21:36:23 +0000
@@ -80,7 +80,10 @@
8080
81private Q_SLOTS:81private Q_SLOTS:
82 void accountManagerSetup() {82 void accountManagerSetup() {
83 mAccountManager = Tp::AccountManager::create();83 mAccountManager = Tp::AccountManager::create(Tp::AccountFactory::create(QDBusConnection::sessionBus(),
84 Tp::Account::FeatureCore),
85 Tp::ConnectionFactory::create(QDBusConnection::sessionBus(),
86 Tp::Connection::FeatureCore));
84 connect(mAccountManager->becomeReady(),87 connect(mAccountManager->becomeReady(),
85 SIGNAL(finished(Tp::PendingOperation*)),88 SIGNAL(finished(Tp::PendingOperation*)),
86 SLOT(accountManagerReady(Tp::PendingOperation*)));89 SLOT(accountManagerReady(Tp::PendingOperation*)));
@@ -147,14 +150,13 @@
147 void checkAndAddAccount(const Tp::AccountPtr& account)150 void checkAndAddAccount(const Tp::AccountPtr& account)
148 {151 {
149 Tp::ConnectionCapabilities caps = account->capabilities();152 Tp::ConnectionCapabilities caps = account->capabilities();
150153 // TODO: Later on we will need to filter for the right capabilities, and also allow dynamic account detection
151 // anything call like, perhaps overkill?154 // Don't check caps for now as a workaround for https://bugs.launchpad.net/ubuntu/+source/media-hub/+bug/1409125
152 if (caps.audioCalls() || caps.videoCalls() || caps.videoCallsWithAudio() || caps.streamedMediaCalls()) {155 // at least until we are able to find out the root cause of it (check rev 107 for the caps check)
153 auto tcm = new TelepathyCallMonitor(account);156 auto tcm = new TelepathyCallMonitor(account);
154 connect(tcm, SIGNAL(offHook()), SLOT(offHook()));157 connect(tcm, SIGNAL(offHook()), SLOT(offHook()));
155 connect(tcm, SIGNAL(onHook()), SLOT(onHook()));158 connect(tcm, SIGNAL(onHook()), SLOT(onHook()));
156 mCallMonitors.push_back(tcm);159 mCallMonitors.push_back(tcm);
157 }
158 }160 }
159};161};
160}162}
@@ -168,6 +170,7 @@
168 std::thread([this]() {170 std::thread([this]() {
169 qt::core::world::build_and_run(0, nullptr, [this]() {171 qt::core::world::build_and_run(0, nullptr, [this]() {
170 qt::core::world::enter_with_task([this]() {172 qt::core::world::enter_with_task([this]() {
173 std::cout << "CallMonitor: Creating TelepathyBridge" << std::endl;
171 mBridge = new TelepathyBridge();174 mBridge = new TelepathyBridge();
172 cv.notify_all();175 cv.notify_all();
173 });176 });
@@ -208,9 +211,10 @@
208211
209void CallMonitor::on_change(const std::function<void(CallMonitor::State)>& func)212void CallMonitor::on_change(const std::function<void(CallMonitor::State)>& func)
210{213{
211 if (d->mBridge != nullptr)214 if (d->mBridge != nullptr) {
215 std::cout << "CallMonitor: Setting up callback for TelepathyBridge on_change" << std::endl;
212 d->mBridge->on_change(func);216 d->mBridge->on_change(func);
213 else217 } else
214 std::cerr << "TelepathyBridge: Failed to hook on_change signal, bridge not yet set" << std::endl;218 std::cerr << "TelepathyBridge: Failed to hook on_change signal, bridge not yet set" << std::endl;
215}219}
216220
217221
=== modified file 'src/core/media/service_implementation.cpp'
--- src/core/media/service_implementation.cpp 2015-01-07 20:08:51 +0000
+++ src/core/media/service_implementation.cpp 2015-01-12 21:36:23 +0000
@@ -508,9 +508,11 @@
508 d->call_monitor->on_change([this](CallMonitor::State state) {508 d->call_monitor->on_change([this](CallMonitor::State state) {
509 switch (state) {509 switch (state) {
510 case CallMonitor::OffHook:510 case CallMonitor::OffHook:
511 std::cout << "Got call started signal, pausing all multimedia sessions" << std::endl;
511 pause_all_multimedia_sessions();512 pause_all_multimedia_sessions();
512 break;513 break;
513 case CallMonitor::OnHook:514 case CallMonitor::OnHook:
515 std::cout << "Got call ended signal, resuming paused multimedia sessions" << std::endl;
514 resume_paused_multimedia_sessions();516 resume_paused_multimedia_sessions();
515 break;517 break;
516 }518 }
@@ -600,6 +602,7 @@
600 && player->audio_stream_role() == media::Player::multimedia)602 && player->audio_stream_role() == media::Player::multimedia)
601 {603 {
602 d->paused_sessions.push_back(key);604 d->paused_sessions.push_back(key);
605 std::cout << "Pausing Player with key: " << key << std::endl;
603 player->pause();606 player->pause();
604 }607 }
605 });608 });

Subscribers

People subscribed via source and target branches