From fc00704eafd27305b9ca7e842b0321e0007d3154 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 16 Jan 2019 19:44:28 -0500 Subject: Replace QtMultimedia usage with 4A + gstreamer Replace QtMultimedia usage for ringtone playing with a gstreamer pipeline that uses the provided 4A role ALSA device for output. For now, a "phone" role is assumed to be available, but it does not exist in the current set of 4A policy and HALs, and needs to be added. Testing was done by making the required role changes locally and using some debug QML tweaks to allow triggering the ringtone manually. Bug-AGL: SPEC-1596 Change-Id: I55c2229de1bc5470ee818e5be382b64664fa2d29 Signed-off-by: Scott Murray --- app/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/main.cpp') diff --git a/app/main.cpp b/app/main.cpp index 71868d8..91580a5 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -30,6 +30,7 @@ #include #include "phone.h" #include "numbertype.h" +#include "fileplayer.h" int main(int argc, char *argv[]) { @@ -63,11 +64,13 @@ int main(int argc, char *argv[]) context->setContextProperty(QStringLiteral("bindingAddress"), bindingAddress); Telephony *telephony = new Telephony(bindingAddress); context->setContextProperty("telephony", telephony); - Phone *phone = new Phone(telephony); + std::string token = secret.toStdString(); + std::string install_dir = getenv("AFM_APP_INSTALL_DIR"); + FilePlayer *player = new FilePlayer(port, token, install_dir + "/bin/Phone.wav", std::string("phone")); + Phone *phone = new Phone(telephony, player); context->setContextProperty("phone", phone); QObject::connect(telephony, &Telephony::callStateChanged, phone, &Phone::onCallStateChanged); context->setContextProperty("pbap", new Pbap(bindingAddress, context)); - std::string token = secret.toStdString(); LibHomeScreen* hs = new LibHomeScreen(); QLibWindowmanager* qwm = new QLibWindowmanager(); -- cgit 1.2.3-korg