New MythTV add-on using libcmyth - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136) +---- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
- cflynt - 2011-09-23 iscraigh Wrote:Still not having any luck installing, when I follow your commands I get.. You had to run the bootstrap/configure commands as sudo because you grabbed the repository as sudo, so your local user didn't have permissions to write to the directory. You can fix this in the future by doing a Code: sudo chown -R username.usernmae directory username obviously being your local user and directory being the xbmc directory. - tsp42 - 2011-09-23 dubstar_04 Wrote:I have tested the most recent git:The add-on caches the EPG information and I suspect that it can double the memory usage especially if you have hundreds or more channels. It should however be fixable. I will try to look into the sorting of the recordings. It will be easy to fix if XBMC uses the same order as the recordings are added. I will try to figure out how to present the mythtv timers that matches titles instead of a specific time slot. I 'm not sure how mythtv handles it in the SQL database. Anyway I will try to implement it Sunday. Another thing, remember to enable the extensive debug option in the addon configuratiob before posting the debug logs. It is disabled by default as it spams the log file. - dubstar_04 - 2011-09-24 tsp42 Wrote:The add-on caches the EPG information and I suspect that it can double the memory usage especially if you have hundreds or more channels. It should however be fixable. I will try to look into the sorting of the recordings. It will be easy to fix if XBMC uses the same order as the recordings are added. Wow, that would be cool if you could find time to have a look at the timers and recordings. What is your intention going forward? Do you aim to maintain the add-on and keep it sync'd with dushmaniacs branch? - dubstar_04 - 2011-09-24 in function PVR_ERROR PVRClientMythTV::GetTimers(PVR_HANDLE handle) I am using the following simple fix to only collect timers after the current time: Code: time_t timeNow; after Code: tag.startTime=it->StartTime(); This is a simple fix and would probably need adjusting to capture currently happening recordings. This has not been tested so may not work over a number of days, i.e if the database is updated? I hope this helps. Edit: This seems to be working ok. i've not tested it too much though. Thanks, Dubstar_04 - dubstar_04 - 2011-09-24 I have problem with the memory usage climbing to 1.5gb when the database is first populated. I.e if I delete the database from the settings and turn the client on the whole machine locks up. Does anyone know how to find memory leaks? Valgrind? Thanks, dubstar_04 - Blacksheep70 - 2011-09-25 Awesome work! Works on my system and I didn't detect any issues so far! Thumbs up for including that into the main XBMC tree! Regards Blacksheep - dubstar_04 - 2011-09-25 If i wipe the database and run xbmc the memory used climbs and climbs until xbmc closes. Logs are attached: Valgrind: http://paste.ubuntu.com/696574/ Log: http://paste.ubuntu.com/696578/ I hope this helps, Dubstar_04 - tsp42 - 2011-09-26 dubstar_04: Thanks for trying to find the source of the high memory usage. Could you please provide me with the profiling file from valgrind Massif as I suspect it is not a true memory leak but more likely extensive duplication of the EPG data. The recordings are unfortunately not sorted by the order that they are added to XBMC so I will have to change XBMC PVR to fix the ordering. The fix for the old timers will come soon when I've merged the latest changes from XBMC PVR. - dubstar_04 - 2011-09-26 tsp42 Wrote:dubstar_04: I will try to run Massif tonight and provide feed back. Would it not be possible to map the starttime of the recordings and sort by that before entering them into xbmc, or would that cause even more memory consumption? on my system if i start xbmc, pvr manager runs and updates everything, the system then idles using 1.7GB of memory. if i restart xbmc it idles at 48MB. I dont really know what this represents but hopefully it will help you. Thanks, Dubstar_04 - tsp42 - 2011-09-26 dubstar_04 Wrote:Would it not be possible to map the starttime of the recordings and sort by that before entering them into xbmc, or would that cause even more memory consumption?I tried that but XBMC PVR ignores the order that the recordings are added. I will have to find the place in the XBMC PVR source code where the recordings are sorted and change it. Maybe dushmaniac can give me a hint where to look. - dubstar_04 - 2011-09-26 tsp42 Wrote:I tried that but XBMC PVR ignores the order that the recordings are added. I will have to find the place in the XBMC PVR source code where the recordings are sorted and change it. Maybe dushmaniac can give me a hint where to look. dteirney has done a lot of work around the recordings and the way they are displayed. maybe he could advise or you could look through this code to see how he implemented the ordering system? dteirneys post: http://forum.xbmc.org/showthread.php?tid=103945 Thanks, dubstar_04 - dubstar_04 - 2011-09-26 I have tried getting a massif output but it seems to get killed before the pvr manager has completed its update process. I have attached a number of logs. i hope these are useful Massif output: start new database: http://paste.ubuntu.com/697343/ update existing database: one: http://paste.ubuntu.com/697347/ two: http://paste.ubuntu.com/697353/ run xbmc normally, allow to update, then run valgrind massif: http://paste.ubuntu.com/697366/ this seems to provide better example of the update process rather than the previous two. Thanks, Dubstar_04 - tsp42 - 2011-09-26 dubstar_04: Thanks. I can reproduce the leak now but only in linux not on windows. I will continue tomorrow finding the cause. - dubstar_04 - 2011-09-26 Cool, I hope you can sort it without much trouble. Thanks, Dubstar_04 - tsp42 - 2011-09-27 The leak should be closed now. Remarkable example of how well written the libcmyth code and documentation is :-) Code: /** |