Re: [vdr] Does the back key not really stop the replay?
On 07.09.2013 19:51, Thomas Maass wrote: ... My plugin should work with an unpatched VDR. I added a cReplayControl::Stop(); as first command to the destructor of cMyReplayControl. This works, but is that the way to go? Can you suggest a better place to do the unlinking and unmounting? If you want to take actions in ~cMyReplayControl() that require replay to have stopped already, calling cReplayControl::Stop() there is certainly feasible. After all, it's called in cReplayControl::~cReplayControl() just as well. At any rate, I'll still add the kBlue/kBack-unification patch for the next version, because it appears to make sense. This shouldn't interfere with you still calling Stop() then in your destructor. Klaus ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] Does the back key not really stop the replay?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 My plugin should work with an unpatched VDR. I added a cReplayControl::Stop(); as first command to the destructor of cMyReplayControl. This works, but is that the way to go? Can you suggest a better place to do the unlinking and unmounting? Thomas - -- gpg-id: d31aaeea https://www.setho.org/people -BEGIN PGP SIGNATURE- Version: APG v1.0.8 iQE7BAEBCAAlBQJSK2eyHhxUaG9tYXMgTWFhc3MgPG1hc2VAc2V0aG8ub3JnPgAK CRDDMP/x0xqu6tzUCAC6Qvhrz8vpFG+Z/54KMGVN5zynyqXwe4Mw2lemEwhRBkTg CVRhjyEzklqGYac4wn3m5TRd7QFIJB+Kf1JuTU2fO3CwltySvaXadu/bbDZtWubw I3s9Cl6hfz+4m8OUv9fZr85h8vGgOeKtfC2lZWI5QxpDyPiYvXLBIU6N6627WXs9 j1dEUCSlsgze+PMPTJnAD5+1xg3UPnnTfEvAcWU03kuAawrOArG+Po+ePas4bP17 P0n/rVrtucI5vHodPo4D8qGgz7BFprnV1QVl0O9kDkNPHIUhhCndCCpXOVxSgWD7 m7FrOEHnbULoEfLJ6297S3fMc2HLpqFZIBrROrIz =oz/i -END PGP SIGNATURE- ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] Does the back key not really stop the replay?
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@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
[vdr] Does the back key not really stop the replay?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! 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. 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. Thomas - -- gpg-id: D31AAEEA http://www.setho.org/people -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAEBAgAGBQJSKjNDAAoJEMMw//HTGq7qIkEIALSuhsm/YtK8RZTfKqZkmF79 +sCkl0MIMcVNXm+ACQQY08aZRDs5ncpo8bkASr0ngqsg+rkhq2PdBZ4Xag5KoioX Mo2GVhzsFGYejy2EvZLoWLUPS4Fo/J3dUam8bLgbWlIkqmahw4ZBWY4RjhOaMbEl PH0JUgMYv1rY4ubLrZnEig6VPXmXwqQA8HrGYzK80aWZ3njjVq37Bm32mqBTeCN3 hn7fIEFCjtSnX6Ch1TX6BYquQwP3sELnsXvgVVm4LNNTspa0g8/xQt3WiqJ6eer9 ovlSeYLIZhldZPCfL5BrsB4kGNGFSCIZehmMEn/EvAKbzKfgtb8iaqRl3pxK5S0= =ov5V -END PGP SIGNATURE- ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr