Hi all,
Klaus responded to my private message about the Power key being ignored while playing back a recording. He suggested to add a cControl::Shutdown() call to the kPower handler. I did that, and the attached patch (against vdr-1.3.27) works for me.
I'm not sure if it is necessary to move the assignments before the cControl::Shutdown() call, but I thought it would be safer that way.
Marko
Marko Mäkelä wrote:
Hi all,
Klaus responded to my private message about the Power key being ignored while playing back a recording. He suggested to add a cControl::Shutdown() call to the kPower handler. I did that, and the attached patch (against vdr-1.3.27) works for me.
I'm not sure if it is necessary to move the assignments before the cControl::Shutdown() call, but I thought it would be safer that way.
Marko
--- vdr.c 2005-06-18 14:19:07.000000000 +0300 +++ vdr.c.mod 2005-07-31 22:27:38.000000000 +0300 @@ -738,12 +738,15 @@ Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!")); break; }
LastActivity = 1; // not 0, see below!
UserShutdown = true; if (cRecordControls::Active()) { if (Interface->Confirm(tr("Recording - shut down anyway?"))) ForceShutdown = true;
cControl::Shutdown(); }
LastActivity = 1; // not 0, see below!
UserShutdown = true;
else
cControl::Shutdown(); break; default: break; }
The way you have done this there will _always_ be a cControl::Shutdown(). Could it be that you wanted was to have _no_ cControl::Shutdown() in case there is a recording going on, but the user didn't confirm the "Recording - shut down anyway?" prompt? In that case you should have added braces around the 'if' block, as in
if (Interface->Confirm(tr("Recording - shut down anyway?"))) { ForceShutdown = true; cControl::Shutdown(); }
Please try it that way and let me know.
I don't think that moving the assignments is necessary.
Klaus
On Sat, Aug 06, 2005 at 12:43:53PM +0200, Klaus Schmidinger wrote:
The way you have done this there will _always_ be a cControl::Shutdown(). Could it be that you wanted was to have _no_ cControl::Shutdown() in case there is a recording going on, but the user didn't confirm the "Recording - shut down anyway?" prompt? In that case you should have added braces around the 'if' block, as in
if (Interface->Confirm(tr("Recording - shut down anyway?"))) { ForceShutdown = true; cControl::Shutdown(); }
Please try it that way and let me know.
My bad, I was confused by the indentation of the closing brace. I am used to indenting the closing brace by one fewer level.
The attached patch avoids the cControl::Shutdown() if the prompt is not confirmed.
It would be even better to add a "confirm shutdown" prompt in the case that no recording is active, but a recorded stream is being played back when hitting the Power key.
It can be confusing that the Power key stops recorded playback but not live playback. I'd rather display the "press any key to cancel shutdown" prompt and keep playing back the recorded stream. Alas, I do not know how to achieve that; maybe it would require some more inter-thread communication.
Marko
Marko Mäkelä wrote:
On Sat, Aug 06, 2005 at 12:43:53PM +0200, Klaus Schmidinger wrote:
The way you have done this there will _always_ be a cControl::Shutdown(). Could it be that you wanted was to have _no_ cControl::Shutdown() in case there is a recording going on, but the user didn't confirm the "Recording - shut down anyway?" prompt? In that case you should have added braces around the 'if' block, as in
if (Interface->Confirm(tr("Recording - shut down anyway?"))) { ForceShutdown = true; cControl::Shutdown(); }
Please try it that way and let me know.
My bad, I was confused by the indentation of the closing brace. I am used to indenting the closing brace by one fewer level.
The attached patch avoids the cControl::Shutdown() if the prompt is not confirmed.
It would be even better to add a "confirm shutdown" prompt in the case that no recording is active, but a recorded stream is being played back when hitting the Power key.
It can be confusing that the Power key stops recorded playback but not live playback. I'd rather display the "press any key to cancel shutdown" prompt and keep playing back the recorded stream. Alas, I do not know how to achieve that; maybe it would require some more inter-thread communication.
Now you're confusing me. Isn't that the current behavior? In version 1.3.25 there was a change
No longer stopping Transfer Mode or replay immediately when the Power button is pressed (thanks to Rolf Ahrenberg).
Your suggested change would countermand that, wouldn't it?
Since I don't use the power off feature myself, and this is apparently a rather complex thing, I'd like to hear some other users' opinion about this before I change anything.
Klaus
On Sun, 7 Aug 2005, Klaus Schmidinger wrote:
Marko Mäkelä wrote:
It can be confusing that the Power key stops recorded playback but not live playback. I'd rather display the "press any key to cancel shutdown" prompt and keep playing back the recorded stream. Alas, I do not know how to achieve that; maybe it would require some more inter-thread communication.
Now you're confusing me. Isn't that the current behavior? In version 1.3.25 there was a change
No longer stopping Transfer Mode or replay immediately when the Power button is pressed (thanks to Rolf Ahrenberg).
Your suggested change would countermand that, wouldn't it?
..and I'm strongly against the idea to countermand the feature above. When I'm watching tv with my budget cards and inactivity timeout kicks in, I don't want black screen with "press any key" message but the live stream running all the time. Now the behaviour with budget cards is the same as with ff ones and changing it to different would be really confusing (at least for me).
BR, -- rofa
On Sun, Aug 07, 2005 at 12:21:23PM +0200, Klaus Schmidinger wrote:
Marko Mäkelä wrote:
It would be even better to add a "confirm shutdown" prompt in the case that no recording is active, but a recorded stream is being played back when hitting the Power key.
It can be confusing that the Power key stops recorded playback but not live playback. I'd rather display the "press any key to cancel shutdown" prompt and keep playing back the recorded stream. Alas, I do not know how to achieve that; maybe it would require some more inter-thread communication.
Now you're confusing me. Isn't that the current behavior?
Well, the current behavior (completely ignoring the Power key during recorded playback) is confusing, but admittedly so can be the new one as well. It would be more consistent to ask for confirmation up-front in any case (no matter if live or recorded playback) and replace the confirmation message with a warning if a timed recording or a cutting is in progress.
In version 1.3.25 there was a change
No longer stopping Transfer Mode or replay immediately when the Power button is pressed (thanks to Rolf Ahrenberg).
Your suggested change would countermand that, wouldn't it?
Since I don't use the power off feature myself, and this is apparently a rather complex thing, I'd like to hear some other users' opinion about this before I change anything.
That makes sense.
Marko
On Sun, Aug 07, 2005 at 04:25:49PM +0300, Rolf Ahrenberg wrote:
On Sun, 7 Aug 2005, Klaus Schmidinger wrote:
Marko Mäkelä wrote:
It can be confusing that the Power key stops recorded playback but not live playback. I'd rather display the "press any key to cancel shutdown" prompt and keep playing back the recorded stream. Alas, I do not know how to achieve that; maybe it would require some more inter-thread communication.
Now you're confusing me. Isn't that the current behavior? In version 1.3.25 there was a change
No longer stopping Transfer Mode or replay immediately when the Power button is pressed (thanks to Rolf Ahrenberg).
Your suggested change would countermand that, wouldn't it?
..and I'm strongly against the idea to countermand the feature above. When I'm watching tv with my budget cards and inactivity timeout kicks in, I don't want black screen with "press any key" message but the live stream running all the time.
I am not sure if we are talking about the same thing. I am not suggesting to auto-suspend on inactivity timeout. By the way, is there no way to suspend the MPEG decoder on full-featured cards? That'd allow the cards run cooler. It would also reduce the probability of firmware crashes on corrupt MPEG stream.
Marko