XBMC Community Forum
New MythTV add-on using libcmyth - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: PVR Development (/forumdisplay.php?fid=136)
+--- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



- stevellion - 2011-10-21 11:50

Just going back to the LiveTV Pause issue.

If the pause works in the mainline myth:// source implementation - I thought that was also using (standard) cmyth to access the stream?

So, therefore, Pause LiveTV should work in the same way in this enhanced MythTV connector?


Or - does the myth:// source in mainline connect to MythTV in a completely different way, so therefore my point is irellevant.

My top tip though - keep the myth:// source active in your video sources and use it for testing against this enhanced plugin. While it's nowhere near as pretty, or feature rich - it's more stable.


- tsp42 - 2011-10-21 13:45

fiveisalive Wrote:New issue (seems to be the day!) Now that my EPG is looking better, starting looking at the timer screen more. I've noticed that for some of my schedules (a much better word than "timers", IMHO) in the mythbackend/frontend that they don't have a channel assigned to them, but they record perfectly fine (because they can record on any channel, or the channel was renamed in the backend). Unfortunately the PVR add-on doesn't display any schedules lacking a channel number.
Thanks for finding the source of the EPG bug. I will put it into my repository latter today.
I know that the timer window is a poor fit to the MythTV recording rules. I intent to change the add-on so it displays all the scheduled recording in the timer window and then add a new window accessible thought the context menu in the timer window that will display the mythtv recording rules (that is currently sort of displayed in the timer window.). In this way I can overcome the limitations of the PVR API.

stevellion: There are some differences between the myth:// source implementation and the PVR implementation but you are right it should work without crashing in the add-on. However skin support is still needed to display the pause button. It looks like the forward/ reverse buttons will require some changes to the PVR code but hopeful dushmaniac will provide some input.


- stevellion - 2011-10-21 15:20

tsp42 - Thanks! - I wish I could do more.

In the meantime, I'll just keep up the feedback with bug reports with details where I can


- dubstar_04 - 2011-10-21 19:35

fiveisalive Wrote:By the way, dushmaniac requested I file a detailed bug report with logs, so I I've filed it at github here:

https://github.com/opdenkamp/xbmc/issues/277

And after some trial-and-error. I found a (partial) solution (also posted here: https://github.com/opdenkamp/xbmc/issues/277#issuecomment-2478152 )

I noticed that all the EPG events themselves are stored within the PVR add-on in UTC but the EPG cleanups, i.e. the timestamps about when to refresh the EPG data itself are done in local time, that is, all except one place where UTC was used in place of local time. in CEpgContainer::UpdateEntry, the NextEpgUpdate variable is populated using the UTC (rather than local time), creating a skew, meaning the event window doesn't get populated. The following patch fixed it for me:

https://gist.github.com/1303227

However, I still have some clock skew events like Jimmer has reported, where the events are off by an hour in the timeline grid, but appear Ok when you look at the detailed view.

This is why I love the XBMC community so much:

https://github.com/opdenkamp/xbmc/commit/838a4458879e519e9190707d9f3564a7f7ce0212

A big thanks to everyone who is working in XBMC.


- fiveisalive - 2011-10-21 20:00

tsp42 Wrote:Thanks for finding the source of the EPG bug. I will put it into my repository latter today.

Thanks. Looks like dushmaniac fixed it (in a better and more comprehensive way than my patch) in his branch here, although I haven't had a chance to test his fix myself:

https://github.com/opdenkamp/xbmc/commit/cfd29b8c93e7c8366db5f90e8c123c99f8bc02aa

He also committed my patch to fix the hidden channel problem here:

https://github.com/opdenkamp/xbmc/commit/127b5fe5b448fd92572851e01d521757d6e89e56

As well as a patch to expose the channel number in the EPG view (untested by me), so maybe worth updating to his latest master branch?

Quote:I know that the timer window is a poor fit to the MythTV recording rules. I intent to change the add-on so it displays all the scheduled recording in the timer window and then add a new window accessible thought the context menu in the timer window that will display the mythtv recording rules (that is currently sort of displayed in the timer window.). In this way I can overcome the limitations of the PVR API.

I see, so that the "Timer" window will be more like the list of "Upcoming Recordings" in Mythbox or mythfrontend? Will having a new dialog/window require all skins to support this new window, or will it work regardless of skin?

Quote:stevellion: There are some differences between the myth:// source implementation and the PVR implementation but you are right it should work without crashing in the add-on. However skin support is still needed to display the pause button. It looks like the forward/ reverse buttons will require some changes to the PVR code but hopeful dushmaniac will provide some input.

The skin does currently support a "Record" button, though?


- ericminou - 2011-10-22 18:56

Great great great work!! Thank you.

Just a little FYI, in order to get VDPAU support you need to install libvdpau-dev then re-run configure and make.

To install libvdpau-dev:
Code:
sudo apt-get install libvdpau-dev

To make sure everything is setup right just run:
Code:
./configure --enable-vdpau=yes

The script will stop and report an error if it cant find the proper libraries.

After installing that everything is nice and smooth on a baby Atom ION system!!

Thanks again!


- Weatherman - 2011-10-22 22:51

First, a big thank you to TSP for the fantastic work on the PVR/Myth work! I have tried many builds and this one works better than any I have tested with my setup. This is a must have for XBMC!

Notes on my setup:
Ubuntu 11.10 / TSP's XBMC/PVR build from git.
Very latest MythBuntu using my very new HDHomerun Prime (3 cable card tuners).

Using the myth:// setup under Video option, everything works fantastic! Live TC, channel changes and guide all work perfect from my testing.

When I try to use the Live TV option from the main menu of XBMC, I am unable to tune in any channels. It does pull in the channels from MythBuntu and has the guide information. When I select a channel, it just says "Working" forever.

What is strange is how it works fine under the myth:// option in Videos.

At this point in time, I just would love to have the Live TV and Guide information so I can start using my HDHomerun Prime with my (2) XBMC systems (which right now are running XBMC Live 10.1)

I'm doing all my testing in a VM.

Keep up the fantastic work.. I wish I could so more than just test.

- Mark


- tsp42 - 2011-10-22 23:26

fiveisalive: I've merged the latest changes from XBMC PVR so hopeful the EPG problems should have disappeared now.
I don't know if the new window will work with other skins but I suspect it will not but lets see when I get the first version going.

ericminou: Thanks I've added a link in the first post.

Weatherman: Could you post a link to the xbmc debug log (and please enable "Include more debug information in the log" in the mythtv cmyth add-on configuration and restart xbmc to let the changes take effect). It is otherwise a bit hard to figure out what is wrong Wink .


- stevellion - 2011-10-23 00:16

Hmm. wonder why this is happening.. ?? Trying to see if it really is mysql..
but it was working 10 mins ago before I built from git.


23:14:28 T:139908266051328 DEBUG: AddOnLog: MythTV cmyth PVR Client: MythEventHandler thread started (pid=16814, tid=17041)
23:14:28 T:139908404553472 DEBUG: CAddonCallbacksAddon - QueueNotification - MythTV cmyth PVR Client - Error Message : 'Failed to connect to MythTV MySQL database mythconverg@127.0.0.1 mythtv/xxxxxx
Too many connections'
23:14:28 T:139908266051328 DEBUG: AddOnLog: MythTV cmyth PVR Client: MythEventHandler thread ended (pid=16814, tid=17041)
23:14:28 T:139908404553472 ERROR: ADDON: Dll MythTV cmyth PVR Client - Client returned bad status (1) from Create and is not usable
23:14:28 T:139908404553472 INFO: Called Add-on status handler for '1' of clientName:MythTV cmyth PVR Client, clientID:pvr.mythtv.cmyth (same Thread=no)
23:14:28 T:139908404553472 ERROR: PVR - InitialiseClient - can't initialise add-on 'MythTV cmyth PVR Client'


- stevellion - 2011-10-23 00:24

Strange - it is out of connections.. but not sure why.. xbmc is taking them all.


| 18437 | mythtv | localhost | mythconverg | Sleep | 1 | | NULL |
| 18438 | mythtv | localhost | mythconverg | Sleep | 0 | | NULL |
| 18439 | mythtv | localhost | mythconverg | Sleep | 0 | | NULL |
| 18440 | mythtv | localhost | mythconverg | Sleep | 1 | | NULL |
| 18441 | mythtv | localhost | mythconverg | Sleep | 122 | | NULL |
| 18456 | mythtv | localhost | mythconverg | Sleep | 0 | | NULL |
| 27111 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27112 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27113 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27114 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27115 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27116 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27117 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27118 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27119 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27120 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27121 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27122 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27123 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27124 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27125 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27126 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27127 | xbmc | localhost | NULL | Sleep | 575 | | NULL |
| 27128 | xbmc | localhost | NULL | Sleep | 575 | | NULL |

there are lots more..


- stevellion - 2011-10-23 00:26

Ouch.. they all disappear back to just a few mythtv ones when I log out of XBMC.. and all come back again when I log back in.. something is up... Sad

Ok - Update. I think there have been some backend DB changes and as I'm storing music & video in mysql, there seems to be no ability to convert.. I've now switched back to non mysql and it's working well.

In the log, I saw this...


23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos42 [1044](Access denied for user 'xbmc'@'%' to database 'MyVideos42')
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos41
23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos41 [1044](Access denied for user 'xbmc'@'%' to database 'MyVideos41')
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos40
23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos40 [1040](Too many connections)
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos39
23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos39 [1040](Too many connections)
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos38
23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos38 [1040](Too many connections)
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos37
...

23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos2 [1044](Access denied for user 'xbmc'@'%' to database 'MyVideos2')
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos1
23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos1 [1044](Access denied for user 'xbmc'@'%' to database 'MyVideos1')
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:xbmc_video
23:38:57 T:140703467415520 NOTICE: Old database found - updating from version 0 to 56
23:38:57 T:140703467415520 ERROR: SQL: Can't create database for copy: 'xbmc_video' (1044)
23:38:57 T:140703467415520 ERROR: Unable to copy old database xbmc_video to new version MyVideos56
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos56
23:38:57 T:140703467415520 ERROR: Unable to open database: MyVideos56 [1044](Access denied for user 'xbmc'@'%' to database 'MyVideos56')
23:38:57 T:140703467415520 DEBUG: Connecting to mysql:localhost:MyVideos55
...

Eventually it falls back sqlite, but it's a problem. I guess should report this over on the mainline?


- tsp42 - 2011-10-23 01:01

I guess you will have to test mainline first and see if it is an issue that have been fixed after the last merge of mainline into XBMC PVR.


PVR/MythTV Live TV debug. - Weatherman - 2011-10-23 03:11

tsp42 Wrote:Weatherman: Could you post a link to the xbmc debug log (and please enable "Include more debug information in the log" in the mythtv cmyth add-on configuration and restart xbmc to let the changes take effect). It is otherwise a bit hard to figure out what is wrong Wink .

TSP42: Sure, no problem. Here is the debug/log information from running XBMC and going right into Live TV and trying to watch a channel where it will just just sit there at the "Working" prompt.

http://pastebin.com/7ZKCKTki

The only odd thing I saw was this:

ERROR: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_conn_connect: asked for version 8, got version 63

I'm sure it will make more sence to you.

Thanks!

- Mark


- ericminou - 2011-10-23 03:40

Weatherman Wrote:First, a big thank you to TSP for the fantastic work on the PVR/Myth work! I have tried many builds and this one works better than any I have tested with my setup. This is a must have for XBMC!

Notes on my setup:
Ubuntu 11.10 / TSP's XBMC/PVR build from git.
Very latest MythBuntu using my very new HDHomerun Prime (3 cable card tuners).

Using the myth:// setup under Video option, everything works fantastic! Live TC, channel changes and guide all work perfect from my testing.

When I try to use the Live TV option from the main menu of XBMC, I am unable to tune in any channels. It does pull in the channels from MythBuntu and has the guide information. When I select a channel, it just says "Working" forever.

What is strange is how it works fine under the myth:// option in Videos.

At this point in time, I just would love to have the Live TV and Guide information so I can start using my HDHomerun Prime with my (2) XBMC systems (which right now are running XBMC Live 10.1)

I'm doing all my testing in a VM.

Keep up the fantastic work.. I wish I could so more than just test.

- Mark

I had the same problem and I think I know the solution (I have a very similar setup). Do you have you channels named 12_1, 12_2, etc... in mythtv backend?


- ericminou - 2011-10-23 03:42

Weatherman Wrote:TSP42: Sure, no problem. Here is the debug/log information from running XBMC and going right into Live TV and trying to watch a channel where it will just just sit there at the "Working" prompt.

http://pastebin.com/7ZKCKTki

The only odd thing I saw was this:

ERROR: AddOnLog: MythTV cmyth PVR Client: LibCMyth: (cmyth)cmyth_conn_connect: asked for version 8, got version 63

I'm sure it will make more sence to you.

Thanks!

- Mark

You can ignore that error. If you do some reading on the forum it is the expected behavior.