On 06.09.2013 21:55, Thomas Maass wrote:
... When pressing the back key during replay, the replay is not really stopped immediately. It has another behaviour than pressing stop or blue. When pressing back, the replay stops, and I get back to the menu. But the recording seems to be still open.
That's because when pressing kBack, the cReplayControl::ProcessKey() returns osRecordings case kBack: if (Setup.DelTimeshiftRec) { cRecordControl* rc = cRecordControls::GetRecordControl(fileName); return rc && rc->InstantId() ? osEnd : osRecordings; } return osRecordings; which, in turn, makes the main loop in vdr.c call cControl::Shutdown(): case osRecordings: DELETE_MENU; cControl::Shutdown(); Menu = new cMenuMain(osRecordings); break;
I derived the cReplayControl class in my plugin, to add the archive-hdd functions. Before play, the archive-hdd gets mounted, then the videofiles are symlinked to the recordingdir under /video. After stopping the replay, the symlinks should be removed again, and the archive-hdd should be unmounted. I did not find a better place to do the unlinking and unmounting, than the destructor of my class cMyReplayControl. This works only, when stopping the replay with stop or blue. When stopping with back, I get a "busy" while unmounting. And my derived class only implements my own destructor, nothing else. Klaus, can you check the exact behaviour when pressing back during replay? I cannot see kBack in cReplayControl::ProcessKey.
But it *is* there - see above. Since kBlue and kBack are both supposed to end replay, and the only difference is that kBack shall open the Recordings menu, I see no reason why the code should actually be different. What is done in case kBack is also done in cReplayControl::Stop(), so I guess the following change should make it behave as you expect: --- menu.c 2013/08/21 10:45:11 3.3 +++ menu.c 2013/09/07 10:03:16 @@ -4990,10 +4990,8 @@ else Show(); break; - case kBack: if (Setup.DelTimeshiftRec) { - cRecordControl* rc = cRecordControls::GetRecordControl(fileName); - return rc && rc->InstantId() ? osEnd : osRecordings; - } + case kBack: Hide(); + Stop(); return osRecordings; default: return osUnknown; } Klaus _______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr