Show current video/audio decoder in popover

This commit is contained in:
Rafał Dzięgiel
2021-09-01 14:28:15 +02:00
parent bbada8fb4e
commit 451711b9c6
3 changed files with 19 additions and 0 deletions

View File

@@ -79,6 +79,9 @@ class ClapperWidget extends Gtk.Grid
this.player.connect('duration-changed', this._onPlayerDurationChanged.bind(this));
this.player.connect('media-info-updated', this._onMediaInfoUpdated.bind(this));
this.player.connect('video-decoder-changed', this._onPlayerVideoDecoderChanged.bind(this));
this.player.connect('audio-decoder-changed', this._onPlayerAudioDecoderChanged.bind(this));
this.overlay.set_child(playerWidget);
this.overlay.add_overlay(this.revealerTop);
this.overlay.add_overlay(this.revealerBottom);
@@ -507,6 +510,16 @@ class ClapperWidget extends Gtk.Grid
this.controls.positionScale.set_value(positionSeconds);
}
_onPlayerVideoDecoderChanged(player, decoder)
{
this.controls.videoTracksButton.setDecoder(decoder);
}
_onPlayerAudioDecoderChanged(player, decoder)
{
this.controls.audioTracksButton.setDecoder(decoder);
}
_onStateNotify(toplevel)
{
const isMaximized = Boolean(