• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 35
MythTV PVR client Addon Developers Wanted - Developers Only!
#46
Everyone, what are the thoughts on using http://mythtv.org/wiki/MythXML rather than http://www.mythtv.org/wiki/Myth_Protocol where possible?

libcmyth, which works with the Myth Protocol or MySQL database isn't getting any significant support outside of XBMC to keep it up-to-date.

Pros for using MythXML
1) XML is human readable and has good tooling support for parsing etc.
2) HTTP is well understood and also has good tooling support etc. You can fire a web browser at the backend with the right URL and get what you need for debugging.

Concerns:
1) MythXML is newish and I haven't found any information on how the API will be versioned. The version number of the "object" appears to come back in the response though, e.g. "ProtoVer" in http://mythtv.org/wiki/GetProgramGuide_%28MythXML%29
2) Not sure when it was first introduced. Is it in Myth 0.23? Will this limit the number of people that can use it if they need to be running a 0.23 backend? Do we need to worry about that?
3) Does the streaming of the recording work in XBMC? http://mythtv.org/wiki/GetRecording_%28MythXML%29
4) LiveTV still looks like it will need to be accessed via Myth Protocol.

Next Steps:
1) XBMC (I think) knows how to stream content via HTTP. Perhaps someone could test the http://mythtv.org/wiki/GetRecording_%28MythXML%29 API by specifying a known good URL for XBMC and see what happens. What happens if a good URL is simply pasted into a browser? Volunteers?
2) tafypz, how are you finding it for the work you are doing on the EPG. Which XML parsing library are you using? TinyXML?
3) Build out all the parts we can with MythXML and then go from there?
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
#47
Would anyone be particularly concerned if I suggested that the addon followed the Google Style Guide. I don't want to start a religious debate, but having some rules for coding when multiple people are working on something is always useful.

http://google-styleguide.googlecode.com/...pguide.xml
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
#48
dteirney Wrote:Would anyone be particularly concerned if I suggested that the addon followed the Google Style Guide. I don't want to start a religious debate, but having some rules for coding when multiple people are working on something is always useful.

http://google-styleguide.googlecode.com/...pguide.xml

This is fine by me
#49
dteirney Wrote:Everyone, what are the thoughts on using http://mythtv.org/wiki/MythXML rather than http://www.mythtv.org/wiki/Myth_Protocol where possible?

libcmyth, which works with the Myth Protocol or MySQL database isn't getting any significant support outside of XBMC to keep it up-to-date.

Pros for using MythXML
1) XML is human readable and has good tooling support for parsing etc.
2) HTTP is well understood and also has good tooling support etc. You can fire a web browser at the backend with the right URL and get what you need for debugging.

Concerns:
1) MythXML is newish and I haven't found any information on how the API will be versioned. The version number of the "object" appears to come back in the response though, e.g. "ProtoVer" in http://mythtv.org/wiki/GetProgramGuide_%28MythXML%29
2) Not sure when it was first introduced. Is it in Myth 0.23? Will this limit the number of people that can use it if they need to be running a 0.23 backend? Do we need to worry about that?
3) Does the streaming of the recording work in XBMC? http://mythtv.org/wiki/GetRecording_%28MythXML%29
4) LiveTV still looks like it will need to be accessed via Myth Protocol.

Next Steps:
1) XBMC (I think) knows how to stream content via HTTP. Perhaps someone could test the http://mythtv.org/wiki/GetRecording_%28MythXML%29 API by specifying a known good URL for XBMC and see what happens. What happens if a good URL is simply pasted into a browser? Volunteers?
2) tafypz, how are you finding it for the work you are doing on the EPG. Which XML parsing library are you using? TinyXML?
3) Build out all the parts we can with MythXML and then go from there?


I think that MythXML might have been introduced in 0.23 (I haven't heard about it prior to that), in any case given that 0.23 is the current stable release and 0.24 is around the block, I think that starting by supporting 0.23 is a reasonable requirement.
MythXML seems fine for the program guide, it has a limitation of 10000 items retrieved from the EPG per request, on my line up (300 channels) this is about 24 hours worth of data per request for all 300 channels at once.

I didn't know about tinyXML, I have been using xerces-c (I use it at work) for my parsing / validation needs, I will look into tinyXML
#50
Your question about XML parser got me thinking.
I went blindly to xerces as I have been using it for years. I have found out that the boost library which has a header only lib called property tree which uses rapidxml underneath the hood, What do you guys have experience in?
I am fine using any parser, if the majority of you guys use a specific parser, I am fine using it.
#51
tafypz Wrote:Your question about XML parser got me thinking.
I went blindly to xerces as I have been using it for years. I have found out that the boost library which has a header only lib called property tree which uses rapidxml underneath the hood, What do you guys have experience in?
I am fine using any parser, if the majority of you guys use a specific parser, I am fine using it.

I've been using something called 'lilxml' for various pojects. It is a little smaller than tinyxml. It was written for the INDI project, and can only be found in their source code: http://indi.svn.sourceforge.net/viewvc/i...indi/libs/. That said, I think tinyxml is a good choice, it is well documented, has no dependencies, and is designed to be x-platform compatible.

On the bigger question, mythxml looks like a good choice. The myth devs have done a poor job keeping the myth-protocol stable enough for external tools. Hopefully mythxml is thought out well enough to remain stable for a while. I believe it has been available since 0.22 as it seems to have been in the code base since at least 2007, but some of the features you'll need will require 0.23 I believe.
#52
PhracturedBlue Wrote:I've been using something called 'lilxml' for various pojects. It is a little smaller than tinyxml. It was written for the INDI project, and can only be found in their source code: http://indi.svn.sourceforge.net/viewvc/i...indi/libs/. That said, I think tinyxml is a good choice, it is well documented, has no dependencies, and is designed to be x-platform compatible.

On the bigger question, mythxml looks like a good choice. The myth devs have done a poor job keeping the myth-protocol stable enough for external tools. Hopefully mythxml is thought out well enough to remain stable for a while. I believe it has been available since 0.22 as it seems to have been in the code base since at least 2007, but some of the features you'll need will require 0.23 I believe.

Thanks for the info, I guess that that is a "+1" for tinyXML.
I agree that mythxml looks like a good choice for quite a few things, I still haven't seen the streaming of a recording with it but if it works well and performs well, then why not. There are a few things that will require us to go through the protocol, one of them being the functionality to schedule a recording. I definitely think we should require 0.23 (I might get flamed for this) but I think that this a good starting point. I might actually create a 2nd backend on 0.24 once 0.23 EPG is done to see if there are any differences and handle them accordingly. The EPG response does provide the backend version and the proto version so things can be done at that level with ease.

from the getprogramguide request:
<Version>0.23.1.201000710-1</Version>
<ProtoVer>23056</ProtoVer>
#53
I'd +1 TinyXML as well. It's what's used in the core of XBMC for XML parsing.
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
#54
dteirney Wrote:I'd +1 TinyXML as well. It's what's used in the core of XBMC for XML parsing.

Then I'd say +1 to tinyXML too, it makes sense to keep the libs consistent with the core of XBMC
I will switch my code to tinyXML
#55
I have updated Ticket #10347 with a new patch. The new code builds on the code in #7197 and fills the videoinfo DB with data from MythTv in the case that none of the other matches were successful.

In this case it is expected that episode and season are unknown, and so the remaining episodes that could not be matcehd to thetvdb will end up under 'Specials' but will retain all info that was captured from Myth (subtitle, summary, etc)

If this looks like the right direction, I'll do the same thing for Movies as well.

I still need to look into writing some sort of synchronizer to keep myth and xbmc in sync.

Dumb Question: Is there a way to force a rescan of programs when nothing has changed on Myth's side? Running 'Scan For New Content' isn't sufficient because a hash-key has been set which prevents rescanning.

I end up going into SQL and running something like:
Code:
update path set strHash = NULL where idPath = 40;
And then I can run 'Scan For New Content'.

Also, doing a 'remove from library' doesn't clear the hash key, so it isn't possible to re-add data after removing it without the above sql command either.

If there is a right way to handle this, let me know, otherwise I'll probably file a bug to deal with the latter case (the former is just for debug, and is not something users are likely to care about)
#56
PhracturedBlue Wrote:Dumb Question: Is there a way to force a rescan of programs when nothing has changed on Myth's side? Running 'Scan For New Content' isn't sufficient because a hash-key has been set which prevents rescanning.

<snip>

Also, doing a 'remove from library' doesn't clear the hash key, so it isn't possible to re-add data after removing it without the above sql command either.

If there is a right way to handle this, let me know, otherwise I'll probably file a bug to deal with the latter case (the former is just for debug, and is not something users are likely to care about)

I don't think a force rescan can be done. I had similar problems trying to test my code with the season and episode parsing. If the hash had included the VideoInfoTag contents it might have worked properly. Myth is a bit of an unusual source because it actually sets VideoInfoTag content. Many sources don't, but more and more are, especially plugins that source TV Show information.

If you do a Clean Library, does everything still stay in the Library? I had some problems with things disappearing ages ago when I worked on the TV Show area.

Second part re remove sounds like a bug.

The myth:// source currently does some caching as well, which might cause problems if everything now gets accessed via the Library. The cache is currently cleared when the top level myth:// folder is accessed, or any content is deleted through XBMC.
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
#57
I've add a list of the PVR Addon API methods on the wiki page.

http://wiki.xbmc.org/index.php?title=MythTV_PVR_Addon

The raw method API can be found in the xbmc/pvrclients/mythtv/client.cpp file in the patch located at http://trac.xbmc.org/attachment/ticket/1...ed-2.patch

If anyone is able to review the MythXML content for any of the MythTV interfaces and perhaps list what fields in the XML map to the data structures XBMC expects please let this list know and if possible update the wiki page with your name.

If anyone is able to test the HTTP streaming capabilities of the MythXML interface then also let this list know.

The C structures XBMC uses can be found in xbmc/addons/include/xbmc_pvr_types.h

The structures all appear to be doxygen'ed but I don't know if there is any documentation generated.
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
#58
dteirney Wrote:If you do a Clean Library, does everything still stay in the Library? I had some problems with things disappearing ages ago when I worked on the TV Show area.
I haven't done a 'Clean Library' I also can't find it in the menus anywhere. I was looking for this feature, since I end up with duplicates when I move directories around.

The myth:// source currently does some caching as well, which might cause problems if everything now gets accessed via the Library. The cache is currently cleared when the top level myth:// folder is accessed, or any content is deleted through XBMC.[/quote]
I don't think the cache should be an issue, except in the case where you try to watch a program that is in xbmc's db but no longer exists in Myth. I am still trying to figure out how to handle the synchronization.
#59
PhracturedBlue Wrote:I haven't done a 'Clean Library' I also can't find it in the menus anywhere. I was looking for this feature, since I end up with duplicates when I move directories around.

It's in the settings under "Video" --> "Library" I think (not at home so can't access XBMC right now but it's definitly somewhere in the "Video" settings).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
#60
Montellese Wrote:It's in the settings under "Video" --> "Library" I think (not at home so can't access XBMC right now but it's definitly somewhere in the "Video" settings).

Thanks. It seems to have done the right thing, and not removed any of my myth-added content. It takes too long to run for what I need to do to synchronize myth <->xbmc regularly though.

On that topic I had a thought:
Enhance 'Scan for changes' to detect missing content as well as new content.
It then becomes very fast to run 'Scan for changes' on a myth source, since the hash prevents scanning if nothing has changed.

I then just need a smart way to run 'Scan for changes'

The simplest is probably to just do a scan whenever the Video library is accessed (maybe in a background thread)

Alternatively we could set it up to run periodically (this could be done with a python script i guess, or we could actually code something that does a scan whenever the cmyth cache is refreshed

Next would be to grab the next scheduled recording time and to set a trigger to scan once that happens.

I looked into the myth python bindings, and there isn't any method to set a trigger when an action happens (like record or delete), but if we really want that we could set up a mysql trigger taht will set a bit whenever the 'recorded' table is modified. It would mean that xbmc would need to connect to myth's sql db though, and would involve some sort of manual setup, so it is not really an ideal path.
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 35

Logout Mark Read Team Forum Stats Members Help
MythTV PVR client Addon Developers Wanted - Developers Only!8