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)



- tsp42 - 2012-03-04 16:05

guyrichie: Another solution that is currently used in this addon, is to iterate though all the tunners (and that includes the virtual tunners too) until one of them is free to serve the requested channel. For details see the function PVRClientMythTV::SwitchChannel(const PVR_CHANNEL &channelinfo)


- tsp42 - 2012-03-04 21:21

KeithLM Wrote:No worries on the delay, I'm just tinkering at this point.

I'm just using one HDHomeRun Prime with a cablecard and it has 3 built-in tuners. From what I've gathered, different tuner devices actually affect the value of chanid in the channel table, or something like that. Looking in my channel table all my chanid fields are equal to 1000 + channum. I believe if I had a second source then those chanid fields would be 2000 + channum.
I've updated the code now. Please see if it helps.

I found this post about the difference between channel name, channel id, call sign and channel number in MythTV. slightly confusing...


- KeithLM - 2012-03-04 23:57

tsp42 Wrote:I've updated the code now. Please see if it helps.

I found this post about the difference between channel name, channel id, call sign and channel number in MythTV. slightly confusing...

OK, well it looks like I have two streams recording, and another viewing live, all from XBMC. Excellent.

That post explains a lot. It seems to make more sense now. Perhaps callsign is within the HD protocol so that is guaranteed to be consistent between tuners and providers, so by using that as a basis for recording your scheduled recordings will remain if you switch devices and/or service.

Are you working on adding the options to do transcoding and user jobs? I know I saw variables for those in one of the structures related to timers. I'm thinking about working out a user job to use Handbrake as the transcoder, because I find the results with the MythTV transcoder to be poor. I can't seem to get DD audio through it, and I either end up with a larger size file, or a horrible looking compressed file, I can't seem to get anything in between with it.


- nmcaullay - 2012-03-05 00:26

Hi there, i have a recent git build including this addon, but when i have a scheduled recording happening on the mythtv backend (channel A), the logic in the addon doesnt seem to allow for watching livetv on channel B. I'll try to explain my self in dot points Smile

1) Scheduled recording starts on Channel A (Multiplex 1)
2) Try to watch liveTV Channel B (on multiplex 1, same as channel A)
3) LiveTV works

1) Scheduled recording starts on Channel A (Multiplex 1)
2) Try to watch liveTV Channel Z (on multiplex 2, different multiplex to channel A)
3) LiveTV shows a channel from Multiplex 1

So, as far as I can tell, when a scheduled recording is happening, and you choose to watch liveTV, the addon will enumerate the tuners (physical and virtual), but will settle on the first available virtual tuner regardless of it's current "tuned" status.

Is there a way to ensure etiher
1) When virtual tuners are iterated through, that the virtual tuner is able to lock onto the multiplex requested (i.e. it is not locked to a different multiplex due to the parent physical tuner recording something), or
2) When iterating through available tuners, ignore virtual tuners that are already locked on different multiplexes?

This is good progress.... I was fighting with this last night, and assumed it was some mythtv configuration issue, but it seems that it isnt just me Smile

Cheers Nathan

tsp42 Wrote:guyrichie: Another solution that is currently used in this addon, is to iterate though all the tunners (and that includes the virtual tunners too) until one of them is free to serve the requested channel. For details see the function PVRClientMythTV::SwitchChannel(const PVR_CHANNEL &channelinfo)



- robweber - 2012-03-05 16:16

I'm trying to compile this on Windows but am getting some errors related to the Boost libraries not being available. I saw a few posts back that this was mentioned in relation to Linux builds but nothing about Windows that I can see yet.

Can anyone tell me where I should put the Boost libraries so that I can compile in VS2010 on Windows? Does it require any config in the project properties?

Thanks.


- myksterx - 2012-03-05 16:21

just viewed the video on the first post and i am extremly impressed with what im seeing !! good work guys - hope this will be implemented by default to the XBMC build eventually as this really is the dogs bollocks!


- tsp42 - 2012-03-05 21:57

robweber:
Try running the bat file in the myth-cmyth directory:
xbmc/xbmc/pvrclients/mythtv-cmyth/boost_win32_dependency.bat
I thought it would run by it self when building the projetc but apparently this is not the case.

nmcaullay:
Sounds like a bug. It should only select a tunner if it is able to tune in to the requested channel. Could you post an extented debug log so I can see what's going on.

KeithLM:
Yes I'm working on exposuring the additional recording options. I've added it to the libcmyth code but the GUI part is still missing (it is a bit more complicated/boring to do).


- Kr0nZ - 2012-03-06 01:38

this doesnt work for me
XBMC just freezes when trying to access mythtv through videos

I just add my backend in videos right? using the myth:// protocol?

mythbackend --version:
Code:
Please attach all output as a file in bug reports.
MythTV Version   : v0.24.2-17-g0f6bb92
MythTV Branch    : fixes/0.24
Network Protocol : 63
Library API      : 0.24.20110505-1
QT Version       : 4.7.0
Options compiled in:
linux profile using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_hdpvr using_iptv using_ivtv using_joystick_menu using_lirc using_mheg using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit using_v4l using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg

mythbackend.log shows:
Code:
2012-03-05 18:17:59.798 MainServer::HandleVersion - Client speaks protocol version 8 but we speak 63!
2012-03-05 18:17:59.807 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa6015f58)
2012-03-05 18:17:59.808 MainServer::ANN Playback
2012-03-05 18:17:59.897 adding: mythdemon as a client (events: 0)
2012-03-05 18:18:00.319 MainServer::HandleVersion - Client speaks protocol version 8 but we speak 63!
2012-03-05 18:18:00.326 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa57a7688)
2012-03-05 18:18:00.327 MainServer::ANN Playback
2012-03-05 18:18:00.373 adding: mythdemon as a client (events: 0)
2012-03-05 18:18:00.571 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa60623f0)
2012-03-05 18:18:00.571 MainServer::HandleVersion - Client speaks protocol version 8 but we speak 63!
2012-03-05 18:18:00.599 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa5a48590)
2012-03-05 18:18:00.599 MainServer::ANN Playback
2012-03-05 18:18:00.613 adding: mythdemon as a client (events: 0)
2012-03-05 18:18:00.605 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa5a48590)
2012-03-05 18:18:00.583 MythSocket(ffffffffa60623f0:-1): writeStringList: Error, socket went unconnected.
                        We wrote 0 of 220 bytes with 1 errors
2012-03-05 18:18:00.642 MythSocket(ffffffffa5a48590:-1): writeStringList: Error, socket went unconnected.
                        We wrote 0 of 21 bytes with 1 errors
2012-03-05 18:18:00.665 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffa5a48590)
2012-03-05 18:18:00.693 Waiting for a process request thread..
2012-03-05 18:18:00.801 MainServer, Warning: Unknown socket closing MythSocket(0xffffffffaf032bf8)
2012-03-05 18:18:00.811 MythSocket(ffffffffaf032bf8:-1): writeStringList: Error, socket went unconnected.
                        We wrote 0 of 379 bytes with 1 errors



- nmcaullay - 2012-03-06 04:22

Hi there, I'm not convinced you have read the initial posts, and compiled xbmc as per directions. The mythtv integration in xbmc (when compiled as described in the first page of this topic) is via the LiveTV menu, not Videos.

Please confirm that you have compiled as per instructions, and then the clever people in this topic can provide guidance (i.e. make sure livetv is enabled, home to configure the libcmyth addon etc).

Cheers Nathan


- Kr0nZ - 2012-03-06 06:37

nmcaullay Wrote:Please confirm that you have compiled as per instructions, and then the clever people in this topic can provide guidance (i.e. make sure livetv is enabled, home to configure the libcmyth addon etc).
Cheers Nathan

Thnx working now, I had it configured but I didnt have it enabled in 'system > live tv'

I've been waiting sooo long for a working mythtv addon and this so far seems to be working good

XBMC looks so much nicer than mythfrontend