Kodi Community Forum
MythTV PVR client Addon Developers Wanted - Developers Only! - 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: MythTV PVR client Addon Developers Wanted - Developers Only! (/showthread.php?tid=82015)

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


- dteirney - 2011-01-08

The latest MythTV PVR Addon code is currently residing in the pvr branch in my github repository at:

https://github.com/dteirney/xbmc/tree/pvr/

My repository is forked off the XBMC master as is opdenkamp's (dushmaniac).

My pvr branch contains the changes from openkamp's master. Once I get the darned addon loading again I'll send a pull request to opdenkamp.

For a reason that escapes me at 1:30am in the morning I'm getting the following error when the addon is loaded.

"Unable to load /mnt/drive0/home/david/workspace/xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr, reason: tinyxml/tinyxml.a: cannot open shared object file: No such file or directory"

http://pastebin.com/jBAWi0As

@dushmaniac, are you able to have a look at my main Makefile and see if there is anything obviously wrong with how the LIBS have been specified.

https://github.com/dteirney/xbmc/blob/pvr/xbmc/pvrclients/mythtv/Makefile.in


- opdenkamp - 2011-01-08

you should probably link it statically


- dteirney - 2011-01-09

After much tearing out of hair I'm no further along in understanding why the current state of the PVR Addon is segfaulting as soon as any of the TinyXML classes are touched.

Latest state of my testing to get a resolution is up in my branch at:

https://github.com/dteirney/xbmc/tree/pvr/xbmc/pvrclients/mythtv

If someone who knows about general C++ compiling, linking and Makefiles could have a look that would be great.

I can't statically link all the dependencies as we are currently using FileCurl for the HTTP communication for MythXML and that class just links to all sorts of things in the XBMC source tree. In the future I suspect we'll have to use the native, untouched libcurl library.

Would greatly appreciate if someone manages to solve this issue so I can get on with the other features and commit the libmythsql library to get the Timer information.

Latest core dump at: http://pastebin.com/ccT2ya3B


- therealrocket - 2011-01-09

I managed to work around the missing .a files by putting them where the log seems to look for them.

Getting a crash and also found a small bug. Where do you want me to report both problems?


- therealrocket - 2011-01-10

Also, when I look in the "Live TV" section of XBMC I don't see my channels or recordings. (I see one recording called "Server 1 - 192.168.1.250")

Backend is protocol 56 (0.23) - it's old, but it works and it's stable!

I can test against a 0.24 backend in the next few days.


- dteirney - 2011-01-10

therealrocket Wrote:I managed to work around the missing .a files by putting them where the log seems to look for them.

Getting a crash and also found a small bug. Where do you want me to report both problems?

Log that says something about missing .a files? Where was that log? What file did you have to move where?

I guess post issues here for the moment. Patches that address issues would be appreciated if possible.

I'll commit a changelog.txt file later tonight that contains a list of what should be working and what is not done yet. That should then show up in the Addon Changelog window. I'll add that to the README on github as well.


- therealrocket - 2011-01-10

dteirney Wrote:Log that says something about missing .a files? Where was that log? What file did you have to move where?

~/.xbmc/temp/xbmc.log mentions the path "tinyxml/tinyxml.a", so I created a directory inside the working directory of XBMC called tinyxml and copied tinyxml.a there and it was able to load it. Same was required for libmythxml since it's linked the same way, except libmythxml also links against "../tinyxml/tinyxml.a" so I had to make another copy of tinyxml in the parent dir Smile

Re the linking problem, try adding the -static option to LDFLAGS so it appears before the libs to be statically linked. Makefile.in was deleted I noticed - who builds the client now?

dteirney Wrote:I guess post issues here for the moment. Patches that address issues would be appreciated if possible.

My settings:
backend: 0.23 (not 0.23.1)
hostname = 192.168.1.250
port = 6544
username = mythtv (that's the mysql username used by myth)
password = (mythbuntu-generated mysql password)

(I added username and password to settings.xml so I wouldn't be using the default values)

Here are the problems I'm having.. there are a few Smile

  1. I don't see anything in the Live TV section of XBMC: no channels, no guide, no recordings, no timers. The only recording I see is "Server 1 - 192.168.1.250" which is a folder and empty when I open it. I suspect it's misconfigured, got any clues as to how?
  2. There's a pretty easily reproducible crash (just click around the Live TV section a bit) - PVRChannel.cpp:UpdateEPGPointers calls NotifyObservers("epg"). The top frame is an avahi method. The crash doesn't happen in a build of the master branch. Backtrace shall be forthcoming.
  3. (minor) Username and password aren't read from settings.xml. (they need to be read into the buffer in client.cpp in the same way as g_szHostname) - Patch forthcoming
  4. (security issue) a few buffer overflows (strcpy calls) reading addon settings in AddonHelpers_Addon.cpp. This affects the mythtv pvrclient (client.cpp) as it uses a fixed-length buffer.

dteirney Wrote:I'll commit a changelog.txt file later tonight that contains a list of what should be working and what is not done yet. That should then show up in the Addon Changelog window. I'll add that to the README on github as well.

No prob. One last thing, is my 0.23 backend a valid test case?


- therealrocket - 2011-01-10

The culprit for the hostname problem could be here on line 3 (option="urlencoded")

https://github.com/dteirney/xbmc/blob/pvr/addons/pvr.mythtv/resources/settings.xml

I'll test tonight


- dteirney - 2011-01-10

therealrocket Wrote:The culprit for the hostname problem could be here on line 3 (option="urlencoded")

https://github.com/dteirney/xbmc/blob/pvr/addons/pvr.mythtv/resources/settings.xml

I'll test tonight

Pretty sure you are right on that one. Changed and committed.


- dteirney - 2011-01-10

I fixed the segmentation fault issues today. A problem with the tinyxml classes getting loaded when they were already loaded "in" XBMC.

Changed to use the tinyXML classes in the guilib directory as a short term fix to get the functionality further completed. Will have to namespace tinyxml once the PVR code gets moved out of the XBMC tree.

Latest and greatest committed to github. Still got to add in a bunch of other commits for the mythsql library now that I have something that is working again.

Fixed missing Makefile. Didn't appear in list of untracked files because the top level xbmc .gitignore file was hiding it.


- dubstar_04 - 2011-01-11

I cloned your git and tried to build xbmc but my
machine powered off. I rebooted did a make clean and tried again
but my machine powered off at the same point! I'm too tired to look into
the problem at the moment but I thought I would let you know
in case anyone else sees the same thing!

It's weird, I usually build xbmc every week and this has neve happened before,
to be honest I didn't even think it would be possible.


- aftereight - 2011-01-11

I compiled your version as well and got a segmentation fault when entering the "System" section. It seems to be related to the xml issue described before.

system: Ubuntu 10.04/64


- fiveisalive - 2011-01-11

I compiled dteirney's pvr git branch, and althought it looks like it's talking to the mythtv backend (from the log), I get a segfault as soon as "Live TV" is focused on the home screen (i.e. I don't even need to press enter on the Live TV menu item to get a segfault)


- dteirney - 2011-01-12

For any segfaults please provide a link to a pastebin backtrace. You can get a backtrace by doing the following:

1) Run xbmc using gdb. $ gdb ./xbmc.bin
2) (gdb) start
3) (gdb) continue
4) After it has segfaulted: (gdb) backtrace

Thanks. SQL stuff will be committed at the weekend to get the list of schedules.

If someone can look at the SQL that is needed to create a new recording schedule or delete an existing schedule that would be useful. Surfing through the mythbox sourcecode will probably find it.


- jm_maclaren - 2011-01-12

David, I am interested in helping out. I coded a bunch of this stuff when I updated and added functionality to mythroku, so I have some modest experience coding requests that talk to the backend's database. As I am new to xbmc, I am still browsing through your code to see how it all works. I really would like to get livetv going in 0.24.
Best, James