GithubHelp home page GithubHelp logo

kodi-pvr / pvr.mediaportal.tvserver Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 27.0 2.22 MB

Kodi: MediaPortal TVServer client addon

License: GNU General Public License v2.0

CMake 1.16% C++ 94.41% C 4.43%
hacktoberfest

pvr.mediaportal.tvserver's People

Contributors

adamsutton avatar afedchin avatar alanwww1 avatar alwinesch avatar basilgello avatar bilkusg avatar decke avatar fernetmenta avatar fetzerch avatar gade01 avatar hudokkow avatar jalle19 avatar janbar avatar ksooo avatar ktdreyer avatar margro avatar markieta avatar martijnkaijser avatar mdeguzis avatar memphiz avatar olafhering avatar opdenkamp avatar phunkyfish avatar rbalint avatar rbuehlma avatar rechi avatar txtranslation avatar weblate avatar wsnipex avatar xhaggi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pvr.mediaportal.tvserver's Issues

does not compile on android

compilation of master fails on android:

/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp:503:21: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_multiaddr', which is of non-class type '__be32 {aka unsigned int}'
   imr.imr_multiaddr.s_addr = groupAddress;
                     ^
[ 64%] Building C object CMakeFiles/pvr.mediaportal.tvserver.dir/src/lib/live555/groupsock/inet.c.o
/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp:504:22: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_sourceaddr', which is of non-class type '__be32 {aka unsigned int}'
   imr.imr_sourceaddr.s_addr = sourceFilterAddr;
                      ^
/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp:505:21: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_interface', which is of non-class type '__be32 {aka unsigned int}'
   imr.imr_interface.s_addr = ReceivingInterfaceAddr;
                     ^
/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp: In function 'Boolean socketLeaveGroupSSM(UsageEnvironment&, int, netAddressBits, netAddressBits)':
/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp:521:21: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_multiaddr', which is of non-class type '__be32 {aka unsigned int}'
   imr.imr_multiaddr.s_addr = groupAddress;
                     ^
/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp:522:22: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_sourceaddr', which is of non-class type '__be32 {aka unsigned int}'
   imr.imr_sourceaddr.s_addr = sourceFilterAddr;
                      ^
/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-21/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/GroupsockHelper.cpp:523:21: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_interface', which is of non-class type '__be32 {aka unsigned int}'
   imr.imr_interface.s_addr = ReceivingInterfaceAddr;

Active timers as part of series schedule missing

@margro @ksooo
A timer that is part of a series schedule (timer rule) and that is currently recording
is missing from all screens in Kodi (timers, timer rules, tv guide), so there's no way to cancel an active timer. One time schedules are working as expected.
This happens with Kodi Jarvis 16.1 and Kodi Krypton nightlies,
MediaPortal TVServer 1.15 and TVServer Kodi plugin 1.15.0.134.

new "async connect" don't work with plugin and kodi 18

the new "async connect" for pvr client addons (introduced with krypton) don't work with the plugin. in kodi 17.x there was a switch under Setup>PVR&Live TV>General, to disable the error-message. he is removed under 18.x, so the plugin permanently show a popup, even if i'm looking viedeo, "Connection lost" and "Server is unavailable", if my tv-server goes to sleep. Please modify the addon, the popup makes me crazy!
In idle it also plays a system-sound, every i think 60 second!

Situation: WHS2011 as TV-Server with MediaPortal, 2 Raspberry Pi and 2 Windows 7 Clients with KODI 18 ALPHA, Kodi default Skin, Language German.

Cannot watch SD recordings, HD ok

In Kodi v18, I cannot play recordings of programs that are in SD / MPEG-2 (e.g. RTL or VOX in Germany). HD (720p, e.g. ARD HD) are fine. I only have free tv.
When i click on a SD recording nothing happens. Sometime i see the loading symbol for about 1 ms.
I can play the SD recordings without problems if i create a library of the SMB share of my MediaPortal server an start the .ts files from there.

The behavior is the same on both my test clients.

Logs:
Server MP2 debug log: https://pastebin.com/wD4aEbn4
SetupTV log: https://pastebin.com/YDZWd4EM
Client2 Kodi debug log: https://pastebin.com/897G3zuX

Time of test: ~ 2018-12-09, 18:02
I first tried two recordings of "hundkatzemaus" (VOX, SD), which didn't start. Then I started "Elefant Tiger & Co." (MDR, HD) successfully.

My setup:
Server:

  • MP2 Server 2.2 on Windows 10
  • MediaPortal_2_2_pre_TVServerKodi_plugin_rev139
  • Shares are created, permissions set to full for "Everyone". Live TV is working fine in SD and HD.

Client1:

  • Intel PC with NVIDIA GT 1030
  • LibreELEC Generic 8.90.009
  • pvr.mediaportal.tvserver-3.5.13-Leia

Client2:

  • Raspberry 3B
  • LibreELEC RPi2.arm 8.90.009
  • pvr.mediaportal.tvserver-3.5.13-Leia

edit: Tested on Kodi 17.6 with PVR AddOn 2.4.19: All recordings are running fine. So this only seems to happen in V18!?

MepoRTSPClient fails to build against LiveMedia555 >= 20181016

I am trying to update the Debian package for this add-on and it builds fine using the bundled TSReader / Live555 library from 2010.

However, Debian recommends linking against Live555 packaged in Debian.
The Debian package versions are as follows;

https://packages.debian.org/jessie/liblivemedia-dev

I adapted @rbalint patch for Live555 detection to include system Live555 headers:

From 31cf19d9a14bfa79346bb5811b441863547fbfe2 Mon Sep 17 00:00:00 2001
From: Balint Reczey <[email protected]>
Date: Fri, 4 Nov 2016 16:37:59 +0100
Subject: [PATCH] Use system's Live555 libraries when they are available

[basilgello: -DLIVE555 is not declared in liblivemedia-dev but used
at lease in src/lib/tsreader/TSReader.cpp. Since embedded Live555
library is present in source tree anyway, let's set the flags
regardless of where Live555 was actually found]

Signed-off-by: Vasyl Gello <[email protected]>
---
 CMakeLists.txt | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1226685..872159b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,16 +7,27 @@ find_package(Kodi REQUIRED)
 find_package(p8-platform REQUIRED)
 find_package(TinyXML REQUIRED)
 
-set(LIVE555_INCLUDE_DIR
-  src/lib/live555/liveMedia/include
-  src/lib/live555/BasicUsageEnvironment/include
-  src/lib/live555/UsageEnvironment/include
-  src/lib/live555/groupsock/include
-  src/lib/live555/
-)
+find_package(PkgConfig)
+pkg_check_modules(LIVE555 live555)
+
+if (NOT LIVE555_FOUND)
+  set(LIVE555_INCLUDE_DIR
+    src/lib/live555/liveMedia/include
+    src/lib/live555/BasicUsageEnvironment/include
+    src/lib/live555/UsageEnvironment/include
+    src/lib/live555/groupsock/include
+    src/lib/live555/
+    )
+endif()
 
 set(LIVE555_DEFINES -DLIVE555 -D_WINSOCK_DEPRECATED_NO_WARNINGS -DSOCKLEN_T=socklen_t -DBSD=1)
 
+add_definitions(-D__STDC_FORMAT_MACROS ${LIVE555_DEFINES})
+
+if (LIVE555_FOUND)
+  add_definitions(${LIVE555_CFLAGS})
+endif()
+
 include_directories(${p8-platform_INCLUDE_DIRS}
                     ${TINYXML_INCLUDE_DIR}
                     ${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
@@ -25,7 +36,6 @@ include_directories(${p8-platform_INCLUDE_DIRS}
                     ${LIVE555_INCLUDE_DIR}
 )
 
-add_definitions(-D__STDC_FORMAT_MACROS ${LIVE555_DEFINES})
 
 if (NOT WIN32)
   add_options(ALL_LANGUAGES ALL_BUILDS "-fPIC")
@@ -227,11 +237,18 @@ SET(LIVE555_HEADERS
 source_group("Header Files\\lib\\live555" FILES ${LIVE555_HEADERS})
 
 # Make sure that CMake adds all files to the MSVC project
-list(APPEND MPTV_SOURCES ${MPTV_HEADERS} ${TSREADER_SOURCES} ${TSREADER_HEADERS} ${LIVE555_SOURCES} ${LIVE555_HEADERS})
+list(APPEND MPTV_SOURCES ${MPTV_HEADERS} ${TSREADER_SOURCES} ${TSREADER_HEADERS})
+if (NOT LIVE555_FOUND)
+  list(APPEND MPTV_SOURCES ${LIVE555_SOURCES} ${LIVE555_HEADERS})
+endif()
 
 set(DEPLIBS ${p8-platform_LIBRARIES}
             ${TINYXML_LIBRARIES})
 
+if (LIVE555_FOUND)
+  set(DEPLIBS ${LIVE555_LIBRARIES} ${DEPLIBS})
+endif()
+
 if(WIN32)
   list(APPEND DEPLIBS ws2_32)
 endif(WIN32)
-- 
2.28.0

and tried rebuilding the addon but failed with the following log:

build-20200729201327.log

@margro Does it make sense to transplant TSReader 1.3.0 to the addon or let's stick with embedded version of the library there is now?

UPDATE: I figured out that Team MediaPortal uses patched Live555 library in 1.3.0 as well, so I am really stuck at what to do with this addon. Is it ever relevant for recent MediaPortal 2?

Build failed

/home/xbian/xbian-package-xbmc/build/rpi4-matrix/working/cmake/addons/build/pvr.mediaportal.tvserver/src/GUIDialogRecordSettings.cpp:15:10: fatal error: kodi/ActionIDs.h: No such file or directory
 #include <kodi/ActionIDs.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.

I'm sorry to have to say this, but the constant senseless changes are an absolute horror

Add optional wake on lan support

Hi @margro as you can imagine, not everyone has a tv server that's online 24/7.
But sometimes a user just wants to use Kodi only for file playback or legal streaming content. If right at this time the tv server isn't reachable, your plugin puts itself in some kind of deactivated state. If after file playback the user wants to watch tv, he has to start his tv server and also has to restart Kodi. Very uncomfortable!

Kodi's internal wake on lan doesn't work for pvr. The Advanced WOL addon doesn't work reliable on Android devices, because it can't query if the server is online already.

So here's the request: Please add wake on lan support to your great plugin.
There should be two options for this. One main option that wakes up the server with every request, also when epg updates occur. And a suboption that wakes up the server only by a playback attempt.

Thanks in advance!

Old Recordings did not get deleted automatically

When you create an timer from guide or an instant recording with mediaportal pvr backend, the default value of lifetime is "MPTV_KEEP_ALWAYS".

This has the effect that old recordings did'nt get deleted from the backend when you have set a disk quota (to delete old recordings).

it would be better to set the Default value to "MPTV_KEEP_UNTIL_SPACE_NEEDED". After a quick test with this Setting old recordings gets deleted by the backend if disk is nearly full.

In the Forum there are users with the same issue and a possible fix is posted here: ​https://forum.kodi.tv/showthread.php?tid=301878&pid=2606063#pid2606063

Streaming method: ffmpeg - playback fails

It appears a regression that causes playback to fail when streaming method is set to "ffmpeg" under the plugin configuration. Tested under Windows 10 build 1909 x64.

Version 2.4.19 under Kodi 17.6 works
Version 3.5.18 under Kodi 18.4 x64/18.5 x64 fails to begin playback

Strangely, the inverse is true (i.e working in 3.5.18, did not work previously) when streaming method is set to TSReader with "use RTSP streaming" set to true.

build failed on openSUSE due to "no return statement in function returning non-void"

[  707s] /usr/bin/g++-12 -DADDON_GLOBAL_VERSION_FILESYSTEM_USED -DADDON_GLOBAL_VERSION_GENERAL_USED -DADDON_GLOBAL_VERSION_GUI_USED -DADDON_GLOBAL_VERSION_MAIN_USED -DADDON_GLOBAL_VERSION_TOOLS_USED -DADDON_INSTANCE_VERSION_PVR_USED -DBSD=1 -DBUILD_KODI_ADDON -DLIVE555 -DSOCKLEN_T=socklen_t -D_WINSOCK_DEPRECATED_NO_WARNINGS -D__STDC_FORMAT_MACROS -Dpvr_mediaportal_tvserver_EXPORTS -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/depends/include/kodi/.. -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/tools/depends/target/binary-addons/build/pvr.mediaportal.tvserver-prefix/src/pvr.mediaportal.tvserver-build -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/live555/liveMedia/include -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/live555/BasicUsageEnvironment/include -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/live555/UsageEnvironment/include -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/live555/groupsock/include -I/home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/live555 -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -fPIC -O2 -g -DNDEBUG -fPIC   -DTARGET_POSIX -DTARGET_LINUX -fPIC -std=c++17 -MD -MT CMakeFiles/pvr.mediaportal.tvserver.dir/src/lib/tsreader/MemoryReader.cpp.o -MF CMakeFiles/pvr.mediaportal.tvserver.dir/src/lib/tsreader/MemoryReader.cpp.o.d -o CMakeFiles/pvr.mediaportal.tvserver.dir/src/lib/tsreader/MemoryReader.cpp.o -c /home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/tsreader/MemoryReader.cpp
[  707s] In file included from /home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/tsreader/MemoryReader.h:33,
[  707s]                  from /home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/tsreader/MemoryReader.cpp:32:
[  707s] /home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/tsreader/FileReader.h:41:11: warning: 'MPTV::FileReader' declared with greater visibility than the type of its field 'MPTV::FileReader::m_hFile' [-Wattributes]
[  707s]    41 |     class FileReader
[  707s]       |           ^~~~~~~~~~
[  707s] /home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/tsreader/MemoryReader.h: In member function 'MPTV::CMemoryReader& MPTV::CMemoryReader::operator=(const MPTV::CMemoryReader&)':
[  707s] /home/abuild/rpmbuild/BUILD/xbmc-20.0-Nexus/cmake/addons/build/pvr.mediaportal.tvserver/src/lib/tsreader/MemoryReader.h:52:70: error: no return statement in function returning non-void [-Werror=return-type]
[  707s]    52 |         CMemoryReader& operator=(const CMemoryReader& memoryreader) {};
[  707s]       |                                                                      ^
[  707s]       |                                                                      return *this;
[  708s] cc1plus: some warnings being treated as errors

The error comes from the private assignment operator.
We can delete it instead of empty declaration

diff --git a/src/lib/tsreader/MemoryReader.h b/src/lib/tsreader/MemoryReader.h
index 288984b..9a502ae 100644
--- a/src/lib/tsreader/MemoryReader.h
+++ b/src/lib/tsreader/MemoryReader.h
@@ -41,6 +41,7 @@ namespace MPTV
       public:
         CMemoryReader(CMemoryBuffer& buffer);
         virtual ~CMemoryReader(void);
+        CMemoryReader& operator=(const CMemoryReader& memoryreader) = delete;
         virtual long Read(unsigned char* pbData, size_t lDataLength, size_t *dwReadBytes);
         virtual int64_t SetFilePointer(int64_t llDistanceToMove, unsigned long dwMoveMethod);
         virtual bool IsBuffer() { return true; };
@@ -49,7 +50,6 @@ namespace MPTV
 
       private:
         CMemoryBuffer& m_buffer;
-        CMemoryReader& operator=(const CMemoryReader& memoryreader) {};
     };
 }
 #endif //LIVE555

comskip on remote server

I believe it's already well-known that mediaportal and comskip only work with kodi if the kodi instance is running on the same machine as mediaportal itself.
I've found a reasonably simple code fix for this which works remotely with android/linux/windows ( and probably others but I can't test them ) in the common use-case where the remote access uses smb.

I'm using this myself at home, and would be happy to contribute my changes, but before I do the necesssary work I am looking for a sanity check as to whether this change is of sufficient interest, and how to synchronise the change here with the corresponding changes on the kodi side. ( My fix is safe in the sense that changed kodi still works with vanilla pvr.mediaportal.tvserver and vice versa, but obviously both need updates for anything good to happen ).

Any advice welcome.

EPG - No information displays in guide

Since Matrix - the EPG displays “no information” even though addon shows EPG data is updating. Scheduled recordings do appear in the guide.

This occurs on latest AndroidTV. Devices are a Sony Tv (running AndroidTV ) and a Nvidia Shield TV.

can't install kodi-pvr-mediaportal-tvserver package as it's missing from PPA index

Currently this package can't be installed on Ubuntu. Here's how to reproduce:

$ docker run -it --rm ubuntu:bionic
# apt-get update && apt-get -y install software-properties-common
  ...
# add-apt-repository ppa:team-xbmc/ppa && apt-get update
  ...
# apt-get install kodi kodi-pvr-mediaportal-tvserver
  ...
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:

  The following packages have unmet dependencies:
   kodi-pvr-mediaportal-tvserver : Depends: kodi-api-pvr (= 5.2.1)
  E: Unable to correct problems, you have held broken packages.

The package is missing from the PPA's index, but it's present on the overview page. I'm probably using the wrong terminology but I hope you get the idea.

Omega beta 3

Let me start by saying that I didn't have any problems with beta 2. Omega beta 3 gives me problems with viewing the TV.
Apparently everything works, I have the list of channels, the icons and the EPG, I can easily scroll through the entire list of my channels... but when I select one the two wheels in the center of the screen start to turn and the system remains waiting for a few seconds and then stops, as if I had pressed stop
In short, the channel display does not start.
Windows 11 x64 updated to the latest version.

https://paste.kodi.tv/konucegupo.kodi

Mediaportal plugin error: Cannot read PVR client name string properties

Hi guys.

I have a problem : ### PVR client doesn't start

This is the sympthom.
https://imagizer.imageshack.com/img923/2430/l588XA.jpg
PVR Manager is starting up... 0%

HW/SW configuration:
Kodi 20.1, Windows 11 , Mediaportal 2 ver. 1.23.200.0 , VLC 3.0.18 (just for test Mediaportal Live TV)
Intel core i5 , 16 GB Ram, 256Gb Disk + some TB of externak HD drives, TVB-T/T2/C Usb stick.

A brief history:
I activated new weeks ago Mediaportal Addon and it working but video was a little bit jerky.
So, I triyed to change LiveTv server and Kodi addon. I test few addons but the best is MediaPortal, so I try to go back and enable it again uninstalling all others LiveTV server external to Kodi.
When I enabled again MediaPortal Addon I got the message shown in the image on the top.

I already disabed/enabled addon and also uninstalled it/reinstalled. Nothing change.
I configured newly MediaPortal addon and input static ip address and other infos and had same error: PVR continue turn at 0%.
I disabled also Automatc Updates of MediaPortal Addon. Same result.

I test MediaPortal Server Live TV server as shown here using VLC and all work fine: with MediaPortal Server + VNC video is not jerky anymore it is fluid and smoothly.
So, the problem is limited to MediaPortal addon/Kodi.

In the end I see the log. I enabled log for specific PVR component and this is the result:

2023-10-11 10:34:02.423 T:4148    error <general>: GetAddonNameStringProperties: Add-on 'pvr.mediaportal.tvserver' returned an error: server error
2023-10-11 10:34:02.423 T:4148    error <general>: PVR::CPVRClient::SetConnectionState: Cannot read PVR client name string properties
2023-10-11 10:34:04.454 T:4148    error <general>: GetAddonNameStringProperties: Add-on 'pvr.mediaportal.tvserver' returned an error: server error
2023-10-11 10:34:04.455 T:4148    error <general>: PVR::CPVRClient::SetConnectionState: Cannot read PVR client name string properties
2023-10-11 10:34:04.455 T:4148    error <general>: AddOnLog: pvr.mediaportal.tvserver: Could not connect to MediaPortal TV Server backend.
2023-10-11 10:34:04.455 T:4148    error <general>: GetAddonNameStringProperties: Add-on 'pvr.mediaportal.tvserver' returned an error: server error

I don't found any informations about error reported in log.

I found the log error message in file names PVRClient.cpp

void CPVRClient::SetConnectionState(PVR_CONNECTION_STATE state)
{
  if (state == PVR_CONNECTION_STATE_CONNECTED)
  {
    // update properties - some will only be available after add-on is connected to backend
    if (!GetAddonProperties())
      CLog::LogF(LOGERROR, "Error reading PVR client properties");
  }
  else
  {
    if (!GetAddonNameStringProperties())
      CLog::LogF(LOGERROR, "Cannot read PVR client name string properties");
  }
[...]
}

but i'm not a software developer and I don't understand calls between KODI code and Mediaportal addon code.

So, anyone has any idea or canhelp me to start PVR ?

Thank for any reply and please forgive me for my bad english.

Streaming method: TSReader with RTSP fails Kodi v19.0 Windows x64

Kodi just "hangs" (busy circle spinning) when playback is attempted. Looks like the media is being sent over UDP by Mediaportal server but Kodi is not decoding/displaying it. Logs show:

INFO : AddOnLog: pvr.mediaportal.tvserver: Creating a new TsReader...
INFO : AddOnLog: pvr.mediaportal.tvserver: TsReader open 'rtsp://x.x.x.x/stream3.0'
INFO : AddOnLog: pvr.mediaportal.tvserver: OpenLiveStream: success for channel id 1234 (Channel Name) on card 3
INFO : Creating Demuxer

This method did not work on Kodi 17.6, but 18.4/18.5 it worked (and only seeking would fail #111). Now it completely fails!

Unable to seek recordings

Version 3.5.18 under Kodi 18.5 x64 playback stops as soon as attempting to seek through a recording

Attempting to resume recording at a position other than beginning also fails.

Platform: Windows 10 1909 x64
Streaming method: TSReader over RTSP

Using ffmpeg streaming method with version 2.4.19 under Kodi 17.6 works perfectly with seeking. Cannot use ffmpeg method under Kodi 18.5 to test (see issue #110)

Problem with channel change when audio changes from dd5.1 to aac

I post also here the same message taht i posted on the forum:
https://forum.kodi.tv/showthread.php?tid=342732&pid=2882328#pid2882328

I still trying to understand this issue.
I've tried also a different pvr server (Nextpvr) a different kodi addon Nextpvr client.
At the start i had the same audio switch issue on channel change, but juggling with their addon i found they have a setting that stop the stream during a channel change. And it made the magic: no more audio issues when channge change.
At this point I started to be confused, in mediaportal client setting there is a fastchannel switch that if i'm not wrong should do the same, so if the fast change switch is not selected I'm expecting that th stream is closed on each channel change.
So i started to look at your code on github and i found that in the very early implemetation of your plugin there is a function that is named switchchannel that check that setting and in case call CloseLiveStream before the OpenLiveStream.

https://github.com/margro/xbmc-pvr-addons/blob/development/addons/pvr.mediaportal.tvserver/src/pvrclient-mediaportal.cpp

bool cPVRClientMediaPortal::SwitchChannel(const PVR_CHANNEL &channel)
{
if (((int)channel.iUniqueId) == m_iCurrentChannel)
return true;
if (g_eStreamingMethod == TSReader)
{
XBMC->Log(LOG_NOTICE, "SwitchChannel(uid=%i) tsreader: open a new live stream", channel.iUniqueId);
if (!g_bFastChannelSwitch)
{
// Close existing live stream before opening a new one.
// This is slower, but it helps XBMC playback when the streams change types (e.g. SD->HD)
TRACE("Fast channel switching is disabled. Closing the existing live stream first");
CloseLiveStream();
}
return OpenLiveStream(channel);
}
else
{
XBMC->Log(LOG_DEBUG, "SwitchChannel(uid=%i) ffmpeg rtsp: nothing to be done here... GetLiveSteamURL() should fetch a new rtsp url from the backend.", channel.iUniqueId);
return false;
}
}

in the new implementations i can't find a SwitchChannel function but (if I've correctly understood) it is always called a OpenLiveStream function for start tv or to change channel.

inside this fuction i can't find any check on fastchannel switch setting , so the CloseStream is called only in case of errors.

https://github.com/kodi-pvr/pvr.mediaportal.tvserver/blob/63de57a99ba5deabe2a710124224fd593bccdba4/src/pvrclient-mediaportal.cpp

bool cPVRClientMediaPortal::OpenLiveStream(const PVR_CHANNEL &channelinfo)
{
string result;
char command[256] = "";
const char* sResolveRTSPHostname = booltostring(g_bResolveRTSPHostname);
vector<string> timeshiftfields;
KODI->Log(LOG_NOTICE, "Open Live stream for channel uid=%i", channelinfo.iUniqueId);
if (!IsUp())
{
m_iCurrentChannel = -1;
m_bTimeShiftStarted = false;
m_bSkipCloseLiveStream = false; //initialization
m_signalStateCounter = 0;
KODI->Log(LOG_ERROR, "Open Live stream failed. No connection to backend.");
return false;
}
if (((int)channelinfo.iUniqueId) == m_iCurrentChannel)
{
KODI->Log(LOG_NOTICE, "New channel uid equal to the already streaming channel. Skipping re-tune.");
return true;
}
m_iCurrentChannel = -1; // make sure that it is not a valid channel nr in case it will fail lateron
m_signalStateCounter = 0;
m_bTimeShiftStarted = false;
m_bSkipCloseLiveStream = false; //initialization
// Start the timeshift
// Use the optimized TimeshiftChannel call (don't stop a running timeshift)
snprintf(command, 256, "TimeshiftChannel:%i|%s|False\n", channelinfo.iUniqueId, sResolveRTSPHostname);
result = SendCommand(command);
if (result.find("ERROR") != std:tring::npos || result.length() == 0)
{
KODI->Log(LOG_ERROR, "Could not start the timeshift for channel uid=%i. Reason: %s", channelinfo.iUniqueId, result.c_str());
if (g_iTVServerKodiBuild>=109)
{
Tokenize(result, timeshiftfields, "|");
//[0] = string error message
//[1] = TvResult (optional field. SendCommand can also return a timeout)
if(timeshiftfields.size()>1)
{
//For TVServer 1.2.1:
//enum TvResult
//{
// Succeeded = 0, (this is not an error)
// AllCardsBusy = 1,
// ChannelIsScrambled = 2,
// NoVideoAudioDetected = 3,
// NoSignalDetected = 4,
// UnknownError = 5,
// UnableToStartGraph = 6,
// UnknownChannel = 7,
// NoTuningDetails = 8,
// ChannelNotMappedToAnyCard = 9,
// CardIsDisabled = 10,
// ConnectionToSlaveFailed = 11,
// NotTheOwner = 12,
// GraphBuildingFailed = 13,
// SWEncoderMissing = 14,
// NoFreeDiskSpace = 15,
// NoPmtFound = 16,
//};
int tvresult = atoi(timeshiftfields[1].c_str());
// Display one of the localized error messages 30060-30075
KODI->QueueNotification(QUEUE_ERROR, KODI->GetLocalizedString(30059 + tvresult));
}
else
{
KODI->QueueNotification(QUEUE_ERROR, result.c_str());
}
}
else
{
if (result.find("[ERROR]: TVServer answer: ") != std:tring::npos)
{
//Skip first part: "[ERROR]: TVServer answer: "
KODI->QueueNotification(QUEUE_ERROR, "TVServer: %s", result.substr(26).c_str());
}
else
{
//Skip first part: "[ERROR]: "
KODI->QueueNotification(QUEUE_ERROR, result.substr(7).c_str());
}
}
m_iCurrentChannel = -1;
if (m_tsreader != nullptr)
{
SAFE_DELETE(m_tsreader);
}
return false;
}
else
{
Tokenize(result, timeshiftfields, "|");
if(timeshiftfields.size()<4)
{
KODI->Log(LOG_ERROR, "OpenLiveStream: Field count mismatch (<4). Data: %s\n", result.c_str());
m_iCurrentChannel = -1;
return false;
}
//[0] = rtsp url
//[1] = original (unresolved) rtsp url
//[2] = timeshift buffer filename
//[3] = card id (TVServerKodi build >= 106)
//[4] = tsbuffer pos (TVServerKodi build >= 110)
//[5] = tsbuffer file nr (TVServerKodi build >= 110)
m_PlaybackURL = timeshiftfields[0];
if (g_eStreamingMethod == TSReader)
{
KODI->Log(LOG_NOTICE, "Channel timeshift buffer: %s", timeshiftfields[2].c_str());
if (channelinfo.bIsRadio)
{
usleep(100000); // 100 ms sleep to allow the buffer to fill
}
}
else
{
KODI->Log(LOG_NOTICE, "Channel stream URL: %s", m_PlaybackURL.c_str());
}
if (g_iSleepOnRTSPurl > 0)
{
KODI->Log(LOG_NOTICE, "Sleeping %i ms before opening stream: %s", g_iSleepOnRTSPurl, timeshiftfields[0].c_str());
usleep(g_iSleepOnRTSPurl * 1000);
}
// Check the returned stream URL. When the URL is an rtsp stream, we need
// to close it again after watching to stop the timeshift.
// A radio web stream (added to the TV Server) will return the web stream
// URL without starting a timeshift.
if(timeshiftfields[0].compare(0,4, "rtsp") == 0)
{
m_bTimeShiftStarted = true;
}
if (g_eStreamingMethod == TSReader)
{
if (m_tsreader != NULL)
{
bool bReturn = false;
// Continue with the existing TsReader.
KODI->Log(LOG_NOTICE, "Re-using existing TsReader...");
//if(g_bDirectTSFileRead)
if(g_bUseRTSP == false)
{
m_tsreader->SetCardId(atoi(timeshiftfields[3].c_str()));
if ((g_iTVServerKodiBuild >=110) && (timeshiftfields.size()>=6))
bReturn = m_tsreader->OnZap(timeshiftfields[2].c_str(), atoll(timeshiftfields[4].c_str()), atol(timeshiftfields[5].c_str()));
else
bReturn = m_tsreader->OnZap(timeshiftfields[2].c_str(), -1, -1);
}
else
{
// RTSP url
KODI->Log(LOG_NOTICE, "Skipping OnZap for TSReader RTSP");
bReturn = true; //Fast forward seek (OnZap) does not work for RTSP
}
if (bReturn)
{
m_iCurrentChannel = (int) channelinfo.iUniqueId;
m_iCurrentCard = atoi(timeshiftfields[3].c_str());
m_bCurrentChannelIsRadio = channelinfo.bIsRadio;
}
else
{
KODI->Log(LOG_ERROR, "Re-using the existing TsReader failed.");
CloseLiveStream();
}
return bReturn;
}
else
{
KODI->Log(LOG_NOTICE, "Creating a new TsReader...");
m_tsreader = new CTsReader();
}
if (!g_bUseRTSP)
{
// Reading directly from the Timeshift buffer
m_tsreader->SetCardSettings(&m_cCards);
m_tsreader->SetCardId(atoi(timeshiftfields[3].c_str()));
//if (g_szTimeshiftDir.length() > 0)
// m_tsreader->SetDirectory(g_szTimeshiftDir);
if ( m_tsreader->Open(timeshiftfields[2].c_str()) != S_OK )
{
KODI->Log(LOG_ERROR, "Cannot open timeshift buffer %s", timeshiftfields[2].c_str());
CloseLiveStream();
return false;
}
}
else
{
// use the RTSP url and live555
if ( m_tsreader->Open(timeshiftfields[0].c_str()) != S_OK)
{
KODI->Log(LOG_ERROR, "Cannot open channel url %s", timeshiftfields[0].c_str());
CloseLiveStream();
return false;
}
usleep(400000);
}
}
// at this point everything is ready for playback
m_iCurrentChannel = (int) channelinfo.iUniqueId;
m_iCurrentCard = atoi(timeshiftfields[3].c_str());
m_bCurrentChannelIsRadio = channelinfo.bIsRadio;
}
KODI->Log(LOG_NOTICE, "OpenLiveStream: success for channel id %i (%s) on card %i", m_iCurrentChannel, channelinfo.strChannelName, m_iCurrentCard);
return true;
}

Can you confirm that I'm not wrong and the fastchannel setting is ignored ?

Thank you

Recording playback skips

I wonder if anyone has any suggestions for me. I am running Kodi on a Raspberry Pi 3 with OSMC, connecting to a MediaPortal 1 server. On the Pi when I go to playback a recording all starts well, but at the first commercial playback freezes on a black screen for several minutes, then when playback resumes it skips a fair bit of the program. Each additional commercial is similar in that most of the commercial, and sometimes several minutes of the show are skipped. When I run Kodi on a PC to watch the same recordings playback is much better with commercials skipped pretty much correctly. Anyway to disable the commercial skipping, or figure out what might be happening on the Raspberry Pi??

Active recordings not playable

@margro @ksooo
Don't know when this started, but right now active recordings are not playable anymore.
One have to wait for the recording to finish, otherwise you get an error "empty url".
This happens with Kodi Jarvis 16.1 and Kodi Krypton nightlies,
MediaPortal TVServer 1.15 and TVServer Kodi plugin 1.15.0.134.

00:38:16 T:143304  NOTICE: VideoPlayer: Opening: pvr://recordings/tv/active/Outcast [1]/Outcast [1] - 10. Wie Kinder ohne Licht s01e10, TV (FOX HD), 20160815_220009, 984.pvr
00:38:16 T:143304 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
00:38:16 T:143304   ERROR: DXVA::CProcessorHD::IsFormatSupported - Unsupported format 104 for 1.
00:38:16 T:143304   ERROR: DXVA::CProcessorHD::IsFormatSupported - Unsupported format 105 for 1.
00:38:16 T:142172  NOTICE: Creating InputStream
00:38:16 T:142172  NOTICE: AddOnLog: MediaPortal PVR Client: OpenRecordedStream (id=984)
00:38:16 T:142172   ERROR: AddOnLog: MediaPortal PVR Client: Recording playback not possible. Backend returned empty filename or stream URL for recording id 984
00:38:16 T:142172   ERROR: CVideoPlayer::OpenInputStream - error opening [pvr://recordings/tv/active/Outcast [1]/Outcast [1] - 10. Wie Kinder ohne Licht s01e10, TV (FOX HD), 20160815_220009, 984.pvr]
00:38:16 T:142172  NOTICE: CVideoPlayer::OnExit()
00:38:16 T:143304  NOTICE: CVideoPlayer::CloseFile()
00:38:16 T:143304  NOTICE: VideoPlayer: waiting for threads to exit
00:38:16 T:143304  NOTICE: VideoPlayer: finished waiting

kodi crashes

Kodi crashes because of this error:

2019-06-30 15:11:16.571 T:6560 NOTICE: Creating InputStream
2019-06-30 15:11:16.571 T:6560 NOTICE: AddOnLog: MediaPortal PVR Client: Open Live stream for channel uid=303
2019-06-30 15:11:17.452 T:6560 ERROR: AddOnLog: MediaPortal PVR Client: TVServerKodi error: [ERROR]: TVServer answer: AllCardsBusy|1
2019-06-30 15:11:17.452 T:6560 ERROR: AddOnLog: MediaPortal PVR Client: Could not start the timeshift for channel uid=303. Reason: [ERROR]: TVServer answer: AllCardsBusy

Kodi Crashes When Trying to View Live Stream or Recorded Show

Whenever I now try to use the Kodi MediaPortal add-on, it Kodi crashes to the "sad face" and and then restarts. This happens whenever I try to view live TV or view a recorded show.

I can view the recorded shows fine by going through the "file system" and clicking on the *.ts file. But if I try to view it through the MediaPortal add-on, it crashes.

This issue is reproducible every time on my machine.

Let me know what is needed to help resolve this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.