Skip to content

Commit

Permalink
Merge pull request #64 from AlwinEsch/api-change
Browse files Browse the repository at this point in the history
[Matrix] API related change
  • Loading branch information
AlwinEsch authored Oct 15, 2020
2 parents 6c8804d + eb30396 commit 27fa0b7
Show file tree
Hide file tree
Showing 7 changed files with 279 additions and 24 deletions.
40 changes: 26 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
language: cpp

#
# Define the build matrix
#
# Travis defaults to building on Ubuntu Trusty when building on
# Linux. We need Xenial in order to get up to date versions of
# cmake and g++.
#
env:
global:
- app_id=inputstream.ffmpegdirect

#
# Define the build matrix
#
matrix:
include:
- os: linux
Expand All @@ -21,10 +17,22 @@ matrix:
dist: xenial
sudo: required
compiler: clang
- os: linux
dist: bionic
sudo: required
compiler: gcc
env: DEBIAN_BUILD=true
- os: linux
dist: focal
sudo: required
compiler: gcc
env: DEBIAN_BUILD=true
- os: osx
osx_image: xcode10.2

before_install:
- if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi
- if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y yasm autopoint; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install yasm gettext; fi
Expand All @@ -35,11 +43,15 @@ before_install:
# we'll put the Kodi source on the same level
#
before_script:
- cd $TRAVIS_BUILD_DIR/..
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
- cd ${app_id} && mkdir build && cd build
- mkdir -p definition/${app_id}
- echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt
- cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons
- if [[ $DEBIAN_BUILD != true ]]; then cd $TRAVIS_BUILD_DIR/..; fi
- if [[ $DEBIAN_BUILD != true ]]; then git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git; fi
- if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir build && cd build; fi
- if [[ $DEBIAN_BUILD != true ]]; then mkdir -p definition/${app_id}; fi
- if [[ $DEBIAN_BUILD != true ]]; then echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt; fi
- if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons; fi
- if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
- if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep $TRAVIS_BUILD_DIR; fi

script: make
script:
- if [[ $DEBIAN_BUILD != true ]]; then make; fi
- if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh $TRAVIS_BUILD_DIR; fi
11 changes: 9 additions & 2 deletions inputstream.ffmpegdirect/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="inputstream.ffmpegdirect"
version="1.15.5"
version="1.16.0"
name="Inputstream FFmpeg Direct"
provider-name="Ross Nicholson">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -14,16 +14,23 @@
library_@PLATFORM@="@LIBRARY_FILENAME@" />
<extension point="xbmc.service" library="resources/lib/runner.py"/>
<extension point="xbmc.addon.metadata">
<summary lang="de_DE">InputStream Client für FFmpeg-Streams (libavformat)</summary>
<summary lang="en_GB">InputStream Client for FFmpeg streams (libavformat)</summary>
<description lang="de_DE">InputStream-Client für Streams, die entweder mit dem libav-Format von FFmpeg oder mit cURL von Kodi geöffnet werden können. Gängige Stream-Formate wie TS, HLS und DASH (ohne DRM) werden ebenso unterstützt wie viele andere.&#10; &#10;Das Addon unterstützt auch Archiv-/Aufholdienste, bei denen Wiedergabefenster vorhanden sind (normalerweise in Tagen), und kann über diesen Zeitraum hinweg eine Zeitverschiebung bewirken.&#10; &#10;Dokumentation finden Sie unter: https://github.com/xbmc/inputstream.ffmpegdirect/blob/Matrix/README.md&#10; </description>
<description lang="en_GB">InputStream Client for streams that can be opened by either FFmpeg's libavformat or Kodi's cURL. Common stream formats such as plain TS, HLS and DASH (without DRM) are supported as well as many others.&#10; &#10;The addon also has support for Archive/Catchup services where there is a replay windows (usually in days) and can timeshift across that span.&#10; &#10;For documenation visit: https://github.com/xbmc/inputstream.ffmpegdirect/blob/Matrix/README.md&#10; </description>
<platform>@PLATFORM@</platform>
<license>GPL-2.0-or-later</license>
<license>GPL-2.0-or-later</license>
<source>https://github.com/xbmc/inputstream.ffmpegdirect</source>
<assets>
<icon>icon.png</icon>
<fanart>fanart.jpg</fanart>
</assets>
<news>
v1.16.0
- Update: Inputstream API 2.3.4
- Added: German translation
- Added: Debian build test to Travis CI

v1.15.5
- Update: Use add-on supplied StringUtils and remove local version
- Update: Remove local threading code and use addon supplied instead
Expand Down
5 changes: 5 additions & 0 deletions inputstream.ffmpegdirect/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v1.16.0
- Update: Inputstream API 2.3.4
- Added: German translation
- Added: Debian build test to Travis CI

v1.15.5
- Update: Use add-on supplied StringUtils and remove local version
- Update: Remove local threading code and use addon supplied instead
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
# Kodi Media Center language file
# Addon Name: Inputstream.ffmpegdirect
# Addon id: inputstream.ffmpegdirect
# Addon Provider: phunkyfish

msgid ""
msgstr ""

"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. settings labels

#. label-category: Network
msgctxt "#30000"
msgid "Network"
msgstr "Netzwerk"

#. label-group: Network - httpProxy
msgctxt "#30001"
msgid "HTTP proxy"
msgstr "HTTP-Proxy"

#. label: Network - useHttpProxy
msgctxt "#30002"
msgid "Use HTTP proxy when opening with FFmpeg"
msgstr "Verwenden Sie beim Öffnen mit FFmpeg den HTTP-Proxy"

#. label-option: Network - httpProxyHost
msgctxt "#30003"
msgid "Server"
msgstr "Server"

#. label-option: Network - httpProxyPort
msgctxt "#30004"
msgid "Port"
msgstr "Port"

#. label-option: Network - httpProxyUser
msgctxt "#30005"
msgid "Username"
msgstr "Benutzername"

#. label-option: Network - httpProxyPassword
msgctxt "#30006"
msgid "Password"
msgstr "Passwort"

#. label-group: Network - Bandwidth
msgctxt "#30007"
msgid "Bandwidth"
msgstr "Bandbreite"

#. label-option: Network - networkBandwidth
msgctxt "#30008"
msgid "Stream selection bandwidth"
msgstr "Stream-Auswahlbandbreite"

#empty strings from id 30009 to 30019

#. label-category: timeshift
#. label-group: Timeshift - Timeshift
msgctxt "#30020"
msgid "Timeshift"
msgstr "Timeshift"

#. label: Timeshift - timeshiftBufferPath
msgctxt "#30021"
msgid "Timeshift buffer path"
msgstr "Timeshift-Pufferpfad"

#. label: Timeshift - timeshiftEnableLimit
msgctxt "#30022"
msgid "Enable timeshift limit"
msgstr "Timeshift-Limit aktivieren"

#. label: Timeshift - timeshiftOnDiskLength
msgctxt "#30023"
msgid "Maximum timeshift buffer length"
msgstr "Maximale Länge des Timeshift-Puffers"

#. format-label: Timeshift - timeshiftOnDiskLength
msgctxt "#30024"
msgid "{0:.2f} hours"
msgstr "{0:.2f} Stunden"

#empty strings from id 30025 to 30039

#. label-category: advanced
msgctxt "#30040"
msgid "Advanced"
msgstr "Fortgeschritten"

#. label-category: advanced
#. label-group: Advanced - Logging
msgctxt "#30041"
msgid "FFmpeg"
msgstr "FFmpeg"

#. label: Advanced - allowFFmpegLogging
msgctxt "#30042"
msgid "Allow FFmpeg logging"
msgstr "FFmpeg-Protokollierung zulassen"

#. label: Advanced - probeForFps
msgctxt "#30043"
msgid "Probe for FPS"
msgstr "Prüfe FPS"

#. label: Advanced - enableTeletext
msgctxt "#30044"
msgid "Enable teletext"
msgstr "Videotext aktivieren"

#. help: Advanced - useFastOpemForManifestStreams
msgctxt "#30045"
msgid "Use fast open for streams using a manifest file"
msgstr "Benutzte schnelles Öffnen von Streams mit Manifestdatei"

#. help: Advanced - forceRealtimeOffCatchup
msgctxt "#30046"
msgid "For catchup streams report stream is not realtime"
msgstr "Für \"Catch Up\"-Streams ist der Berichtsstrom nicht in Echtzeit"

#empty strings from id 30047 to 30599

#. ############
#. help info #
#. ############

#. help info - HTTP Proxy

#. help-category: Network
msgctxt "#30600"
msgid "This category contains the settings for network configuration such as FFmpeg proxy and bandwidth limits."
msgstr "Diese Kategorie enthält die Einstellungen für die Netzwerkkonfiguration, z. B. FFmpeg-Proxy und Bandbreitenbeschränkungen."

#. help: Network - useHttpProxy
msgctxt "#30601"
msgid "Whether or not a proxy should be used when opening with FFmpeg. Note that if opened using curl kodi's proxy settings will be used."
msgstr "Gibt an, ob beim Öffnen mit FFmpeg ein Proxy verwendet werden soll. Beachten Sie, dass beim Öffnen mit Curl Kodi die Proxy-Einstellungen verwendet werden."

#. help: Network - httpProxyHost
msgctxt "#30602"
msgid "Configure the proxy server address."
msgstr "Konfiguriert die Proxy-Server-Adresse."

#. help: Network- httpProxyPort
msgctxt "#30603"
msgid "Configure the proxy server port."
msgstr "Konfiguriert den Proxyserver-Port."

#. help: Network - httpProxyUser
msgctxt "#30604"
msgid "Configure the proxy server username."
msgstr "Konfiguriert den Benutzernamen des Proxyservers."

#. help: Network - httpProxyPassword
msgctxt "#30605"
msgid "Configure the proxy server password."
msgstr "Konfiguriert das Proxy-Server-Passwort."

#. help: Network - streamBandwidth
msgctxt "#30606"
msgid "Use this value as a maximum when selecting which HLS stream to use."
msgstr "Verwenden Sie diesen Wert maximal, wenn Sie den zu verwendenden HLS-Stream auswählen."

#empty strings from id 30607 to 30619

#. help info - Timeshift

#. help-category: timeshift
msgctxt "#30620"
msgid "This category contains the settings for timeshift. Timeshifting allows you to pause live TV as well as move back and forward from your current position similar to playing back a recording."
msgstr "Diese Kategorie enthält die Einstellungen für die Zeitverschiebung. Mit Timeshifting können Sie das Live-Fernsehen anhalten und sich von Ihrer aktuellen Position aus vorwärts und rückwärts bewegen, ähnlich wie bei der Wiedergabe einer Aufnahme."

#. help: Timeshift - timeshiftBufferPath
msgctxt "#30621"
msgid "The path used to store the timeshift buffer. The default is the [I]\"addon_data/inputstream.ffmpegdirect/timeshift\"[/I] folder in userdata. Note that this folder will be cleared of timeshift files on Kodi startup. Only relevant when [I]\"inputstream.ffmpegdirect.stream_mode=timeshift\"[/I] property is passed to the addon."
msgstr "Der Pfad zum Speichern des Timeshift-Puffers. Der Standardwert ist der Ordner [I]\"addon_data/inputstream.ffmpegdirect/timeshift\"[/I] in den Benutzerdaten. Beachten Sie, dass dieser Ordner beim Kodi-Start von Timeshift-Dateien befreit wird. Nur relevant, wenn die Eigenschaft [I]\"inputstream.ffmpegdirect.stream_mode=timeshift\"[/I] an das Addon übergeben wird"

#. help: Timeshift - timeshiftEnableLimit
msgctxt "#30622"
msgid "Enable this option to limit the length of the timeshift buffer. If disabled the buffer will grow forever until playback is stopped. Regardless of this setting the buffer will also grow forever if paused."
msgstr "Aktivieren Sie diese Option, um die Länge des Timeshift-Puffers zu begrenzen. Wenn deaktiviert, wächst der Puffer für immer, bis die Wiedergabe gestoppt wird. Unabhängig von dieser Einstellung wächst der Puffer auch für immer, wenn er angehalten wird."

#. help: Timeshift - timeshiftOnDiskLength
msgctxt "#30623"
msgid "The length of the timeshift buffer in hours. Once the value is reached the older buffer data will be deleted to ensure the limit is not breached. Note that the storage for your device should be sufficient to allow the buffer to grow to it's maximum length (otherwise it's equivalent to disabling this option). A good heuristic for video size is 130MB per minute of 1080p video and 375MB per minute of 4K video."
msgstr "Die Länge des Timeshift-Puffers in Stunden. Sobald der Wert erreicht ist, werden die älteren Pufferdaten gelöscht, um sicherzustellen, dass das Limit nicht überschritten wird. Beachten Sie, dass der Speicherplatz für Ihr Gerät ausreichen sollte, damit der Puffer auf seine maximale Länge anwachsen kann (andernfalls entspricht dies dem Deaktivieren dieser Option). Eine gute Heuristik für die Videogröße sind 130 MB pro Minute 1080p-Video und 375 MB pro Minute 4K-Video."

#empty strings from id 30624 to 30639

#. help info - Advanced

#. help-category: advanced
msgctxt "#30640"
msgid "Advanced settings"
msgstr "Erweiterte Einstellungen"

#. help: Advanced - allowFFmpegLogging
msgctxt "#30641"
msgid "If enabled the addon will log any FFmpeg logging to the Kodi log."
msgstr "Wenn aktiviert, protokolliert das Addon alle FFmpeg-Protokolle im Kodi-Protokoll."

#. help: Advanced - probeForFps
msgctxt "#30642"
msgid "Probe for frames per second. Default enabled. If disabled the value returned by the codec will be used."
msgstr "Prüfe für Bilder pro Sekunde. Standard aktiviert. Wenn deaktiviert, wird der vom Codec zurückgegebene Wert verwendet."

#. help: Advanced - enableTeletext
msgctxt "#30643"
msgid "Allow teletext. Default enabled."
msgstr "Videotext zulassen. Standard aktiviert."

#. help: Advanced - useFastOpenForManifestStreams
msgctxt "#30644"
msgid "Streams which have a manifest file (e.g. HLD/DASH/Smooth Streaming) can be opened more quickly with FFmpeg with this option enabled."
msgstr "Streams mit einer Manifestdatei (z.B. HLD/DASH/Smooth Streaming) können mit FFmpeg mit aktivierter Option schneller geöffnet werden."

#. help: Advanced - forceRealtimeOffCatchup
msgctxt "#30645"
msgid "For certain catchup streams such as HLS reporting that a live stream is not live can improve stream open times. If testing this option works for a catchup stream/provider, then add a [I]\"#KODIPROP=inputstream.ffmpegdirect.is_realtime_stream=false\"[/I] to the M3U entry in question. This setting should not be left enabled for all streams."
msgstr "Bei bestimmten \"Catch Up\"-Streams wie HLS kann die Meldung, dass ein Live-Stream nicht live ist, die Öffnungszeiten des Streams verbessern. Wenn das Testen dieser Option für einen Catchup-Stream/Anbieter funktioniert, fügen Sie dem betreffenden M3U-Eintrag ein [I]\"#KODIPROP=inputstream.ffmpegdirect.is_realtime_stream=false\"[/I] hinzu. Diese Einstellung sollte nicht für alle Streams aktiviert bleiben"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. settings labels
Expand Down Expand Up @@ -179,7 +179,7 @@ msgstr ""

#. help: Timeshift - timeshiftBufferPath
msgctxt "#30621"
msgid "The path used to store the timeshift buffer. The default is the `addon_data/inputstream.ffmpegdirect/timeshift` folder in userdata. Note that this folder will be cleared of timeshift files on Kodi startup. Only relevant when `inputstream.ffmpegdirect.stream_mode=timeshift" property is passed to the addon."
msgid "The path used to store the timeshift buffer. The default is the [I]\"addon_data/inputstream.ffmpegdirect/timeshift\"[/I] folder in userdata. Note that this folder will be cleared of timeshift files on Kodi startup. Only relevant when [I]\"inputstream.ffmpegdirect.stream_mode=timeshift\"[/I] property is passed to the addon."
msgstr ""

#. help: Timeshift - timeshiftEnableLimit
Expand Down Expand Up @@ -223,5 +223,5 @@ msgstr ""

#. help: Advanced - forceRealtimeOffCatchup
msgctxt "#30645"
msgid "For certain catchup streams such as HLS reporting that a live stream is not live can improve stream open times. If testing this option works for a catchup stream/provider, then add a `#KODIPROP=inputstream.ffmpegdirect.is_realtime_stream=false` to the M3U entry in question. This setting should not be left enabled for all streams."
msgid "For certain catchup streams such as HLS reporting that a live stream is not live can improve stream open times. If testing this option works for a catchup stream/provider, then add a [I]\"#KODIPROP=inputstream.ffmpegdirect.is_realtime_stream=false\"[/I] to the M3U entry in question. This setting should not be left enabled for all streams."
msgstr ""
6 changes: 3 additions & 3 deletions src/stream/FFmpegStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ INPUTSTREAM_IDS FFmpegStream::GetStreamIds()

for (const auto& streamPair : m_streams)
{
if (iids.m_streamCount < INPUTSTREAM_IDS::MAX_STREAM_COUNT)
if (iids.m_streamCount < INPUTSTREAM_MAX_STREAM_COUNT)
iids.m_streamIds[iids.m_streamCount++] = streamPair.second->uniqueId;
else
Log(LOGLEVEL_ERROR, "Too many streams, only %u supported", INPUTSTREAM_IDS::MAX_STREAM_COUNT);
Log(LOGLEVEL_ERROR, "Too many streams, only %u supported", INPUTSTREAM_MAX_STREAM_COUNT);
}
}

Expand Down Expand Up @@ -2307,4 +2307,4 @@ void FFmpegStream::GetL16Parameters(int &channels, int &samplerate)
}
}
}
}
}
Loading

0 comments on commit 27fa0b7

Please sign in to comment.