Cancel recording in progress

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
Post Reply
mboney
Posts: 1
Joined: Fri Apr 07, 2017 11:41 am

Cancel recording in progress

Post by mboney » Sun Feb 02, 2020 12:49 pm

Code: Select all

Linux chimichanga 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_DESCRIPTION="Linux Mint 19.2 Tina"
I have hdhomerun_record running on Linux, and the problem I am seeing is that there seems to be no way to make hdhomerun_record stop recording until a timer for the show kicks off, or if it issue the command "hdhomerun_record stop".

I'm controlling the recording from the hdhomerun app on android. I can disable/remove the recording task, which removes future recordings, but seems to have no impact on the current active recording.

Additionally, I can delete the recording itself from the UI in android, however, hdhomerun_record keeps the tuner slot occupied, and it seems to be doing work at 6% cpu usage, even without a useful file to write to any longer.

This seems like a bug to me: logically, if you delete the recording file, there is no file left to write data to, then the program should release the tuner slot, and stop working.

See the log below where the delete occurs, but hdhomerun_record continues to acquire data:

Code: Select all

20200202-19:28:29 Status: Recording: NHL Hockey - Pittsburgh Penguins at Washington Capitals 20200202 [20200202-1730] from 1040650C (1289MB)
20200202-19:30:29 Status: Resource: nbk=0 dmk=190
20200202-19:30:29 Status: Disk write: MB=174 MB/s=58 worst=57
20200202-19:30:29 Status: Recording: NHL Hockey - Pittsburgh Penguins at Washington Capitals 20200202 [20200202-1730] from 1040650C (1464MB)
20200202-19:32:25 Playback: cmd delete: processing
20200202-19:32:29 Status: Resource: nbk=0 dmk=190
20200202-19:32:29 Status: Disk write: MB=176 MB/s=60 worst=1
20200202-19:32:29 Status: Recording: NHL Hockey - Pittsburgh Penguins at Washington Capitals 20200202 [20200202-1730] from 1040650C (1640MB)
20200202-19:32:30 Recorded: recorded sync to record-api.hdhomerun.com
20200202-19:32:31 System: server time = Sun Feb  2 19:32:31 2020 (correction of 0s)
20200202-19:32:31 Recorded: recorded sync success
20200202-19:34:30 Status: Resource: nbk=0 dmk=190
20200202-19:34:30 Status: Disk write: MB=179 MB/s=58 worst=4
20200202-19:34:30 Status: Recording: NHL Hockey - Pittsburgh Penguins at Washington Capitals 20200202 [20200202-1730] from 1040650C (1820MB)
My presumtion as to what is happening is that the delete request removes the file from the file system, however, due to the .mpg file descriptor still being open, nothing is interrupted until the timer fires, see lsof output:

Code: Select all

hdhomerun 20904 20911            matt   24u      REG                8,1 2391472236    3933689 /home/matt/Recordings/Sporting Events/NHL Hockey - Pittsburgh Penguins at Washington Capitals 20200202 [20200202-1730].mpg (deleted)
I would suggest adding some logic that if a delete request comes through, iterate the recordings in progress, if the delete request matches this active recording, cancel it, release tuner slot, then delete the file from the filesystem.

goofnroxx
Posts: 88
Joined: Fri Jun 16, 2017 10:30 am

Re: Cancel recording in progress

Post by goofnroxx » Mon Feb 03, 2020 6:25 am

This has been requested several times, but so far no luck.

Post Reply