Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#12144 closed Patch - Feature (fixed)

Save volume only on TV Player exit (optimize DB usage)

Reported by: angela.schmid@… Owned by: Roger Siddons
Priority: minor Milestone: 0.28
Component: MythTV - Audio Output Version: 0.27-fixes
Severity: low Keywords: mysql volume save
Cc: Ticket locked: no

Description

Saving the volume to the DB on each volume change is unnecessary. To optimize DB usage, the patch saves the volume only on exit of the TV Player (TV::PrepareToExitPlayer?).

There was also a small bug: On each volume change in the TV Player the volume is saved twice when software volume is configured:

In libs/libmyth/audio/volumebase.cpp VolumeBase::SetCurrentVolume?

Attachments (1)

0001-Save-volume-only-on-TV-Player-exit.patch (4.3 KB) - added by angela.schmid@… 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by angela.schmid@…

comment:1 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: newclosed

In 85baf66840dbf728af732f1d346ffe63fbe3ab41/mythtv:

Save volume only on TV Player exit

Original patch by angelaschmid <angela.schmid@…>. Thank you

Fixes #12144

comment:2 Changed 10 years ago by JYA

Milestone: unknown0.28

comment:3 Changed 8 years ago by Roger Siddons <rsiddons@…>

In 26e44bf08cf2f3b17a3eae7efa8afa65156d7fe0/mythtv:

Revert "Save volume only on TV Player exit"

This reverts commit 85baf66840dbf728af732f1d346ffe63fbe3ab41.

AudioPlayer? exits/resets in numerous other places (for example: livetv, end-of-recording dialog, audio stream change)
so catching all of them is difficult and error-prone. An alternative solution will be used.

Refs #12144

comment:4 Changed 8 years ago by Roger Siddons <rsiddons@…>

In 874b65bc84bd080ec538d27a12573b2e582ffaef/mythtv:

Audio: Fix duplicate Db writes of volume for software mixer

When using software mixer volume updates were being written to Db twice

Refs #12144

comment:5 Changed 8 years ago by Lawrence Rust <lvr@…>

In abaf8ddb8ca4f9cc1196a08ca9593498398f948f/mythtv:

Audio: Offload dbase updates when volume is changed

VolumeBase::SetCurrentVolume? writes the new volume immediately to the dbase.
This dbase update occurs on the main UI thread and can take several mS
on a remote FE. The delay caused by a series of volume changes (e.g. by
holding down the volume up/down button) can adversely affect video playback,
causing minor loss of a/v sync which results in the player dropping frames
which in turn is distracting to the viewer.

This patch delegates volume dbase updates to a separate thread which
also adds a holdoff period in order to reduce the number of updates.

LVR 0.27/0234
Fixes #12144

Signed-off-by: Roger Siddons <rsiddons@…>

comment:6 Changed 8 years ago by Roger Siddons

Owner: changed from JYA to Roger Siddons
Note: See TracTickets for help on using tickets.