summaryrefslogtreecommitdiffstats
path: root/mediaplayer/mediaplayer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2022-02-28Add Bluetooth media control supportmarlin_12.93.0marlin/12.93.012.93.0Scott Murray1-23/+115
Rework to expose Bluetooth AVRCP media control in the Bluetooth class, and use that support to implement a Bluetooth backend in the Mediaplayer class. This replaces the scheme that existed with the agl-service-mediaplayer binding where it abstracted away the Bluetooth support itself. However, care has been take to make sure that the exposed API to users of libqtappfw-mediaplayer has not changed. Bug-AGL: SPEC-4231 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I76b4f75621ce0121364eea3259b074bf3067ee88
2022-02-15Rework mediaplayer support to use mpdScott Murray1-162/+81
Rework the mediaplayer support to replace the stubbed out app framework agl-service-mediaplayer binding use with driving mpd (Media Player Daemon) via the libmpdclient library. Local file playback behavior should be equivalent to before in an image with mpd present and suitably configured. Bluetooth AVRCP support is still stubbed out, and will be re-implemented with followup changes. Bug-AGL: SPEC-4182 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ifdf092b472c271460d0f5e9a8c7d2353904411b2
2020-05-04share MessageEngine instanceRaquel Medina1-7/+6
Share MessageEngine instance among clients in the same process using a common socket (same url). - add MessageEngineFactory class; - extend std::unordered_map<> to use QString as key; - use std::shared_ptr<MessageEngine> to share ownership among MessageEngineFactory and the engine clients; - force MessagEngine parent object null to avoid life cycle dependency on a parent; - protect insertions & deletions in m_calls map; Also, not directly related but as part of testing these changes: cleanup on voice to remove superflous model sorting (there's just one voice model for alexa voice agent). Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ie2304453dc37723dac13d256286eeb85f84ca2ab
2020-03-23rework message hierarchyRaquel Medina1-28/+39
Rework message hierarchy with the final objective of splitting libqtappfw into several libraries. This commit carries the following changes: - Simplify message hierarchy, keeping abstract Message class, adding specialization for call and event messages, keeping ResponseMessage, and removing all module specific specializations. - Add MessageFactory class to create message objects. - Change messages life cycle: using smart pointers and removing QObject from message hierarchy (a Message is not a QObject anymore and thus 'deleteLater()' is not available). - Adapt all modules to use new message hierarchy. - Keep ResponseMessage original constructor to avoid breaking TaskManager. - Message constructors have been kept public, but will go private on a follow-up patch (once TaskManager class has been modified to use new MessageFactory). Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I3a7a6325209ddeca2293f1ac745371861a947bfb
2020-03-09eliminate unneeded dependencies on public headersRaquel Medina1-4/+8
- Remove unneeded dependencies from libqtappfw public headers, specifically MessageEngine and Message hierarchy header files, in preparation for refactoring work on these areas. This change helps shield client apps from the upcoming changes in the library, and highlight the separation between the library's core and the various modules providing public interfaces to those apps. - Make MessageType an scoped enum to fwd declare it. - Update Copyright statement on files updated by this patch. Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I12fd9cdc034aa1166f6448c07befadd9d2042b05
2019-09-12mediaplayer: clear metadata in consumer UI on media removalMatt Ranostay1-0/+16
On storage removal the metadata displayed for the media playing should be cleared in consumer UI Bug-AGL: SPEC-1430 Change-Id: I9824c94cf81fc0beb0cc278ac980813e906efbe8 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-02-21libqtappfw: mediaplayer: update loop command parameterMatt Ranostay1-2/+2
state parameter needs to be able to set to a respective string to enable various loop functionality (e.g. playlist, track, or off) This patchset needs to be merged, and respective SRCREV in the recipe to be updated before additional changes to avoid breakage. Bug-AGL: SPEC-2181 Change-Id: I37de12f7ed02fba5e15ef45c3a854967264f2014 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-02-13libqtappfw: mediaplayer: send empty artist + album data if noneMatt Ranostay1-3/+17
Avoid isues with clients always assuming there is an artist + album data by sending blank strings. Bug-AGL: SPEC-2180 Change-Id: Ifc1aab9f4a64bc2a142f56e1b3ffc40b1db1f5bd Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-12-20libqtappfw: mediaplayer: set album art via qml contextguppy_6.99.3guppy/6.99.36.99.3Matt Ranostay1-1/+8
To avoid race conditions of album art not being displayed on startup Change-Id: Ic5776421cea408d4dbd06efc65b1f7561d45537a Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-11-25libqtappfw: mediaplayer: add connect/disconnect methodsMatt Ranostay1-0/+9
Allow libqtappfw middleware to connect/disconnect avrcp/a2dp profiles. Bug-AGL: SPEC-1630 Change-Id: Idd160ccddc90a211af3c43b19a731d6df6ae8b1e Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-09-12libqtappfw: remove deleteLater instances that aren't usedguppy_6.90.0guppy/6.90.06.90.0Matt Ranostay1-3/+3
Remove several deleteLater calls that should have been delete's. This should solve race conditions that an object calls deleteLater(), and leaves scope before the QT main loop is called. Outcome of the race condition is that sometimes the memory allocator reallocates it to another message and causes a crash. Bug-AGL: SPEC-1680 Change-Id: Ic83d8c6c204c6e3248bbe9a9def1842e1e384b2b Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-06-29libqtappfw: mediaplayer: change from JSON objects to proper Qt modelMatt Ranostay1-2/+33
Switch to using proper Qt model versus JSON objects being passed to QML Bug-AGL: SPEC-1430 Change-Id: Ic07a355fee3292d113bc62bee9acb0764a0a5458 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-06-25Reorg binding-specific modules into subdirectoriesMatt Porter1-0/+171
Move binding-specific code into per-binding subdirectories. This separates the core message engine code and simplifies adding new binding-specific modules. Bug-AGL: SPEC-1525 Change-Id: I8fc545e3af375e2ed9e79a41363b7ade97e9b20a Signed-off-by: Matt Porter <mporter@konsulko.com>