[mythtv-commits] Ticket #13114: Import Recorder Fix

MythTV noreply at mythtv.org
Fri Sep 22 15:43:44 UTC 2017


#13114: Import Recorder Fix
--------------------------------+----------------------------
 Reporter:  devmonkey@…         |          Owner:  pbennett
     Type:  Patch - Bug Fix     |         Status:  infoneeded
 Priority:  minor               |      Milestone:  30.0
Component:  MythTV - Recording  |        Version:  0.28.1
 Severity:  medium              |     Resolution:
 Keywords:                      |  Ticket locked:  0
--------------------------------+----------------------------

Comment (by devmonkey@…):

 Hi, thanks for reviewing this. You may get a bit more insight about what
 I'm using this for from https://forum.mythtv.org/viewtopic.php?f=9&t=2243

 To try and answer your questions

 According to the wiki and setup I believe you should leave the filename
 blank. This does however bring the backend down. In the end as a
 workaround I just put in a dummy name of a file that does not exist (it
 will create a link otherwise). I have only a vague recollection of the
 crash but I did do a backtrace and believe it is crashing when the
 scheduler runs before or during FindConflict (or something similar). I
 believe there is a bad pointer being fed through in the code. It could
 also be that my database is old and has something missing although I did
 create the Import recorder from scratch. At the moment this bug is a mute
 point without the above patch as the Import recorder doesn't do anything
 useful (I can file a bug if you're happy to merge the other stuff). As a
 side note I also tried the Demo recorder which fails for different reasons
 (I believe there is a memory leak at some point).

 Program guide is important for scheduling the recordings. They are
 scheduled on the STB via a script that syncs between mythtv and the STB.
 Playback is matched up again using an ID trapped during scheduling against
 channel & start time. In short I'm using playback on the STB rather than
 tuning a channel (although this can be nearly live as per most DVRs).

 In regards how data gets into MythTV with the patch the operation should
 nominally be as per usual i.e. data is from the program guide and MythTV
 updates everything accordingly (recording always assumed to have
 succeeded). The recording itself is generated by writing to the ringbuffer
 file with a modified version of the hdpvr2 app from the hauppauge web
 site. I would have some choice words about the hdpvr2 but with a lot of
 effort you can make it work pretty well. You can otherwise probably get
 acceptable results fixing your STB to 720p. I think then you may get away
 with the hdpvr2 app as is or with some minimal mods. Hopefully there are
 some other devices that could be used though.

 I personally never use LiveTV so haven't even tested it. I did note that
 the channel changer script is disabled so unless the recorder restarts for
 each channel change I think it's probably a no. I suspect even with the
 channel changer script enabled that there may be some work required. I
 also altered the timeout on opening the file to reduce the logging but it
 could be changed back perhaps with another mod to give the logging a
 different timeout period.

 My goal was to have nominal operation as close to an internal card as
 possible (I have dual DVB-S2 for other recordings). Once you schedule a
 recording my backend obviously behaves as normal i.e. in my case it wakes
 up and waits for the recording to finish. It therefore seemed like a good
 idea to follow this through and make MythTV import whilst the STB is
 recording. With the above patch you can also watch while it records as per
 normal. This only works during the scheduled recording time as the
 frontend needs to understand that the file is still being updated (default
 frontend logic or whatever). Obviously when there are 2 simultaneous
 recordings on the STB things will get out of sync as we can only import
 one at a time so the second recording will be imported late even if they
 are back to back. This will kill or mess up the live recording
 functionality. I think a workaround might be to set a new start / stop
 time when the import starts.

 I do now have static import scripts that don't need anything to be
 scheduled by MythTV and these don't rely on the Import recorder at all.
 This just generates a bunch of database entries after doing some lookups
 etc. It seems to make most sense though to have MythTV do the scheduling
 in which case it wants to record during the scheduled time etc. I did
 originally think about doing a daily import of all unwatched programs on
 the STB but it is less efficient, there is less relevant feedback and the
 ability to watch an in progress recording isn't there.

 One thing which is a problem at the moment is that the full path of the
 ringbuffer file is not fed to the script parameters. This means none of
 the live stuff works if you write to a different path than the one MythTV
 selected. I think maybe someone filed a bug or posted about this somewhere
 (sorry I don't remember where). I use the Python bindings atm to poll the
 recorder until the correct file comes up so I can get the full path.

 Ultimately I can use MythTV scheduling & other functionality and I don't
 have to manage 2 systems plus I don't have to put up with the tiny HD &
 other issues with the STB etc.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13114#comment:6>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list