Skip to content

feat!: dual-target mpv backend + rename to ovos-media-plugin-mpv#21

Merged
JarbasAl merged 3 commits into
devfrom
feat/dual-audio-media-backend
Jun 25, 2026
Merged

feat!: dual-target mpv backend + rename to ovos-media-plugin-mpv#21
JarbasAl merged 3 commits into
devfrom
feat/dual-audio-media-backend

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

Makes mpv work on both stacks (it was legacy ovos-audio only) and renames the distribution to match the ovos-media-plugin-* family.

  • New ovos-media backends: extract the mpv engine into a shared MPVBaseService(MediaBackend); add MPVOCPAudioService (opm.media.audio) + MPVOCPVideoService (opm.media.video). The legacy OVOSMPVService (mycroft.plugin.audioservice) now reuses the same engine via base-first MRO — no duplicated logic.
  • Rename: distribution ovos-audio-plugin-mpvovos-media-plugin-mpv; bump ovos-plugin-manager>=2.1.0,<3.0.0 (needed for the opm.media.* templates). Python module stays ovos_plugin_mpv (mplayer convention).
  • 18 tests pass (new audio/video backends + legacy adapter share one engine; entry-point groups asserted).

The GitHub repo is being renamed to ovos-media-plugin-mpv (redirects preserved).

🤖 Generated with Claude Code

Add the new ovos-media backends so mpv works on both stacks (previously legacy
ovos-audio only):
- extract the mpv engine into a shared MPVBaseService(MediaBackend); add
  MPVOCPAudioService (opm.media.audio) and MPVOCPVideoService (opm.media.video);
  the legacy OVOSMPVService now reuses the shared engine via the same
  base-first MRO. ocp_sync_playback is legacy-only — the new backends fall back
  to the bus emit (existing try/except).
- rename the distribution ovos-audio-plugin-mpv -> ovos-media-plugin-mpv and
  declare opm.media.audio/video alongside mycroft.plugin.audioservice; bump
  ovos-plugin-manager to >=2.1.0,<3.0.0 (required for the opm.media.* templates).
  Python module stays ovos_plugin_mpv (matches the mplayer convention).
- tests cover the new audio/video backends + the legacy adapter sharing one
  engine and the declared entry-point groups.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@JarbasAl, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes and 11 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71d8f7f2-689b-45d1-88ea-01ff8b6e2621

📥 Commits

Reviewing files that changed from the base of the PR and between 29db383 and 6d57d62.

📒 Files selected for processing (4)
  • ovos_plugin_mpv/__init__.py
  • pyproject.toml
  • test/test_e2e.py
  • test/test_mpv.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dual-audio-media-backend

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Beep boop! Here's the latest status of your PR checks. 🤖

I've aggregated the results of the automated checks for this PR below.

🔍 Lint

The results are fresh out of the pipeline. 🏗️

ruff: issues found — see job log

🔒 Security (pip-audit)

No malware found in this neighborhood! 🏡

✅ No known vulnerabilities found (61 packages scanned).

⚖️ License Check

Ensuring the project remains 100% open source. 🔓

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🏷️ Release Preview

What's in the box? A preview of the next release! 📦

Caution

Breaking change — this PR will bump the MAJOR version (0.2.2a31.0.0a1).
Downstream dependents may break. Double-check compatibility before merging.

Current: 0.2.2a3Next: 1.0.0a1

Signal Value
Label breaking, feature
PR title feat!: dual-target mpv backend + rename to ovos-media-plugin-mpv
Bump major

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 1.0.0a1

Channel Status Note Current Constraint
Stable Not in channel -
Testing Not in channel -
Alpha Not in channel -

📋 Repo Health

Ensuring the repo's immune system is strong (aka security checks). 🛡️

✅ All required files present.

Latest Version: 0.2.2a3

ovos_plugin_mpv/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_plugin_mpv/version.py has valid version block markers

🔌 Plugin Detection

Ensuring the plugin's 'metadata' is searchable and accurate. 🔍

⚠️ Plugin Status: WARNINGS (2)

Plugin Info:

  • Name: ovos-media-plugin-mpv
  • Description: mpv audio + video playback plugin for ovos-media (and the legacy ovos-audio service)

Plugin Types: media.audio, media.video

OPM Detection:

Plugin Type Wheel Editable
media.audio
media.video

Entry Point Validation:

Entry Point Type Import Interface
ovos-media-audio-plugin-mpv media.audio ✅ 1ms
ovos-media-video-plugin-mpv media.video

⊘ No settingsmeta.json

Issues:

  • ⚠️ No settingsmeta.json found
  • ⚠️ No settingsmeta.json found

🔨 Build Tests

Checking the calibration of the build environment. ⚖️

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Helping you push code with confidence 🚀

…ayer

Use ovoscope's OCPPlayerHarness (PR #89) to inject MPVOCPAudioService into a real
ovos-media OCPMediaPlayer on a FakeBus and exercise the full play/pause/resume/
stop flow + now_playing routing (the mpv engine is mocked). Declare the
ovoscope[media] test extra (floor-pinned to 0.20.0a1, the release that adds the
harness); the test skips gracefully if the extra is absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JarbasAl JarbasAl marked this pull request as ready for review June 25, 2026 17:41
…released)

The OCPPlayerHarness media extra shipped in ovoscope 0.21.0a1, not 0.20.x.
0.20.0a1 was never published to PyPI, so the test extra was unresolvable and
build_tests failed at install with 'No matching distribution found'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JarbasAl JarbasAl merged commit b3b63dc into dev Jun 25, 2026
14 checks passed
@JarbasAl JarbasAl deleted the feat/dual-audio-media-backend branch June 25, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant