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)



RE: New MythTV add-on using libcmyth - opteron123 - 2012-05-27 06:55

(2012-05-27 06:17)KeithLM Wrote:  Well I've got my 11.10 box talking to MythTV now. I'm still having some issues with Myth, but that's Myth. Near as I can tell they haven't fixed any of the transcoding problems that I saw before, as in it's real crappy and can only support 2-channel mp3 audio and it doesn't really compress the files to a reasonable size without reducing quality significantly. I'm going to attempt to have it call handbrake once I can get all the details worked out, perhaps add in commercial removal too.

How did you get passed the Plugin suffered an unknown error trap?

im still having dramas.


RE: New MythTV add-on using libcmyth - KeithLM - 2012-05-27 06:59

(2012-05-27 06:55)opteron123 Wrote:  How did you get passed the Plugin suffered an unknown error trap?

im still having dramas.
Best I can figure is that a recent change fixed the problem I had. Either that or it was a matter of just starting with a completely fresh build in a whole new directory.


RE: New MythTV add-on using libcmyth - InoD - 2012-05-27 10:07

(2012-05-27 00:40)tsp42 Wrote:  Yes that is the problem. The preview icons is most likely deleted when clean cache is called the first time if m_preview is not initialized with the local preview images (and that would happen if m_jobqueue is emptied before the last call to getPreviewIconPath. I will use your suggestion and add a 24 hour delay before the first cache clean. Your preview icons should be redownloaded when getPreviewIconPath is called again (=every time the recording list is updated) but it sounds like that doesn't happens.

Ok, thanks. I will test it soon. Well, that does happen, but during startup it first grabs channel icons and probably it is done with that (m_jobqueue is empty) before it starts on the preview icons, but by that time cleanCache() was called. I think this change should do the trick.
The pull request from ktdreyer (168cb10443) causes compile errors on Linux now. Three log calls has CStdString as arguments... they should be converted using c_str() first.

Edit: there is also a compile error in tools.h (line 119), but I have no time to fix it now.


RE: New MythTV add-on using libcmyth - opteron123 - 2012-05-27 12:29

BLAST!!! (Damn I'm having a bad day)

I have just had to re-apt-get tinyxml headers to compile the latest git pull...weird.

Won't compile now because of boost library cStdString errors, is that related to what InoD has experienced? Or will I have to reinstall boost libraries again.

So giving up on ubuntu for the moment and testing on Win7 laptop.

Windows build 22052012 crashes after updating channel listings from 0.25 mythtv backend, is this a known issue, or have i stuffed something up here too?

Also where are the logs stored on windows XBMC?

Cheers.


RE: New MythTV add-on using libcmyth - cfetzer - 2012-05-27 13:53

Tsp added my fix for the broken multiplex detection (see https://github.com/tsp/xbmc/issues/9) to his xbmc/master branch.
Problem was that while a recording was ongoing, you could only watch live tv on a channel with the same multiplex.

It seems to work quite nice now, however let me know if you experience any problems - especially if you use uncommon hardware (like digial+analog tuner on one device).


RE: New MythTV add-on using libcmyth - quickFuse - 2012-05-27 18:20

How I built and installed this on Ubuntu 12.04

First I downloaded Precise Pangolin, I used the PC (Intel x86) desktop CD http://releases.ubuntu.com/precise/. I used Unetbootin to create a bootable USB drive from the above ISO. Then I booted the USB drive and performed a new install taking the option to install any package updates.

Once installed the first thing I did was install binary drivers for my graphics card (AMD A8-3850 with ATI Radeon HD 6550D graphics in my case) using the provided Ubuntu wizard. A notification window basically pops up prompting you to do this when you first login.

Now I installed mythtv and other build dependencies as documented in earlier posts and from README.ubuntu in the source and started the build process:
Code:
# Note this installs MythTV 0.25 +fixes on this version of Ubuntu.
apt-get install mythtv

# Note a few of these get replaced, use -s to check which
apt-get install git git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev autopoint

# As noted in the first post of this thread
apt-get install libboost-regex-dev libboost-filesystem-dev libboost-dev

# Download the sources
git clone https://github.com/tsp/xbmc.git
cd xbmc
git checkout Eden-pvr

# Start the build process
./bootstrap
./configure
make

As noted above there's still a typo in the source (at least in my checkout of the code from a few mins ago) in tools.h at line 119. You can fix that with this patch:
Code:
--- tools.h.orig        2012-05-27 11:42:20.697377134 -0400
+++ tools.h     2012-05-27 11:42:41.144778174 -0400
@@ -116,7 +116,7 @@
   {
     if (mutex && locked)
     {
-      Mutex->Unlock();
+      mutex->Unlock();
       locked = false;
       return true;
     }

Also as noted above there are 3 compile errors in fileOps.cpp from calls to XBMC->Log. I basically just commented them out, or rather hacked them to compile. Not sure what the proper fix is.

Then I did make install and tested out the software. I had some pretty cool results. For comparison, I've been using MythBox on XBMCbuntu 11.10 for some time, and wanted to try this PVR branch instead and also get mythtv-0.25 in the process. I'm using OTA for reception with an HVR-2250 tuner and I was very surprised to see the results of the first channel scan bring in another 6 channels than I usually get! I was then even more pleased after installing the new Aeon Nox 3 skin, which has the Live TV menu there. Awesome! Seemed like it was time to upgrade....

Unfortunately I've had to since image this HTPC back to the XBMCbuntu 11.10 install for now, as changing channels is just unbearably slow. Like 10 seconds or maybe even more. Too frustrating. There seems to be some other stability issues as well but I don't have anything specific in terms of logging or debugging to provide. MythBox is a little slow to change channels but it's at least pretty stable.

I took an image just before reverting back, so I can re-image back to the 12.04 install sometime and update, rebuild and experiment some more. It was fun to test it out, and Thanks again to everybody putting in their efforts. Looking forward to some improvements allowing for a stable transition, it just feels a lot tighter than the MythBox thing.


RE: New MythTV add-on using libcmyth - tsp42 - 2012-05-27 22:28

(2012-05-27 12:29)opteron123 Wrote:  BLAST!!! (Damn I'm having a bad day)

I have just had to re-apt-get tinyxml headers to compile the latest git pull...weird.

Won't compile now because of boost library cStdString errors, is that related to what InoD has experienced? Or will I have to reinstall boost libraries again.

So giving up on ubuntu for the moment and testing on Win7 laptop.

Windows build 22052012 crashes after updating channel listings from 0.25 mythtv backend, is this a known issue, or have i stuffed something up here too?

Also where are the logs stored on windows XBMC?

Cheers.
The compile errors should be fixed now. The windows build shouldn't crash but I will have to update the build to the latest version (Do you use the Eden or master build?). The log file is stored in the \Users\[USERNAME]\AppData\Roaming\XBMC directory.

quickFuse: I'm working on improving the channel switch time. Is the time is takes to switch channel with my addon comparable to the time it takes MythBox to open LiveTV an display the first channel?.


RE: New MythTV add-on using libcmyth - bilbonvidia - 2012-05-27 23:35

Hi tsp42, It takes 12 seconds ish to change channels on xbmc 4- 7 seems to vary on mythtv after a brief test. 7 second to first come on mythtv and 14 on xbmc, this is with xbmcbuntu upgraded to 12.04. From what I have read, 4 seconds is a very fast change for mythtv.

Cheers


RE: New MythTV add-on using libcmyth - andyb2000 - 2012-05-28 11:35

Hi all,
Just did a git pull to get the latest, compile itself looked fine (after a few tweaks as posted previously by others), but as soon as the plugin starts up it crashes xbmc. It looks like it might be a version mismatch, my myth backend shows:

Code:
2012-05-27 22:11:44.607 MainServer::HandleAnnounce FileTransfer
2012-05-27 22:11:44.645 adding: XBMCLive as a remote file transfer
2012-05-27 22:11:46.696 RingBuf(/var/lib/mythtv/livetv/23272_20120527221143.mpg) Error: OpenFile(): File too small (0B).
2012-05-27 22:11:46.860 TVRec(1): Changing from WatchingLiveTV to None
2012-05-27 22:12:00.646 MainServer::HandleVersion - Client speaks protocol version 8 but we speak 63!
2012-05-27 22:12:00.683 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa9902620)
2012-05-27 22:12:00.685 MainServer::ANN Playback
2012-05-27 22:12:00.776 adding: XBMCLive as a client (events: 0)
2012-05-27 22:12:00.823 TVRec(1): Changing from None to WatchingLiveTV
2012-05-27 22:12:00.866 TVRec(1): HW Tuner: 1->1
2012-05-27 22:12:01.405 LoadFromScheduler(): Error, called from backend.
2012-05-27 22:12:01.409 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
2012-05-27 22:12:01.468 DTVMux, Error: Invalid symbol rate parameter '0', aborting.
2012-05-27 22:12:01.528 DVBChan(1:/dev/dvb/adapter1/frontend0) Error: SetChannelByString(111): Failed to initialize mult
iplex options

Is this because of my mythbackend being old? It shows mythbackend version: fixes/0.24


XBMC log shows:

Code:
10:33:43 T:2850384704  NOTICE: Thread CTCPServer start, auto delete: false
10:33:43 T:2976275264   ERROR: SetThreadInfo: error Permission denied
10:33:43 T:2976275264  NOTICE: Thread PVR add-on updater start, auto delete: false
10:33:43 T:2976275264   DEBUG: PVR - ResetProperties - creating PVR add-on instance 'MythTV cmyth PVR Client'
10:33:43 T:3048494912    INFO: GL: Selected vsync mode 2
10:33:43 T:2976275264   DEBUG: InitialiseClient - initialising add-on 'MythTV cmyth PVR Client'
10:33:43 T:2959489856  NOTICE: VideoInfoScanner: Starting scan ..
10:33:43 T:2833021760  NOTICE: Thread Jobworker start, auto delete: true
10:33:43 T:2976275264   DEBUG: ADDON: Dll Initializing - MythTV cmyth PVR Client
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.jsonrpc-http type: _xbmc-jsonrpc-h._
tcp name:XBMC (XBMCLive) port:8080
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::addService() named: XBMC (XBMCLive) type: _xbmc-jsonrpc-h._tcp port:8080
10:33:43 T:2976275264   DEBUG: SECTION:LoadDLL(/usr/lib/xbmc/addons/pvr.mythtv.cmyth/XBMC_MythTV_cmyth.pvr)
10:33:43 T:2976275264   DEBUG: Loading: /usr/lib/xbmc/addons/pvr.mythtv.cmyth/XBMC_MythTV_cmyth.pvr
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.jsonrpc-tpc type: _xbmc-jsonrpc._tcp
name:XBMC (XBMCLive) port:9090
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::addService() named: XBMC (XBMCLive) type: _xbmc-jsonrpc._tcp port:9090
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.webapi type: _xbmc-web._tcp name:XBM
C (XBMCLive) port:8080
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::addService() named: XBMC (XBMCLive) type: _xbmc-web._tcp port:8080
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.webserver type: _http._tcp name:XBMC
(XBMCLive) port:8080
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::addService() named: XBMC (XBMCLive) type: _http._tcp port:8080
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.eventserver type: _xbmc-events._udp
name:XBMC (XBMCLive) port:9777
10:33:43 T:2833021760   DEBUG: CZeroconfAvahi::addService() named: XBMC (XBMCLive) type: _xbmc-events._udp port:9777
10:33:43 T:3018214208  NOTICE: Thread CRssReader start, auto delete: false
10:33:43 T:3018214208   DEBUG: CurlFile::Open(0xb3e64180) http://feeds.feedburner.com/xbmc
10:33:43 T:3018214208    INFO: easy_aquire - Created session to http://feeds.feedburner.com
10:33:43 T:2942704448   DEBUG: CRecentlyAddedJob::UpdateVideos() - Running RecentlyAdded home screen update



RE: New MythTV add-on using libcmyth - tsp42 - 2012-05-28 12:45

andyb2000: No it should work with 0.24. Do you use the eden pvr or master branch? Could you pastebin the crash log so I can see what causes the cras?.