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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: New MythTV add-on using libcmyth (/showthread.php?tid=110694)



- wisenuts - 2011-12-13

TSP:

Upon a closer inspection the stutter still happens in full screen its just less noticeable.

I also installed the windows build on my desktop and it works flawlessly so far.

What are your thoughts? rebuild the linux box? Is there something I can monitor to see where the stutter is coming from?

Thanks!


- fetzerch - 2011-12-13

@tsp: I was debugging the problem with the missing shows in the EPG.

cfetzer Wrote:... There are shows missing in the epg. Most of them are missing at the beginning (now) - thats why the channel view is missing the show guide info.
However, the times are correct so I don't think it's related to those timezone problems. ...

Unfortunately the problem is related to the mythtv plugin and not the pvr code itself.
You're using the field "seriesid" as unique id for the epg. This may work when using the EPG from EIT. But it does not work when using mythfilldatabase and xmltv as EPG source. seriesid is then hashed by title (see http://www.gossamer-threads.com/lists/mythtv/users/251117) and therefore the shows are overridden. So can't you use the channel and the starttime as unique id for all entries?

Now when I clean and reload the whole epg there are still entries at the beginn and end of the epg missing. This time it's caused by get_guide in libcmyth. It does not include a show that has not ended yet and has started before the given startdate. Also shows that last the whole duration between startdate and enddate are not included. I fixed this in the libcmyth code.
https://github.com/fetzerch/xbmc/commit/4446044b4ffb21d108417488c0788cd2308e79fa
Do you think this is ok? I would then create a PR into xbmc:master.

BTW: Do you have any news on the tuner selection? (http://forum.xbmc.org/showpost.php?p=927545&postcount=224) Do you have it still in mind or does it make sence to create an issue entry on github?

Thanks and keep on this awesome work!
Christian


- tsp42 - 2011-12-14

cfetzer: Thanks for for finding the source of the EPG problems. I've updated the code with the two changes. The reason for why I didn't use the starttime and channel id for the unique ID is because they require 64 bit(two ints) while the unique ID is only 32 bit. This could cause problems if the channelID is greater than 2^16 or if there are 18 hours 12 minutes and 16 seconds (or a multiple of this) between two programs (seems unlikely) (at least in my current implementation).

I don't use GetNextFreeRecorder so LastFreeCard would not do anything. I have however changes the code so it iterates though the tuner list in reverse giving the same effect.
I did start on adding the code to add/change settings on the backend but xbmc was so unstable that I changed the focus to that instead. The situation has improved now so I will see if I can finish the code.

wisenuts: You can try looking at the cpu/gpu utilization. Maybe updating the graphic drivers.


- ursli - 2011-12-15

I'm also having noticeable stutters when I watch livetv (and only there) with the latest windows build (XBMCSetup-20111212-0a1b1f2-dx) if I go back to an older build (XBMCSetup-20111204-f7903b9-dx) it is gone. Got a Recording on right now so I will be checking the log file and install the latest opdenkamp build tomorrow just to see if it has something to do with the latest changes in the main xbmc branch.


Can't enbable PVR add-on? - kartman_canada - 2011-12-15

Sorry for being dense...

Just grabbed the 12/12 windows build and installed.... trying to enable cmyth addon but I'm going in circles...

All the PVR clients are showing as disabled... I go in and configure and then select enable but nothing seems to happen. any idea what I might be missing?

my Myth backend is all up and waiting...

thanx.


- fiveisalive - 2011-12-15

kartman_canada Wrote:Sorry for being dense...

Just grabbed the 12/12 windows build and installed.... trying to enable cmyth addon but I'm going in circles...

All the PVR clients are showing as disabled... I go in and configure and then select enable but nothing seems to happen. any idea what I might be missing?

my Myth backend is all up and waiting...

thanx.

If this is the first time you are running PVR you have to enable "Live TV" in the Settings as well before the PVR addons will be selectable, IIRC (don't have my box in front of me right now).


- fiveisalive - 2011-12-15

tsp: re-built from git the master branch from your repo on my Fedora system and it seems a *lot* more stable. Haven't stress tested it too much, but live TV seemed to work (let it run for 20 mins or so), also EPG updates seem a bit more sane. Didn't crash at all, at least not in the 40 mins or so of testing. The "rules" screen I guess is still display-only. I wonder if there's a more elegant way to access it than using "menu"->"client actions"->"rules", it's somewhat unintuitive way to access it right now, is there no way to have the "rules" right there in the right-context menu? I guess this is a limitation of the way the main PVR code has to implement these client-specific actions?


- deadite66 - 2011-12-15

program times while playing a video from mythtv is broken for me, it shows the correct length but current time stays on 00:00.
podcasts and non-mythtv video files work correctly.


Osx - SiloDS - 2011-12-15

Has anyone tried to compile this on OSX?

Getting a compile error.

http://pastebin.com/d5PvBMpC

Silo


- kartman_canada - 2011-12-15

fiveisalive Wrote:If this is the first time you are running PVR you have to enable "Live TV" in the Settings as well before the PVR addons will be selectable, IIRC (don't have my box in front of me right now).

Hmmm... tried this... it complains that no PVR clients are enabled and then takes me to the PVR add-on screen. I selected cMyth, configured with my backend info and then click "enable" but nothing seems to happen...

any other ideas? grrrr....


- tsp42 - 2011-12-16

katman_canada: Try posting the content of the debug log. It might be because something fails to load. You can find the logfile in C:\Users\USERNAME\AppData\Roaming\XBMC

SiloDS: I don't have a mac and it is a weird compile error but you can try removing the line containing "private:" in cppmyth/MythSignal.h and see if it helps.

fiveisalive: The hidden recording rules is a xbmc PVR limitation.

deadite66: https://github.com/opdenkamp/xbmc/issues/368


- fiveisalive - 2011-12-16

tsp42 Wrote:fiveisalive: The hidden recording rules is a xbmc PVR limitation.

Any chance of working with dushmaniac on a more user-friendly solution in the long-term?


- kartman_canada - 2011-12-16

tsp42 Wrote:katman_canada: Try posting the content of the debug log. It might be because something fails to load. You can find the logfile in C:\Users\USERNAME\AppData\Roaming\XBMC

Code:
20:16:05 T:6372   ERROR: SQL: SQL error or missing database
                                            Query: SELECT id FROM pvrenabled WHERE addonID = 'pvr.vdr.vnsi' LIMIT 1

I'm using the experimental mysql interface for my library as I have several XBMC installs in the house with a central database. The error above is repeated several times in the log. Does this explain why I can't enable the PVR clients?

thanx.


- ursli - 2011-12-16

ursli Wrote:I'm also having noticeable stutters when I watch livetv (and only there) with the latest windows build (XBMCSetup-20111212-0a1b1f2-dx) if I go back to an older build (XBMCSetup-20111204-f7903b9-dx) it is gone. Got a Recording on right now so I will be checking the log file and install the latest opdenkamp build tomorrow just to see if it has something to do with the latest changes in the main xbmc branch.

Finally had the time to do some testing, it seems like something broke with DXVA for me in all the recent xbmc pvr builds (tested with opdenkamp and yours tsp), just for completeness sake the log, maybe somebody can make sense of it?

Log:

Code:
05:55:37 T:944  NOTICE: Creating InputStream
05:55:39 T:944  NOTICE: AddOnLog: MediaPortal PVR Client (TSReader): CTsReader::Open(D:\Recordings\timeshift\live4-0.ts.tsbuffer)
05:55:39 T:944  NOTICE: Creating Demuxer
05:55:40 T:944  NOTICE: Opening video stream: 0 source: 256
05:55:40 T:944  NOTICE: Creating video codec with codec id: 2
05:55:40 T:944  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
05:55:40 T:944  NOTICE: Creating video thread
05:55:40 T:944  NOTICE: Opening audio stream: 1 source: 256
05:55:40 T:944  NOTICE: Finding audio codec for: 86016
05:55:40 T:5076  NOTICE: running thread: video_thread
05:55:40 T:944   ERROR: CDVDAudioCodecPassthroughFFmpeg::Open - FFmpeg SPDIF muxer does not support this codec
05:55:40 T:944   ERROR: Previous line repeats 1 times.
05:55:40 T:944  NOTICE: Creating audio thread
05:55:40 T:944  NOTICE: Opening teletext stream: 3 source: 256
05:55:40 T:944  NOTICE: Creating teletext data thread
05:55:40 T:4552  NOTICE: running thread: CDVDPlayerAudio::Process()
05:55:40 T:4552   ERROR: CDVDAudioCodecPassthroughFFmpeg::Open - FFmpeg SPDIF muxer does not support this codec
05:55:40 T:4552  NOTICE: Creating audio device with codec id: 86016, channels: 2, sample rate: 48000, no pass-through
05:55:40 T:4360  NOTICE: running thread: CDVDTeletextData
05:55:40 T:944   ERROR: CSelectionStreams::Get - failed to get stream
05:55:40 T:4552 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
05:55:40 T:5076  NOTICE:  fps: 25.000000, pwidth: 720, pheight: 576, dwidth: 720, dheight: 405
05:55:40 T:5076  NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (155) (weight: 0.000)
05:55:40 T:5076  NOTICE: D3D: rendering method forced to DXVA2 processor
05:55:40 T:4188 WARNING: DXVA::CProcessor::Render - did not find all required samples, adjusting the sample array.
05:55:40 T:4188 WARNING: DXVA::CProcessor::Render - no usable samples.
05:55:40 T:4188 WARNING: DXVA::CProcessor::Render - did not find all required samples, adjusting the sample array.
05:55:40 T:4188 WARNING: DXVA::CProcessor::Render - no usable samples.
...
05:55:40 T:4552 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
05:55:40 T:4188 WARNING: DXVA::CProcessor::Render - did not find all required samples, adjusting the sample array.
05:55:40 T:4188 WARNING: DXVA::CProcessor::Render - no usable samples.
....
05:55:41 T:4188   ERROR: DXVA - failed executing m_process->VideoProcessBlt(target, &blt, &samp[offset], count, NULL) at line 1543 with error 80070057
05:55:41 T:4552   ERROR: Previous line repeats 3 times.
05:55:41 T:4552 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
05:55:41 T:4188   ERROR: DXVA - failed executing m_process->VideoProcessBlt(target, &blt, &samp[offset], count, NULL) at line 1543 with error 80070057
05:55:41 T:4552   ERROR: Previous line repeats 4 times.
...
05:55:43 T:5076 WARNING: CRenderManager::FlipPage - timeout waiting for flip to complete
05:55:43 T:4552 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
05:55:43 T:4188 WARNING: DXVA::CProcessor::Render - did not find all required samples, adjusting the sample array.
05:55:43 T:4188 WARNING: DXVA::CProcessor::Render - no usable samples.
05:55:43 T:4188 WARNING: DXVA::CProcessor::Render - did not find all required samples, adjusting the sample array.
05:55:43 T:4188 WARNING: DXVA::CProcessor::Render - no usable samples.
05:55:43 T:4552 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
05:56:22 T:4188 WARNING: Previous line repeats 230 times.
05:56:22 T:4188  NOTICE: CDVDPlayer::CloseFile()
05:56:22 T:4188  NOTICE: DVDPlayer: waiting for threads to exit
05:56:22 T:944  NOTICE: CDVDPlayer::OnExit()
05:56:22 T:944  NOTICE: DVDPlayer: closing audio stream
05:56:22 T:944  NOTICE: Closing audio stream
05:56:22 T:944  NOTICE: Waiting for audio thread to exit
05:56:22 T:4552   ERROR: CDVDAudio::AddPackets - failed to add leftover bytes to render
05:56:22 T:4552  NOTICE: thread end: CDVDPlayerAudio::OnExit()
05:56:22 T:944  NOTICE: Closing audio device
05:56:22 T:944  NOTICE: Deleting audio codec
05:56:22 T:944  NOTICE: DVDPlayer: closing video stream
05:56:22 T:944  NOTICE: Closing video stream
05:56:22 T:944  NOTICE: waiting for video thread to exit


As mentioned already; going back to the build from 4th of december fixes it.


- SiloDS - 2011-12-16

tsp42 Wrote:SiloDS: I don't have a mac and it is a weird compile error but you can try removing the line containing "private:" in cppmyth/MythSignal.h and see if it helps.

That worked, but the next error is that OSX doesn't have std::map::at()

Any way around that in your code? (I know C, but not C++ well)

Cheers

SiloDS