XBMC Community Forum
Testing help needed for USB Tuner support for LiveTV using MythTV - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: PVR Development (/forumdisplay.php?fid=136)
+--- Thread: Testing help needed for USB Tuner support for LiveTV using MythTV (/showthread.php?tid=131011)

Pages: 1 2


Testing help needed for USB Tuner support for LiveTV using MythTV - dteirney - 2012-05-08 14:23

I need some people who are using USB tuners to test out some Live TV patches that were submitted by jm_maclaren that should allow Live TV for MythTV to work. This is related to http://trac.xbmc.org/ticket/11082

The code to be tested can be found in the mythtv-usb branch of my github repo.

https://github.com/dteirney/xbmc/tree/mythtv-usb

After cloning this repo, be sure to change to the mythtv-usb branch by using:

Code:
$ git checkout mythtv-usb

Note that these patches are applied to plain ole XBMC, not one of the branches with PVR support. Once the changes have been tested as being suitably stable the changes will be committed to XBMC master and will then get updated in the downstream PVR related branches.

For information about running plain ole XBMC with MythTV please refer to http://wiki.xbmc.org/?title=MythTV


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-09 04:51

Compiled openelec 32 bit with https://github.com/dteirney/xbmc/commit/d871af84ae0baab8f735044c6664222425a85b75 as a patch.... Finally it works!

It's been a long time since I've been able to access live tv from the hdpvr.

I've included a log, in case you can see something you can improve or possibly diagnose why the hdpvr has tripped up xbmc for a long time.

Great work man! Smile

Hope this makes it to master

pastebin.com/iWv5k3NK

Did get a weird error. If I go through VIDEOS->FILES->Mythtv_SOURCE->Live channels and selecting one rather than going straight to the myth source from a modded confluence menu that goes directly to the source
Hope this makes sense and it's not convoluted, weird I know, but I can repro ad nauseum.


Another note, is that when the program ends, live tv doesn't continue, it goes back to the menu, not a dealbreaker by any means, but here's me trying to document "QA-style" Angel

Here's a log snippet from the crash I'm telling you about :

02:52:35 T:3017422592 DEBUG: OnPlayMedia myth://mythv:mythtv@192.168.0.8:6543/channels/639.ts
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers(myth://mythv:mythtv@192.168.0.8:6543/channels/639.ts)
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/rtmp/mms/udp
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: hdhomerun/myth/rtmp/mms/udp
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: adding player: DVDPlayer (1) for rule: hdhomerun/myth/rtmp/mms/udp
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdfile
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
02:52:35 T:3017422592 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers: matched 1 rules with players
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
02:52:35 T:3017422592 DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
02:52:35 T:3017422592 NOTICE: DVDPlayer: Opening: myth://mythv:mythtv@192.168.0.8:6543/channels/639.ts
02:52:35 T:3017422592 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
02:52:35 T:3017422592 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
02:52:35 T:2986855232 NOTICE: Thread CDVDPlayer start, auto delete: false
02:52:35 T:2986855232 NOTICE: Creating InputStream
02:52:35 T:2986855232 DEBUG: AquireSession - Aquired existing MythTV session: 0xb3300948
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 8, got version 63
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 63, got version 63
02:52:35 T:3017136960 NOTICE: Thread CMythSession start, auto delete: false
02:52:35 T:2998967104 DEBUG: Process - MythTV event SYSTEM_EVENT: CLIENT_CONNECTED HOSTNAME veris SENDER x2
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 8, got version 63
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 63, got version 63
02:52:35 T:3017422592 DEBUG: ------ Window Init (DialogBusy.xml) ------
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_recorder_check_channel: cmyth_rcv_okay() failed (-1)
02:52:35 T:2998967104 DEBUG: Process - MythTV event SYSTEM_EVENT: CLIENT_DISCONNECTED HOSTNAME veris SENDER x2
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 8, got version 63
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 63, got version 63
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_recorder_check_channel: cmyth_rcv_okay() failed (-1)
02:52:35 T:2998967104 DEBUG: Process - MythTV event SYSTEM_EVENT: CLIENT_DISCONNECTED HOSTNAME veris SENDER x2
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 8, got version 63
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_conn_connect: asked for version 63, got version 63
02:52:35 T:2986855232 DEBUG: SetupLiveTV - recorder isn't running, let's start it
02:52:35 T:2998967104 DEBUG: Process - MythTV event SYSTEM_EVENT: REC_STARTED CARDID 9 CHANID 5639 STARTTIME 2012-05-08T22:54:46 SENDER x2
02:52:35 T:2998967104 DEBUG: Process - MythTV event LIVETV_CHAIN_UPDATE: live-veris-2012-05-09T02:52:35
02:52:35 T:2998967104 DEBUG: Previous line repeats 1 times.
02:52:35 T:2998967104 DEBUG: Process - MythTV event SIGNAL
02:52:35 T:2986855232 DEBUG: Previous line repeats 1 times.
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_db_get_connection: cmyth_db_check_connection failed
02:52:35 T:2986855232 ERROR: (cmyth)cmyth_mysql_check_livetv_recorder_ready, finalisation/execution of query failed!
02:52:35 T:2998967104 DEBUG: Process - MythTV event RECORDING_LIST_CHANGE_ADD: 5639 2012-05-08T22:54:46
02:52:35 T:3017136960 DEBUG: Previous line repeats 1 times.
02:52:35 T:3017136960 INFO: (cmyth)__cmyth_rcv_proginfo: got recording info
02:52:35 T:3017136960 DEBUG: Process - MythTV event RECORDING_LIST_CHANGE_UPDATE
02:52:35 T:2998967104 INFO: (cmyth)__cmyth_rcv_proginfo: got recording info
02:52:35 T:2998967104 DEBUG: Process - MythTV event RECORDING_LIST_CHANGE_UPDATE
02:52:35 T:3017136960 DEBUG: Process - MythTV event SIGNAL


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - dteirney - 2012-05-09 13:53

Thanks for the testing. I need to fix up some of the logging statements in libcmyth. Lots of the errors in that log aren't in fact errors which makes reading the logs harder than it needs to be.

"(cmyth)cmyth_db_get_connection: cmyth_db_check_connection failed" is a problem though.

Looks like I better check that the connections are getting closed properly. Might be using up all the connections to the MySQL server.

I'll try to fix up all the logging this weekend, check the SQL usage and then post another update for further testing. Thanks for your help.


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-09 15:58

No problem dteirney.

I'm subscribing to this thread and await your news!

You're onto something for sure.


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - dteirney - 2012-05-10 17:09

@sebj, I wasn't seeing the expected logging statements from your initial log. I've fixed up some of the erroneous logging and made some other changes so all DEBUG output from libcmyth will be output from XBMC when it's set to DEBUG.

For the moment this will generate heaps of logging because there's still some DEBUG level logging in libcmyth that needs to be taken out. For the moment though, if you can update and paste a log file that would be good.

Note that the update to my mythtv-usb branch was a forced push so you'll need to pull and then do a hard reset. Not sure how that will work with how you have pulled my content in, but if you managed to do it that way initially I'm sure you can figure it out.


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-10 21:19

I added the patch to xbmc master from openelec.

I think I'll try to combine all your updates today in a huge patch and see if it compiles.

I'll keep you posted.


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-11 04:12

Here's the crash with the new debug commits http://pastebin.com/C4TAaYc1

I basically made a combined patch that had all the commits you did after https://github.com/dteirney/xbmc/commit/afe18e73725c66bde621f4bd0643bd96ecac88b2

What I don;t understand is that live tv works, like I said, before, if I go dirctly in the source from a main menu xml addition to confluence

http://pastebin.com/2gtHj80b

Hope the extra debug stuff works!


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - dteirney - 2012-05-11 09:01

@sebj, the logging suggests that all the patches haven't been pulled into your tree.

I think it might be easier to add my repository as another remote and then pull into your tree using git pull. http://help.github.com/remotes/

For example, something like the following, perhaps in a branch of your current clone of XBMC master:

Code:
git remote add dteirney git@github.com:dteirney/xbmc.git
git pull dteirney mythtv-usb



RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-12 04:09

OpenELEC has a build system I doubt can hadle this git fu, so I'll try a straight compile in a vm.

Running into issues, I'm a git noob Tongue

Quote:git clone git://github.com/xbmc/xbmc.git xbmc
Cloning into xbmc...
remote: Counting objects: 159098, done.
remote: Compressing objects: 100% (55663/55663), done.
remote: Total 159098 (delta 112075), reused 142515 (delta 100132)
Receiving objects: 100% (159098/159098), 304.26 MiB | 3.51 MiB/s, done.
Resolving deltas: 100% (112075/112075), done.
user@ubuntu:~/Documents$ git remote add dteirney git@github.com:dteirney/xbmc.git
fatal: Not a git repository (or any of the parent directories): .git
user@ubuntu:~/Documents$ cd xbmc/
user@ubuntu:~/Documents/xbmc$ git remote add dteirney git@github.com:dteirney/xbmc.git
user@ubuntu:~/Documents/xbmc$ git pull dteirney mythtv-usb
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Confused


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - dteirney - 2012-05-12 04:52

If you are going to compile in a separate VM it's probably easier to clone my github repo and then checkout the mythtv-usb branch.

Code:
git clone git@github.com:dteirney/xbmc.git
git checkout mythtv-usb
./bootstrap
./configure
make



RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-14 05:48

Cloning into xbmc...
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:ebBig Grinf:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - dteirney - 2012-05-14 10:23

Try the read-only github URL. That other one is the read-write one and maybe it needs some other permissions setup.

Code:
git clone git://github.com/dteirney/xbmc.git
git checkout mythtv-usb
./bootstrap
./configure
make



RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-16 04:39

Progress report :

no getting much luck getting xbmc to run in a vm because of opengl.

./configure --disable-gl isn;t working yet.

Still working on that, might have to get a dev box running.


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-22 16:36

dteirney,

Just a head's up.

Still haven't had the time to run the new app with gl (life in the way)

But the previous patch still works pretty well regardless. I compiled it in my openelec project and it's still ticking, no issues so far, even that "bug" I was talking about seems to have been a fluke or something.

Openelec seems to have switched ffmpeg versions and refactored vdpau and it's been rather solid I must say.


RE: Testing help needed for USB Tuner support for LiveTV using MythTV - sebj - 2012-05-27 20:56

Ok, so I got a vm running that can launch xbmc.

http://pastebin.com/0mUCM4q8

It didn't play the live stream though, debug was on.

Going to try in 32bit, the bootstrap failed laoding libdvdnav in 64bit precise, so I'll try a 32bit vm next just to make sure.

Other videos played "fine" though...

keep in touch!