[mythtv-commits] Ticket #12457: livetv not saving volume
MythTV
noreply at mythtv.org
Sun Jun 14 18:46:49 UTC 2015
#12457: livetv not saving volume
---------------------------------------------+-----------------------------
Reporter: takuya <8twfr79wnyvqjfkp@…> | Owner: jyavenard
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - Audio Output | Version: Master Head
Severity: medium | Keywords: livetv volume
Ticket locked: 0 | save
---------------------------------------------+-----------------------------
related: ticket:12144
tested same behavior with both software and alsa mixers[[br]]
livetv channel change SOMETIMES resets volume to previous saved[[br]]
exit livetv NEVER saves volume[[br]]
exit recording ALWAYS saves volume
From trying to follow the source, I believe TV::!PrepareToExitPlayer is
the only place where the volume is saved.[[br]]
This function is called when exiting a recording or video, but not
livetv.[[br]]
This was determined by a gdb breakpoint on TV::!PrepareToExitPlayer.
When exiting a recording TV::!PrepareToExitPlayer[[br]]
was called by TV::!ActiveHandleAction[[br]]
which was called by TV::!ProcessKeypress.[[br]]
I noticed the "if (StateIsLiveTV(!GetState(ctx)))" and that
TV::!PrepareToExitPlayer is only called if false.[[br]]
Most of TV::!PrepareToExitPlayer is not meaningful for livetv, but the
following clip was added in ticket:12144 .
{{{
if (ctx->player->GetAudio()->ControlsVolume())
{
ctx->player->SaveVolume();
}
}}}
file: libmythtv/tv_play.cpp[[br]]
function: TV::!ActiveHandleAction
{{{
else if (has_action("ESCAPE", actions) ||
has_action("BACK", actions))
... clip ...
if (StateIsLiveTV(GetState(ctx)))
{
if (ctx->HasPlayer() && (12 & db_playback_exit_prompt))
{
ShowOSDStopWatchingRecording(ctx);
return handled;
}
else
{
do_exit = true; // ### this gets called exiting livetv
}
}
else
{
if (ctx->HasPlayer() && (5 & db_playback_exit_prompt) &&
!underNetworkControl && !isDVDStill)
{
ShowOSDStopWatchingRecording(ctx);
return handled;
}
PrepareToExitPlayer(ctx, __LINE__); // ### this gets called
exiting recording
requestDelete = false;
do_exit = true;
}
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12457>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list