Merge lp://staging/~chunsang/media-hub/wip_media-hub-interface into lp://staging/media-hub

Proposed by Chunsang Jeong
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 226
Merged at revision: 214
Proposed branch: lp://staging/~chunsang/media-hub/wip_media-hub-interface
Merge into: lp://staging/media-hub
Diff against target: 167 lines (+83/-11)
3 files modified
overlay/bin/media-hub-service.wrapper (+26/-0)
snapcraft.yaml (+47/-8)
src/core/media/apparmor/ubuntu.cpp (+10/-3)
To merge this branch: bzr merge lp://staging/~chunsang/media-hub/wip_media-hub-interface
Reviewer Review Type Date Requested Status
Jim Hodapp (community) Approve
Alfonso Sanchez-Beato Approve
Review via email: mp+319896@code.staging.launchpad.net

Commit message

Enable media-hub as a snap enabling media playback with media-hub clients e.g. mediaplayer-app

Description of the change

Enable media-hub as a snap enabling media playback with media-hub clients e.g. mediaplayer-app

To post a comment you must log in.
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

See comments below

review: Needs Fixing
Revision history for this message
Chunsang Jeong (chunsang) wrote :

Thanks Alfonso,
Please check the replies for your comments.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@chunsang, thanks for the changes. After some testing, I have some further comments:

* In the end, the line
name: "MediaHub"
is actually needed. It works as a parameter to the mpris interface, and gets used to build the apparmor profile. Please add it back, plus a comment on why it is needed.

* Add the screen-inhibit-control to the list of plugs, this is needed so media-hub can control the screen display.

* I see a couple of warnings when creating the snap:
<<
"grade" property not specified: defaulting to "stable"
DEPRECATED: The 'snap' keyword has been replaced by 'prime'.
See http://snapcraft.io/docs/deprecation-notices/dn1 for more information.
>>
Please remove them (add grade: stable and use prime)

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Some additional points:

* It turns out that including gstreamer1.0-plugins-bad produces this error you once mentioned in mediaplayer-app:
<<
[II 2017-03-16 16:15:54.988771] [platform_default_sink.cpp:75@make_platform_default_sink_factory] Invalid or no A/V backend specified, using "hybris" as a default.
ERROR: Failed to load hybris linker for Android SDK version 19
>>
Did you find a fix for this that allows us to still use plugins-bad?

* To be able to connect to pulse audio, some env vars need to be defined:
  - If the snap is running in a classic environment:
      PULSE_RUNTIME_PATH=/run/user/$UID/pulse
  - If PA is provided by a snap (so PA is running as root):
      PULSE_RUNTIME_PATH=/var/run/pulse
      PULSE_SYSTEM=1
So we need some wrapper script to set them, as in https://github.com/canonical-system-enablement/pulseaudio-example/blob/master/overlay/bin/client-wrapper . Ideally it should be able to find out the type of PA installation and set then env accordingly.

* This is the bug for user session daemons: https://bugs.launchpad.net/snappy/+bug/1613420

* For AMR, looking at https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec#Licensing_and_patent_issues it seems like it is safe to include it.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

One more update: it is fine to include gstreamer1.0-plugins-bad, but mediaplayer-app needs to be recompiled in that case using latest media-hub client library from the overlay.

Finally, mediaplayer-app needs to use *media-hub* interface on top of lp:~renatofilho/mediaplayer-app/fix-app-args/

Revision history for this message
Chunsang Jeong (chunsang) wrote :

@abeato, thanks for your review. Please check the additional patch.

And for prior question about "ERROR: Failed to load hybris linker for Android SDK version 19", it's known problem which happens when not using stable-phone-overlay ppa to snap any of media player-app and media-hub, as you already figured out.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@chunsang, thanks for the changes. Just a couple more things, see below.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

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

A few things to fix. See inline below.

review: Needs Fixing (code)
226. By Chunsang Jeong

register snap.music-app.music-app snap name into apparmor to avoid invalid id and access media folders

Revision history for this message
Chunsang Jeong (chunsang) wrote :

See inline comments.

Revision history for this message
Chunsang Jeong (chunsang) wrote :

> A few things to fix. See inline below.
Sorry that I forgot to save the reply, so you might see updated patch (r226) first.

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

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches