GithubHelp home page GithubHelp logo

pvr.vbox's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

pvr.vbox's Issues

Fix dangling pointer when accessing current channel

After adding the update loop, the m_channels vector gets updated regularly. When watching a channel, m_currentChannel points to this vector which means that pointer gets invalidated as soon as the update loop has run for a while.

Improve request failure logging

  • add request method name instead of just saying "Request failed"
  • add a proper request error message when XML parsing fails due to no data so we can distinguish that from other cases

Update architecture README subsection

At least the part about the timeshift buffer is partly wrong, the implementation has already been moved to its own namespace. Probably some other things need updating as well.

Repeated crash with UK external XMLTV file - buffer overrun?

This tag:
<desc lang="en">With Catriona Young. Mozart: Overture: Singspiel in three acts: Die Entfuhrung aus dem Serail, K384. Balakirev: Oriental Fantasy orch Lyapunov: Islamey. Holst: Oriental Suite: Beni Mora, Op 29 No 1. Borusan Istanbul Philharmonic Orchestra, conductor Sascha Goetzel. 1.04 Handel: Solomon - oratorio, Act 3; Sinfonia (Arrival of the Queen of Sheba). 1.08 Respighi: Suite: Belkis, regina di Saba (Belkis, Queen of Sheba). 1.33 Erkin: Kocekce. 1.43 Mozart: Quintet for piano, oboe, clarinet, bassoon and horn in E flat, K452. 2.08 Purcell: Timon of Athens, the Man-Hater, Z632. 2.31 Bartok: Violin Concerto No 1 Op Post, Sz36. 2.53 Martinu: Symphony No 1. 3.30 Dvorak: Slavonic Dance No 10 in E minor, Op 72 No 2. 3.36 Mendelssohn: Venetian Boat Song, Op 30 No 6 (Songs Without Words, Book II). 3.40 Vivaldi: Concerto in F for violin, two oboes, two horns, bassoon and cello, Rv569. 3.53 Part: The Woman with the Alabaster box for chorus. 4.00 Faure: Piano Nocturne No 6 in D flat, Op 63. 4.09 Borgs</desc>

is ok and loads without crashing during the initial population of the EPG after booting

This tag:
<desc lang="en">With Catriona Young. Mozart: Overture: Singspiel in three acts: Die Entfuhrung aus dem Serail, K384. Balakirev: Oriental Fantasy orch Lyapunov: Islamey. Holst: Oriental Suite: Beni Mora, Op 29 No 1. Borusan Istanbul Philharmonic Orchestra, conductor Sascha Goetzel. 1.04 Handel: Solomon - oratorio, Act 3; Sinfonia (Arrival of the Queen of Sheba). 1.08 Respighi: Suite: Belkis, regina di Saba (Belkis, Queen of Sheba). 1.33 Erkin: Kocekce. 1.43 Mozart: Quintet for piano, oboe, clarinet, bassoon and horn in E flat, K452. 2.08 Purcell: Timon of Athens, the Man-Hater, Z632. 2.31 Bartok: Violin Concerto No 1 Op Post, Sz36. 2.53 Martinu: Symphony No 1. 3.30 Dvorak: Slavonic Dance No 10 in E minor, Op 72 No 2. 3.36 Mendelssohn: Venetian Boat Song, Op 30 No 6 (Songs Without Words, Book II). 3.40 Vivaldi: Concerto in F for violin, two oboes, two horns, bassoon and cello, Rv569. 3.53 Part: The Woman with the Alabaster box for chorus. 4.00 Faure: Piano Nocturne No 6 in D flat, Op 63. 4.09 Borgst</desc>

reliably crashes every time - with a Kodi reboot loop effectively being created as it can't get past the EPG upload without a crash.

The difference is 996 characters vs. 995 characters. Presumably, there is some memory being allocated somewhere with a fixed size?

This is a problem in the UK where program descriptions can be even longer than this.

For example, the full tag in this particular program is:

<desc lang="en">With Catriona Young. Mozart: Overture: Singspiel in three acts: Die Entfuhrung aus dem Serail, K384. Balakirev: Oriental Fantasy orch Lyapunov: Islamey. Holst: Oriental Suite: Beni Mora, Op 29 No 1. Borusan Istanbul Philharmonic Orchestra, conductor Sascha Goetzel. 1.04 Handel: Solomon - oratorio, Act 3; Sinfonia (Arrival of the Queen of Sheba). 1.08 Respighi: Suite: Belkis, regina di Saba (Belkis, Queen of Sheba). 1.33 Erkin: Kocekce. 1.43 Mozart: Quintet for piano, oboe, clarinet, bassoon and horn in E flat, K452. 2.08 Purcell: Timon of Athens, the Man-Hater, Z632. 2.31 Bartok: Violin Concerto No 1 Op Post, Sz36. 2.53 Martinu: Symphony No 1. 3.30 Dvorak: Slavonic Dance No 10 in E minor, Op 72 No 2. 3.36 Mendelssohn: Venetian Boat Song, Op 30 No 6 (Songs Without Words, Book II). 3.40 Vivaldi: Concerto in F for violin, two oboes, two horns, bassoon and cello, Rv569. 3.53 Part: The Woman with the Alabaster box for chorus. 4.00 Faure: Piano Nocturne No 6 in D flat, Op 63. 4.09 Borgstrom: Music to Johan Gabriel Borkman. 4.21 Haydn: Overture: Sinfonia (L' Isola disabitata). 4.31 Mozart: Overture: Der Schauspieldirektor, K486. 4.35 Schubert: Impromptu No 2 in E flat, D899. 4.41 Delibes: Suite: Sylvia. 4.59 Reutter: Ecce quomodo moritur justus. 5.06 Mendelssohn: String Quartet No 2 in A minor, Op 13. 5.36 Bach: Ricercare a 6 (Musical Offering, BWV1079). 5.45 Kutev: Symphonic Dances. 5.56 Noskowski: The Highlander's Fantasy, Op 17. 6.05 Reinecke: Ballade for flute and orchestra. 6.13 Bach: Quintet No 4 in E flat for flute, oboe, violin, viola and double bass, Op 11.</desc>

This renders the add-on effectively unusable in the UK because without external XMLTV, the EPG is too lousy to use and with external XMLTV, it crashes. It is worth noting that the Simple IPTV PVR plugin parses the same XMLTV file perfectly and also loads the channel icons and the graphics for each program, which vbox.pvr doesn't seem to be able to do.

I hope this is enough detail to track down the problem - please let me know - I tried to find the bug in your source but didn't find it yet, so please let me know where it is when you find it - thanks

Linking against static library libxmltv fails

Linking pvr.vbox.so as shared library against static library liblibxmltv.a fails, see log http://sprunge.us/YhNH

No issue when both static or both shared.

POSITION_INDEPENDENT_CODE is probably needed to be enabled, manually setting this (-DCMAKE_POSITION_INDEPENDENT_CODE=true) fix the issue.
Due to my little experience with CMake I'm not sending PR but here's the change that works for me

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 915f446..fad44ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.6)

 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})

+set(CMAKE_POSITION_INDEPENDENT_CODE True)
+
 enable_language(CXX)

 find_package(kodi REQUIRED)

Add support for authentication

By default the VBox web interface is accessible without any kind of authentication at all. This is quite insecure if the device is meant to be used over the Internet, so authentication should definitely be added.

External XMLTV data

If an external XMLTV source is configured, the addon should load it asynchronously. Once it's loaded, the data from it is used should be used if the user has specified that it should override the OTA EPG provided by the VBox.

Adjust for timezone variations when converting XMLTV timestamps

To avoid random issues with timers becoming scheduled when they should actually start recording immediately etc., we need to make sure that:

  • all timestamps converted from XMLTV are adjusted to UTC
  • all timestamps converted from UNIX timestamps to XMLTV get adjusted to the timezone the VBox is configured for (needs to be checked through the API).

Custom XMLTV channel mapping

Currently the addon maps external XMLTV entries to VBox channels based on the channel display name. While this should work in the majority of cases, a way to override this mapping has to be implemented at some point.

One way to do this would be that the addon automatically creates a file named xmltvmap.xml when an external XMLTV file is configured and no such file exists already. The file would be populated with the mappings done automatically. The user can then extend these to fill in the blanks.

Here's a proposal for the file structure. The xmltv-name attribute is the channel display name as it appears in the external XMLTV file while the content of the mapping tag is the channel display name used by the VBox.

<?xml version="1.0" encoding="UTF-8"?>
<xmltvmap>
    <mapping xmltv-name="Yle TV1">Yle TV1</mapping>
    <mapping xmltv-name="Yle TV2">Yle TV2</mapping>
    <!-- The user could enter e.g. "MTV3 HD" here -->
    <mapping xmltv-name="MTV3"></mapping>
</xmltvmap>

Kodi/PVR Manager freeze when loading channels pvr.vbox

Seems like tinyxml2 is crashing, I've tried notspiff'2 1.0.12, leethomason's 2.2.0 & 3.0.0.

Not much info in the logs.

Using kodi b9a9083bd9757f375879999ce0638d5f10b871a9

http://sprunge.us/IKfU

Starting program: /usr/lib/kodi/kodi.bin 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
sh: lsb_release: command not found
[New Thread 0x7fffdf73b700 (LWP 19099)]
[New Thread 0x7fffdff3c700 (LWP 19098)]
[New Thread 0x7fffdbf3b700 (LWP 19097)]
[New Thread 0x7fffc7ffe700 (LWP 19105)]
[New Thread 0x7fff8ffff700 (LWP 19119)]
[New Thread 0x7fffc57f9700 (LWP 19110)]
[New Thread 0x7fffc4ff8700 (LWP 19111)]
[New Thread 0x7fff8cfe9700 (LWP 19124)]
[New Thread 0x7fff9dffb700 (LWP 19116)]
[Thread 0x7fff8cfe9700 (LWP 19124) exited]
[New Thread 0x7fffc6ffc700 (LWP 19107)]
[New Thread 0x7fff9f7fe700 (LWP 19113)]
[Thread 0x7fffc57f9700 (LWP 19110) exited]
[New Thread 0x7fff8956a700 (LWP 19128)]
[New Thread 0x7fff8768e700 (LWP 19127)]
[New Thread 0x7ffff7f2a700 (LWP 19123)]
[New Thread 0x7fff8dbf3700 (LWP 19122)]
[New Thread 0x7fff8e3f4700 (LWP 19121)]
[New Thread 0x7fff8ebf5700 (LWP 19120)]
[New Thread 0x7fff9cff9700 (LWP 19118)]
[New Thread 0x7fff9d7fa700 (LWP 19117)]
[New Thread 0x7fff9e7fc700 (LWP 19115)]
[New Thread 0x7fff9effd700 (LWP 19114)]
[New Thread 0x7fff9ffff700 (LWP 19112)]
[New Thread 0x7fffc5ffa700 (LWP 19109)]
[New Thread 0x7fffc67fb700 (LWP 19108)]
[New Thread 0x7fffc77fd700 (LWP 19106)]
[New Thread 0x7fffdd88d700 (LWP 19102)]
[New Thread 0x7fffde08e700 (LWP 19101)]
[New Thread 0x7fffde88f700 (LWP 19100)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff8956a700 (LWP 19128)]
0x00007fff9c3876b3 in tinyxml2::XMLElement::QueryUnsignedText(unsigned int*) const () from /usr/lib/libtinyxml2.so.1

Keep buffer in RAM

Feature suggestion:

With regards to #35 I would like to suggest that maybe a setting for keeping the buffer in RAM will be added.

ATM we can use tmpfs as the buffer target but it will grow until no space is left which isn't good idea, so support in the addon for keeping in buffer in RAM should actually keep track of the available free space and will make sure at least X MB of space is left free.

For SD video (~1.6Mbps average bitrate), having the buffer in the RAM is working for me quite nicely on devices with 1GB of RAM (Cubox-i2) and it helps avoid constantly writing into flash memory.

Add a refresh loop

Currently information is only retrieved from the backend once. We need an update loop that runs at a set interval and updates channels, guide, recordings and timers.

Extend ScheduleChannelRecord usage when external XMLTV is used

Starting with version 2.48 of the firmware it is possible to send your own programme title and description when scheduling recordings using ScheduleChannelRecord. This way recordings will no longer show up as "unnamed recording" when external XMLTV data is used.

Change the connection settings

Currently if the user is sometimes on his local network and sometimes roaming on the internet (e.g. a laptop), the addon will most likely not work without reconfiguration since there's only one setting for the hostname and ports. What we should do is duplicate all settings so that the user can specify settings for both his internal network and for external access. When the addon starts, it tries the internal hostname first, then the external, and only if neither works will the addon fail to start.

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.