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
1=== modified file 'debian/rules'
2--- debian/rules 2014-06-27 08:06:14 +0000
3+++ debian/rules 2015-01-12 21:36:23 +0000
4@@ -14,7 +14,7 @@
5 export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9
6
7 %:
8- dh $@ --fail-missing -- -B build
9+ dh $@ --fail-missing --parallel -- -B build
10
11 override_dh_auto_configure:
12 dh_auto_configure -- -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX)
13
14=== modified file 'src/core/media/call-monitor/call_monitor.cpp'
15--- src/core/media/call-monitor/call_monitor.cpp 2015-01-07 22:30:45 +0000
16+++ src/core/media/call-monitor/call_monitor.cpp 2015-01-12 21:36:23 +0000
17@@ -80,7 +80,10 @@
18
19 private Q_SLOTS:
20 void accountManagerSetup() {
21- mAccountManager = Tp::AccountManager::create();
22+ mAccountManager = Tp::AccountManager::create(Tp::AccountFactory::create(QDBusConnection::sessionBus(),
23+ Tp::Account::FeatureCore),
24+ Tp::ConnectionFactory::create(QDBusConnection::sessionBus(),
25+ Tp::Connection::FeatureCore));
26 connect(mAccountManager->becomeReady(),
27 SIGNAL(finished(Tp::PendingOperation*)),
28 SLOT(accountManagerReady(Tp::PendingOperation*)));
29@@ -147,14 +150,13 @@
30 void checkAndAddAccount(const Tp::AccountPtr& account)
31 {
32 Tp::ConnectionCapabilities caps = account->capabilities();
33-
34- // anything call like, perhaps overkill?
35- if (caps.audioCalls() || caps.videoCalls() || caps.videoCallsWithAudio() || caps.streamedMediaCalls()) {
36- auto tcm = new TelepathyCallMonitor(account);
37- connect(tcm, SIGNAL(offHook()), SLOT(offHook()));
38- connect(tcm, SIGNAL(onHook()), SLOT(onHook()));
39- mCallMonitors.push_back(tcm);
40- }
41+ // TODO: Later on we will need to filter for the right capabilities, and also allow dynamic account detection
42+ // Don't check caps for now as a workaround for https://bugs.launchpad.net/ubuntu/+source/media-hub/+bug/1409125
43+ // at least until we are able to find out the root cause of it (check rev 107 for the caps check)
44+ auto tcm = new TelepathyCallMonitor(account);
45+ connect(tcm, SIGNAL(offHook()), SLOT(offHook()));
46+ connect(tcm, SIGNAL(onHook()), SLOT(onHook()));
47+ mCallMonitors.push_back(tcm);
48 }
49 };
50 }
51@@ -168,6 +170,7 @@
52 std::thread([this]() {
53 qt::core::world::build_and_run(0, nullptr, [this]() {
54 qt::core::world::enter_with_task([this]() {
55+ std::cout << "CallMonitor: Creating TelepathyBridge" << std::endl;
56 mBridge = new TelepathyBridge();
57 cv.notify_all();
58 });
59@@ -208,9 +211,10 @@
60
61 void CallMonitor::on_change(const std::function<void(CallMonitor::State)>& func)
62 {
63- if (d->mBridge != nullptr)
64+ if (d->mBridge != nullptr) {
65+ std::cout << "CallMonitor: Setting up callback for TelepathyBridge on_change" << std::endl;
66 d->mBridge->on_change(func);
67- else
68+ } else
69 std::cerr << "TelepathyBridge: Failed to hook on_change signal, bridge not yet set" << std::endl;
70 }
71
72
73=== modified file 'src/core/media/service_implementation.cpp'
74--- src/core/media/service_implementation.cpp 2015-01-07 20:08:51 +0000
75+++ src/core/media/service_implementation.cpp 2015-01-12 21:36:23 +0000
76@@ -508,9 +508,11 @@
77 d->call_monitor->on_change([this](CallMonitor::State state) {
78 switch (state) {
79 case CallMonitor::OffHook:
80+ std::cout << "Got call started signal, pausing all multimedia sessions" << std::endl;
81 pause_all_multimedia_sessions();
82 break;
83 case CallMonitor::OnHook:
84+ std::cout << "Got call ended signal, resuming paused multimedia sessions" << std::endl;
85 resume_paused_multimedia_sessions();
86 break;
87 }
88@@ -600,6 +602,7 @@
89 && player->audio_stream_role() == media::Player::multimedia)
90 {
91 d->paused_sessions.push_back(key);
92+ std::cout << "Pausing Player with key: " << key << std::endl;
93 player->pause();
94 }
95 });

Subscribers

People subscribed via source and target branches