[mythtv] Datadirect patch approach

David Shay david at shay.net
Tue Feb 14 19:29:46 UTC 2006


I am planning on submitting a patch to avoid hitting datadirect 
redundantly if you have multiple videosources.  There are two basic 
approaches I could use, and I was looking for guidance before I coded 
something up. [Also, I wanted to note that I did make an error in a 
previous post in saying that mythtv did current day, tomorrow, and +13 
-- I now realize that it only does tomorrow and +13, however for 3 data 
sources, this still results in 6 calls to datadirect when only 2 are needed]

With approach 1, I would change the general looping structure in 
filldata.cpp to iterate over days first, and videosources second.  This 
is probably the more difficult of the 2 approaches, but the changes 
would be contained to filldata.cpp and not over to datadirect.cpp in 
libmythtv.

With approach 2, I would keep the looping strucure intact (videosources 
first, days second), but keep temp files around for each call to 
datadirect, then before doing each retrieval determine whether or not 
that retrieval had been done yet for that day.  This is probably easier 
to code up, but would need to make changes to both filldata.cpp and 
datadirect.cpp in order to keep the temp files around for longer, and 
not delete them until the program exits.

If there is general indifference, I will just go with approach 2.



More information about the mythtv-dev mailing list