Repository navigation
Media over GStreamer, and what's playing over MPRIS - #18
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements AppRuntime's media contracts on Linux:
MediaPlayer.mdover GStreamer, andNowPlaying.mdover MPRIS. The player now drawsVideoPlayernodes.LinuxMedia: AppRuntime'sHostMediaPlaybackruns the contract. It gets one GStreamerplaybinper player (GStreamerEngine).unavailable.appsinkas RGBA, which holds at most one and drops older ones. Sound goes to the desktop's sound server throughscaletempo, so changing the rate keeps the pitch.MediaError, andcanPlayanswered from GStreamer's registry.org.mpris.MediaPlayer2.<app id>, on the session bus, which the shell shows with its media controls and keys.HostMediaPlayback.remote. Next and previous go to the guest.PropertiesChangedon each report, andSeekedwhen the position jumps. The name is given up when the app stops describing a player..audio(background: true)makescanPlayInBackgroundtrue, since the desktop never sends an app to the background.LinuxDBusserving:exportserves an object through PureSwift/DBus's object server, with its methods and properties answered on the main loop.requestNameandreleaseNametake and give up a name;emitandemitPropertiesChangedsend signals.HostVideoPlayer): the latest picture, fitted, filled or stretched as the node asks. Unlesscontrols: none, it has a play/pause button, a scrubber and the time. The controls' pause is reported as the user's.HostNodeViewsdraws the node, because the syncedNodeViewhas noVideoPlayercase yet.LinuxFiles.configureIfNeeded(): media finds bundle and app files throughHostFileseven when the app doesn't useFiles.Plan.md: §15 covers media and MPRIS, and §11.1 covers serving on D-Bus. Testing, Phases and Open questions move to §16–§18.Testing: the full Linux suite passes in Docker (262 tests). The D-Bus and media suites passed two more runs.
fakesink. They play a WAV the tests write and an MJPEG AVI that GStreamer encodes.dbus-daemon, with a second connection standing in for the shell.VideoPlayernodes lay out in LinuxUI's rendering test.Not verified: