Add workarounds for current Wireplumber policy implementation

Description

To work with the current behavior of the Wireplumber policy implementation, the mediaplayer and radio bindings need to set their gstreamer states' to READY or STOPPED state when the stop/pause button is pressed in the UI, instead of to PAUSED as is currently done.  This is due to Wireplumber's behavior being driven by endpoint lifetime, and currently policy is only triggered on endpoint creation or destruction.  Setting a gstreamer stream to GST_STATE_PAUSED does not destroy the associated endpoint in PW, so the WP policy will not trigger with its current behavior.  This is visible with e.g. mediaplayer not restarting when radio is stopped and vice versa.

One side effect of this change that will need extra consideration is that in order to maintain current behavior, the mediaplayer binding will need to track stream position to be able to seek to where it was before going to READY state when it resumes playing.

Environment

None

Activity

Jan-Simon Moeller 
March 3, 2020 at 9:31 PM

This is marked in progress for 9.0.0 . Is it still an issue ?

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Components

Priority

Created December 17, 2019 at 12:40 AM
Updated April 7, 2020 at 7:36 PM
Resolved March 3, 2020 at 9:36 PM