Skip to content

clapper-gtk: Add audio widget #579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 3, 2025
Merged

clapper-gtk: Add audio widget #579

merged 8 commits into from
Aug 3, 2025

Conversation

Rafostar
Copy link
Owner

@Rafostar Rafostar commented Aug 1, 2025

This PR adds a ClapperGtkAudio widget which can be used to integrate audio-only playback to some application or just build an audio player with it.

It made sense to make it, as it can easily work with all the buttons, seek bar, labels, etc. that ClapperGtk library already provides.

Usage is similar ClapperGtkVideo - just place buttons inside it (or one of its children) and they will work automatically. This aims to be easy to use, yet at the same time gives freedom for applications to do the UI however they want to.

Example is also included as part of this PR.


NOTE: This might do some breaking API changes for some bindings or apps, since the only way that made sense to do this was by subclassing video widget into a base class, moving some props to it and then having both audio and video widgets share that base class. I tried my best to reduce such issues to minimum.

Create a base class called "ClapperGtkAv" and subclass it into "ClapperGtkVideo".
This allows to have player and session inhibit logic in base class and share it
with other subclassed widgets.
Actions of video widget are being deprecated in favour of
the same actions in the recently added AV base class
A widget similar to video but for audio playback only. Widgets from
ClapperGtk library like buttons, seek bar, etc. can be used in it
for building an audio player with ease.
A simple audio player made using "ClapperGtkAudio"
widget with python3 GI bindings
A detailed signal that allows for applications to receive element
messages posted on the pipeline bus. Useful if app cares about
some custom message that player normally does not handle.

For example audio player might want to read "level" messages in
order to show current audio level or implement visualizations.
We only need to post events in the pipeline for navigation to work.
This was never used for anything and it generates a lot of noise
in the pipeline bus when cursor is moving over video.
Replace all usage of "clapper_gtk_video_get_player" with
"clapper_gtk_av_get_player" as the former one is deprecated
Replace all usage of "video" actions with "av" as the former one is deprecated
@Rafostar Rafostar merged commit d9c8534 into master Aug 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant