mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
Compare commits
137 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bd9a030e7 | ||
|
|
27a962409b | ||
|
|
f986fb0c37 | ||
|
|
d8ab0b654b | ||
|
|
07592d1e8b | ||
|
|
feb31df3b4 | ||
|
|
c931a3510d | ||
|
|
1672676b87 | ||
|
|
21e21878d6 | ||
|
|
096ba5e26e | ||
|
|
27445b4f8a | ||
|
|
de94bf7c3b | ||
|
|
151d9918ff | ||
|
|
c57bf7318e | ||
|
|
1fb2681772 | ||
|
|
e814ca5972 | ||
|
|
8003914943 | ||
|
|
03f6db3269 | ||
|
|
448a0279be | ||
|
|
2a2e30d38d | ||
|
|
0e933bb5b4 | ||
|
|
e290fc492a | ||
|
|
669021932b | ||
|
|
473676705d | ||
|
|
e3a6fba417 | ||
|
|
9d5803fe1d | ||
|
|
5389274ed1 | ||
|
|
d21b436002 | ||
|
|
30ec9c2a11 | ||
|
|
2acd7d8021 | ||
|
|
340229b925 | ||
|
|
4efcf42da2 | ||
|
|
aefcbe0672 | ||
|
|
f8a8d878a5 | ||
|
|
d60a579dfc | ||
|
|
0d3512d492 | ||
|
|
c34104feed | ||
|
|
3585439653 | ||
|
|
926ed98ad4 | ||
|
|
243886e415 | ||
|
|
8744b4876c | ||
|
|
1b99a105fc | ||
|
|
6d192350c3 | ||
|
|
094be53b37 | ||
|
|
48cb2b7581 | ||
|
|
86f796d618 | ||
|
|
62ede1ba96 | ||
|
|
5703acd71f | ||
|
|
b147dc33ab | ||
|
|
a1047be164 | ||
|
|
ff9b487fe9 | ||
|
|
b4a494f231 | ||
|
|
885cb9c2f2 | ||
|
|
1ba716ff1a | ||
|
|
2b45337f3b | ||
|
|
0dfe65f0b2 | ||
|
|
313060e13e | ||
|
|
f4eb2af766 | ||
|
|
93987c3c2e | ||
|
|
1af41effbc | ||
|
|
1fecfa9bcb | ||
|
|
3cbed0708e | ||
|
|
83163d7603 | ||
|
|
94b5be6fc3 | ||
|
|
8dc105dc43 | ||
|
|
32d9edfa4e | ||
|
|
f7e1f6702d | ||
|
|
f98750943c | ||
|
|
3a164d0a84 | ||
|
|
ad1e4fb8fe | ||
|
|
04600bf444 | ||
|
|
89aabaaf9f | ||
|
|
f0187ecbfe | ||
|
|
2d2557f31b | ||
|
|
815f2e7547 | ||
|
|
752cfd01f0 | ||
|
|
d282b30f4e | ||
|
|
917501c9b7 | ||
|
|
c1b70632ba | ||
|
|
54db1b3339 | ||
|
|
8e2b320b99 | ||
|
|
cc9335d6e5 | ||
|
|
4145cfe956 | ||
|
|
4a3bd93539 | ||
|
|
f107fee66f | ||
|
|
aa9b78065d | ||
|
|
aaa2c58989 | ||
|
|
d37c22d61f | ||
|
|
0f820b3068 | ||
|
|
b0482f422b | ||
|
|
792a28b64b | ||
|
|
cb4f28a577 | ||
|
|
7a30bdab0d | ||
|
|
8cc3a30690 | ||
|
|
8e4c355a16 | ||
|
|
a3cc43c4ef | ||
|
|
d90ad6a0af | ||
|
|
3a844a56af | ||
|
|
4e8086843a | ||
|
|
7f8f2e09c3 | ||
|
|
81e511484d | ||
|
|
28493a0ecb | ||
|
|
0f1e2130e6 | ||
|
|
8fe7fb4eaf | ||
|
|
1a3380a66f | ||
|
|
cc49129ea6 | ||
|
|
dbe59534c6 | ||
|
|
171e9da663 | ||
|
|
273585c995 | ||
|
|
9ef4973efa | ||
|
|
9999a2a864 | ||
|
|
7e4ab7250f | ||
|
|
e92c0b39d6 | ||
|
|
e423e70267 | ||
|
|
261b9f041b | ||
|
|
ed84d28cb3 | ||
|
|
e152b81ec6 | ||
|
|
233710a48f | ||
|
|
0908a504c9 | ||
|
|
769122992d | ||
|
|
2ba5ddac6c | ||
|
|
0fca33726d | ||
|
|
adfcd74f37 | ||
|
|
6408e17a5d | ||
|
|
3b96de2f8a | ||
|
|
091ae119ad | ||
|
|
dd83d899f5 | ||
|
|
6690b7360e | ||
|
|
b52a555a22 | ||
|
|
76f4e6db01 | ||
|
|
e0dc3d7e9e | ||
|
|
4fcc3ce6d9 | ||
|
|
443b4fd6a6 | ||
|
|
8e45336ea0 | ||
|
|
3bffa1bf6c | ||
|
|
07407b98f3 | ||
|
|
f3b9188ac1 |
@@ -277,6 +277,9 @@ dashes="==========================="
|
||||
}
|
||||
|
||||
show_config() {
|
||||
# load graphic configuration
|
||||
get_graphicdrivers
|
||||
|
||||
dashes="==========================="
|
||||
config_message="$config_message\n $dashes$dashes$dashes"
|
||||
config_message="$config_message\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "unofficial"))"
|
||||
@@ -312,6 +315,7 @@ show_config() {
|
||||
config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)"
|
||||
config_message="$config_message\n - WindowManager:\t\t\t $WINDOWMANAGER"
|
||||
config_message="$config_message\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS"
|
||||
config_message="$config_message\n - uvesafb support:\t\t\t $UVESAFB_SUPPORT"
|
||||
|
||||
# Hardware decoder support
|
||||
|
||||
@@ -319,8 +323,8 @@ show_config() {
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER"
|
||||
config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI"
|
||||
config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU"
|
||||
config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT"
|
||||
config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT"
|
||||
|
||||
# Input device configuration
|
||||
|
||||
@@ -340,7 +344,6 @@ show_config() {
|
||||
|
||||
config_message="$config_message\n - ALSA support:\t\t\t $ALSA_SUPPORT"
|
||||
config_message="$config_message\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT"
|
||||
config_message="$config_message\n - Blu-Ray support:\t\t\t $BLURAY_SUPPORT"
|
||||
config_message="$config_message\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT"
|
||||
config_message="$config_message\n - Hardware Sensors support:\t\t $SENSOR_SUPPORT"
|
||||
config_message="$config_message\n - LCD drivers:\t\t\t\t $LCD_DRIVER"
|
||||
@@ -353,23 +356,22 @@ show_config() {
|
||||
config_message="$config_message\n - Include firmware:\t\t\t $config_firmware"
|
||||
done
|
||||
|
||||
for config_modules in $INITRAMFS_MODULES; do
|
||||
config_message="$config_message\n - Initramfs modules:\t\t\t $config_modules"
|
||||
done
|
||||
|
||||
# Network service configuration
|
||||
|
||||
config_message="$config_message\n\n Network service configuration:"
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON"
|
||||
config_message="$config_message\n - NFS mounting support:\t\t $NFS_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER"
|
||||
config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER"
|
||||
config_message="$config_message\n - PPTP support:\t\t\t $PPTP_SUPPORT"
|
||||
config_message="$config_message\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airplay support:\t\t $AIRPLAY_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airtunes support:\t\t $AIRTUNES_SUPPORT"
|
||||
config_message="$config_message\n - Kodi AFP support:\t\t\t $AFP_SUPPORT"
|
||||
config_message="$config_message\n - Kodi NFS support:\t\t\t $NFS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SAMBA client support:\t\t $SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - Kodi UPNP support:\t\t\t $UPNP_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Webserver support:\t\t $WEBSERVER"
|
||||
|
||||
# OS configuration
|
||||
|
||||
@@ -405,8 +407,22 @@ fi
|
||||
config_message="$config_message\n $dashes$dashes"
|
||||
|
||||
config_message="$config_message\n - Kodi version:\t\t\t $MEDIACENTER"
|
||||
config_message="$config_message\n - Kodi nonfree support:\t\t $NONFREE_SUPPORT"
|
||||
config_message="$config_message\n - Kodi DVDCSS support:\t\t\t $DVDCSS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi nonfree support:\t\t $KODI_NONFREE_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Blu-Ray support:\t\t $KODI_BLURAY_SUPPORT"
|
||||
config_message="$config_message\n - Bluray BD+ support:\t\t\t $BLURAY_BDPLUS_SUPPORT"
|
||||
config_message="$config_message\n - Bluray AACS support:\t\t\t $BLURAY_AACS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi DVDCSS support:\t\t\t $KODI_DVDCSS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airplay support:\t\t $KODI_AIRPLAY_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Airtunes support:\t\t $KODI_AIRTUNES_SUPPORT"
|
||||
config_message="$config_message\n - Kodi AFP support:\t\t\t $KODI_AFP_SUPPORT"
|
||||
config_message="$config_message\n - Kodi NFS support:\t\t\t $KODI_NFS_SUPPORT"
|
||||
config_message="$config_message\n - Kodi MySQL support:\t\t\t $KODI_MYSQL_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Optical Drive support:\t\t $KODI_OPTICAL_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SAMBA client support:\t\t $KODI_SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - Kodi SSH client support:\t\t $KODI_SSHLIB_SUPPORT"
|
||||
config_message="$config_message\n - Kodi UPNP support:\t\t\t $KODI_UPNP_SUPPORT"
|
||||
config_message="$config_message\n - Kodi Webserver support:\t\t $KODI_WEBSERVER_SUPPORT"
|
||||
|
||||
|
||||
for config_skin in $SKINS; do
|
||||
config_message="$config_message\n - Include Skin:\t\t\t $config_skin"
|
||||
|
||||
@@ -40,12 +40,14 @@ get_graphicdrivers() {
|
||||
DRI_DRIVERS="$DRI_DRIVERS,i915"
|
||||
XORG_DRIVERS="$XORG_DRIVERS intel"
|
||||
COMPOSITE_SUPPORT="yes"
|
||||
VAAPI_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "i965" ]; then
|
||||
DRI_DRIVERS="$DRI_DRIVERS,i965"
|
||||
XORG_DRIVERS="$XORG_DRIVERS intel"
|
||||
COMPOSITE_SUPPORT="yes"
|
||||
VAAPI_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "nouveau" ]; then
|
||||
@@ -56,15 +58,16 @@ get_graphicdrivers() {
|
||||
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,nouveau"
|
||||
XORG_DRIVERS="$XORG_DRIVERS nouveau"
|
||||
COMPOSITE_SUPPORT="yes"
|
||||
# LLVM_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "nvidia" ]; then
|
||||
XORG_DRIVERS="$XORG_DRIVERS nvidia"
|
||||
VDPAU_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "nvidia-legacy" ]; then
|
||||
XORG_DRIVERS="$XORG_DRIVERS nvidia-legacy"
|
||||
VDPAU_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "r200" ]; then
|
||||
@@ -78,6 +81,7 @@ get_graphicdrivers() {
|
||||
XORG_DRIVERS="$XORG_DRIVERS ati"
|
||||
LLVM_SUPPORT="yes"
|
||||
COMPOSITE_SUPPORT="yes"
|
||||
VDPAU_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "r600" ]; then
|
||||
@@ -85,6 +89,7 @@ get_graphicdrivers() {
|
||||
XORG_DRIVERS="$XORG_DRIVERS ati"
|
||||
LLVM_SUPPORT="yes"
|
||||
COMPOSITE_SUPPORT="yes"
|
||||
VDPAU_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
if [ "$drv" = "radeonsi" ]; then
|
||||
@@ -92,6 +97,7 @@ get_graphicdrivers() {
|
||||
XORG_DRIVERS="$XORG_DRIVERS ati"
|
||||
LLVM_SUPPORT="yes"
|
||||
COMPOSITE_SUPPORT="yes"
|
||||
VDPAU_SUPPORT="yes"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
# set default language for buildsystem
|
||||
export LC_ALL=C
|
||||
|
||||
# determines DISTRO, if not forced by user
|
||||
# default is OpenELEC
|
||||
if [ -z "$DISTRO" ]; then
|
||||
DISTRO="OpenELEC"
|
||||
else
|
||||
DISTRO="$DISTRO"
|
||||
fi
|
||||
|
||||
# determines PROJECT, if not forced by user
|
||||
# default is Generic
|
||||
if [ -z "$PROJECT" ]; then
|
||||
@@ -18,20 +26,26 @@ else
|
||||
fi
|
||||
|
||||
ROOT=`pwd`
|
||||
DISTRO_DIR="$ROOT/distributions"
|
||||
PROJECT_DIR="$ROOT/projects"
|
||||
LINUX_DEPENDS="$PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf $ROOT/packages/linux/package.mk"
|
||||
|
||||
# include versioning
|
||||
. config/version
|
||||
|
||||
# read project options if available
|
||||
if [ -f "$PROJECT_DIR/$PROJECT/options" ]; then
|
||||
. $PROJECT_DIR/$PROJECT/options
|
||||
# read distro versioning if available
|
||||
if [ -f "$DISTRO_DIR/$DISTRO/version" ]; then
|
||||
. $DISTRO_DIR/$DISTRO/version
|
||||
fi
|
||||
|
||||
# read distro options if available
|
||||
if [ -f "$PROJECT_DIR/options.$DISTRO" ]; then
|
||||
. $PROJECT_DIR/options.$DISTRO
|
||||
if [ -f "$DISTRO_DIR/$DISTRO/options" ]; then
|
||||
. $DISTRO_DIR/$DISTRO/options
|
||||
fi
|
||||
|
||||
# read project options if available
|
||||
if [ -f "$PROJECT_DIR/$PROJECT/options" ]; then
|
||||
. $PROJECT_DIR/$PROJECT/options
|
||||
fi
|
||||
|
||||
# Need to point to your actual cc
|
||||
@@ -51,7 +65,12 @@ LINUX_DEPENDS="$PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf $ROOT/package
|
||||
# Concurrency make level (-j option)
|
||||
# Try value 1 (default) to 4 on single CPU computer, or more on
|
||||
# multi-processor computer (like hyperthreading SMP CPU)
|
||||
CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'`
|
||||
if test -z "${CONCURRENCY_MAKE_LEVEL}"; then
|
||||
if test -z "${CONCURRENCY_MAKE_FACTOR}"; then
|
||||
CONCURRENCY_MAKE_FACTOR=1.0
|
||||
fi
|
||||
CONCURRENCY_MAKE_LEVEL=`echo "$(grep -c '^processor[[:cntrl:]]*:' /proc/cpuinfo) * ${CONCURRENCY_MAKE_FACTOR}" | bc | cut -d'.' -f1`
|
||||
fi
|
||||
|
||||
# cache size for ccache
|
||||
# Set the maximum size of the files stored in the cache. You can specify a
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# VERSION: set full version, use "devel" for development version
|
||||
OPENELEC_VERSION="devel"
|
||||
OPENELEC_VERSION="4.95.3"
|
||||
|
||||
# OS_VERSION: OS Version
|
||||
OS_VERSION="5.0"
|
||||
|
||||
244
distributions/OpenELEC/options
Normal file
244
distributions/OpenELEC/options
Normal file
@@ -0,0 +1,244 @@
|
||||
# Name of the Distro to build (full name, without special characters)
|
||||
DISTRONAME="OpenELEC"
|
||||
|
||||
# short project description
|
||||
DESCRIPTION="OpenELEC is a fast and userfriendly Kodi Entertainment Center distribution."
|
||||
|
||||
# Welcome Message for e.g. SSH Server (up to 5 Lines)
|
||||
GREETING0="##############################################"
|
||||
GREETING1="# OpenELEC - The living room PC for everyone #"
|
||||
GREETING2="# ...... visit http://www.openelec.tv ...... #"
|
||||
GREETING3="##############################################"
|
||||
GREETING4=""
|
||||
|
||||
# Root password to integrate in the target system
|
||||
ROOT_PASSWORD="openelec"
|
||||
|
||||
# Mediacenter to use (kodi / no)
|
||||
MEDIACENTER="kodi"
|
||||
|
||||
# Skins to install (Confluence)
|
||||
# Space separated list is supported,
|
||||
# e.g. SKINS="Confluence"
|
||||
SKINS="Confluence"
|
||||
|
||||
# Default Skin (Confluence)
|
||||
SKIN_DEFAULT="Confluence"
|
||||
|
||||
# install extra subtitle Fonts for KODI (yes / no)
|
||||
KODI_EXTRA_FONTS="yes"
|
||||
|
||||
# build and install 'RSXS' Screensaver (yes / no)
|
||||
KODI_SCR_RSXS="yes"
|
||||
|
||||
# build and install 'ProjectM' Visualization (yes / no)
|
||||
KODI_VIS_PROJECTM="yes"
|
||||
|
||||
# build and install 'GOOM' Visualization (yes / no)
|
||||
KODI_VIS_GOOM="yes"
|
||||
|
||||
# build and install 'Waveform' Visualization (yes / no)
|
||||
KODI_VIS_WAVEFORM="yes"
|
||||
|
||||
# build and install 'Spectrum' Visualization (yes / no)
|
||||
KODI_VIS_SPECTRUM="yes"
|
||||
|
||||
# build and install 'FishBMC' Visualization (yes / no)
|
||||
# does not work on RPi
|
||||
KODI_VIS_FISHBMC="yes"
|
||||
|
||||
# build and install PulseAudio support (yes / no)
|
||||
PULSEAUDIO_SUPPORT="no"
|
||||
|
||||
# build and install espeak support (yes / no)
|
||||
ESPEAK_SUPPORT="yes"
|
||||
|
||||
# build and install with non-free support
|
||||
# (RAR compression support in KODI) (yes / no)
|
||||
KODI_NONFREE_SUPPORT="yes"
|
||||
|
||||
# build and install with BluRay support (yes / no)
|
||||
KODI_BLURAY_SUPPORT="yes"
|
||||
|
||||
# build and install with BD+ support
|
||||
# (BD+ decryption support in KODI) (yes / no)
|
||||
BLURAY_BDPLUS_SUPPORT="yes"
|
||||
|
||||
# build and install with AACS support
|
||||
# (BD decryption support in KODI) (yes / no)
|
||||
BLURAY_AACS_SUPPORT="yes"
|
||||
|
||||
# build and install with DVDCSS support
|
||||
# (DVD decryption support in KODI) (yes / no)
|
||||
KODI_DVDCSS_SUPPORT="yes"
|
||||
|
||||
# additional drivers to install:
|
||||
# for a list of additinoal drivers see packages/linux-drivers
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8188EU RTL8812AU dvbhdhomerun"
|
||||
|
||||
# build and install bluetooth support (yes / no)
|
||||
BLUETOOTH_SUPPORT="yes"
|
||||
|
||||
# build and install with KODI webfrontend (yes / no)
|
||||
KODI_WEBSERVER_SUPPORT="yes"
|
||||
|
||||
# build and install Avahi (Zeroconf) daemon (yes / no)
|
||||
AVAHI_DAEMON="yes"
|
||||
|
||||
# build with UPnP support (yes / no)
|
||||
KODI_UPNP_SUPPORT="yes"
|
||||
|
||||
# build with MySQL support (yes / no)
|
||||
KODI_MYSQL_SUPPORT="yes"
|
||||
|
||||
# build xbmc with sshlib support (yes / no)
|
||||
KODI_SSHLIB_SUPPORT="yes"
|
||||
|
||||
# build xbmc with optical drive support (yes / no)
|
||||
KODI_OPTICAL_SUPPORT="yes"
|
||||
|
||||
# KODI Audio encoders for usage with optical drive support
|
||||
# Space separated list is supported,
|
||||
# e.g. KODI_AUDIOENCODER_ADDONS="ENCODER1 ENCODER2"
|
||||
KODI_AUDIOENCODER_ADDONS="flac lame vorbis wav"
|
||||
|
||||
# build with AirPlay support (stream videos from iDevices to KODI) (yes / no)
|
||||
KODI_AIRPLAY_SUPPORT="yes"
|
||||
|
||||
# build with AirTunes support (stream music from iDevices to KODI) (yes / no)
|
||||
KODI_AIRTUNES_SUPPORT="yes"
|
||||
|
||||
# build with libnfs support (mounting nfs shares with KODI) (yes / no)
|
||||
KODI_NFS_SUPPORT="yes"
|
||||
|
||||
# build with afpfs-ng support (mounting AFP shares with KODI) (yes / no)
|
||||
KODI_AFP_SUPPORT="no"
|
||||
|
||||
# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)
|
||||
KODI_SAMBA_SUPPORT="yes"
|
||||
|
||||
# build with NFS support (mounting nfs shares via the OS) (yes / no)
|
||||
NFS_SUPPORT="yes"
|
||||
|
||||
# build with Samba Client support (mounting samba shares via the OS) (yes / no)
|
||||
SAMBA_SUPPORT="yes"
|
||||
|
||||
# build and install Samba Server (yes / no)
|
||||
SAMBA_SERVER="yes"
|
||||
|
||||
# build and install SFTP Server (yes / no)
|
||||
SFTP_SERVER="yes"
|
||||
|
||||
# build and install PPP support (yes / no)
|
||||
PPTP_SUPPORT="yes"
|
||||
|
||||
# build and install OpenVPN support (yes / no)
|
||||
OPENVPN_SUPPORT="yes"
|
||||
|
||||
# build and install diskmounter support (udevil)
|
||||
# this service provide auto mounting support for external drives in the
|
||||
# mediacenter also automount internally drives at boottime via udev (yes / no)
|
||||
UDEVIL="yes"
|
||||
|
||||
# build and install exFAT fuse support (yes / no)
|
||||
EXFAT="yes"
|
||||
|
||||
# build and install NTFS-3G fuse support (yes / no)
|
||||
NTFS3G="yes"
|
||||
|
||||
# build and install hfs filesystem utilities (yes / no)
|
||||
HFSTOOLS="yes"
|
||||
|
||||
# Windowmanager to use (ratpoison / fluxbox / none)
|
||||
WINDOWMANAGER="fluxbox"
|
||||
|
||||
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
|
||||
# Space separated list is supported,
|
||||
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia nouveau"
|
||||
if [ "$TARGET_ARCH" = "i386" ]; then
|
||||
# TODO: create Legacy build with OpenELEC-4.2
|
||||
# install legacy drivers to i386 ARCH
|
||||
GRAPHIC_DRIVERS="r200 r300 r600 i915 i965 nvidia-legacy"
|
||||
elif [ "$TARGET_ARCH" = "x86_64" ]; then
|
||||
GRAPHIC_DRIVERS="r300 r600 radeonsi i915 i965 nvidia"
|
||||
fi
|
||||
|
||||
# build and install remote support (yes / no)
|
||||
REMOTE_SUPPORT="yes"
|
||||
|
||||
# build and install ATV IR remote support (yes / no)
|
||||
ATVCLIENT_SUPPORT="yes"
|
||||
|
||||
# build and install IRServer IR/LCD support (yes / no)
|
||||
IRSERVER_SUPPORT="yes"
|
||||
|
||||
# build and install Joystick support (yes / no)
|
||||
JOYSTICK_SUPPORT="yes"
|
||||
|
||||
# build and install CEC adapter support (yes / no)
|
||||
CEC_SUPPORT="yes"
|
||||
|
||||
# build and install iSCSI support - iscsistart (yes / no)
|
||||
ISCSI_SUPPORT="yes"
|
||||
|
||||
# LCD driver to Use - Possible drivers are ( Comma seperated:
|
||||
# bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,dm140,
|
||||
# ea65,EyeboxOne,g15,glcdlib,glk,hd44780,i2500vfd,
|
||||
# icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,
|
||||
# joy,lb216,lcdm001,lcterm,lirc,lis,MD8800,mdm166a,
|
||||
# ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,
|
||||
# picolcd,pyramid,sed1330,sed1520,serialPOS,
|
||||
# serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,vlsys_m428
|
||||
# 'all' compiles all drivers;
|
||||
# 'all,!xxx,!yyy' de-selects previously selected drivers
|
||||
# "none" for disable LCD support
|
||||
LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428,serialVFD,shuttleVFD"
|
||||
|
||||
# Support for partitioning and formating disks in initramfs (yes / no)
|
||||
# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage
|
||||
INITRAMFS_PARTED_SUPPORT="no"
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
FIRMWARE="misc-firmware wlan-firmware dvb-firmware"
|
||||
|
||||
# build with swap support (yes / no)
|
||||
SWAP_SUPPORT="no"
|
||||
|
||||
# swap support enabled per default (yes / no)
|
||||
SWAP_ENABLED_DEFAULT="no"
|
||||
|
||||
# swapfile size if SWAP_SUPPORT=yes in MB
|
||||
SWAPFILESIZE="256"
|
||||
|
||||
# build with installer (yes / no)
|
||||
INSTALLER_SUPPORT="yes"
|
||||
|
||||
# Testpackages for development (yes / no)
|
||||
TESTING="no"
|
||||
|
||||
# OEM packages for OEM's (yes / no)
|
||||
OEM_SUPPORT="no"
|
||||
|
||||
# build and install nano text editor (yes / no)
|
||||
NANO_EDITOR="yes"
|
||||
|
||||
# cron support (yes / no)
|
||||
CRON_SUPPORT="yes"
|
||||
|
||||
# Perf support in development builds (yes / no)
|
||||
PERF_SUPPORT="yes"
|
||||
|
||||
# Distribution Specific source location
|
||||
DISTRO_MIRROR="http://sources.openelec.tv/mirror"
|
||||
DISTRO_SRC="http://sources.openelec.tv/$OPENELEC_VERSION"
|
||||
|
||||
# Addon Server Url
|
||||
ADDON_SERVER_URL="http://addons.openelec.tv"
|
||||
|
||||
# set the addon dirs
|
||||
ADDON_PATH="$ADDON_VERSION/$PROJECT/$TARGET_ARCH"
|
||||
ADDON_URL="$ADDON_SERVER_URL/$ADDON_PATH"
|
||||
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 439 KiB After Width: | Height: | Size: 439 KiB |
@@ -1,3 +1,5 @@
|
||||
4.3.2
|
||||
allow running scripts from addon settings
|
||||
4.3.1
|
||||
rebuild for addon api bump
|
||||
4.3.0
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PKG_NAME="hdhomerun"
|
||||
PKG_VERSION="4.3"
|
||||
PKG_REV="1"
|
||||
PKG_REV="2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.silicondust.com/products/hdhomerun/dvbt/"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -15,18 +15,3 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xbmcaddon
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id = 'driver.dvb.hdhomerun')
|
||||
__cwd__ = __settings__.getAddonInfo('path')
|
||||
__resources_lib__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
|
||||
__settings_xml__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))
|
||||
|
||||
if __name__ == "__main__" and len(sys.argv) == 2 and sys.argv[1] == 'refresh_tuners':
|
||||
sys.path.append(__resources_lib__)
|
||||
from functions import refresh_hdhomerun_tuners
|
||||
refresh_hdhomerun_tuners(__settings_xml__)
|
||||
__settings__.openSettings()
|
||||
|
||||
32
packages/addons/driver/hdhomerun/source/resources/actions.py
Normal file
32
packages/addons/driver/hdhomerun/source/resources/actions.py
Normal file
@@ -0,0 +1,32 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xbmcaddon
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id = 'driver.dvb.hdhomerun')
|
||||
__cwd__ = __settings__.getAddonInfo('path')
|
||||
__resources_lib__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
|
||||
__settings_xml__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))
|
||||
|
||||
if len(sys.argv) == 2 and sys.argv[1] == 'refresh_tuners':
|
||||
sys.path.append(__resources_lib__)
|
||||
from functions import refresh_hdhomerun_tuners
|
||||
refresh_hdhomerun_tuners(__settings_xml__)
|
||||
__settings__.openSettings()
|
||||
@@ -37,16 +37,17 @@ def _usage(this_file):
|
||||
return """SYNOPSIS: pretty print an XML document
|
||||
USAGE: python %s <filename> \n""" % this_file
|
||||
|
||||
def _pprint_line(indent_level, line, width=100, output=_sys.stdout):
|
||||
def _pprint_line(indent_level, line, width=100, output=_sys.stdout, ignore_contents = False):
|
||||
if line.strip():
|
||||
start = ""
|
||||
number_chars = 0
|
||||
for l in range(indent_level):
|
||||
start = start + " "
|
||||
number_chars = number_chars + 1
|
||||
if not ignore_contents:
|
||||
try:
|
||||
elem_start = _re.findall("(\<\W{0,1}\w+:\w+) ?", line)[0]
|
||||
elem_finished = _re.findall("([?|\]\]/]*\>)", line)[0]
|
||||
elem_finished = _re.findall("([?|\]\]/|\-\-]*\>)", line)[0]
|
||||
#should not have *
|
||||
attrs = _re.findall("(\S*?\=\".*?\")", line)
|
||||
output.write(start + elem_start)
|
||||
@@ -68,6 +69,8 @@ def _pprint_line(indent_level, line, width=100, output=_sys.stdout):
|
||||
except IndexError:
|
||||
#give up pretty print this line
|
||||
output.write(start + line + "\n")
|
||||
else:
|
||||
output.write(start + line + "\n")
|
||||
|
||||
|
||||
def _pprint_elem_content(indent_level, line, output=_sys.stdout):
|
||||
@@ -81,6 +84,7 @@ def _get_next_elem(data):
|
||||
end_pos = data.find(">") + 1
|
||||
retval = data[start_pos:end_pos]
|
||||
stopper = retval.rfind("/")
|
||||
ignore_contents = False
|
||||
if stopper < retval.rfind("\""):
|
||||
stopper = -1
|
||||
single = (stopper > -1 and ((retval.find(">") - stopper) < (stopper - retval.find("<"))))
|
||||
@@ -89,11 +93,19 @@ def _get_next_elem(data):
|
||||
ignore_question = retval.find("<?") > -1
|
||||
|
||||
if ignore_excl:
|
||||
ignore_contents = True
|
||||
cdata = retval.find("<![CDATA[") > -1
|
||||
if cdata:
|
||||
end_pos = data.find("]]>")
|
||||
if end_pos > -1:
|
||||
end_pos = end_pos + len("]]>")
|
||||
stopper = end_pos
|
||||
else:
|
||||
end_pos = data.find("-->")
|
||||
if end_pos > -1:
|
||||
end_pos = end_pos + len("-->")
|
||||
stopper = end_pos
|
||||
retval = data[start_pos:end_pos]
|
||||
|
||||
elif ignore_question:
|
||||
end_pos = data.find("?>") + len("?>")
|
||||
@@ -101,11 +113,12 @@ def _get_next_elem(data):
|
||||
|
||||
no_indent = ignore or single
|
||||
|
||||
#print retval, end_pos, start_pos, stopper > -1, no_indent
|
||||
|
||||
return start_pos, \
|
||||
end_pos, \
|
||||
stopper > -1, \
|
||||
no_indent
|
||||
no_indent, \
|
||||
ignore_contents
|
||||
|
||||
def get_pprint(xml, indent=4, width=80):
|
||||
"""Returns the pretty printed xml """
|
||||
@@ -117,6 +130,8 @@ def get_pprint(xml, indent=4, width=80):
|
||||
out = out()
|
||||
pprint(xml, output=out, indent=indent, width=width)
|
||||
|
||||
|
||||
|
||||
return out.output
|
||||
|
||||
|
||||
@@ -126,7 +141,7 @@ def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
Use indent to select indentation level. Default is 4 """
|
||||
data = xml
|
||||
indent_level = 0
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
start_pos, end_pos, is_stop, no_indent, ignore_contents = _get_next_elem(data)
|
||||
while ((start_pos > -1 and end_pos > -1)):
|
||||
_pprint_elem_content(indent_level, data[:start_pos].strip(),
|
||||
output=output)
|
||||
@@ -136,7 +151,8 @@ def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
_pprint_line(indent_level,
|
||||
data[:end_pos - start_pos],
|
||||
width=width,
|
||||
output=output)
|
||||
output=output,
|
||||
ignore_contents=ignore_contents)
|
||||
data = data[end_pos - start_pos:]
|
||||
if not is_stop and not no_indent :
|
||||
indent_level = indent_level + indent
|
||||
@@ -144,7 +160,7 @@ def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
if not data:
|
||||
break
|
||||
else:
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
start_pos, end_pos, is_stop, no_indent, ignore_contents = _get_next_elem(data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
<category label="9000">
|
||||
<setting type="sep" />
|
||||
<setting id="ENABLE_TUNER_TYPES" type="bool" label="9005" default="true" />
|
||||
<setting label="9010" option="close" type="action" action="RunScript($ID, refresh_tuners)" />
|
||||
<setting label="9010" option="close" type="action" id="refresh_tuners" action="RunScript($CWD/resources/actions.py, refresh_tuners)" />
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
4.3.4
|
||||
fixed xbmc/kodi rebranding error
|
||||
some fixes
|
||||
4.3.3
|
||||
addon transformed to service addon
|
||||
new addon settings option to enable to check for new driver at boot
|
||||
4.3.2
|
||||
new addon settings option to enable to update driver from web with latest version
|
||||
4.3.1
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PKG_NAME="sundtek-mediatv"
|
||||
PKG_VERSION="4.3"
|
||||
PKG_REV="2"
|
||||
PKG_REV="4"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://support.sundtek.com/"
|
||||
@@ -29,7 +29,7 @@ PKG_SECTION="driver/dvb"
|
||||
PKG_SHORTDESC="Sundtek USB Stick DVB userspace driver"
|
||||
PKG_LONGDESC="Driver for Sundtek MediaTV Pro (DVB-C, DVB-T, AnalogTV, Composite, S-Video, FM-Radio USB Stick) and Sundtek SkyTV Ultimate (DVB-S/S2 USB)."
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_TYPE="xbmc.python.script"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
@@ -47,11 +47,18 @@ make_target() {
|
||||
INSTALLER_URL="http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz"
|
||||
;;
|
||||
esac
|
||||
|
||||
wget -O installer.tar.gz $INSTALLER_URL
|
||||
|
||||
tar -xzf installer.tar.gz
|
||||
# we run this via wrapper
|
||||
mv opt/bin/mediaclient opt/bin/mediaclient.bin
|
||||
chmod 755 opt/bin/*
|
||||
|
||||
chmod -R 755 opt/ etc/
|
||||
|
||||
rm -f opt/bin/getinput.sh
|
||||
rm -f opt/bin/lirc.sh
|
||||
rm -fr opt/lib/pm/
|
||||
|
||||
wget -O version.used http://sundtek.de/media/latest.phtml
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
@@ -64,4 +71,5 @@ addon() {
|
||||
cp -P $PKG_DIR/settings-default.xml $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
cp -Pa $PKG_BUILD/opt/bin $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
cp -Pa $PKG_BUILD/opt/lib $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
cp $PKG_BUILD/version.used $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
}
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
<setting id="DEVICE4_NUM" value="1" />
|
||||
<setting id="DEVICE5_IP" value="" />
|
||||
<setting id="DEVICE5_NUM" value="1" />
|
||||
<setting id="CHECK_BOOT" value="false" />
|
||||
</settings>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
LD_PRELOAD=/storage/.xbmc/addons/driver.dvb.sundtek-mediatv/lib/libmediaclient.so exec mediaclient.bin "$@"
|
||||
@@ -0,0 +1,247 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
net_tuner_num_fix() {
|
||||
local num=$1
|
||||
|
||||
[ -z "$num" ] && num=1
|
||||
num=$(( $num *1 ))
|
||||
[ $num -lt 1 ] && num=1
|
||||
num=$(( $num -1 ))
|
||||
echo $num
|
||||
}
|
||||
|
||||
SUNDTEK_ADDON_DIR="$HOME/.kodi/addons/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_HOME="$HOME/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_SETTINGS="$SUNDTEK_ADDON_HOME/settings.xml"
|
||||
|
||||
mkdir -p $SUNDTEK_ADDON_HOME
|
||||
|
||||
if [ ! -f "$SUNDTEK_ADDON_HOME/sundtek.conf" ]; then
|
||||
cp $SUNDTEK_ADDON_DIR/config/* $SUNDTEK_ADDON_HOME/
|
||||
else
|
||||
# in case of missing entries in addon home's sundtek.conf
|
||||
entry_set="$(grep use_hwpidfilter $SUNDTEK_ADDON_HOME/sundtek.conf 2>/dev/null)"
|
||||
if [ -z "$entry_set" ]; then
|
||||
sed -i 's|^device_attach=.*|# device_attach not used anymore\n\n# enable HW PID filter\nuse_hwpidfilter=off\n\n# enable listening on network\nenablenetwork=off|g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
sed -i 's|^#first_adapter=.*|first_adapter=0|g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
|
||||
sed -i 's|.*network tuner IP address (OpenELEC specific).*||g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
sed -i 's|.*network_tuner_ip=.*||g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$SUNDTEK_ADDON_SETTINGS" ]; then
|
||||
cp $SUNDTEK_ADDON_DIR/settings-default.xml $SUNDTEK_ADDON_SETTINGS
|
||||
fi
|
||||
|
||||
[ ! -f $SUNDTEK_ADDON_HOME/rc_key_enter.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_enter $SUNDTEK_ADDON_HOME/rc_key_enter.map
|
||||
[ ! -f $SUNDTEK_ADDON_HOME/rc_key_ok.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_ok $SUNDTEK_ADDON_HOME/rc_key_ok.map
|
||||
|
||||
mkdir -p /var/config
|
||||
cat "$SUNDTEK_ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
# check if there is new driver on web
|
||||
if [ "$CHECK_BOOT" = "true" ]; then
|
||||
if [ ! -f /var/run/sundtek.checked ]; then
|
||||
# only once after boot
|
||||
touch /var/run/sundtek.checked
|
||||
|
||||
(
|
||||
# wait some time before checking
|
||||
sleep 20
|
||||
cd $SUNDTEK_ADDON_DIR
|
||||
|
||||
wget -O version.latest http://sundtek.de/media/latest.phtml
|
||||
|
||||
version_used=$(cat version.used)
|
||||
version_latest=$(cat version.latest)
|
||||
if [ "$version_used" != "$version_latest" ]; then
|
||||
# new version exist
|
||||
kodi-send -a "Notification(Sundtek, \"New driver version exist, update manually\", 4000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
fi
|
||||
)&
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$(pidof mediasrv)" ]; then
|
||||
rm -f /var/log/mediasrv.log
|
||||
rm -f /var/log/mediaclient.log
|
||||
|
||||
SUNDTEK_CONF_TMP=/tmp/sundtek.conf
|
||||
cp $SUNDTEK_ADDON_HOME/sundtek.conf $SUNDTEK_CONF_TMP
|
||||
|
||||
[ -z "$LOWEST_ADAPTER_NUM" ] && LOWEST_ADAPTER_NUM=0
|
||||
sed -i "s|^first_adapter=.*|first_adapter=$LOWEST_ADAPTER_NUM|g" $SUNDTEK_CONF_TMP
|
||||
|
||||
# enable HW PID filter
|
||||
if [ "$ENABLE_HW_PID_FILTER" = "true" ]; then
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=on|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=off|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
# enable IR receiver
|
||||
if [ "$ENABLE_IR_RECEIVER" = "true" ]; then
|
||||
sed -i 's|^ir_disabled=.*|ir_disabled=0|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^ir_disabled=.*|ir_disabled=1|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
if [ "$ALLOW_NET_USE" = "true" ]; then
|
||||
sed -i 's|^enablenetwork=.*|enablenetwork=on|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^enablenetwork=.*|enablenetwork=off|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
[ "$DEVICE1_IP" = "0.0.0.0" ] && DEVICE1_IP=""
|
||||
[ "$DEVICE2_IP" = "0.0.0.0" ] && DEVICE2_IP=""
|
||||
[ "$DEVICE3_IP" = "0.0.0.0" ] && DEVICE3_IP=""
|
||||
[ "$DEVICE4_IP" = "0.0.0.0" ] && DEVICE4_IP=""
|
||||
[ "$DEVICE5_IP" = "0.0.0.0" ] && DEVICE5_IP=""
|
||||
DEVICE1_NUM=$(net_tuner_num_fix $DEVICE1_NUM)
|
||||
DEVICE2_NUM=$(net_tuner_num_fix $DEVICE2_NUM)
|
||||
DEVICE3_NUM=$(net_tuner_num_fix $DEVICE3_NUM)
|
||||
DEVICE4_NUM=$(net_tuner_num_fix $DEVICE4_NUM)
|
||||
DEVICE5_NUM=$(net_tuner_num_fix $DEVICE5_NUM)
|
||||
|
||||
if [ "$USE_NET_TUNERS" = "true" -a -n "$DEVICE1_IP" ]; then
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
# add entries
|
||||
echo -e "\n[NETWORK]" >>$SUNDTEK_CONF_TMP
|
||||
for dev in $(seq 0 $DEVICE1_NUM); do
|
||||
echo "device=$DEVICE1_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE2_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE2_NUM); do
|
||||
echo "device=$DEVICE2_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE3_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE3_NUM); do
|
||||
echo "device=$DEVICE3_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE4_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE4_NUM); do
|
||||
echo "device=$DEVICE4_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE5_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE5_NUM); do
|
||||
echo "device=$DEVICE5_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
if [ "$ENABLE_TUNER_TYPES" = "true" ]; then
|
||||
# get tuner serial numbers
|
||||
SERIALS=$(cat /var/config/sundtek-addon.conf | sed -n 's|^ATTACHED_TUNER_\(.*\)_DVBMODE=.*|\1|gp' | sort | uniq)
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
for SERIAL in $SERIALS; do
|
||||
DVBMODE=$(eval echo \$ATTACHED_TUNER_${SERIAL}_DVBMODE)
|
||||
IRPROT=$(eval echo \$ATTACHED_TUNER_${SERIAL}_IRPROT)
|
||||
KEYMAP=$(eval echo \$ATTACHED_TUNER_${SERIAL}_KEYMAP)
|
||||
|
||||
if [ "$DVBMODE" = "DVB-T" ]; then
|
||||
# only set DVB-T because default is DVB-C (and DVB-S is not set either)
|
||||
DVBMODE="DVBT"
|
||||
else
|
||||
DVBMODE=""
|
||||
fi
|
||||
|
||||
[ "$IRPROT" = "NEC" -o "$IRPROT" = "auto" ] && IRPROT=""
|
||||
|
||||
[ ! -f $KEYMAP ] && KEYMAP=""
|
||||
|
||||
# remove setttings for this tuner
|
||||
awk -v val="[$SERIAL]" '$0 == val {flag=1; next} /^ir_protocol=|^rcmap=|^initial_dvb_mode=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-types
|
||||
mv ${SUNDTEK_CONF_TMP}-types $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
|
||||
ADDNEW=true
|
||||
if [ -n "$DVBMODE" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "initial_dvb_mode=$DVBMODE" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$IRPROT" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "ir_protocol=$IRPROT" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "rcmap=$KEYMAP" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
|
||||
md5_1=$(md5sum -b $SUNDTEK_CONF_TMP | awk '{print $1}')
|
||||
md5_2=$(md5sum -b $SUNDTEK_ADDON_HOME/sundtek.conf | awk '{print $1}')
|
||||
if [ "$md5_1" != "$md5_2" ]; then
|
||||
# file changed - copy to addon home
|
||||
cp $SUNDTEK_CONF_TMP $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
fi
|
||||
|
||||
chmod +x $SUNDTEK_ADDON_DIR/bin/*
|
||||
mediasrv --wait-for-devices -p $SUNDTEK_ADDON_DIR/bin -c $SUNDTEK_ADDON_HOME/sundtek.conf -d
|
||||
|
||||
# wait few seconds
|
||||
[ -z "$SETTLE_TIME" ] && SETTLE_TIME=0
|
||||
SETTLE_TIME=$(( $SETTLE_TIME *1 ))
|
||||
if [ $SETTLE_TIME -gt 0 ]; then
|
||||
logger -t Sundtek "### Settle for $SETTLE_TIME sec ###"
|
||||
sleep $SETTLE_TIME
|
||||
fi
|
||||
|
||||
if [ "$RUN_USER_SCRIPT" = "true" -a -f "$SUNDTEK_ADDON_HOME/userscript.sh" ]; then
|
||||
logger -t Sundtek "### Running user script $SUNDTEK_ADDON_HOME/userscript.sh ###"
|
||||
cat $SUNDTEK_ADDON_HOME/userscript.sh | dos2unix >/var/run/sundtek-userscript.sh
|
||||
sh /var/run/sundtek-userscript.sh
|
||||
fi
|
||||
|
||||
# save adapter serial number
|
||||
serial_number_old=$(cat $SUNDTEK_ADDON_HOME/adapters.txt 2>/dev/null)
|
||||
serial_number_new=$(mediaclient -e | awk '/device / {print $0} /SERIAL/ {id=1} /ID:/ {if (id==1) print $2}')
|
||||
if [ "$serial_number_old" != "$serial_number_new" ]; then
|
||||
echo "$serial_number_new" >$SUNDTEK_ADDON_HOME/adapters.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
logger -t Sundtek "### Sundtek ready ###"
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
ADDON_DIR="$HOME/.kodi/addons/driver.dvb.sundtek-mediatv"
|
||||
|
||||
logger -t Sundtek "### Sundtek driver stop ###"
|
||||
mediaclient --shutdown
|
||||
@@ -20,18 +20,44 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
SUNDTEK_ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_DIR="$HOME/.kodi/addons/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_HOME="$HOME/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_SETTINGS="$SUNDTEK_ADDON_HOME/settings.xml"
|
||||
|
||||
logger -t Sundtek "### Starting updating driver ###"
|
||||
xbmc-send -a "Notification(Sundtek, Starting updating driver, 2000)"
|
||||
trap_exit_install() {
|
||||
kodi-send -a "Notification(Sundtek, Something went wrong. Cleaning..., 8000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
cd "$SUNDTEK_ADDON_DIR"
|
||||
rm -fr tmp
|
||||
exit 5
|
||||
}
|
||||
|
||||
# kill process
|
||||
systemctl stop driver.dvb.sundtek-mediatv
|
||||
killall -9 mediaclient &>/dev/null
|
||||
killall -9 mediasrv &>/dev/null
|
||||
|
||||
# exit on errors
|
||||
set -e
|
||||
|
||||
trap trap_exit_install EXIT
|
||||
|
||||
cd "$SUNDTEK_ADDON_DIR"
|
||||
rm -fr tmp
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
|
||||
logger -t Sundtek "### Starting updating driver ###"
|
||||
kodi-send -a "Notification(Sundtek, Starting updating driver, 2000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
|
||||
wget -O ../version.used http://sundtek.de/media/latest.phtml
|
||||
if [ $? -ne 0 ]; then
|
||||
logger -t Sundtek "### Can't get latest version ###"
|
||||
kodi-send -a "Notification(Sundtek, Cant get latest version, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ARCH=$(sed -n 's|.*\.\([^-]*\)-.*|\1|p' /etc/release | tr -d '\n')
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
INSTALLER_URL="http://sundtek.de/media/netinst/64bit/installer.tar.gz"
|
||||
@@ -41,33 +67,40 @@ elif [ "$ARCH" = "arm" ]; then
|
||||
INSTALLER_URL="http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz"
|
||||
else
|
||||
logger -t Sundtek "### Unsupported architecture ###"
|
||||
xbmc-send -a "Notification(Sundtek, Unsupported architecture, 5000)"
|
||||
kodi-send -a "Notification(Sundtek, Unsupported architecture, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
cd ..
|
||||
rm -fr tmp
|
||||
exit 1
|
||||
fi
|
||||
|
||||
logger -t Sundtek "### Downloading driver archive for $ARCH ###"
|
||||
xbmc-send -a "Notification(Sundtek, Downloading driver archive for $ARCH, 2000)"
|
||||
wget -O installer.tar.gz $INSTALLER_URL
|
||||
logger -t Sundtek "### Extracting archive ###"
|
||||
xbmc-send -a "Notification(Sundtek, Extracting archive, 2000)"
|
||||
tar -xzf installer.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
logger -t Sundtek "### Archive damaged ###"
|
||||
xbmc-send -a "Notification(Sundtek, Archive damaged, 5000)"
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
exit 2
|
||||
fi
|
||||
|
||||
killall -9 mediaclient.bin &>/dev/null
|
||||
killall -9 mediaclient &>/dev/null
|
||||
killall -9 mediasrv &>/dev/null
|
||||
logger -t Sundtek "### Downloading driver archive for $ARCH ###"
|
||||
kodi-send -a "Notification(Sundtek, Downloading driver archive for $ARCH, 2000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
wget -O installer.tar.gz $INSTALLER_URL
|
||||
if [ $? -ne 0 ]; then
|
||||
logger -t Sundtek "### Archive damaged ###"
|
||||
kodi-send -a "Notification(Sundtek, Download failed, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# we run this via wrapper
|
||||
mv opt/bin/mediaclient opt/bin/mediaclient.bin
|
||||
chmod 755 opt/bin/*
|
||||
logger -t Sundtek "### Extracting archive ###"
|
||||
kodi-send -a "Notification(Sundtek, Extracting archive, 2000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
tar -xzf installer.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
logger -t Sundtek "### Archive damaged ###"
|
||||
kodi-send -a "Notification(Sundtek, Archive damaged, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
cd ..
|
||||
rm -fr tmp/
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# fix permissions
|
||||
chmod -R 755 opt/ etc/
|
||||
|
||||
rm -f opt/bin/getinput.sh
|
||||
rm -f opt/bin/lirc.sh
|
||||
rm -fr opt/lib/pm/
|
||||
|
||||
cp -Pa opt/bin/* ../bin/
|
||||
cp -Pa opt/lib/* ../lib/
|
||||
@@ -75,7 +108,12 @@ cp -Pa opt/lib/* ../lib/
|
||||
cd ..
|
||||
rm -fr tmp
|
||||
|
||||
logger -t Sundtek "### Driver update finished, please reboot ###"
|
||||
xbmc-send -a "Notification(Sundtek, Driver update finished, 2000)"
|
||||
xbmc-send -a "Notification(Sundtek, Please reboot, 5000)"
|
||||
logger -t Sundtek "### Driver update finished ###"
|
||||
kodi-send -a "Notification(Sundtek, Driver update finished, 5000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
kodi-send -a "Notification(Sundtek, Please reboot, 5000, $SUNDTEK_ADDON_DIR/icon.png)"
|
||||
|
||||
trap - EXIT
|
||||
|
||||
systemctl start driver.dvb.sundtek-mediatv
|
||||
|
||||
exit 0
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -20,223 +20,11 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
# start locking mechanism - allows only one instance to be run at a time
|
||||
SUNDTEK_LOCKFILE="/var/lock/userspace-driver-sundtek.lck"
|
||||
SUNDTEK_LOCKFD=99
|
||||
# obtain an exclusive lock
|
||||
exlock() { eval "exec $SUNDTEK_LOCKFD>\"$SUNDTEK_LOCKFILE\""; flock -x $SUNDTEK_LOCKFD; }
|
||||
# drop a lock
|
||||
unlock() { flock -u $SUNDTEK_LOCKFD; flock -xn $SUNDTEK_LOCKFD && rm -f "$SUNDTEK_LOCKFILE"; }
|
||||
# end locking mechanism
|
||||
SUNDTEK_ADDON_DIR="$HOME/.kodi/addons/driver.dvb.sundtek-mediatv"
|
||||
|
||||
# exclusive lock
|
||||
exlock
|
||||
|
||||
net_tuner_num_fix() {
|
||||
local num=$1
|
||||
|
||||
[ -z "$num" ] && num=1
|
||||
num=$(( $num *1 ))
|
||||
[ $num -lt 1 ] && num=1
|
||||
num=$(( $num -1 ))
|
||||
echo $num
|
||||
}
|
||||
|
||||
SUNDTEK_ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
|
||||
SUNDTEK_ADDON_SETTINGS="$SUNDTEK_ADDON_HOME/settings.xml"
|
||||
|
||||
mkdir -p $SUNDTEK_ADDON_HOME
|
||||
|
||||
if [ ! -f "$SUNDTEK_ADDON_HOME/sundtek.conf" ]; then
|
||||
cp $SUNDTEK_ADDON_DIR/config/* $SUNDTEK_ADDON_HOME/
|
||||
if [ -f $SUNDTEK_ADDON_DIR/lib/libmediaclient.so ]; then
|
||||
logger -t Sundtek "### Preloading library ###"
|
||||
export LD_PRELOAD=$SUNDTEK_ADDON_DIR/lib/libmediaclient.so
|
||||
else
|
||||
# in case of missing entries in addon home's sundtek.conf
|
||||
entry_set="$(grep use_hwpidfilter $SUNDTEK_ADDON_HOME/sundtek.conf 2>/dev/null)"
|
||||
if [ -z "$entry_set" ]; then
|
||||
sed -i 's|^device_attach=.*|# device_attach not used anymore\n\n# enable HW PID filter\nuse_hwpidfilter=off\n\n# enable listening on network\nenablenetwork=off|g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
sed -i 's|^#first_adapter=.*|first_adapter=0|g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
|
||||
sed -i 's|.*network tuner IP address (OpenELEC specific).*||g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
sed -i 's|.*network_tuner_ip=.*||g' $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
fi
|
||||
logger -t Sundtek "### Preloading library doesn't exist ###"
|
||||
fi
|
||||
|
||||
if [ ! -f "$SUNDTEK_ADDON_SETTINGS" ]; then
|
||||
cp $SUNDTEK_ADDON_DIR/settings-default.xml $SUNDTEK_ADDON_SETTINGS
|
||||
fi
|
||||
|
||||
[ ! -f $SUNDTEK_ADDON_HOME/rc_key_enter.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_enter $SUNDTEK_ADDON_HOME/rc_key_enter.map
|
||||
[ ! -f $SUNDTEK_ADDON_HOME/rc_key_ok.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_ok $SUNDTEK_ADDON_HOME/rc_key_ok.map
|
||||
|
||||
mkdir -p /var/config
|
||||
cat "$SUNDTEK_ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
export LD_PRELOAD=$SUNDTEK_ADDON_DIR/lib/libmediaclient.so
|
||||
|
||||
if [ -z "$(pidof mediasrv)" ]; then
|
||||
rm -f /var/log/mediasrv.log
|
||||
rm -f /var/log/mediaclient.log
|
||||
|
||||
SUNDTEK_CONF_TMP=/tmp/sundtek.conf
|
||||
cp $SUNDTEK_ADDON_HOME/sundtek.conf $SUNDTEK_CONF_TMP
|
||||
|
||||
[ -z "$LOWEST_ADAPTER_NUM" ] && LOWEST_ADAPTER_NUM=0
|
||||
sed -i "s|^first_adapter=.*|first_adapter=$LOWEST_ADAPTER_NUM|g" $SUNDTEK_CONF_TMP
|
||||
|
||||
# enable HW PID filter
|
||||
if [ "$ENABLE_HW_PID_FILTER" = "true" ]; then
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=on|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=off|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
# enable IR receiver
|
||||
if [ "$ENABLE_IR_RECEIVER" = "true" ]; then
|
||||
sed -i 's|^ir_disabled=.*|ir_disabled=0|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^ir_disabled=.*|ir_disabled=1|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
if [ "$ALLOW_NET_USE" = "true" ]; then
|
||||
sed -i 's|^enablenetwork=.*|enablenetwork=on|g' $SUNDTEK_CONF_TMP
|
||||
else
|
||||
sed -i 's|^enablenetwork=.*|enablenetwork=off|g' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
[ "$DEVICE1_IP" = "0.0.0.0" ] && DEVICE1_IP=""
|
||||
[ "$DEVICE2_IP" = "0.0.0.0" ] && DEVICE2_IP=""
|
||||
[ "$DEVICE3_IP" = "0.0.0.0" ] && DEVICE3_IP=""
|
||||
[ "$DEVICE4_IP" = "0.0.0.0" ] && DEVICE4_IP=""
|
||||
[ "$DEVICE5_IP" = "0.0.0.0" ] && DEVICE5_IP=""
|
||||
DEVICE1_NUM=$(net_tuner_num_fix $DEVICE1_NUM)
|
||||
DEVICE2_NUM=$(net_tuner_num_fix $DEVICE2_NUM)
|
||||
DEVICE3_NUM=$(net_tuner_num_fix $DEVICE3_NUM)
|
||||
DEVICE4_NUM=$(net_tuner_num_fix $DEVICE4_NUM)
|
||||
DEVICE5_NUM=$(net_tuner_num_fix $DEVICE5_NUM)
|
||||
|
||||
if [ "$USE_NET_TUNERS" = "true" -a -n "$DEVICE1_IP" ]; then
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
# add entries
|
||||
echo -e "\n[NETWORK]" >>$SUNDTEK_CONF_TMP
|
||||
for dev in $(seq 0 $DEVICE1_NUM); do
|
||||
echo "device=$DEVICE1_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE2_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE2_NUM); do
|
||||
echo "device=$DEVICE2_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE3_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE3_NUM); do
|
||||
echo "device=$DEVICE3_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE4_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE4_NUM); do
|
||||
echo "device=$DEVICE4_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
if [ -n "$DEVICE5_IP" ]; then
|
||||
for dev in $(seq 0 $DEVICE5_NUM); do
|
||||
echo "device=$DEVICE5_IP:$dev" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
if [ "$ENABLE_TUNER_TYPES" = "true" ]; then
|
||||
# get tuner serial numbers
|
||||
SERIALS=$(cat /var/config/sundtek-addon.conf | sed -n 's|^ATTACHED_TUNER_\(.*\)_DVBMODE=.*|\1|gp' | sort | uniq)
|
||||
. /var/config/sundtek-addon.conf
|
||||
|
||||
for SERIAL in $SERIALS; do
|
||||
DVBMODE=$(eval echo \$ATTACHED_TUNER_${SERIAL}_DVBMODE)
|
||||
IRPROT=$(eval echo \$ATTACHED_TUNER_${SERIAL}_IRPROT)
|
||||
KEYMAP=$(eval echo \$ATTACHED_TUNER_${SERIAL}_KEYMAP)
|
||||
|
||||
if [ "$DVBMODE" = "DVB-T" ]; then
|
||||
# only set DVB-T because default is DVB-C (and DVB-S is not set either)
|
||||
DVBMODE="DVBT"
|
||||
else
|
||||
DVBMODE=""
|
||||
fi
|
||||
|
||||
[ "$IRPROT" = "NEC" -o "$IRPROT" = "auto" ] && IRPROT=""
|
||||
|
||||
[ ! -f $KEYMAP ] && KEYMAP=""
|
||||
|
||||
# remove setttings for this tuner
|
||||
awk -v val="[$SERIAL]" '$0 == val {flag=1; next} /^ir_protocol=|^rcmap=|^initial_dvb_mode=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-types
|
||||
mv ${SUNDTEK_CONF_TMP}-types $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
|
||||
ADDNEW=true
|
||||
if [ -n "$DVBMODE" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "initial_dvb_mode=$DVBMODE" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$IRPROT" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "ir_protocol=$IRPROT" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "rcmap=$KEYMAP" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
|
||||
md5_1=$(md5sum -b $SUNDTEK_CONF_TMP | awk '{print $1}')
|
||||
md5_2=$(md5sum -b $SUNDTEK_ADDON_HOME/sundtek.conf | awk '{print $1}')
|
||||
if [ "$md5_1" != "$md5_2" ]; then
|
||||
# file changed - copy to addon home
|
||||
cp $SUNDTEK_CONF_TMP $SUNDTEK_ADDON_HOME/sundtek.conf
|
||||
fi
|
||||
|
||||
mediasrv --wait-for-devices -p $SUNDTEK_ADDON_DIR/bin -c $SUNDTEK_ADDON_HOME/sundtek.conf -d
|
||||
|
||||
# wait few seconds
|
||||
[ -z "$SETTLE_TIME" ] && SETTLE_TIME=0
|
||||
SETTLE_TIME=$(( $SETTLE_TIME *1 ))
|
||||
if [ $SETTLE_TIME -gt 0 ]; then
|
||||
logger -t Sundtek "### Settle for $SETTLE_TIME sec ###"
|
||||
sleep $SETTLE_TIME
|
||||
fi
|
||||
|
||||
if [ "$RUN_USER_SCRIPT" = "true" -a -f "$SUNDTEK_ADDON_HOME/userscript.sh" ]; then
|
||||
logger -t Sundtek "### Running user script $SUNDTEK_ADDON_HOME/userscript.sh ###"
|
||||
cat $SUNDTEK_ADDON_HOME/userscript.sh | dos2unix >/var/run/sundtek-userscript.sh
|
||||
sh /var/run/sundtek-userscript.sh
|
||||
fi
|
||||
(
|
||||
# save adapter serial number in background
|
||||
sleep 5
|
||||
serial_number_old=$(cat $SUNDTEK_ADDON_HOME/adapters.txt 2>/dev/null)
|
||||
serial_number_new=$(mediaclient.bin -e | awk '/device / {print $0} /ID:/ {print $2}')
|
||||
if [ "$serial_number_old" != "$serial_number_new" ]; then
|
||||
echo "$serial_number_new" >$SUNDTEK_ADDON_HOME/adapters.txt
|
||||
fi
|
||||
)&
|
||||
fi
|
||||
|
||||
logger -t Sundtek "### Sundtek ready ###"
|
||||
|
||||
# unlock the lock
|
||||
unlock
|
||||
|
||||
@@ -15,29 +15,3 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import xbmcaddon
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id = 'driver.dvb.sundtek-mediatv')
|
||||
__cwd__ = __settings__.getAddonInfo('path')
|
||||
__resources_lib__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
|
||||
__settings_xml__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))
|
||||
|
||||
__mediaclient__ = xbmc.translatePath(os.path.join(__cwd__, 'bin', 'mediaclient.bin'))
|
||||
__ld_preload__ = xbmc.translatePath(os.path.join(__cwd__, 'lib', 'libmediaclient.so'))
|
||||
__mediaclient_e__ = 'LD_PRELOAD=' + __ld_preload__ + ' ' + __mediaclient__ + ' -e'
|
||||
__update_sh__ = xbmc.translatePath(os.path.join(__cwd__, 'bin', 'update-driver.sh'))
|
||||
|
||||
if __name__ == "__main__" and len(sys.argv) == 2 and sys.argv[1] == 'refresh_tuners':
|
||||
sys.path.append(__resources_lib__)
|
||||
from functions import refresh_sundtek_tuners
|
||||
refresh_sundtek_tuners(__settings_xml__, __mediaclient_e__)
|
||||
__settings__.openSettings()
|
||||
elif __name__ == "__main__" and len(sys.argv) == 2 and sys.argv[1] == 'update_driver':
|
||||
proc = subprocess.Popen([__update_sh__], shell = True)
|
||||
return_code = proc.wait()
|
||||
print "sundtek update driver rv", return_code
|
||||
__settings__.openSettings()
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import xbmcaddon
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id = 'driver.dvb.sundtek-mediatv')
|
||||
__cwd__ = __settings__.getAddonInfo('path')
|
||||
__resources_lib__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
|
||||
__settings_xml__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))
|
||||
|
||||
__mediaclient__ = xbmc.translatePath(os.path.join(__cwd__, 'bin', 'mediaclient'))
|
||||
__mediaclient_e__ = __mediaclient__ + ' -e'
|
||||
__update_sh__ = xbmc.translatePath(os.path.join(__cwd__, 'bin', 'sundtek-update-driver.sh'))
|
||||
|
||||
if len(sys.argv) == 2:
|
||||
if sys.argv[1] == 'refresh_tuners':
|
||||
print "sundtek refresh tuners"
|
||||
sys.path.append(__resources_lib__)
|
||||
from functions import refresh_sundtek_tuners
|
||||
refresh_sundtek_tuners(__settings_xml__, __mediaclient_e__)
|
||||
__settings__.openSettings()
|
||||
elif sys.argv[1] == 'update_driver':
|
||||
print "sundtek update driver"
|
||||
proc = subprocess.Popen([__update_sh__], shell = True)
|
||||
return_code = proc.wait()
|
||||
print "sundtek update driver return value " + str(return_code)
|
||||
__settings__.openSettings()
|
||||
@@ -29,5 +29,6 @@
|
||||
<string id="9030"> keymap filename</string>
|
||||
|
||||
<string id="3000">Driver</string>
|
||||
<string id="3020">Check for new driver version at boot</string>
|
||||
<string id="3010">Update from web... (press me)</string>
|
||||
</strings>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -22,7 +22,7 @@ import shutil
|
||||
import xmlpp
|
||||
from xml.dom import minidom
|
||||
|
||||
__sundtek_userspace__ = '/storage/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv/'
|
||||
__sundtek_userspace__ = '/storage/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv/'
|
||||
|
||||
######################################################################################################
|
||||
# backup setting.xml file only if backup doesn't exist
|
||||
|
||||
@@ -37,16 +37,17 @@ def _usage(this_file):
|
||||
return """SYNOPSIS: pretty print an XML document
|
||||
USAGE: python %s <filename> \n""" % this_file
|
||||
|
||||
def _pprint_line(indent_level, line, width=100, output=_sys.stdout):
|
||||
def _pprint_line(indent_level, line, width=100, output=_sys.stdout, ignore_contents = False):
|
||||
if line.strip():
|
||||
start = ""
|
||||
number_chars = 0
|
||||
for l in range(indent_level):
|
||||
start = start + " "
|
||||
number_chars = number_chars + 1
|
||||
if not ignore_contents:
|
||||
try:
|
||||
elem_start = _re.findall("(\<\W{0,1}\w+:\w+) ?", line)[0]
|
||||
elem_finished = _re.findall("([?|\]\]/]*\>)", line)[0]
|
||||
elem_finished = _re.findall("([?|\]\]/|\-\-]*\>)", line)[0]
|
||||
#should not have *
|
||||
attrs = _re.findall("(\S*?\=\".*?\")", line)
|
||||
output.write(start + elem_start)
|
||||
@@ -68,6 +69,8 @@ def _pprint_line(indent_level, line, width=100, output=_sys.stdout):
|
||||
except IndexError:
|
||||
#give up pretty print this line
|
||||
output.write(start + line + "\n")
|
||||
else:
|
||||
output.write(start + line + "\n")
|
||||
|
||||
|
||||
def _pprint_elem_content(indent_level, line, output=_sys.stdout):
|
||||
@@ -81,6 +84,7 @@ def _get_next_elem(data):
|
||||
end_pos = data.find(">") + 1
|
||||
retval = data[start_pos:end_pos]
|
||||
stopper = retval.rfind("/")
|
||||
ignore_contents = False
|
||||
if stopper < retval.rfind("\""):
|
||||
stopper = -1
|
||||
single = (stopper > -1 and ((retval.find(">") - stopper) < (stopper - retval.find("<"))))
|
||||
@@ -89,11 +93,19 @@ def _get_next_elem(data):
|
||||
ignore_question = retval.find("<?") > -1
|
||||
|
||||
if ignore_excl:
|
||||
ignore_contents = True
|
||||
cdata = retval.find("<![CDATA[") > -1
|
||||
if cdata:
|
||||
end_pos = data.find("]]>")
|
||||
if end_pos > -1:
|
||||
end_pos = end_pos + len("]]>")
|
||||
stopper = end_pos
|
||||
else:
|
||||
end_pos = data.find("-->")
|
||||
if end_pos > -1:
|
||||
end_pos = end_pos + len("-->")
|
||||
stopper = end_pos
|
||||
retval = data[start_pos:end_pos]
|
||||
|
||||
elif ignore_question:
|
||||
end_pos = data.find("?>") + len("?>")
|
||||
@@ -101,11 +113,12 @@ def _get_next_elem(data):
|
||||
|
||||
no_indent = ignore or single
|
||||
|
||||
#print retval, end_pos, start_pos, stopper > -1, no_indent
|
||||
|
||||
return start_pos, \
|
||||
end_pos, \
|
||||
stopper > -1, \
|
||||
no_indent
|
||||
no_indent, \
|
||||
ignore_contents
|
||||
|
||||
def get_pprint(xml, indent=4, width=80):
|
||||
"""Returns the pretty printed xml """
|
||||
@@ -117,6 +130,8 @@ def get_pprint(xml, indent=4, width=80):
|
||||
out = out()
|
||||
pprint(xml, output=out, indent=indent, width=width)
|
||||
|
||||
|
||||
|
||||
return out.output
|
||||
|
||||
|
||||
@@ -126,7 +141,7 @@ def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
Use indent to select indentation level. Default is 4 """
|
||||
data = xml
|
||||
indent_level = 0
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
start_pos, end_pos, is_stop, no_indent, ignore_contents = _get_next_elem(data)
|
||||
while ((start_pos > -1 and end_pos > -1)):
|
||||
_pprint_elem_content(indent_level, data[:start_pos].strip(),
|
||||
output=output)
|
||||
@@ -136,7 +151,8 @@ def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
_pprint_line(indent_level,
|
||||
data[:end_pos - start_pos],
|
||||
width=width,
|
||||
output=output)
|
||||
output=output,
|
||||
ignore_contents=ignore_contents)
|
||||
data = data[end_pos - start_pos:]
|
||||
if not is_stop and not no_indent :
|
||||
indent_level = indent_level + indent
|
||||
@@ -144,7 +160,7 @@ def pprint(xml, output=_sys.stdout, indent=4, width=80):
|
||||
if not data:
|
||||
break
|
||||
else:
|
||||
start_pos, end_pos, is_stop, no_indent = _get_next_elem(data)
|
||||
start_pos, end_pos, is_stop, no_indent, ignore_contents = _get_next_elem(data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
<category label="9000">
|
||||
<setting type="sep" />
|
||||
<setting id="ENABLE_TUNER_TYPES" type="bool" label="9005" default="true" />
|
||||
<setting label="9010" option="close" type="action" action="RunScript($ID, refresh_tuners)" />
|
||||
<setting label="9010" option="close" type="action" id="refresh_tuners" action="RunScript($CWD/resources/actions.py, refresh_tuners)" />
|
||||
</category>
|
||||
<category label="3000">
|
||||
<setting type="sep" />
|
||||
<setting label="3010" option="close" type="action" action="RunScript($ID, update_driver)" />
|
||||
<setting id="CHECK_BOOT" type="bool" label="3020" default="false" />
|
||||
<setting label="3010" option="close" type="action" id="update_driver" action="RunScript($CWD/resources/actions.py, update_driver)" />
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
@@ -25,9 +25,10 @@ oe_setup_addon driver.dvb.sundtek-mediatv
|
||||
if [ "$SUSPEND_DRIVER" = "true" ]; then
|
||||
case "$1" in
|
||||
pre)
|
||||
killall -9 mediasrv &>/dev/null
|
||||
systemctl stop driver.dvb.sundtek-mediatv.service
|
||||
;;
|
||||
post)
|
||||
systemctl start driver.dvb.sundtek-mediatv.service
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Sundtek driver service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/sh -c "exec sh /storage/.kodi/addons/driver.dvb.sundtek-mediatv/bin/sundtek-mediatv.start"
|
||||
ExecStop=-/bin/sh -c "exec sh /storage/.kodi/addons/driver.dvb.sundtek-mediatv/bin/sundtek-mediatv.stop"
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -Naur libcec-2.2-8d84f8b/configure.ac libcec-2.2-8d84f8b.patch/configure.ac
|
||||
--- libcec-2.2-8d84f8b/configure.ac 2014-10-27 12:55:30.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/configure.ac 2014-10-27 13:11:03.726445999 +0100
|
||||
diff -Naur libcec-2.2.0/configure.ac libcec-2.2.0.patch/configure.ac
|
||||
--- libcec-2.2.0/configure.ac 2014-11-01 01:51:37.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/configure.ac 2014-11-10 23:14:45.210162950 +0100
|
||||
@@ -100,6 +100,14 @@
|
||||
esac
|
||||
fi
|
||||
@@ -16,7 +16,7 @@ diff -Naur libcec-2.2-8d84f8b/configure.ac libcec-2.2-8d84f8b.patch/configure.ac
|
||||
## add the top dir and include to the include path, so we can include config.h and cec.h
|
||||
CPPFLAGS="$CPPFLAGS -I\$(abs_top_srcdir)/src -I\$(abs_top_srcdir)/include"
|
||||
|
||||
@@ -305,6 +313,17 @@
|
||||
@@ -306,6 +314,17 @@
|
||||
fi
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ diff -Naur libcec-2.2-8d84f8b/configure.ac libcec-2.2-8d84f8b.patch/configure.ac
|
||||
## check if our build system is complete
|
||||
AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR($msg_required_header_missing))
|
||||
AC_CHECK_HEADER(ctype.h,,AC_MSG_ERROR($msg_required_header_missing))
|
||||
diff -Naur libcec-2.2-8d84f8b/include/cectypes.h libcec-2.2-8d84f8b.patch/include/cectypes.h
|
||||
--- libcec-2.2-8d84f8b/include/cectypes.h 2014-10-27 12:55:30.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/include/cectypes.h 2014-10-27 13:12:22.785470074 +0100
|
||||
@@ -306,6 +306,17 @@
|
||||
diff -Naur libcec-2.2.0/include/cectypes.h libcec-2.2.0.patch/include/cectypes.h
|
||||
--- libcec-2.2.0/include/cectypes.h 2014-10-28 16:20:50.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/include/cectypes.h 2014-11-10 23:21:37.347945493 +0100
|
||||
@@ -307,6 +307,17 @@
|
||||
#define CEC_EXYNOS_VIRTUAL_COM "Exynos"
|
||||
|
||||
/*!
|
||||
@@ -55,7 +55,7 @@ diff -Naur libcec-2.2-8d84f8b/include/cectypes.h libcec-2.2-8d84f8b.patch/includ
|
||||
* Mimimum client version
|
||||
*/
|
||||
#define CEC_MIN_LIB_VERSION 2
|
||||
@@ -887,7 +898,8 @@
|
||||
@@ -888,7 +899,8 @@
|
||||
ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
|
||||
ADAPTERTYPE_RPI = 0x100,
|
||||
ADAPTERTYPE_TDA995x = 0x200,
|
||||
@@ -65,9 +65,9 @@ diff -Naur libcec-2.2-8d84f8b/include/cectypes.h libcec-2.2-8d84f8b.patch/includ
|
||||
} cec_adapter_type;
|
||||
|
||||
typedef struct cec_menu_language
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/AdapterFactory.cpp libcec-2.2-8d84f8b.patch/src/lib/adapter/AdapterFactory.cpp
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/AdapterFactory.cpp 2014-10-27 12:55:30.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/AdapterFactory.cpp 2014-10-27 13:16:07.856765188 +0100
|
||||
diff -Naur libcec-2.2.0/src/lib/adapter/AdapterFactory.cpp libcec-2.2.0.patch/src/lib/adapter/AdapterFactory.cpp
|
||||
--- libcec-2.2.0/src/lib/adapter/AdapterFactory.cpp 2014-10-28 16:20:50.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/adapter/AdapterFactory.cpp 2014-11-10 23:18:08.761485552 +0100
|
||||
@@ -57,6 +57,11 @@
|
||||
#include "Exynos/ExynosCECAdapterCommunication.h"
|
||||
#endif
|
||||
@@ -104,24 +104,166 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/AdapterFactory.cpp libcec-2.2-8d84
|
||||
#error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
|
||||
#endif
|
||||
|
||||
@@ -155,7 +175,12 @@
|
||||
return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
|
||||
@@ -151,11 +171,16 @@
|
||||
return new CRPiCECAdapterCommunication(m_lib->m_cec);
|
||||
#endif
|
||||
|
||||
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API)
|
||||
+#if defined(HAVE_IMX_API)
|
||||
+ if (!strcmp(strPort, CEC_IMX_VIRTUAL_COM))
|
||||
+ return new CIMXCECAdapterCommunication(m_lib->m_cec);
|
||||
+#endif
|
||||
+
|
||||
#if defined(HAVE_P8_USB)
|
||||
return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
|
||||
#endif
|
||||
|
||||
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API)
|
||||
+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API) && !defined(HAVE_IMX_API)
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 2014-10-27 13:11:03.735446822 +0100
|
||||
@@ -0,0 +1,367 @@
|
||||
diff -Naur libcec-2.2.0/src/lib/adapter/IMX/AdapterMessageQueue.h libcec-2.2.0.patch/src/lib/adapter/IMX/AdapterMessageQueue.h
|
||||
--- libcec-2.2.0/src/lib/adapter/IMX/AdapterMessageQueue.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/adapter/IMX/AdapterMessageQueue.h 2014-11-10 23:14:45.214162390 +0100
|
||||
@@ -0,0 +1,134 @@
|
||||
+#pragma once
|
||||
+/*
|
||||
+ * This file is part of the libCEC(R) library.
|
||||
+ *
|
||||
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
|
||||
+ * libCEC(R) is an original work, containing original code.
|
||||
+ *
|
||||
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
|
||||
+ *
|
||||
+ * This program is dual-licensed; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+ *
|
||||
+ *
|
||||
+ * Alternatively, you can license this library under a commercial license,
|
||||
+ * please contact Pulse-Eight Licensing for more information.
|
||||
+ *
|
||||
+ * For more information contact:
|
||||
+ * Pulse-Eight Licensing <license@pulse-eight.com>
|
||||
+ * http://www.pulse-eight.com/
|
||||
+ * http://www.pulse-eight.net/
|
||||
+ */
|
||||
+
|
||||
+#include "lib/platform/threads/mutex.h"
|
||||
+
|
||||
+namespace CEC
|
||||
+{
|
||||
+ using namespace PLATFORM;
|
||||
+
|
||||
+ class CAdapterMessageQueueEntry
|
||||
+ {
|
||||
+ public:
|
||||
+ CAdapterMessageQueueEntry(const cec_command &command)
|
||||
+ : m_bWaiting(true), m_retval((uint32_t)-1), m_bSucceeded(false)
|
||||
+ {
|
||||
+ m_hash = hashValue(
|
||||
+ uint32_t(command.opcode_set ? command.opcode : CEC_OPCODE_NONE),
|
||||
+ command.initiator, command.destination);
|
||||
+ }
|
||||
+
|
||||
+ virtual ~CAdapterMessageQueueEntry(void) {}
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Query result from worker thread
|
||||
+ */
|
||||
+ uint32_t Result() const
|
||||
+ {
|
||||
+ return m_retval;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Signal waiting threads
|
||||
+ */
|
||||
+ void Broadcast(void)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ m_condition.Broadcast();
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Signal waiting thread(s) when message matches this entry
|
||||
+ */
|
||||
+ bool CheckMatch(uint32_t opcode, cec_logical_address initiator,
|
||||
+ cec_logical_address destination, uint32_t response)
|
||||
+ {
|
||||
+ uint32_t hash = hashValue(opcode, initiator, destination);
|
||||
+
|
||||
+ if (hash == m_hash)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+ m_retval = response;
|
||||
+ m_bSucceeded = true;
|
||||
+ m_condition.Signal();
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Wait for a response to this command.
|
||||
+ * @param iTimeout The timeout to use while waiting.
|
||||
+ * @return True when a response was received before the timeout passed, false otherwise.
|
||||
+ */
|
||||
+ bool Wait(uint32_t iTimeout)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+ bool bReturn = m_bSucceeded ? true : m_condition.Wait(m_mutex, m_bSucceeded, iTimeout);
|
||||
+ m_bWaiting = false;
|
||||
+ return bReturn;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @return True while a thread is waiting for a signal or isn't waiting yet, false otherwise.
|
||||
+ */
|
||||
+ bool IsWaiting(void)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ return m_bWaiting;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @return Hash value for given cec_command
|
||||
+ */
|
||||
+ static uint32_t hashValue(uint32_t opcode,
|
||||
+ cec_logical_address initiator,
|
||||
+ cec_logical_address destination)
|
||||
+ {
|
||||
+ return 1 | ((uint32_t)initiator << 8) |
|
||||
+ ((uint32_t)destination << 16) | ((uint32_t)opcode << 16);
|
||||
+ }
|
||||
+
|
||||
+ private:
|
||||
+ bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */
|
||||
+ PLATFORM::CCondition<bool> m_condition; /**< the condition to wait on */
|
||||
+ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
|
||||
+ uint32_t m_hash;
|
||||
+ uint32_t m_retval;
|
||||
+ bool m_bSucceeded;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
diff -Naur libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
--- libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 2014-11-10 23:14:45.217161982 +0100
|
||||
@@ -0,0 +1,328 @@
|
||||
+/*
|
||||
+ * This file is part of the libCEC(R) library.
|
||||
+ *
|
||||
@@ -131,7 +273,6 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
|
||||
+ *
|
||||
+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
|
||||
+ * Copyright (C) 2014 by Matus Kral
|
||||
+ *
|
||||
+ * You can redistribute this file and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
@@ -159,12 +300,37 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+#include "lib/LibCEC.h"
|
||||
+#include "lib/platform/sockets/cdevsocket.h"
|
||||
+#include "lib/platform/util/StdString.h"
|
||||
+#include "lib/platform/util/buffer.h"
|
||||
+
|
||||
+/*
|
||||
+ * Ioctl definitions from kernel header
|
||||
+ */
|
||||
+#define HDMICEC_IOC_MAGIC 'H'
|
||||
+#define HDMICEC_IOC_SETLOGICALADDRESS _IOW(HDMICEC_IOC_MAGIC, 1, unsigned char)
|
||||
+#define HDMICEC_IOC_STARTDEVICE _IO(HDMICEC_IOC_MAGIC, 2)
|
||||
+#define HDMICEC_IOC_STOPDEVICE _IO(HDMICEC_IOC_MAGIC, 3)
|
||||
+#define HDMICEC_IOC_GETPHYADDRESS _IOR(HDMICEC_IOC_MAGIC, 4, unsigned char[4])
|
||||
+
|
||||
+#define MAX_CEC_MESSAGE_LEN 17
|
||||
+
|
||||
+#define MESSAGE_TYPE_RECEIVE_SUCCESS 1
|
||||
+#define MESSAGE_TYPE_NOACK 2
|
||||
+#define MESSAGE_TYPE_DISCONNECTED 3
|
||||
+#define MESSAGE_TYPE_CONNECTED 4
|
||||
+#define MESSAGE_TYPE_SEND_SUCCESS 5
|
||||
+
|
||||
+typedef struct hdmi_cec_event{
|
||||
+ int event_type;
|
||||
+ int msg_len;
|
||||
+ unsigned char msg[MAX_CEC_MESSAGE_LEN];
|
||||
+}hdmi_cec_event;
|
||||
+
|
||||
+
|
||||
+using namespace std;
|
||||
+using namespace CEC;
|
||||
+using namespace PLATFORM;
|
||||
+
|
||||
+#include "IMXCECAdapterMessageQueue.h"
|
||||
+#include "AdapterMessageQueue.h"
|
||||
+
|
||||
+#define LIB_CEC m_callback->GetLib()
|
||||
+
|
||||
@@ -178,12 +344,15 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+#define CEC_MSG_FAIL_DEST_NOT_ACK 0x85 /*Message transmisson failed: Destination Address not aknowledged*/
|
||||
+#define CEC_MSG_FAIL_DATA_NOT_ACK 0x86 /*Message transmisson failed: Databyte not acknowledged*/
|
||||
+
|
||||
+
|
||||
+CIMXCECAdapterCommunication::CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
|
||||
+ IAdapterCommunication(callback)
|
||||
+ IAdapterCommunication(callback)/*,
|
||||
+ m_bLogicalAddressChanged(false)*/
|
||||
+{
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+ m_iNextMessage = 0;
|
||||
+ //m_logicalAddresses.Clear();
|
||||
+ m_logicalAddress = CECDEVICE_UNKNOWN;
|
||||
+ m_bLogicalAddressRegistered = false;
|
||||
+ m_bInitialised = false;
|
||||
@@ -211,7 +380,6 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ if (!bStartListening || CreateThread()) {
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_STARTDEVICE, NULL) == 0) {
|
||||
+ m_bInitialised = true;
|
||||
+ RegisterLogicalAddress(CECDEVICE_BROADCAST);
|
||||
+ return true;
|
||||
+ }
|
||||
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to start device\n", __func__);
|
||||
@@ -225,18 +393,17 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+
|
||||
+void CIMXCECAdapterCommunication::Close(void)
|
||||
+{
|
||||
+ StopThread(-1);
|
||||
+ if (m_bInitialised)
|
||||
+ {
|
||||
+ m_bInitialised = false;
|
||||
+ UnregisterLogicalAddress();
|
||||
+ StopThread(0);
|
||||
+
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_STOPDEVICE, NULL) != 0)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ if (!m_bInitialised) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_STOPDEVICE, NULL) != 0) {
|
||||
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to stop device\n", __func__);
|
||||
+ }
|
||||
+ }
|
||||
+ m_dev->Close();
|
||||
+ m_bInitialised = false;
|
||||
+}
|
||||
+
|
||||
+
|
||||
@@ -248,19 +415,17 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+
|
||||
+
|
||||
+cec_adapter_message_state CIMXCECAdapterCommunication::Write(
|
||||
+ const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool UNUSED(bIsReply))
|
||||
+ const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply))
|
||||
+{
|
||||
+ unsigned char message[MAX_MESSAGE_LEN];
|
||||
+ CIMXCECAdapterMessageQueueEntry *entry;
|
||||
+ //cec_frame frame;
|
||||
+ unsigned char message[MAX_CEC_MESSAGE_LEN];
|
||||
+ int msg_len = 1;
|
||||
+ cec_adapter_message_state rc = ADAPTER_MESSAGE_STATE_ERROR;
|
||||
+
|
||||
+ bRetry = true;
|
||||
+ if ((size_t)data.parameters.size + data.opcode_set + 1 > sizeof(message))
|
||||
+ {
|
||||
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: data size too large !", __func__);
|
||||
+ bRetry = false;
|
||||
+ return rc;
|
||||
+ return ADAPTER_MESSAGE_STATE_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ message[0] = (data.initiator << 4) | (data.destination & 0x0f);
|
||||
@@ -272,46 +437,12 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ msg_len+=data.parameters.size;
|
||||
+ }
|
||||
+
|
||||
+ entry = new CIMXCECAdapterMessageQueueEntry(message[0], data.opcode);
|
||||
+ m_messageMutex.Lock();
|
||||
+ uint32_t msgKey = ++m_iNextMessage;
|
||||
+ m_messages.insert(make_pair(msgKey, entry));
|
||||
+ m_messageMutex.Unlock();
|
||||
+
|
||||
+ if (m_dev->Write(message, msg_len) > 0)
|
||||
+ if (m_dev->Write(message, msg_len) == msg_len)
|
||||
+ {
|
||||
+ if (entry->Wait(data.transmit_timeout ? data.transmit_timeout : iLineTimeout *1000))
|
||||
+ {
|
||||
+ int status = entry->Result();
|
||||
+
|
||||
+ if (status == MESSAGE_TYPE_NOACK)
|
||||
+ rc = ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED;
|
||||
+ else if (status == MESSAGE_TYPE_SEND_SUCCESS)
|
||||
+ rc = ADAPTER_MESSAGE_STATE_SENT_ACKED;
|
||||
+
|
||||
+ bRetry = false;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ rc = ADAPTER_MESSAGE_STATE_WAITING_TO_BE_SENT;
|
||||
+#ifdef CEC_DEBUGGING
|
||||
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: command timed out !", __func__);
|
||||
+#endif
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ Sleep(CEC_DEFAULT_TRANSMIT_RETRY_WAIT);
|
||||
+#ifdef CEC_DEBUGGING
|
||||
+ LIB_CEC->AddLog(CEC_LOG_WARNING, "%s: write failed !", __func__);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ m_messageMutex.Lock();
|
||||
+ m_messages.erase(msgKey);
|
||||
+ m_messageMutex.Unlock();
|
||||
+
|
||||
+ delete entry;
|
||||
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: sent command error !", __func__);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
@@ -332,16 +463,19 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+
|
||||
+uint16_t CIMXCECAdapterCommunication::GetPhysicalAddress(void)
|
||||
+{
|
||||
+ uint8_t phy_addr[4];
|
||||
+ uint32_t info;
|
||||
+ uint16_t phy_addr;
|
||||
+
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_GETPHYADDRESS, &phy_addr) != 0)
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_GETPHYADDRESS, &info) != 0)
|
||||
+ {
|
||||
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_GETPHYADDRESS failed !", __func__);
|
||||
+ return CEC_INVALID_PHYSICAL_ADDRESS;
|
||||
+ }
|
||||
+ /* Rebuild 16 bit raw value from fsl 32 bits value */
|
||||
+ phy_addr = ((info & 0x0f) << 12) | (info & 0x0f00) |
|
||||
+ ((info & 0x0f0000) >> 12) | ((info & 0x0f000000) >> 24);
|
||||
+
|
||||
+ m_physicalAddress = ((phy_addr[0] << 4 | phy_addr[1]) << 8) | (phy_addr[2] << 4 | phy_addr[3]);
|
||||
+ return m_physicalAddress;
|
||||
+ return phy_addr;
|
||||
+}
|
||||
+
|
||||
+
|
||||
@@ -351,7 +485,7 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ addresses.Clear();
|
||||
+
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ if (m_bLogicalAddressRegistered)
|
||||
+ if ((m_logicalAddress & (CECDEVICE_UNKNOWN | CECDEVICE_UNREGISTERED)) == 0)
|
||||
+ addresses.Set(m_logicalAddress);
|
||||
+
|
||||
+ return addresses;
|
||||
@@ -364,11 +498,9 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+
|
||||
+bool CIMXCECAdapterCommunication::UnregisterLogicalAddress(void)
|
||||
+{
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ if (!m_bLogicalAddressRegistered)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)CECDEVICE_BROADCAST) != 0)
|
||||
+ {
|
||||
@@ -376,22 +508,19 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+#ifdef CEC_DEBUGGING
|
||||
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s - releasing previous logical address", __func__);
|
||||
+#endif
|
||||
+ m_logicalAddress = CECDEVICE_UNKNOWN;
|
||||
+ m_bLogicalAddressRegistered = false;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool CIMXCECAdapterCommunication::RegisterLogicalAddress(const cec_logical_address address)
|
||||
+{
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+ if (m_logicalAddress == address && m_bLogicalAddressRegistered)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)address) != 0)
|
||||
+ {
|
||||
@@ -399,14 +528,8 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+#ifdef CEC_DEBUGGING
|
||||
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: %x to %x", __func__, m_logicalAddress, address);
|
||||
+#endif
|
||||
+
|
||||
+ m_logicalAddress = address;
|
||||
+ m_bLogicalAddressRegistered = (address != CECDEVICE_BROADCAST) ? true : false;
|
||||
+ m_bLogicalAddressRegistered = true;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
@@ -417,24 +540,27 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ return RegisterLogicalAddress((cec_logical_address)log_addr);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void *CIMXCECAdapterCommunication::Process(void)
|
||||
+{
|
||||
+ bool bHandled;
|
||||
+ hdmi_cec_event event;
|
||||
+ int ret;
|
||||
+
|
||||
+ uint32_t opcode, status;
|
||||
+ cec_logical_address initiator, destination;
|
||||
+
|
||||
+ while (!IsStopped())
|
||||
+ {
|
||||
+ if (IsInitialised() && (ret = m_dev->Read((char *)&event, sizeof(event), 5000)) > 0)
|
||||
+ ret = m_dev->Read((char *)&event, sizeof(event), 5000);
|
||||
+ if (ret > 0)
|
||||
+ {
|
||||
+
|
||||
+ initiator = cec_logical_address(event.msg[0] >> 4);
|
||||
+ destination = cec_logical_address(event.msg[0] & 0x0f);
|
||||
+
|
||||
+ //LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read data : type : %d initiator %d dest %d", __func__, event.event_type, initiator, destination);
|
||||
+ if (event.event_type == MESSAGE_TYPE_RECEIVE_SUCCESS)
|
||||
+ /* Message received */
|
||||
+ {
|
||||
+ cec_command cmd;
|
||||
+
|
||||
@@ -445,54 +571,31 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+ for( uint8_t i = 2; i < event.msg_len; i++ )
|
||||
+ cmd.parameters.PushBack(event.msg[i]);
|
||||
+
|
||||
+ if (!IsStopped()) {
|
||||
+ if (!IsStopped())
|
||||
+ m_callback->OnCommandReceived(cmd);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (event.event_type == MESSAGE_TYPE_SEND_SUCCESS
|
||||
+ || event.event_type == MESSAGE_TYPE_NOACK)
|
||||
+ {
|
||||
+ bHandled = false;
|
||||
+
|
||||
+ m_messageMutex.Lock();
|
||||
+ for (map<uint32_t, CIMXCECAdapterMessageQueueEntry *>::iterator it = m_messages.begin();
|
||||
+ !bHandled && it != m_messages.end(); it++)
|
||||
+ if (event.event_type == MESSAGE_TYPE_CONNECTED)
|
||||
+ /* HDMI has just been reconnected - Notify phy address*/
|
||||
+ {
|
||||
+ bHandled = it->second->Received(event.event_type, event.msg[0], (cec_opcode)event.msg[1]);
|
||||
+ uint16_t iNewAddress = GetPhysicalAddress();
|
||||
+ m_callback->HandlePhysicalAddressChanged(iNewAddress);
|
||||
+ }
|
||||
+ m_messageMutex.Unlock();
|
||||
+ /* We are not interested in other events */
|
||||
+ } /*else {
|
||||
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read returned %d", __func__, ret);
|
||||
+ }*/
|
||||
+
|
||||
+ if (!bHandled)
|
||||
+ LIB_CEC->AddLog(CEC_LOG_WARNING, "%s: response not matched !", __func__);
|
||||
+ }
|
||||
+ else if (event.event_type == MESSAGE_TYPE_DISCONNECTED)
|
||||
+ {
|
||||
+ /* HDMI Hotplug event - disconnect */
|
||||
+ }
|
||||
+ else if (event.event_type == MESSAGE_TYPE_CONNECTED)
|
||||
+ {
|
||||
+ /* HDMI Hotplug event - connect */
|
||||
+ uint16_t oldAddress = m_physicalAddress;
|
||||
+
|
||||
+ if (oldAddress != GetPhysicalAddress())
|
||||
+ m_callback->HandlePhysicalAddressChanged(m_physicalAddress);
|
||||
+#ifdef CEC_DEBUGGING
|
||||
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: plugin event received", __func__);
|
||||
+#endif
|
||||
+ }
|
||||
+ else
|
||||
+ LIB_CEC->AddLog(CEC_LOG_WARNING, "%s: unhandled response received %d!", __func__, event.event_type);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#endif // HAVE_IMX_API
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.h
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.h 2014-10-27 13:11:03.736446898 +0100
|
||||
@@ -0,0 +1,126 @@
|
||||
diff -Naur libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterCommunication.h libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.h
|
||||
--- libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterCommunication.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterCommunication.h 2014-11-10 23:14:45.217161982 +0100
|
||||
@@ -0,0 +1,119 @@
|
||||
+#pragma once
|
||||
+/*
|
||||
+ * This file is part of the libCEC(R) library.
|
||||
@@ -503,7 +606,6 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h l
|
||||
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
|
||||
+ *
|
||||
+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
|
||||
+ * Copyright (C) 2014 by Matus Kral
|
||||
+ *
|
||||
+ * You can redistribute this file and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
@@ -527,18 +629,12 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h l
|
||||
+#include "lib/platform/threads/mutex.h"
|
||||
+#include "lib/platform/threads/threads.h"
|
||||
+#include "lib/platform/sockets/socket.h"
|
||||
+#include "lib/adapter/IMX/mxc_hdmi-cec.h"
|
||||
+#include "lib/adapter/AdapterCommunication.h"
|
||||
+#include <map>
|
||||
+
|
||||
+#define IMX_ADAPTER_VID 0x0471 /*FIXME TBD*/
|
||||
+#define IMX_ADAPTER_PID 0x1001
|
||||
+
|
||||
+typedef struct hdmi_cec_event{
|
||||
+ int event_type;
|
||||
+ int msg_len;
|
||||
+ unsigned char msg[MAX_MESSAGE_LEN];
|
||||
+}hdmi_cec_event;
|
||||
+
|
||||
+
|
||||
+namespace PLATFORM
|
||||
@@ -546,9 +642,10 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h l
|
||||
+ class CCDevSocket;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+namespace CEC
|
||||
+{
|
||||
+ class CIMXCECAdapterMessageQueueEntry;
|
||||
+ class CAdapterMessageQueueEntry;
|
||||
+
|
||||
+ class CIMXCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread
|
||||
+ {
|
||||
@@ -582,12 +679,13 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h l
|
||||
+ uint16_t GetPhysicalAddress(void);
|
||||
+ bool SetControlledMode(bool UNUSED(controlled)) { return true; }
|
||||
+ cec_vendor_id GetVendorId(void);
|
||||
+ void HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress));
|
||||
+ bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address <= CECDEVICE_BROADCAST; }
|
||||
+ cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_IMX; }
|
||||
+ uint16_t GetAdapterVendorId(void) const { return IMX_ADAPTER_VID; }
|
||||
+ uint16_t GetAdapterProductId(void) const { return IMX_ADAPTER_PID; }
|
||||
+ void HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress));
|
||||
+ void SetActiveSource(bool UNUSED(bSetTo), bool UNUSED(bClientUnregistered)) {}
|
||||
+ bool RegisterLogicalAddress(const cec_logical_address address);
|
||||
+ ///}
|
||||
+
|
||||
+ /** @name PLATFORM::CThread implementation */
|
||||
@@ -596,32 +694,30 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h l
|
||||
+ ///}
|
||||
+
|
||||
+ private:
|
||||
+ bool IsInitialised(void) { return m_bInitialised; };
|
||||
+ bool RegisterLogicalAddress(const cec_logical_address address);
|
||||
+ bool IsInitialised(void) const { return m_bInitialised; };
|
||||
+ bool UnregisterLogicalAddress(void);
|
||||
+
|
||||
+ std::string m_strError; /**< current error message */
|
||||
+
|
||||
+ //cec_logical_addresses m_logicalAddresses;
|
||||
+ cec_logical_address m_logicalAddress;
|
||||
+ uint16_t m_physicalAddress;
|
||||
+
|
||||
+ PLATFORM::CMutex m_mutex;
|
||||
+ PLATFORM::CCDevSocket *m_dev; /**< the device connection */
|
||||
+ bool m_bLogicalAddressRegistered;
|
||||
+ bool m_bInitialised;
|
||||
+
|
||||
+ PLATFORM::CMutex m_messageMutex;
|
||||
+ uint32_t m_iNextMessage;
|
||||
+ std::map<uint32_t, CIMXCECAdapterMessageQueueEntry *> m_messages;
|
||||
+
|
||||
+ bool m_bLogicalAddressRegistered;
|
||||
+ bool m_bInitialised;
|
||||
+ std::map<uint32_t, CAdapterMessageQueueEntry *> m_messages;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp 2014-10-27 13:11:03.733446659 +0100
|
||||
diff -Naur libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp
|
||||
--- libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp 2014-11-10 23:14:45.215162253 +0100
|
||||
@@ -0,0 +1,42 @@
|
||||
+/*
|
||||
+ * This file is part of the libCEC(R) library.
|
||||
@@ -665,9 +761,9 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp lib
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterDetection.h libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.h
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterDetection.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.h 2014-10-27 13:11:03.734446742 +0100
|
||||
diff -Naur libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterDetection.h libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.h
|
||||
--- libcec-2.2.0/src/lib/adapter/IMX/IMXCECAdapterDetection.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/adapter/IMX/IMXCECAdapterDetection.h 2014-11-10 23:14:45.215162253 +0100
|
||||
@@ -0,0 +1,36 @@
|
||||
+#pragma once
|
||||
+/*
|
||||
@@ -705,182 +801,9 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterDetection.h libce
|
||||
+ static bool FindAdapter(void);
|
||||
+ };
|
||||
+}
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterMessageQueue.h libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterMessageQueue.h
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/IMX/IMXCECAdapterMessageQueue.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/IMXCECAdapterMessageQueue.h 2014-10-27 13:11:03.736446898 +0100
|
||||
@@ -0,0 +1,118 @@
|
||||
+#pragma once
|
||||
+/*
|
||||
+ * This file is part of the libCEC(R) library.
|
||||
+ *
|
||||
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
|
||||
+ * libCEC(R) is an original work, containing original code.
|
||||
+ *
|
||||
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
|
||||
+ *
|
||||
+ * This program is dual-licensed; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+ *
|
||||
+ *
|
||||
+ * Alternatively, you can license this library under a commercial license,
|
||||
+ * please contact Pulse-Eight Licensing for more information.
|
||||
+ *
|
||||
+ * For more information contact:
|
||||
+ * Pulse-Eight Licensing <license@pulse-eight.com>
|
||||
+ * http://www.pulse-eight.com/
|
||||
+ * http://www.pulse-eight.net/
|
||||
+ */
|
||||
+
|
||||
+#include "lib/platform/threads/mutex.h"
|
||||
+
|
||||
+namespace CEC
|
||||
+{
|
||||
+ using namespace PLATFORM;
|
||||
+
|
||||
+ class CIMXCECAdapterMessageQueueEntry
|
||||
+ {
|
||||
+ public:
|
||||
+ CIMXCECAdapterMessageQueueEntry(uint8_t addrs, cec_opcode opcode)
|
||||
+ : m_bWaiting(true), m_retval((uint32_t)-1), m_bSucceeded(false)
|
||||
+ {
|
||||
+ m_opcode = opcode;
|
||||
+ m_addrs = addrs;
|
||||
+ }
|
||||
+
|
||||
+ virtual ~CIMXCECAdapterMessageQueueEntry(void) {}
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Query result from worker thread
|
||||
+ */
|
||||
+ uint32_t Result() const
|
||||
+ {
|
||||
+ return m_retval;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Signal waiting threads
|
||||
+ */
|
||||
+ void Broadcast(void)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ m_condition.Broadcast();
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Signal waiting thread(s) when message matches this entry
|
||||
+ */
|
||||
+ bool Received(int response, uint8_t addrs, cec_opcode opcode)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+ if (!(m_addrs == addrs && m_opcode == opcode))
|
||||
+ return false;
|
||||
+
|
||||
+ m_retval = response;
|
||||
+ m_bSucceeded = true;
|
||||
+ m_condition.Signal();
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @brief Wait for a response to this command.
|
||||
+ * @param iTimeout The timeout to use while waiting.
|
||||
+ * @return True when a response was received before the timeout passed, false otherwise.
|
||||
+ */
|
||||
+ bool Wait(uint32_t iTimeout)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+
|
||||
+ bool bReturn = m_bSucceeded ? true : m_condition.Wait(m_mutex, m_bSucceeded, iTimeout);
|
||||
+ m_bWaiting = false;
|
||||
+ return bReturn;
|
||||
+ }
|
||||
+
|
||||
+ /*!
|
||||
+ * @return True while a thread is waiting for a signal or isn't waiting yet, false otherwise.
|
||||
+ */
|
||||
+ bool IsWaiting(void)
|
||||
+ {
|
||||
+ CLockObject lock(m_mutex);
|
||||
+ return m_bWaiting;
|
||||
+ }
|
||||
+
|
||||
+ private:
|
||||
+ bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */
|
||||
+ PLATFORM::CCondition<bool> m_condition; /**< the condition to wait on */
|
||||
+ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
|
||||
+ int m_retval;
|
||||
+ bool m_bSucceeded;
|
||||
+ uint8_t m_addrs;
|
||||
+ cec_opcode m_opcode;
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/adapter/IMX/mxc_hdmi-cec.h libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/mxc_hdmi-cec.h
|
||||
--- libcec-2.2-8d84f8b/src/lib/adapter/IMX/mxc_hdmi-cec.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/adapter/IMX/mxc_hdmi-cec.h 2014-10-27 13:11:03.736446898 +0100
|
||||
@@ -0,0 +1,47 @@
|
||||
+/*
|
||||
+ * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * The code contained herein is licensed under the GNU General Public
|
||||
+ * License. You may obtain a copy of the GNU General Public License
|
||||
+ * Version 2 or later at the following locations:
|
||||
+ *
|
||||
+ * http://www.opensource.org/licenses/gpl-license.html
|
||||
+ * http://www.gnu.org/copyleft/gpl.html
|
||||
+ */
|
||||
+#ifndef _HDMICEC_H_
|
||||
+#define _HDMICEC_H_
|
||||
+#include <linux/ioctl.h>
|
||||
+
|
||||
+/*
|
||||
+ * Ioctl definitions
|
||||
+ */
|
||||
+
|
||||
+/* Use 'k' as magic number */
|
||||
+#define HDMICEC_IOC_MAGIC 'H'
|
||||
+/*
|
||||
+ * S means "Set" through a ptr,
|
||||
+ * T means "Tell" directly with the argument value
|
||||
+ * G means "Get": reply by setting through a pointer
|
||||
+ * Q means "Query": response is on the return value
|
||||
+ * X means "eXchange": G and S atomically
|
||||
+ * H means "sHift": T and Q atomically
|
||||
+ */
|
||||
+#define HDMICEC_IOC_SETLOGICALADDRESS \
|
||||
+ _IOW(HDMICEC_IOC_MAGIC, 1, unsigned char)
|
||||
+#define HDMICEC_IOC_STARTDEVICE _IO(HDMICEC_IOC_MAGIC, 2)
|
||||
+#define HDMICEC_IOC_STOPDEVICE _IO(HDMICEC_IOC_MAGIC, 3)
|
||||
+#define HDMICEC_IOC_GETPHYADDRESS \
|
||||
+ _IOR(HDMICEC_IOC_MAGIC, 4, unsigned char[4])
|
||||
+
|
||||
+#define MAX_MESSAGE_LEN 16
|
||||
+
|
||||
+#define MESSAGE_TYPE_RECEIVE_SUCCESS 1
|
||||
+#define MESSAGE_TYPE_NOACK 2
|
||||
+#define MESSAGE_TYPE_DISCONNECTED 3
|
||||
+#define MESSAGE_TYPE_CONNECTED 4
|
||||
+#define MESSAGE_TYPE_SEND_SUCCESS 5
|
||||
+
|
||||
+#endif /* !_HDMICEC_H_ */
|
||||
+
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/CECTypeUtils.h libcec-2.2-8d84f8b.patch/src/lib/CECTypeUtils.h
|
||||
--- libcec-2.2-8d84f8b/src/lib/CECTypeUtils.h 2014-10-27 12:55:30.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/CECTypeUtils.h 2014-10-27 13:11:03.729446299 +0100
|
||||
diff -Naur libcec-2.2.0/src/lib/CECTypeUtils.h libcec-2.2.0.patch/src/lib/CECTypeUtils.h
|
||||
--- libcec-2.2.0/src/lib/CECTypeUtils.h 2014-10-28 16:20:50.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/CECTypeUtils.h 2014-11-10 23:14:45.212162668 +0100
|
||||
@@ -877,6 +877,8 @@
|
||||
return "Raspberry Pi";
|
||||
case ADAPTERTYPE_TDA995x:
|
||||
@@ -890,11 +813,11 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/CECTypeUtils.h libcec-2.2-8d84f8b.patch/sr
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
diff -Naur libcec-2.2-8d84f8b/src/lib/Makefile.am libcec-2.2-8d84f8b.patch/src/lib/Makefile.am
|
||||
--- libcec-2.2-8d84f8b/src/lib/Makefile.am 2014-10-27 12:55:30.000000000 +0100
|
||||
+++ libcec-2.2-8d84f8b.patch/src/lib/Makefile.am 2014-10-27 13:14:08.229600205 +0100
|
||||
@@ -69,4 +69,10 @@
|
||||
adapter/Exynos/ExynosCECAdapterCommunication.cpp
|
||||
diff -Naur libcec-2.2.0/src/lib/Makefile.am libcec-2.2.0.patch/src/lib/Makefile.am
|
||||
--- libcec-2.2.0/src/lib/Makefile.am 2014-10-28 16:20:50.000000000 +0100
|
||||
+++ libcec-2.2.0.patch/src/lib/Makefile.am 2014-11-10 23:20:02.597700521 +0100
|
||||
@@ -63,6 +63,12 @@
|
||||
adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
|
||||
endif
|
||||
|
||||
+## i.MX6 support
|
||||
@@ -903,4 +826,6 @@ diff -Naur libcec-2.2-8d84f8b/src/lib/Makefile.am libcec-2.2-8d84f8b.patch/src/l
|
||||
+ adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||
+endif
|
||||
+
|
||||
libcec_la_LDFLAGS = @LIBS_LIBCEC@ -version-info @VERSION@
|
||||
## Exynos support
|
||||
if USE_EXYNOS_API
|
||||
libcec_la_SOURCES += adapter/Exynos/ExynosCECAdapterDetection.cpp \
|
||||
@@ -36,3 +36,7 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
|
||||
--enable-static \
|
||||
--with-curses \
|
||||
--without-purify"
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf $INSTALL/usr/share/readline
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Mesa"
|
||||
PKG_VERSION="10.3.2"
|
||||
PKG_VERSION="10.3.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
@@ -43,7 +43,7 @@ else
|
||||
MESA_GALLIUM_LLVM="--disable-gallium-llvm"
|
||||
fi
|
||||
|
||||
if [ "$VDPAU" = "yes" ]; then
|
||||
if [ "$VDPAU_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau"
|
||||
MESA_VDPAU="--enable-vdpau"
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bcm2835-driver"
|
||||
PKG_VERSION="5711461"
|
||||
PKG_VERSION="a54afb6"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="tbs-linux-drivers"
|
||||
PKG_VERSION="140819"
|
||||
PKG_VERSION="141019"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="i386 x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="wlan-firmware"
|
||||
PKG_VERSION="0.0.24"
|
||||
PKG_VERSION="0.0.25"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="Free-to-use"
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
PKG_NAME="linux"
|
||||
case "$LINUX" in
|
||||
imx6)
|
||||
PKG_VERSION="cuboxi-3.14-e85332f"
|
||||
PKG_VERSION="cuboxi-3.14-dc5edb8"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="3.17.2"
|
||||
PKG_VERSION="3.17.3"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
From e01a6ba94249c6c8fde24aff5eaf66da4dd2bea0 Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
Date: Mon, 20 Oct 2014 08:29:55 +0300
|
||||
Subject: Revert "iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate"
|
||||
|
||||
This reverts commit aa11bbf3df026d6b1c6b528bef634fd9de7c2619.
|
||||
This commit was causing connection issues and is not needed
|
||||
if IWL_MVM_RS_RSSI_BASED_INIT_RATE is set to false by default.
|
||||
|
||||
Regardless of the issues mentioned above, this patch added the
|
||||
following WARNING:
|
||||
|
||||
WARNING: CPU: 0 PID: 3946 at drivers/net/wireless/iwlwifi/mvm/tx.c:190 iwl_mvm_set_tx_params+0x60a/0x6f0 [iwlmvm]()
|
||||
Got an HT rate for a non data frame 0x8
|
||||
CPU: 0 PID: 3946 Comm: wpa_supplicant Tainted: G O 3.17.0+ #6
|
||||
Hardware name: LENOVO 20ANCTO1WW/20ANCTO1WW, BIOS GLET71WW (2.25 ) 07/02/2014
|
||||
0000000000000009 ffffffff814fa911 ffff8804288db8f8 ffffffff81064f52
|
||||
0000000000001808 ffff8804288db948 ffff88040add8660 ffff8804291b5600
|
||||
0000000000000000 ffffffff81064fb7 ffffffffa07b73d0 0000000000000020
|
||||
Call Trace:
|
||||
[<ffffffff814fa911>] ? dump_stack+0x41/0x51
|
||||
[<ffffffff81064f52>] ? warn_slowpath_common+0x72/0x90
|
||||
[<ffffffff81064fb7>] ? warn_slowpath_fmt+0x47/0x50
|
||||
[<ffffffffa07a39ea>] ? iwl_mvm_set_tx_params+0x60a/0x6f0 [iwlmvm]
|
||||
[<ffffffffa07a3cf8>] ? iwl_mvm_tx_skb+0x48/0x3c0 [iwlmvm]
|
||||
[<ffffffffa079cb9b>] ? iwl_mvm_mac_tx+0x7b/0x180 [iwlmvm]
|
||||
[<ffffffffa0746ce9>] ? __ieee80211_tx+0x2b9/0x3c0 [mac80211]
|
||||
[<ffffffffa07492f3>] ? ieee80211_tx+0xb3/0x100 [mac80211]
|
||||
[<ffffffffa0749c49>] ? ieee80211_subif_start_xmit+0x459/0xca0 [mac80211]
|
||||
[<ffffffff814116e7>] ? dev_hard_start_xmit+0x337/0x5f0
|
||||
[<ffffffff81430d46>] ? sch_direct_xmit+0x96/0x1f0
|
||||
[<ffffffff81411ba3>] ? __dev_queue_xmit+0x203/0x4f0
|
||||
[<ffffffff8142f670>] ? ether_setup+0x70/0x70
|
||||
[<ffffffff814e96a1>] ? packet_sendmsg+0xf81/0x1110
|
||||
[<ffffffff8140625c>] ? skb_free_datagram+0xc/0x40
|
||||
[<ffffffff813f7538>] ? sock_sendmsg+0x88/0xc0
|
||||
[<ffffffff813f7274>] ? move_addr_to_kernel.part.20+0x14/0x60
|
||||
[<ffffffff811c47c2>] ? __inode_wait_for_writeback+0x62/0xb0
|
||||
[<ffffffff813f7a91>] ? SYSC_sendto+0xf1/0x180
|
||||
[<ffffffff813f88f9>] ? __sys_recvmsg+0x39/0x70
|
||||
[<ffffffff8150066d>] ? system_call_fastpath+0x1a/0x1f
|
||||
---[ end trace cc19a150d311fc63 ]---
|
||||
|
||||
which was reported here: https://bugzilla.kernel.org/show_bug.cgi?id=85691
|
||||
|
||||
CC: <stable@vger.kernel.org> [3.13+]
|
||||
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
|
||||
index 1cb793a..c6a517c 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
|
||||
@@ -175,14 +175,10 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
|
||||
|
||||
/*
|
||||
* for data packets, rate info comes from the table inside the fw. This
|
||||
- * table is controlled by LINK_QUALITY commands. Exclude ctrl port
|
||||
- * frames like EAPOLs which should be treated as mgmt frames. This
|
||||
- * avoids them being sent initially in high rates which increases the
|
||||
- * chances for completion of the 4-Way handshake.
|
||||
+ * table is controlled by LINK_QUALITY commands
|
||||
*/
|
||||
|
||||
- if (ieee80211_is_data(fc) && sta &&
|
||||
- !(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) {
|
||||
+ if (ieee80211_is_data(fc) && sta) {
|
||||
tx_cmd->initial_rate_index = 0;
|
||||
tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_STA_RATE);
|
||||
return;
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
||||
32
packages/linux/patches/3.17.3/linux-999.05-upstream-fixes.patch
vendored
Normal file
32
packages/linux/patches/3.17.3/linux-999.05-upstream-fixes.patch
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
From cef83483341e258beed49ce78fb2cc0c46ab1757 Mon Sep 17 00:00:00 2001
|
||||
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
Date: Thu, 30 Oct 2014 06:54:12 -0300
|
||||
Subject: [media] rc5-decoder: BZ#85721: Fix RC5-SZ decoding
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Changeset e87b540be2dd broke RC5-SZ decoding, as it forgot to add
|
||||
the extra bit check for the enabled protocols at the beginning of
|
||||
the logic.
|
||||
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
Acked-by: David Härdeman <david@hardeman.nu>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
|
||||
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c
|
||||
index 2ef7639..84fa6e9 100644
|
||||
--- a/drivers/media/rc/ir-rc5-decoder.c
|
||||
+++ b/drivers/media/rc/ir-rc5-decoder.c
|
||||
@@ -53,7 +53,7 @@ static int ir_rc5_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
u32 scancode;
|
||||
enum rc_type protocol;
|
||||
|
||||
- if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X)))
|
||||
+ if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ)))
|
||||
return 0;
|
||||
|
||||
if (!is_timing_event(ev)) {
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="OpenELEC-settings"
|
||||
PKG_VERSION="0.5.1"
|
||||
PKG_VERSION="0.5.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="prop."
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi-audioencoder-lame"
|
||||
PKG_VERSION="90fb99b"
|
||||
PKG_VERSION="46592f8"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naur xbmc-audioencoder-lame-736b5f4/CMakeLists.txt xbmc-audioencoder-lame-736b5f4.patch/CMakeLists.txt
|
||||
--- xbmc-audioencoder-lame-736b5f4/CMakeLists.txt 2014-07-18 23:48:35.000000000 +0200
|
||||
+++ xbmc-audioencoder-lame-736b5f4.patch/CMakeLists.txt 2014-10-20 13:06:32.787416257 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
enable_language(CXX)
|
||||
|
||||
-find_package(xbmc REQUIRED)
|
||||
+find_package(kodi REQUIRED)
|
||||
find_package(Lame REQUIRED)
|
||||
if(WIN32)
|
||||
find_package(MPGHIP REQUIRED)
|
||||
diff -Naur xbmc-audioencoder-lame-736b5f4/src/EncoderLame.cpp xbmc-audioencoder-lame-736b5f4.patch/src/EncoderLame.cpp
|
||||
--- xbmc-audioencoder-lame-736b5f4/src/EncoderLame.cpp 2014-07-18 23:48:35.000000000 +0200
|
||||
+++ xbmc-audioencoder-lame-736b5f4.patch/src/EncoderLame.cpp 2014-10-20 02:51:53.710444163 +0200
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <lame/lame.h>
|
||||
-#include "xbmc/xbmc_audioenc_dll.h"
|
||||
+#include "kodi/xbmc_audioenc_dll.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <algorithm>
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi-audioencoder-vorbis"
|
||||
PKG_VERSION="a73ef7e"
|
||||
PKG_VERSION="f75f329"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naur xbmc-audioencoder-vorbis-143d10d/CMakeLists.txt xbmc-audioencoder-vorbis-143d10d.patch/CMakeLists.txt
|
||||
--- xbmc-audioencoder-vorbis-143d10d/CMakeLists.txt 2014-07-18 23:48:45.000000000 +0200
|
||||
+++ xbmc-audioencoder-vorbis-143d10d.patch/CMakeLists.txt 2014-10-20 13:07:21.666556980 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
enable_language(CXX)
|
||||
|
||||
-find_package(xbmc REQUIRED)
|
||||
+find_package(kodi REQUIRED)
|
||||
find_package(Ogg REQUIRED)
|
||||
find_package(Vorbis REQUIRED)
|
||||
find_package(VorbisEnc REQUIRED)
|
||||
diff -Naur xbmc-audioencoder-vorbis-143d10d/src/EncoderVorbis.cpp xbmc-audioencoder-vorbis-143d10d.patch/src/EncoderVorbis.cpp
|
||||
--- xbmc-audioencoder-vorbis-143d10d/src/EncoderVorbis.cpp 2014-07-18 23:48:45.000000000 +0200
|
||||
+++ xbmc-audioencoder-vorbis-143d10d.patch/src/EncoderVorbis.cpp 2014-10-20 02:54:04.983666757 +0200
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/vorbisenc.h>
|
||||
-#include "xbmc/xbmc_audioenc_dll.h"
|
||||
+#include "kodi/xbmc_audioenc_dll.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi-audioencoder-wav"
|
||||
PKG_VERSION="b28ab95"
|
||||
PKG_VERSION="40aaedf"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naur xbmc-audioencoder-wav-91a2b72/CMakeLists.txt xbmc-audioencoder-wav-91a2b72.patch/CMakeLists.txt
|
||||
--- xbmc-audioencoder-wav-91a2b72/CMakeLists.txt 2014-07-18 23:48:40.000000000 +0200
|
||||
+++ xbmc-audioencoder-wav-91a2b72.patch/CMakeLists.txt 2014-10-20 13:08:19.017026869 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
enable_language(CXX)
|
||||
|
||||
-find_package(xbmc REQUIRED)
|
||||
+find_package(kodi REQUIRED)
|
||||
|
||||
include_directories(${XBMC_INCLUDE_DIR})
|
||||
|
||||
diff -Naur xbmc-audioencoder-wav-91a2b72/src/EncoderWav.cpp xbmc-audioencoder-wav-91a2b72.patch/src/EncoderWav.cpp
|
||||
--- xbmc-audioencoder-wav-91a2b72/src/EncoderWav.cpp 2014-07-18 23:48:40.000000000 +0200
|
||||
+++ xbmc-audioencoder-wav-91a2b72.patch/src/EncoderWav.cpp 2014-10-20 02:55:43.985839271 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#include "xbmc/xbmc_audioenc_dll.h"
|
||||
+#include "kodi/xbmc_audioenc_dll.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi-pvr-addons"
|
||||
PKG_VERSION="067befe"
|
||||
PKG_VERSION="06842b9"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
@@ -31,7 +31,7 @@ PKG_LONGDESC="This addons allows Kodi PVR to connect to various TV/PVR backends
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
if [ "$MYSQL_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_MYSQL_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET mysql"
|
||||
PVRADDONS_MYSQL="--enable-mysql"
|
||||
else
|
||||
|
||||
@@ -145,18 +145,6 @@ diff -Naur xbmc-pvr-addons-259d150/addons/pvr.mythtv/Makefile.am xbmc-pvr-addons
|
||||
@TARGET_LDFLAGS@
|
||||
else
|
||||
libmythtv_addon_la_LDFLAGS = @TARGET_LDFLAGS@
|
||||
diff -Naur xbmc-pvr-addons-259d150/addons/pvr.mythtv.cmyth/Makefile.am xbmc-pvr-addons-259d150.patch/addons/pvr.mythtv.cmyth/Makefile.am
|
||||
--- xbmc-pvr-addons-259d150/addons/pvr.mythtv.cmyth/Makefile.am 2014-10-06 03:49:06.000000000 +0200
|
||||
+++ xbmc-pvr-addons-259d150.patch/addons/pvr.mythtv.cmyth/Makefile.am 2014-10-06 04:15:06.330573257 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
LIBNAME = libmythtvcmyth-addon
|
||||
lib_LTLIBRARIES = libmythtvcmyth-addon.la
|
||||
|
||||
-LIBS = @abs_top_srcdir@/lib/cmyth/libcmyth.la
|
||||
+LIBS = @abs_top_builddir@/lib/cmyth/libcmyth.la
|
||||
|
||||
AM_CPPFLAGS = -I$(abs_top_srcdir)/lib/cmyth/include
|
||||
|
||||
diff -Naur xbmc-pvr-addons-259d150/addons/pvr.nextpvr/Makefile.am xbmc-pvr-addons-259d150.patch/addons/pvr.nextpvr/Makefile.am
|
||||
--- xbmc-pvr-addons-259d150/addons/pvr.nextpvr/Makefile.am 2014-10-06 03:49:06.000000000 +0200
|
||||
+++ xbmc-pvr-addons-259d150.patch/addons/pvr.nextpvr/Makefile.am 2014-10-06 04:15:06.331573258 +0200
|
||||
@@ -210,30 +198,6 @@ diff -Naur xbmc-pvr-addons-259d150/addons/pvr.wmc/Makefile.am xbmc-pvr-addons-25
|
||||
|
||||
include ../Makefile.include.am
|
||||
|
||||
diff -Naur xbmc-pvr-addons-259d150/lib/cmyth/libcmyth/Makefile.am xbmc-pvr-addons-259d150.patch/lib/cmyth/libcmyth/Makefile.am
|
||||
--- xbmc-pvr-addons-259d150/lib/cmyth/libcmyth/Makefile.am 2014-10-06 03:49:06.000000000 +0200
|
||||
+++ xbmc-pvr-addons-259d150.patch/lib/cmyth/libcmyth/Makefile.am 2014-10-06 04:15:06.332573260 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
storagegroup.c \
|
||||
epginfo.c
|
||||
|
||||
-INCLUDES=-I../include/ $(MYSQL_INCLUDES)
|
||||
+INCLUDES=-I$(srcdir)/../include/ $(MYSQL_INCLUDES)
|
||||
|
||||
$(LIB): libcmyth.la
|
||||
cp -f .libs/libcmyth.a .
|
||||
diff -Naur xbmc-pvr-addons-259d150/lib/cmyth/librefmem/Makefile.am xbmc-pvr-addons-259d150.patch/lib/cmyth/librefmem/Makefile.am
|
||||
--- xbmc-pvr-addons-259d150/lib/cmyth/librefmem/Makefile.am 2014-10-06 03:49:06.000000000 +0200
|
||||
+++ xbmc-pvr-addons-259d150.patch/lib/cmyth/librefmem/Makefile.am 2014-10-06 04:15:06.332573260 +0200
|
||||
@@ -3,7 +3,7 @@
|
||||
librefmem_la_SOURCES = alloc.c \
|
||||
debug_refmem.c
|
||||
|
||||
-INCLUDES=-I../include/ -I../libcmyth/
|
||||
+INCLUDES=-I$(srcdir)/../include/ -I$(srcdir)/../libcmyth/
|
||||
|
||||
$(LIB): librefmem.la
|
||||
cp -f .libs/librefmem.a .
|
||||
diff -Naur xbmc-pvr-addons-259d150/lib/cppmyth/cppmyth/Makefile.am xbmc-pvr-addons-259d150.patch/lib/cppmyth/cppmyth/Makefile.am
|
||||
--- xbmc-pvr-addons-259d150/lib/cppmyth/cppmyth/Makefile.am 2014-10-06 03:49:06.000000000 +0200
|
||||
+++ xbmc-pvr-addons-259d150.patch/lib/cppmyth/cppmyth/Makefile.am 2014-10-06 04:15:06.332573260 +0200
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
diff -Naur xbmc-pvr-addons-259d150/configure.ac xbmc-pvr-addons-259d150.patch/configure.ac
|
||||
--- xbmc-pvr-addons-259d150/configure.ac 2014-10-06 03:49:06.000000000 +0200
|
||||
+++ xbmc-pvr-addons-259d150.patch/configure.ac 2014-10-20 03:09:15.933083541 +0200
|
||||
@@ -293,18 +293,18 @@
|
||||
if test "x${libdir}" != 'x${exec_prefix}/lib'; then
|
||||
LIBDIR=${libdir}
|
||||
elif test "$prefix" = "NONE"; then
|
||||
- LIBDIR=$PREFIX_DEFAULT/lib/xbmc/addons
|
||||
+ LIBDIR=$PREFIX_DEFAULT/lib/kodi/addons
|
||||
else
|
||||
- LIBDIR=$prefix/lib/xbmc/addons
|
||||
+ LIBDIR=$prefix/lib/kodi/addons
|
||||
fi
|
||||
AC_SUBST(LIBDIR)
|
||||
|
||||
if test "x${datadir}" != 'x${datarootdir}' && test "x${datarootdir}" = 'x${prefix}/share'; then
|
||||
DATADIR=${datadir}
|
||||
elif test "$prefix" = "NONE"; then
|
||||
- DATADIR=$PREFIX_DEFAULT/share/xbmc/addons
|
||||
+ DATADIR=$PREFIX_DEFAULT/share/kodi/addons
|
||||
else
|
||||
- DATADIR=$prefix/share/xbmc/addons
|
||||
+ DATADIR=$prefix/share/kodi/addons
|
||||
fi
|
||||
AC_SUBST(DATADIR)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi-theme-Confluence"
|
||||
PKG_VERSION="14-ba267af"
|
||||
PKG_VERSION="14-88a9a44"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kodi"
|
||||
PKG_VERSION="14-ba267af"
|
||||
PKG_VERSION="14-88a9a44"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
@@ -33,6 +33,9 @@ PKG_LONGDESC="Kodi Media Center (which was formerly named Xbox Media Center or X
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
# configure GPU drivers and dependencies:
|
||||
get_graphicdrivers
|
||||
|
||||
# for dbus support
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET dbus"
|
||||
|
||||
@@ -154,20 +157,20 @@ else
|
||||
KODI_JOYSTICK="--disable-joystick"
|
||||
fi
|
||||
|
||||
if [ "$OPTICAL_DRIVE_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_OPTICAL_SUPPORT" = yes ]; then
|
||||
KODI_OPTICAL="--enable-optical-drive"
|
||||
else
|
||||
KODI_OPTICAL="--disable-optical-drive"
|
||||
fi
|
||||
|
||||
if [ "$NONFREE_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_NONFREE_SUPPORT" = yes ]; then
|
||||
# for non-free support
|
||||
KODI_NONFREE="--enable-non-free"
|
||||
else
|
||||
KODI_NONFREE="--disable-non-free"
|
||||
fi
|
||||
|
||||
if [ "$DVDCSS_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_DVDCSS_SUPPORT" = yes ]; then
|
||||
KODI_DVDCSS="--enable-dvdcss"
|
||||
else
|
||||
KODI_DVDCSS="--disable-dvdcss"
|
||||
@@ -177,7 +180,7 @@ if [ "$FAAC_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET faac"
|
||||
fi
|
||||
|
||||
if [ "$BLURAY_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_BLURAY_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libbluray"
|
||||
KODI_BLURAY="--enable-libbluray"
|
||||
else
|
||||
@@ -191,62 +194,62 @@ else
|
||||
KODI_AVAHI="--disable-avahi"
|
||||
fi
|
||||
|
||||
if [ "$MYSQL_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_MYSQL_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET mysql"
|
||||
KODI_MYSQL="--enable-mysql"
|
||||
else
|
||||
KODI_MYSQL="--disable-mysql"
|
||||
fi
|
||||
|
||||
if [ "$AIRPLAY_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_AIRPLAY_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libplist"
|
||||
KODI_AIRPLAY="--enable-airplay"
|
||||
else
|
||||
KODI_AIRPLAY="--disable-airplay"
|
||||
fi
|
||||
|
||||
if [ "$AIRTUNES_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_AIRTUNES_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libshairplay"
|
||||
KODI_AIRTUNES="--enable-airtunes"
|
||||
else
|
||||
KODI_AIRTUNES="--disable-airtunes"
|
||||
fi
|
||||
|
||||
if [ "$NFS_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_NFS_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libnfs"
|
||||
KODI_NFS="--enable-nfs"
|
||||
else
|
||||
KODI_NFS="--disable-nfs"
|
||||
fi
|
||||
|
||||
if [ "$AFP_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_AFP_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET afpfs-ng"
|
||||
KODI_AFP="--enable-afpclient"
|
||||
else
|
||||
KODI_AFP="--disable-afpclient"
|
||||
fi
|
||||
|
||||
if [ "$SAMBA_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_SAMBA_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET samba"
|
||||
KODI_SAMBA="--enable-samba"
|
||||
else
|
||||
KODI_SAMBA="--disable-samba"
|
||||
fi
|
||||
|
||||
if [ "$WEBSERVER" = yes ]; then
|
||||
if [ "$KODI_WEBSERVER_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libmicrohttpd"
|
||||
KODI_WEBSERVER="--enable-webserver"
|
||||
else
|
||||
KODI_WEBSERVER="--disable-webserver"
|
||||
fi
|
||||
|
||||
if [ "$UPNP_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_UPNP_SUPPORT" = yes ]; then
|
||||
KODI_UPNP="--enable-upnp"
|
||||
else
|
||||
KODI_UPNP="--disable-upnp"
|
||||
fi
|
||||
|
||||
if [ "$SSHLIB_SUPPORT" = yes ]; then
|
||||
if [ "$KODI_SSHLIB_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libssh"
|
||||
KODI_SSH="--enable-ssh"
|
||||
else
|
||||
@@ -271,17 +274,14 @@ if [ ! "$KODIPLAYER_DRIVER" = default ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$VDPAU" = yes ]; then
|
||||
if [ "$VDPAU_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau"
|
||||
KODI_VDPAU="--enable-vdpau"
|
||||
else
|
||||
KODI_VDPAU="--disable-vdpau"
|
||||
fi
|
||||
|
||||
if [ "$VAAPI" = yes ]; then
|
||||
# configure GPU drivers and dependencies:
|
||||
get_graphicdrivers
|
||||
|
||||
if [ "$VAAPI_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver"
|
||||
KODI_VAAPI="--enable-vaapi"
|
||||
else
|
||||
|
||||
@@ -1,416 +0,0 @@
|
||||
diff -Naur xbmc-14-31ce987/configure.in xbmc-14-31ce987.patch/configure.in
|
||||
--- xbmc-14-31ce987/configure.in 2014-10-20 02:31:03.259864060 +0200
|
||||
+++ xbmc-14-31ce987.patch/configure.in 2014-10-20 12:49:16.126851321 +0200
|
||||
@@ -2501,7 +2501,7 @@
|
||||
xbmc/osx/Info.plist \
|
||||
xbmc/osx/ios/XBMCIOS-Info.plist \
|
||||
xbmc/osx/atv2/XBMCATV2-Info.plist \
|
||||
- project/cmake/xbmc-config.cmake \
|
||||
+ project/cmake/kodi-config.cmake \
|
||||
tools/android/packaging/xbmc/AndroidManifest.xml \
|
||||
tools/android/packaging/Makefile \
|
||||
tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java \
|
||||
diff -Naur xbmc-14-31ce987/.gitignore xbmc-14-31ce987.patch/.gitignore
|
||||
--- xbmc-14-31ce987/.gitignore 2014-10-20 02:31:03.272864215 +0200
|
||||
+++ xbmc-14-31ce987.patch/.gitignore 2014-10-20 12:49:03.991834753 +0200
|
||||
@@ -337,7 +337,7 @@
|
||||
/project/output
|
||||
|
||||
# /project/cmake
|
||||
-/project/cmake/xbmc-config.cmake
|
||||
+/project/cmake/kodi-config.cmake
|
||||
/project/cmake/*.error
|
||||
/project/cmake/addons/build
|
||||
/project/cmake/addons/depends/build
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/addons/CMakeLists.txt xbmc-14-31ce987.patch/project/cmake/addons/CMakeLists.txt
|
||||
--- xbmc-14-31ce987/project/cmake/addons/CMakeLists.txt 2014-10-18 12:14:11.000000000 +0200
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/addons/CMakeLists.txt 2014-10-20 12:47:44.298691059 +0200
|
||||
@@ -70,14 +70,14 @@
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
- # copy the xbmc-prepare-env.cmake script to the depends path so that we can include it
|
||||
- file(COPY ${XBMCROOT}/project/cmake/scripts/common/xbmc-prepare-env.cmake DESTINATION ${DEPENDS_PATH}/lib/xbmc)
|
||||
+ # copy the kodi-prepare-env.cmake script to the depends path so that we can include it
|
||||
+ file(COPY ${XBMCROOT}/project/cmake/scripts/common/kodi-prepare-env.cmake DESTINATION ${DEPENDS_PATH}/lib/kodi)
|
||||
|
||||
- # add the location of xbmc-prepare-env.cmake to CMAKE_MODULE_PATH so that it is found
|
||||
- list(APPEND CMAKE_MODULE_PATH ${DEPENDS_PATH}/lib/xbmc)
|
||||
+ # add the location of kodi-prepare-env.cmake to CMAKE_MODULE_PATH so that it is found
|
||||
+ list(APPEND CMAKE_MODULE_PATH ${DEPENDS_PATH}/lib/kodi)
|
||||
|
||||
- # include xbmc-prepare-env.cmake which contains the logic to install the addon header bindings etc
|
||||
- include(xbmc-prepare-env)
|
||||
+ # include kodi-prepare-env.cmake which contains the logic to install the addon header bindings etc
|
||||
+ include(kodi-prepare-env)
|
||||
endif()
|
||||
|
||||
### get and build all the binary addons
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt xbmc-14-31ce987.patch/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt
|
||||
--- xbmc-14-31ce987/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt 2014-10-18 12:14:11.000000000 +0200
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/addons/depends/windows/cmake/xbmc/CMakeLists.txt 2014-10-20 12:46:06.181514316 +0200
|
||||
@@ -21,11 +21,11 @@
|
||||
get_filename_component(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
|
||||
|
||||
### prepare the environment
|
||||
-# set the DEPENDS_PATH variable used by xbmc-prepare-env
|
||||
+# set the DEPENDS_PATH variable used by kodi-prepare-env
|
||||
set(DEPENDS_PATH "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
-# copy the xbmc-prepare-env.cmake script so that we can include it
|
||||
-file(COPY ${XBMCROOT}/project/cmake/scripts/common/xbmc-prepare-env.cmake DESTINATION ${CMAKE_BINARY_DIR})
|
||||
+# copy the kodi-prepare-env.cmake script so that we can include it
|
||||
+file(COPY ${XBMCROOT}/project/cmake/scripts/common/kodi-prepare-env.cmake DESTINATION ${CMAKE_BINARY_DIR})
|
||||
|
||||
-# include xbmc-prepare-env.cmake which contains the logic to install the addon header bindings etc
|
||||
-include(xbmc-prepare-env)
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
+# include kodi-prepare-env.cmake which contains the logic to install the addon header bindings etc
|
||||
+include(kodi-prepare-env)
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/addons/README xbmc-14-31ce987.patch/project/cmake/addons/README
|
||||
--- xbmc-14-31ce987/project/cmake/addons/README 2014-10-18 12:14:11.000000000 +0200
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/addons/README 2014-10-20 12:44:44.880370598 +0200
|
||||
@@ -33,8 +33,8 @@
|
||||
* XBMCROOT points to the root directory of the xbmc project (default is the
|
||||
absolute representation of ../../.. starting from this directory).
|
||||
* PACKAGE_ZIP=1 will mean the add-ons will be 'packaged' into a common folder,
|
||||
- rather than being placed in <CMAKE_INSTALL_PREFIX>/lib/xbmc/addons and
|
||||
- <CMAKE_INSTALL_PREFIX>/share/xbmc/addons.
|
||||
+ rather than being placed in <CMAKE_INSTALL_PREFIX>/lib/kodi/addons and
|
||||
+ <CMAKE_INSTALL_PREFIX>/share/kodi/addons.
|
||||
* ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines
|
||||
(defaults to empty).
|
||||
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/kodi-config.cmake.in xbmc-14-31ce987.patch/project/cmake/kodi-config.cmake.in
|
||||
--- xbmc-14-31ce987/project/cmake/kodi-config.cmake.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/kodi-config.cmake.in 2014-10-20 13:11:45.147629367 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+SET(XBMC_INCLUDE_DIR @prefix@/include)
|
||||
+SET(APP_NAME @APP_NAME@)
|
||||
+SET(APP_VERSION_MAJOR @APP_VERSION_MAJOR@)
|
||||
+SET(APP_VERSION_MINOR @APP_VERSION_MINOR@)
|
||||
+LIST(APPEND CMAKE_MODULE_PATH @prefix@/lib/kodi)
|
||||
+ADD_DEFINITIONS(@ARCH_DEFINES@)
|
||||
+
|
||||
+include(kodi-addon-helpers)
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/scripts/common/kodi-addon-helpers.cmake xbmc-14-31ce987.patch/project/cmake/scripts/common/kodi-addon-helpers.cmake
|
||||
--- xbmc-14-31ce987/project/cmake/scripts/common/kodi-addon-helpers.cmake 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/scripts/common/kodi-addon-helpers.cmake 2014-10-20 02:39:16.065509547 +0200
|
||||
@@ -0,0 +1,99 @@
|
||||
+# Workaround for the fact that cpack's filenames are not customizable.
|
||||
+# Each add-on is added as a separate component to facilitate zip/tgz packaging.
|
||||
+# The filenames are always of the form basename-component, which is
|
||||
+# incompatible with the addonid-version scheme we want. This hack renames
|
||||
+# the files from the file names generated by the 'package' target.
|
||||
+# Sadly we cannot extend the 'package' target, as it is a builtin target, see
|
||||
+# http://public.kitware.com/Bug/view.php?id=8438
|
||||
+# Thus, we have to add an 'addon-package' target.
|
||||
+add_custom_target(addon-package
|
||||
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target package)
|
||||
+
|
||||
+macro(add_cpack_workaround target version ext)
|
||||
+ add_custom_command(TARGET addon-package PRE_BUILD
|
||||
+ COMMAND ${CMAKE_COMMAND} -E rename addon-${target}-${version}.${ext} ${target}-${version}.${ext})
|
||||
+endmacro()
|
||||
+
|
||||
+# Grab the version from a given add-on's addon.xml
|
||||
+macro (addon_version dir prefix)
|
||||
+ FILE(READ ${dir}/addon.xml ADDONXML)
|
||||
+ STRING(REGEX MATCH "<addon[^>]*version.?=.?.[0-9\\.]+" VERSION_STRING ${ADDONXML})
|
||||
+ STRING(REGEX REPLACE ".*version=.([0-9\\.]+).*" "\\1" ${prefix}_VERSION ${VERSION_STRING})
|
||||
+ message(STATUS ${prefix}_VERSION=${${prefix}_VERSION})
|
||||
+endmacro()
|
||||
+
|
||||
+# Build, link and optionally package an add-on
|
||||
+macro (build_addon target prefix libs)
|
||||
+ ADD_LIBRARY(${target} ${${prefix}_SOURCES})
|
||||
+ TARGET_LINK_LIBRARIES(${target} ${${libs}})
|
||||
+ addon_version(${target} ${prefix})
|
||||
+ SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${${prefix}_VERSION}
|
||||
+ SOVERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}
|
||||
+ PREFIX "")
|
||||
+ IF(OS STREQUAL "android")
|
||||
+ SET_TARGET_PROPERTIES(${target} PROPERTIES PREFIX "lib")
|
||||
+ ENDIF(OS STREQUAL "android")
|
||||
+
|
||||
+ # set zip as default if addon-package is called without PACKAGE_XXX
|
||||
+ SET(CPACK_GENERATOR "ZIP")
|
||||
+ SET(ext "zip")
|
||||
+ IF(PACKAGE_ZIP OR PACKAGE_TGZ)
|
||||
+ IF(PACKAGE_TGZ)
|
||||
+ SET(CPACK_GENERATOR "TGZ")
|
||||
+ SET(ext "tar.gz")
|
||||
+ ENDIF(PACKAGE_TGZ)
|
||||
+ SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
+ set(CPACK_PACKAGE_FILE_NAME addon)
|
||||
+ IF(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
+ SET(CPACK_STRIP_FILES TRUE)
|
||||
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
+ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
+ set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
|
||||
+ list(APPEND CPACK_COMPONENTS_ALL ${target}-${${prefix}_VERSION})
|
||||
+ # Pack files together to create an archive
|
||||
+ INSTALL(DIRECTORY ${target} DESTINATION ./ COMPONENT ${target}-${${prefix}_VERSION})
|
||||
+ IF(WIN32)
|
||||
+ INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/${target}.dll
|
||||
+ DESTINATION ${target}
|
||||
+ COMPONENT ${target}-${${prefix}_VERSION})
|
||||
+ ELSE(WIN32)
|
||||
+ INSTALL(TARGETS ${target} DESTINATION ${target}
|
||||
+ COMPONENT ${target}-${${prefix}_VERSION})
|
||||
+ ENDIF(WIN32)
|
||||
+ add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext})
|
||||
+ ELSE(PACKAGE_ZIP OR PACKAGE_TGZ)
|
||||
+ INSTALL(TARGETS ${target} DESTINATION lib/kodi/addons/${target})
|
||||
+ INSTALL(DIRECTORY ${target} DESTINATION share/kodi/addons)
|
||||
+ ENDIF(PACKAGE_ZIP OR PACKAGE_TGZ)
|
||||
+endmacro()
|
||||
+
|
||||
+# finds a path to a given file (recursive)
|
||||
+function (xbmc_find_path var_name filename search_path strip_file)
|
||||
+ file(GLOB_RECURSE PATH_TO_FILE ${search_path} ${filename})
|
||||
+ if(strip_file)
|
||||
+ string(REPLACE ${filename} "" PATH_TO_FILE ${PATH_TO_FILE})
|
||||
+ endif(strip_file)
|
||||
+ set (${var_name} ${PATH_TO_FILE} PARENT_SCOPE)
|
||||
+endfunction()
|
||||
+
|
||||
+# Cmake build options
|
||||
+include(addoptions)
|
||||
+include(TestCXXAcceptsFlag)
|
||||
+OPTION(PACKAGE_ZIP "Package Zip file?" OFF)
|
||||
+OPTION(PACKAGE_TGZ "Package TGZ file?" OFF)
|
||||
+OPTION(BUILD_SHARED_LIBS "Build shared libs?" ON)
|
||||
+
|
||||
+# LTO support?
|
||||
+CHECK_CXX_ACCEPTS_FLAG("-flto" HAVE_LTO)
|
||||
+IF(HAVE_LTO)
|
||||
+ OPTION(USE_LTO "use link time optimization" OFF)
|
||||
+ IF(USE_LTO)
|
||||
+ add_options(ALL_LANGUAGES ALL_BUILDS "-flto")
|
||||
+ ENDIF(USE_LTO)
|
||||
+ENDIF(HAVE_LTO)
|
||||
+
|
||||
+# set this to try linking dependencies as static as possible
|
||||
+IF(ADDONS_PREFER_STATIC_LIBS)
|
||||
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
+ENDIF(ADDONS_PREFER_STATIC_LIBS)
|
||||
+
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/scripts/common/kodi-prepare-env.cmake xbmc-14-31ce987.patch/project/cmake/scripts/common/kodi-prepare-env.cmake
|
||||
--- xbmc-14-31ce987/project/cmake/scripts/common/kodi-prepare-env.cmake 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/scripts/common/kodi-prepare-env.cmake 2014-10-20 12:42:39.118143975 +0200
|
||||
@@ -0,0 +1,46 @@
|
||||
+# parse version.txt to get the version info
|
||||
+if(EXISTS "${XBMCROOT}/version.txt")
|
||||
+ file(STRINGS "${XBMCROOT}/version.txt" versions)
|
||||
+ foreach (version ${versions})
|
||||
+ string(REGEX MATCH "^[^ ]+" version_name ${version})
|
||||
+ string(REPLACE "${version_name} " "" version_value ${version})
|
||||
+ set(APP_${version_name} "${version_value}")
|
||||
+ endforeach()
|
||||
+endif()
|
||||
+
|
||||
+# bail if we can't parse versions
|
||||
+if(NOT DEFINED APP_VERSION_MAJOR OR NOT DEFINED APP_VERSION_MINOR)
|
||||
+ message(FATAL_ERROR "Could not determine app version! make sure that ${XBMCROOT}/version.txt exists")
|
||||
+endif()
|
||||
+
|
||||
+### copy all the addon binding header files to include/kodi
|
||||
+# make sure include/kodi exists and is empty
|
||||
+set(XBMC_LIB_DIR ${DEPENDS_PATH}/lib/kodi)
|
||||
+if(NOT EXISTS "${XBMC_LIB_DIR}/")
|
||||
+ file(MAKE_DIRECTORY ${XBMC_LIB_DIR})
|
||||
+endif()
|
||||
+
|
||||
+set(XBMC_INCLUDE_DIR ${DEPENDS_PATH}/include/kodi)
|
||||
+if(NOT EXISTS "${XBMC_INCLUDE_DIR}/")
|
||||
+ file(MAKE_DIRECTORY ${XBMC_INCLUDE_DIR})
|
||||
+endif()
|
||||
+
|
||||
+# kodi-config.cmake.in (further down) expects a "prefix" variable
|
||||
+get_filename_component(prefix "${DEPENDS_PATH}" ABSOLUTE)
|
||||
+
|
||||
+# generate the proper kodi-config.cmake file
|
||||
+configure_file(${XBMCROOT}/project/cmake/kodi-config.cmake.in ${XBMC_LIB_DIR}/kodi-config.cmake @ONLY)
|
||||
+# copy cmake helpers to lib/kodi
|
||||
+file(COPY ${XBMCROOT}/project/cmake/scripts/common/kodi-addon-helpers.cmake ${XBMCROOT}/project/cmake/scripts/common/addoptions.cmake DESTINATION ${XBMC_LIB_DIR})
|
||||
+
|
||||
+### copy all the addon binding header files to include/kodi
|
||||
+# parse addon-bindings.mk to get the list of header files to copy
|
||||
+file(STRINGS ${XBMCROOT}/xbmc/addons/addon-bindings.mk bindings)
|
||||
+string(REPLACE "\n" ";" bindings "${bindings}")
|
||||
+foreach(binding ${bindings})
|
||||
+ string(REPLACE " =" ";" binding "${binding}")
|
||||
+ string(REPLACE "+=" ";" binding "${binding}")
|
||||
+ list(GET binding 1 header)
|
||||
+ # copy the header file to include/kodi
|
||||
+ file(COPY ${XBMCROOT}/${header} DESTINATION ${XBMC_INCLUDE_DIR})
|
||||
+endforeach()
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/scripts/common/xbmc-addon-helpers.cmake xbmc-14-31ce987.patch/project/cmake/scripts/common/xbmc-addon-helpers.cmake
|
||||
--- xbmc-14-31ce987/project/cmake/scripts/common/xbmc-addon-helpers.cmake 2014-10-18 12:14:11.000000000 +0200
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/scripts/common/xbmc-addon-helpers.cmake 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,99 +0,0 @@
|
||||
-# Workaround for the fact that cpack's filenames are not customizable.
|
||||
-# Each add-on is added as a separate component to facilitate zip/tgz packaging.
|
||||
-# The filenames are always of the form basename-component, which is
|
||||
-# incompatible with the addonid-version scheme we want. This hack renames
|
||||
-# the files from the file names generated by the 'package' target.
|
||||
-# Sadly we cannot extend the 'package' target, as it is a builtin target, see
|
||||
-# http://public.kitware.com/Bug/view.php?id=8438
|
||||
-# Thus, we have to add an 'addon-package' target.
|
||||
-add_custom_target(addon-package
|
||||
- COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target package)
|
||||
-
|
||||
-macro(add_cpack_workaround target version ext)
|
||||
- add_custom_command(TARGET addon-package PRE_BUILD
|
||||
- COMMAND ${CMAKE_COMMAND} -E rename addon-${target}-${version}.${ext} ${target}-${version}.${ext})
|
||||
-endmacro()
|
||||
-
|
||||
-# Grab the version from a given add-on's addon.xml
|
||||
-macro (addon_version dir prefix)
|
||||
- FILE(READ ${dir}/addon.xml ADDONXML)
|
||||
- STRING(REGEX MATCH "<addon[^>]*version.?=.?.[0-9\\.]+" VERSION_STRING ${ADDONXML})
|
||||
- STRING(REGEX REPLACE ".*version=.([0-9\\.]+).*" "\\1" ${prefix}_VERSION ${VERSION_STRING})
|
||||
- message(STATUS ${prefix}_VERSION=${${prefix}_VERSION})
|
||||
-endmacro()
|
||||
-
|
||||
-# Build, link and optionally package an add-on
|
||||
-macro (build_addon target prefix libs)
|
||||
- ADD_LIBRARY(${target} ${${prefix}_SOURCES})
|
||||
- TARGET_LINK_LIBRARIES(${target} ${${libs}})
|
||||
- addon_version(${target} ${prefix})
|
||||
- SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${${prefix}_VERSION}
|
||||
- SOVERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}
|
||||
- PREFIX "")
|
||||
- IF(OS STREQUAL "android")
|
||||
- SET_TARGET_PROPERTIES(${target} PROPERTIES PREFIX "lib")
|
||||
- ENDIF(OS STREQUAL "android")
|
||||
-
|
||||
- # set zip as default if addon-package is called without PACKAGE_XXX
|
||||
- SET(CPACK_GENERATOR "ZIP")
|
||||
- SET(ext "zip")
|
||||
- IF(PACKAGE_ZIP OR PACKAGE_TGZ)
|
||||
- IF(PACKAGE_TGZ)
|
||||
- SET(CPACK_GENERATOR "TGZ")
|
||||
- SET(ext "tar.gz")
|
||||
- ENDIF(PACKAGE_TGZ)
|
||||
- SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
- set(CPACK_PACKAGE_FILE_NAME addon)
|
||||
- IF(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
- SET(CPACK_STRIP_FILES TRUE)
|
||||
- ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
- set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
- set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
|
||||
- list(APPEND CPACK_COMPONENTS_ALL ${target}-${${prefix}_VERSION})
|
||||
- # Pack files together to create an archive
|
||||
- INSTALL(DIRECTORY ${target} DESTINATION ./ COMPONENT ${target}-${${prefix}_VERSION})
|
||||
- IF(WIN32)
|
||||
- INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/${target}.dll
|
||||
- DESTINATION ${target}
|
||||
- COMPONENT ${target}-${${prefix}_VERSION})
|
||||
- ELSE(WIN32)
|
||||
- INSTALL(TARGETS ${target} DESTINATION ${target}
|
||||
- COMPONENT ${target}-${${prefix}_VERSION})
|
||||
- ENDIF(WIN32)
|
||||
- add_cpack_workaround(${target} ${${prefix}_VERSION} ${ext})
|
||||
- ELSE(PACKAGE_ZIP OR PACKAGE_TGZ)
|
||||
- INSTALL(TARGETS ${target} DESTINATION lib/xbmc/addons/${target})
|
||||
- INSTALL(DIRECTORY ${target} DESTINATION share/xbmc/addons)
|
||||
- ENDIF(PACKAGE_ZIP OR PACKAGE_TGZ)
|
||||
-endmacro()
|
||||
-
|
||||
-# finds a path to a given file (recursive)
|
||||
-function (xbmc_find_path var_name filename search_path strip_file)
|
||||
- file(GLOB_RECURSE PATH_TO_FILE ${search_path} ${filename})
|
||||
- if(strip_file)
|
||||
- string(REPLACE ${filename} "" PATH_TO_FILE ${PATH_TO_FILE})
|
||||
- endif(strip_file)
|
||||
- set (${var_name} ${PATH_TO_FILE} PARENT_SCOPE)
|
||||
-endfunction()
|
||||
-
|
||||
-# Cmake build options
|
||||
-include(addoptions)
|
||||
-include(TestCXXAcceptsFlag)
|
||||
-OPTION(PACKAGE_ZIP "Package Zip file?" OFF)
|
||||
-OPTION(PACKAGE_TGZ "Package TGZ file?" OFF)
|
||||
-OPTION(BUILD_SHARED_LIBS "Build shared libs?" ON)
|
||||
-
|
||||
-# LTO support?
|
||||
-CHECK_CXX_ACCEPTS_FLAG("-flto" HAVE_LTO)
|
||||
-IF(HAVE_LTO)
|
||||
- OPTION(USE_LTO "use link time optimization" OFF)
|
||||
- IF(USE_LTO)
|
||||
- add_options(ALL_LANGUAGES ALL_BUILDS "-flto")
|
||||
- ENDIF(USE_LTO)
|
||||
-ENDIF(HAVE_LTO)
|
||||
-
|
||||
-# set this to try linking dependencies as static as possible
|
||||
-IF(ADDONS_PREFER_STATIC_LIBS)
|
||||
- SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
-ENDIF(ADDONS_PREFER_STATIC_LIBS)
|
||||
-
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/scripts/common/xbmc-prepare-env.cmake xbmc-14-31ce987.patch/project/cmake/scripts/common/xbmc-prepare-env.cmake
|
||||
--- xbmc-14-31ce987/project/cmake/scripts/common/xbmc-prepare-env.cmake 2014-10-18 12:14:11.000000000 +0200
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/scripts/common/xbmc-prepare-env.cmake 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,46 +0,0 @@
|
||||
-# parse version.txt to get the version info
|
||||
-if(EXISTS "${XBMCROOT}/version.txt")
|
||||
- file(STRINGS "${XBMCROOT}/version.txt" versions)
|
||||
- foreach (version ${versions})
|
||||
- string(REGEX MATCH "^[^ ]+" version_name ${version})
|
||||
- string(REPLACE "${version_name} " "" version_value ${version})
|
||||
- set(APP_${version_name} "${version_value}")
|
||||
- endforeach()
|
||||
-endif()
|
||||
-
|
||||
-# bail if we can't parse versions
|
||||
-if(NOT DEFINED APP_VERSION_MAJOR OR NOT DEFINED APP_VERSION_MINOR)
|
||||
- message(FATAL_ERROR "Could not determine app version! make sure that ${XBMCROOT}/version.txt exists")
|
||||
-endif()
|
||||
-
|
||||
-### copy all the addon binding header files to include/xbmc
|
||||
-# make sure include/xbmc exists and is empty
|
||||
-set(XBMC_LIB_DIR ${DEPENDS_PATH}/lib/xbmc)
|
||||
-if(NOT EXISTS "${XBMC_LIB_DIR}/")
|
||||
- file(MAKE_DIRECTORY ${XBMC_LIB_DIR})
|
||||
-endif()
|
||||
-
|
||||
-set(XBMC_INCLUDE_DIR ${DEPENDS_PATH}/include/xbmc)
|
||||
-if(NOT EXISTS "${XBMC_INCLUDE_DIR}/")
|
||||
- file(MAKE_DIRECTORY ${XBMC_INCLUDE_DIR})
|
||||
-endif()
|
||||
-
|
||||
-# xbmc-config.cmake.in (further down) expects a "prefix" variable
|
||||
-get_filename_component(prefix "${DEPENDS_PATH}" ABSOLUTE)
|
||||
-
|
||||
-# generate the proper xbmc-config.cmake file
|
||||
-configure_file(${XBMCROOT}/project/cmake/xbmc-config.cmake.in ${XBMC_LIB_DIR}/xbmc-config.cmake @ONLY)
|
||||
-# copy cmake helpers to lib/xbmc
|
||||
-file(COPY ${XBMCROOT}/project/cmake/scripts/common/xbmc-addon-helpers.cmake ${XBMCROOT}/project/cmake/scripts/common/addoptions.cmake DESTINATION ${XBMC_LIB_DIR})
|
||||
-
|
||||
-### copy all the addon binding header files to include/xbmc
|
||||
-# parse addon-bindings.mk to get the list of header files to copy
|
||||
-file(STRINGS ${XBMCROOT}/xbmc/addons/addon-bindings.mk bindings)
|
||||
-string(REPLACE "\n" ";" bindings "${bindings}")
|
||||
-foreach(binding ${bindings})
|
||||
- string(REPLACE " =" ";" binding "${binding}")
|
||||
- string(REPLACE "+=" ";" binding "${binding}")
|
||||
- list(GET binding 1 header)
|
||||
- # copy the header file to include/xbmc
|
||||
- file(COPY ${XBMCROOT}/${header} DESTINATION ${XBMC_INCLUDE_DIR})
|
||||
-endforeach()
|
||||
\ Kein Zeilenumbruch am Dateiende.
|
||||
diff -Naur xbmc-14-31ce987/project/cmake/xbmc-config.cmake.in xbmc-14-31ce987.patch/project/cmake/xbmc-config.cmake.in
|
||||
--- xbmc-14-31ce987/project/cmake/xbmc-config.cmake.in 2014-10-18 12:14:11.000000000 +0200
|
||||
+++ xbmc-14-31ce987.patch/project/cmake/xbmc-config.cmake.in 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,8 +0,0 @@
|
||||
-SET(XBMC_INCLUDE_DIR @prefix@/include)
|
||||
-SET(APP_NAME @APP_NAME@)
|
||||
-SET(APP_VERSION_MAJOR @APP_VERSION_MAJOR@)
|
||||
-SET(APP_VERSION_MINOR @APP_VERSION_MINOR@)
|
||||
-LIST(APPEND CMAKE_MODULE_PATH @prefix@/lib/xbmc)
|
||||
-ADD_DEFINITIONS(@ARCH_DEFINES@)
|
||||
-
|
||||
-include(xbmc-addon-helpers)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,334 +0,0 @@
|
||||
From 4037c9fd07fbec1873549e71e0b1c2833a5a87db Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 14:42:30 +0100
|
||||
Subject: [PATCH 1/8] [CEC] fixed: don't try to stick a value > 255 in a byte
|
||||
|
||||
---
|
||||
system/peripherals.xml | 2 +-
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/system/peripherals.xml b/system/peripherals.xml
|
||||
index 57af5d1..5fcff7c 100644
|
||||
--- a/system/peripherals.xml
|
||||
+++ b/system/peripherals.xml
|
||||
@@ -30,7 +30,7 @@
|
||||
<setting key="device_type" type="int" value="1" configurable="0" />
|
||||
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
|
||||
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
|
||||
- <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
|
||||
+ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
|
||||
</peripheral>
|
||||
|
||||
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index 9907ba2..1d068dc 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -1347,8 +1347,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
||||
m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
|
||||
|
||||
- // double tap prevention timeout in ms
|
||||
- m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
|
||||
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
|
||||
+ m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms") / 50;
|
||||
}
|
||||
|
||||
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
|
||||
|
||||
From c82453eaf7af90d1c0a8846776d77fb62bd14246 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 12:29:09 +0100
|
||||
Subject: [PATCH 2/8] [CEC] bump libCEC to 2.2.0
|
||||
|
||||
---
|
||||
project/BuildDependencies/scripts/libcec_d.txt | 2 +-
|
||||
tools/depends/target/libcec/Makefile | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt
|
||||
index a126c74..3d0265e 100644
|
||||
--- a/project/BuildDependencies/scripts/libcec_d.txt
|
||||
+++ b/project/BuildDependencies/scripts/libcec_d.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
; filename source of the file
|
||||
|
||||
-libcec-2.1.4.zip http://mirrors.xbmc.org/build-deps/win32/
|
||||
+libcec-2.2.0-win32.zip http://mirrors.xbmc.org/build-deps/win32/
|
||||
diff --git a/tools/depends/target/libcec/Makefile b/tools/depends/target/libcec/Makefile
|
||||
index 16fec1b..0f54921 100644
|
||||
--- a/tools/depends/target/libcec/Makefile
|
||||
+++ b/tools/depends/target/libcec/Makefile
|
||||
@@ -3,9 +3,9 @@ DEPS= ../../Makefile.include Makefile
|
||||
|
||||
# lib name, version
|
||||
LIBNAME=libcec
|
||||
-VERSION=2.1.4
|
||||
-SOURCE=$(LIBNAME)-$(VERSION)-2
|
||||
-ARCHIVE=$(SOURCE).tar.gz
|
||||
+VERSION=2.2.0
|
||||
+SOURCE=$(LIBNAME)-$(VERSION)
|
||||
+ARCHIVE=$(SOURCE)-2.tar.gz
|
||||
|
||||
# configuration settings
|
||||
CONFIGURE=./configure --prefix=$(PREFIX) --disable-rpi \
|
||||
|
||||
From b5f567522961409e70eceba9629f7906069b1e0f Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 15:32:36 +0100
|
||||
Subject: [PATCH 3/8] [CEC] prevent bus rescan on a Pi, since the adapter
|
||||
cannot be removed
|
||||
|
||||
---
|
||||
xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
index b02535a..4941ae6 100644
|
||||
--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
+++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
@@ -101,6 +101,8 @@ bool CPeripheralBusCEC::PerformDeviceScan(PeripheralScanResults &results)
|
||||
break;
|
||||
case ADAPTERTYPE_RPI:
|
||||
result.m_mappedBusType = PERIPHERAL_BUS_RPI;
|
||||
+ /** the Pi's adapter cannot be removed, no need to rescan */
|
||||
+ m_bNeedsPolling = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
From 9b573e0fdb666339beb1f4cc6104c8c0d0f93829 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 21:01:00 +0100
|
||||
Subject: [PATCH 4/8] [CEC] fixed: don't return garbage from CEC related app
|
||||
messenger methods see
|
||||
https://github.com/xbmc/xbmc/commit/19d37944ca2a2ac2f3e71a40a94e9ea289d8f2db#commitcomment-8248480
|
||||
|
||||
---
|
||||
xbmc/Application.cpp | 14 ++++++++------
|
||||
xbmc/ApplicationMessenger.cpp | 20 +++++---------------
|
||||
xbmc/ApplicationMessenger.h | 4 ++--
|
||||
3 files changed, 15 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
|
||||
index d5604dc..4d26183 100644
|
||||
--- a/xbmc/Application.cpp
|
||||
+++ b/xbmc/Application.cpp
|
||||
@@ -2366,16 +2366,18 @@ bool CApplication::OnKey(const CKey& key)
|
||||
|
||||
if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState") || StringUtils::StartsWithNoCase(action.GetName(),"CECStandby"))
|
||||
{
|
||||
- bool ret = true;
|
||||
-
|
||||
- CLog::LogF(LOGDEBUG, "action %s [%d], toggling state of playing device", action.GetName().c_str(), action.GetID());
|
||||
// do not wake up the screensaver right after switching off the playing device
|
||||
if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState"))
|
||||
- ret = CApplicationMessenger::Get().CECToggleState();
|
||||
+ {
|
||||
+ CLog::LogF(LOGDEBUG, "action %s [%d], toggling state of playing device", action.GetName().c_str(), action.GetID());
|
||||
+ if (!CApplicationMessenger::Get().CECToggleState())
|
||||
+ return true;
|
||||
+ }
|
||||
else
|
||||
- ret = CApplicationMessenger::Get().CECStandby();
|
||||
- if (!ret) /* display is switched off */
|
||||
+ {
|
||||
+ CApplicationMessenger::Get().CECStandby();
|
||||
return true;
|
||||
+ }
|
||||
}
|
||||
|
||||
ResetScreenSaver();
|
||||
diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
|
||||
index 1a59c5c..d228273 100644
|
||||
--- a/xbmc/ApplicationMessenger.cpp
|
||||
+++ b/xbmc/ApplicationMessenger.cpp
|
||||
@@ -843,12 +843,12 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
|
||||
}
|
||||
case TMSG_CECACTIVATESOURCE:
|
||||
{
|
||||
- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE);
|
||||
+ g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE);
|
||||
break;
|
||||
}
|
||||
case TMSG_CECSTANDBY:
|
||||
{
|
||||
- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_STANDBY);
|
||||
+ g_peripherals.ToggleDeviceState(STATE_STANDBY);
|
||||
break;
|
||||
}
|
||||
case TMSG_START_ANDROID_ACTIVITY:
|
||||
@@ -1396,29 +1396,19 @@ bool CApplicationMessenger::CECToggleState()
|
||||
|
||||
ThreadMessage tMsg = {TMSG_CECTOGGLESTATE};
|
||||
tMsg.lpVoid = (void*)&result;
|
||||
- SendMessage(tMsg, false);
|
||||
+ SendMessage(tMsg, true);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
-bool CApplicationMessenger::CECActivateSource()
|
||||
+void CApplicationMessenger::CECActivateSource()
|
||||
{
|
||||
- bool result;
|
||||
-
|
||||
ThreadMessage tMsg = {TMSG_CECACTIVATESOURCE};
|
||||
- tMsg.lpVoid = (void*)&result;
|
||||
SendMessage(tMsg, false);
|
||||
-
|
||||
- return result;
|
||||
}
|
||||
|
||||
-bool CApplicationMessenger::CECStandby()
|
||||
+void CApplicationMessenger::CECStandby()
|
||||
{
|
||||
- bool result;
|
||||
-
|
||||
ThreadMessage tMsg = {TMSG_CECSTANDBY};
|
||||
- tMsg.lpVoid = (void*)&result;
|
||||
SendMessage(tMsg, false);
|
||||
-
|
||||
- return result;
|
||||
}
|
||||
diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h
|
||||
index 9013567..543e065 100644
|
||||
--- a/xbmc/ApplicationMessenger.h
|
||||
+++ b/xbmc/ApplicationMessenger.h
|
||||
@@ -219,8 +219,8 @@ class CApplicationMessenger
|
||||
|
||||
void LoadProfile(unsigned int idx);
|
||||
bool CECToggleState();
|
||||
- bool CECActivateSource();
|
||||
- bool CECStandby();
|
||||
+ void CECActivateSource();
|
||||
+ void CECStandby();
|
||||
|
||||
CStdString GetResponse();
|
||||
int SetResponse(CStdString response);
|
||||
|
||||
From 3e0a6a3d083fbc3773517b6d8846a5bd86e03004 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Tue, 28 Oct 2014 14:52:16 +0100
|
||||
Subject: [PATCH 5/8] [CEC] renamed the iDoubleTapTimeoutMs in the new libCEC
|
||||
for clarity. does not change binary compatibility
|
||||
|
||||
---
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index 1d068dc..ad123d9 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -1347,8 +1347,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
||||
m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
|
||||
|
||||
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
|
||||
// double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
|
||||
- m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms") / 50;
|
||||
+ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
|
||||
+#else
|
||||
+ // backwards compatibility. will be removed once the next major release of libCEC is out
|
||||
+ m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
|
||||
+#endif
|
||||
}
|
||||
|
||||
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
|
||||
|
||||
From 3d6cc38152adbd67cb2ef633e0e5a6f098ec619c Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Tue, 28 Oct 2014 16:08:00 +0100
|
||||
Subject: [PATCH 6/8] [CEC] fixed - don't use CEC_CLIENT_VERSION_CURRENT for
|
||||
the client version, because it will lead to issues when XBMC is rebuilt after
|
||||
a libCEC bump that changes something
|
||||
|
||||
---
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index ad123d9..015daef 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -1268,8 +1268,8 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
|
||||
|
||||
void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
{
|
||||
- // use the same client version as libCEC version
|
||||
- m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
|
||||
+ // client version matches the version of libCEC that we originally used the API from
|
||||
+ m_configuration.clientVersion = CEC_CLIENT_VERSION_2_2_0;
|
||||
|
||||
// device name 'XBMC'
|
||||
snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
|
||||
|
||||
From da8c086eb4f644c5c607d7a721511230e9a078c0 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Fri, 31 Oct 2014 12:08:03 +0100
|
||||
Subject: [PATCH 7/8] [CEC] use device name 'Kodi' instead of 'XBMC'
|
||||
|
||||
---
|
||||
system/peripherals.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/system/peripherals.xml b/system/peripherals.xml
|
||||
index 5fcff7c..a67dc2f 100644
|
||||
--- a/system/peripherals.xml
|
||||
+++ b/system/peripherals.xml
|
||||
@@ -26,7 +26,7 @@
|
||||
<setting key="port" type="string" value="" label="36022" order="15" />
|
||||
|
||||
<setting key="tv_vendor" type="int" value="0" configurable="0" />
|
||||
- <setting key="device_name" type="string" value="XBMC" configurable="0" />
|
||||
+ <setting key="device_name" type="string" value="Kodi" configurable="0" />
|
||||
<setting key="device_type" type="int" value="1" configurable="0" />
|
||||
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
|
||||
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
|
||||
|
||||
From b38a4e4aeebe43d76045fb376f2f9dcb18c4f78f Mon Sep 17 00:00:00 2001
|
||||
From: Karlson2k <k2k@narod.ru>
|
||||
Date: Fri, 31 Oct 2014 13:54:00 +0300
|
||||
Subject: [PATCH 8/8] [cec] [win32] Use new package format
|
||||
|
||||
---
|
||||
project/BuildDependencies/scripts/0_package.list | 1 +
|
||||
project/BuildDependencies/scripts/libcec_d.bat | 15 ---------------
|
||||
2 files changed, 1 insertion(+), 15 deletions(-)
|
||||
delete mode 100644 project/BuildDependencies/scripts/libcec_d.bat
|
||||
|
||||
diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list
|
||||
index 8127b15..e2a4a1f 100644
|
||||
--- a/project/BuildDependencies/scripts/0_package.list
|
||||
+++ b/project/BuildDependencies/scripts/0_package.list
|
||||
@@ -12,6 +12,7 @@ gnutls-3.2.3-win32.zip
|
||||
jsonschemabuilder-1.0.0-win32-3.7z
|
||||
libass-0.10.2-win32.7z
|
||||
libbluray-0.4.0-win32.zip
|
||||
+libcec-2.2.0-win32-1.7z
|
||||
libiconv-1.14-win32-vc120.7z
|
||||
libjpeg-turbo-1.2.0-win32.7z
|
||||
libnfs-1.6.2-win32.7z
|
||||
diff --git a/project/BuildDependencies/scripts/libcec_d.bat b/project/BuildDependencies/scripts/libcec_d.bat
|
||||
deleted file mode 100644
|
||||
index b5104c3..0000000
|
||||
--- a/project/BuildDependencies/scripts/libcec_d.bat
|
||||
+++ /dev/null
|
||||
@@ -1,15 +0,0 @@
|
||||
-@ECHO OFF
|
||||
-
|
||||
-SET LOC_PATH=%CD%
|
||||
-SET FILES=%LOC_PATH%\libcec_d.txt
|
||||
-
|
||||
-CALL dlextract.bat libcec %FILES%
|
||||
-
|
||||
-cd %TMP_PATH%
|
||||
-
|
||||
-mkdir "%CUR_PATH%\include\libcec"
|
||||
-xcopy libcec\include\* "%CUR_PATH%\include\libcec\." /E /Q /I /Y
|
||||
-
|
||||
-copy libcec\libcec.dll "%APP_PATH%\system\."
|
||||
-
|
||||
-cd %LOC_PATH%
|
||||
955
packages/mediacenter/kodi/patches/kodi-999.92-PR5695.patch
Normal file
955
packages/mediacenter/kodi/patches/kodi-999.92-PR5695.patch
Normal file
@@ -0,0 +1,955 @@
|
||||
From 0da54d18200aabcfdc89ea444ab191fd0365674c Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||
Date: Tue, 11 Nov 2014 21:34:44 +0100
|
||||
Subject: [PATCH 1/5] VAAPI: Use Component Logging
|
||||
|
||||
---
|
||||
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 55 ++++++++++++++++----------
|
||||
1 file changed, 35 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
|
||||
index a5e560a..ed7bd74 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "settings/Settings.h"
|
||||
#include "guilib/GraphicContext.h"
|
||||
#include "settings/MediaSettings.h"
|
||||
+#include "settings/AdvancedSettings.h"
|
||||
#include <va/va_x11.h>
|
||||
|
||||
extern "C" {
|
||||
@@ -142,7 +143,8 @@ bool CVAAPIContext::CreateContext()
|
||||
return false;
|
||||
}
|
||||
|
||||
- CLog::Log(LOGDEBUG, "VAAPI - initialize version %d.%d", major_version, minor_version);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VAAPI - initialize version %d.%d", major_version, minor_version);
|
||||
|
||||
|
||||
QueryCaps();
|
||||
@@ -174,13 +176,16 @@ void CVAAPIContext::QueryCaps()
|
||||
for(int i = 0; i < m_attributeCount; i++)
|
||||
{
|
||||
VADisplayAttribute * const display_attr = &m_attributes[i];
|
||||
- CLog::Log(LOGDEBUG, "VAAPI - attrib %d (%s/%s) min %d max %d value 0x%x\n"
|
||||
- , display_attr->type
|
||||
- ,(display_attr->flags & VA_DISPLAY_ATTRIB_GETTABLE) ? "get" : "---"
|
||||
- ,(display_attr->flags & VA_DISPLAY_ATTRIB_SETTABLE) ? "set" : "---"
|
||||
- , display_attr->min_value
|
||||
- , display_attr->max_value
|
||||
- , display_attr->value);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "VAAPI - attrib %d (%s/%s) min %d max %d value 0x%x\n"
|
||||
+ , display_attr->type
|
||||
+ ,(display_attr->flags & VA_DISPLAY_ATTRIB_GETTABLE) ? "get" : "---"
|
||||
+ ,(display_attr->flags & VA_DISPLAY_ATTRIB_SETTABLE) ? "set" : "---"
|
||||
+ , display_attr->min_value
|
||||
+ , display_attr->max_value
|
||||
+ , display_attr->value);
|
||||
+ }
|
||||
}
|
||||
|
||||
int max_profiles = vaMaxNumProfiles(m_display);
|
||||
@@ -190,7 +195,10 @@ void CVAAPIContext::QueryCaps()
|
||||
return;
|
||||
|
||||
for(int i = 0; i < m_profileCount; i++)
|
||||
- CLog::Log(LOGDEBUG, "VAAPI - profile %d", m_profiles[i]);
|
||||
+ {
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VAAPI - profile %d", m_profiles[i]);
|
||||
+ }
|
||||
}
|
||||
|
||||
VAConfigAttrib CVAAPIContext::GetAttrib(VAProfile profile)
|
||||
@@ -482,7 +490,8 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned
|
||||
if (CDVDVideoCodec::IsCodecDisabled(g_vaapi_available, settings_count, avctx->codec_id))
|
||||
return false;
|
||||
|
||||
- CLog::Log(LOGDEBUG,"VAAPI - open decoder");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG,"VAAPI - open decoder");
|
||||
|
||||
if (!CVAAPIContext::EnsureContext(&m_vaapiConfig.context, this))
|
||||
return false;
|
||||
@@ -616,7 +625,8 @@ long CDecoder::Release()
|
||||
if (m_vaapiConfigured == true)
|
||||
{
|
||||
CSingleLock lock(m_DecoderSection);
|
||||
- CLog::Log(LOGDEBUG,"VAAPI::Release pre-cleanup");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG,"VAAPI::Release pre-cleanup");
|
||||
|
||||
Message *reply;
|
||||
if (m_vaapiOutput.m_controlPort.SendOutMessageSync(COutputControlProtocol::PRECLEANUP,
|
||||
@@ -834,7 +844,8 @@ int CDecoder::Check(AVCodecContext* avctx)
|
||||
|
||||
if (state == VAAPI_LOST)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG,"VAAPI::Check waiting for display reset event");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG,"VAAPI::Check waiting for display reset event");
|
||||
if (!m_DisplayEvent.WaitMSec(4000))
|
||||
{
|
||||
CLog::Log(LOGERROR, "VAAPI::Check - device didn't reset in reasonable time");
|
||||
@@ -1071,7 +1082,8 @@ void CDecoder::FiniVAAPIOutput()
|
||||
m_vaapiConfig.contextId = VA_INVALID_ID;
|
||||
|
||||
// detroy surfaces
|
||||
- CLog::Log(LOGDEBUG, "VAAPI::FiniVAAPIOutput destroying %d video surfaces", m_videoSurfaces.Size());
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VAAPI::FiniVAAPIOutput destroying %d video surfaces", m_videoSurfaces.Size());
|
||||
VASurfaceID surf;
|
||||
while((surf = m_videoSurfaces.RemoveNext()) != VA_INVALID_SURFACE)
|
||||
{
|
||||
@@ -1827,7 +1839,8 @@ void COutput::InitCycle()
|
||||
}
|
||||
else
|
||||
{
|
||||
- CLog::Log(LOGDEBUG,"VAAPI - deinterlace method not supported, falling back to BOB");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG,"VAAPI - deinterlace method not supported, falling back to BOB");
|
||||
method = VS_INTERLACEMETHOD_RENDER_BOB;
|
||||
}
|
||||
|
||||
@@ -2073,7 +2086,8 @@ bool COutput::ProcessSyncPicture()
|
||||
}
|
||||
else
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "COutput::%s - return of invalid render pic", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "COutput::%s - return of invalid render pic", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
return busy;
|
||||
@@ -2177,8 +2191,8 @@ bool COutput::EnsureBufferPool()
|
||||
}
|
||||
|
||||
m_bufferPool.procPicId = 0;
|
||||
-
|
||||
- CLog::Log(LOGDEBUG, "VAAPI::COutput::InitBufferPool - Surfaces created");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VAAPI::COutput::InitBufferPool - Surfaces created");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2342,8 +2356,8 @@ bool COutput::CreateGlxContext()
|
||||
CLog::Log(LOGERROR, "VAAPI::COutput::CreateGlxContext - Could not make Pixmap current");
|
||||
return false;
|
||||
}
|
||||
-
|
||||
- CLog::Log(LOGDEBUG, "VAAPI::COutput::CreateGlxContext - created context");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VAAPI::COutput::CreateGlxContext - created context");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3047,7 +3061,8 @@ bool CFFmpegPostproc::Init(EINTERLACEMETHOD method)
|
||||
else if (method == VS_INTERLACEMETHOD_RENDER_BOB ||
|
||||
method == VS_INTERLACEMETHOD_NONE)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "CFFmpegPostproc::Init - skip deinterlacing");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "CFFmpegPostproc::Init - skip deinterlacing");
|
||||
avfilter_inout_free(&outputs);
|
||||
avfilter_inout_free(&inputs);
|
||||
}
|
||||
|
||||
From 5ccbe76792aa2ff0792cdc86f47ce2b893292c48 Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||
Date: Tue, 11 Nov 2014 21:37:16 +0100
|
||||
Subject: [PATCH 2/5] VDPAU: Component Logging
|
||||
|
||||
---
|
||||
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 37 ++++++++++++++++++--------
|
||||
1 file changed, 26 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
index 5760fc5..1871eb8 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
@@ -667,7 +667,8 @@ void CDecoder::SetWidthHeight(int width, int height)
|
||||
m_vdpauConfig.outWidth = width;
|
||||
m_vdpauConfig.outHeight = height;
|
||||
}
|
||||
- CLog::Log(LOGDEBUG, "CVDPAU::SetWidthHeight Setting OutWidth: %i OutHeight: %i", m_vdpauConfig.outWidth, m_vdpauConfig.outHeight);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "CVDPAU::SetWidthHeight Setting OutWidth: %i OutHeight: %i", m_vdpauConfig.outWidth, m_vdpauConfig.outHeight);
|
||||
}
|
||||
|
||||
void CDecoder::OnLostDevice()
|
||||
@@ -806,8 +807,9 @@ void CDecoder::FiniVDPAUOutput()
|
||||
if (CheckStatus(vdp_st, __LINE__))
|
||||
return;
|
||||
m_vdpauConfig.vdpDecoder = VDP_INVALID_HANDLE;
|
||||
-
|
||||
- CLog::Log(LOGDEBUG, "CVDPAU::FiniVDPAUOutput destroying %d video surfaces", m_videoSurfaces.Size());
|
||||
+
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "CVDPAU::FiniVDPAUOutput destroying %d video surfaces", m_videoSurfaces.Size());
|
||||
|
||||
VdpVideoSurface surf;
|
||||
while((surf = m_videoSurfaces.RemoveNext()) != VDP_INVALID_HANDLE)
|
||||
@@ -1047,7 +1049,10 @@ int CDecoder::Render(struct AVCodecContext *s, struct AVFrame *src,
|
||||
|
||||
uint64_t diff = CurrentHostCounter() - startTime;
|
||||
if (diff*1000/CurrentHostFrequency() > 30)
|
||||
- CLog::Log(LOGDEBUG, "CVDPAU::DrawSlice - VdpDecoderRender long decoding: %d ms, dec: %d, proc: %d, rend: %d", (int)((diff*1000)/CurrentHostFrequency()), decoded, processed, rend);
|
||||
+ {
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "CVDPAU::DrawSlice - VdpDecoderRender long decoding: %d ms, dec: %d, proc: %d, rend: %d", (int)((diff*1000)/CurrentHostFrequency()), decoded, processed, rend);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1161,7 +1166,10 @@ int CDecoder::Decode(AVCodecContext *avctx, AVFrame *pFrame)
|
||||
m_bufferStats.SetParams(diff, m_codecControl);
|
||||
}
|
||||
if (diff*1000/CurrentHostFrequency() > 50)
|
||||
- CLog::Log(LOGDEBUG,"CVDPAU::Decode long wait: %d", (int)((diff*1000)/CurrentHostFrequency()));
|
||||
+ {
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG,"CVDPAU::Decode long wait: %d", (int)((diff*1000)/CurrentHostFrequency()));
|
||||
+ }
|
||||
|
||||
if (!retval)
|
||||
{
|
||||
@@ -2996,7 +3004,9 @@ void COutput::Flush()
|
||||
it2 = m_bufferPool.glVideoSurfaceMap.find(pic->sourceIdx);
|
||||
if (it2 == m_bufferPool.glVideoSurfaceMap.end())
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "COutput::Flush - gl surface not found");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "COutput::Flush - gl surface not found");
|
||||
+
|
||||
continue;
|
||||
}
|
||||
m_config.videoSurfaces->MarkRender(it2->second.sourceVuv);
|
||||
@@ -3157,7 +3167,8 @@ bool COutput::ProcessSyncPicture()
|
||||
}
|
||||
else
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "COutput::%s - return of invalid render pic", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "COutput::%s - return of invalid render pic", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
return busy;
|
||||
@@ -3171,7 +3182,9 @@ void COutput::ProcessReturnPicture(CVdpauRenderPicture *pic)
|
||||
it = m_bufferPool.glVideoSurfaceMap.find(pic->sourceIdx);
|
||||
if (it == m_bufferPool.glVideoSurfaceMap.end())
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "COutput::ProcessReturnPicture - gl surface not found");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "COutput::ProcessReturnPicture - gl surface not found");
|
||||
+
|
||||
return;
|
||||
}
|
||||
#ifdef GL_NV_vdpau_interop
|
||||
@@ -3186,7 +3199,9 @@ void COutput::ProcessReturnPicture(CVdpauRenderPicture *pic)
|
||||
it = m_bufferPool.glOutputSurfaceMap.find(pic->sourceIdx);
|
||||
if (it == m_bufferPool.glOutputSurfaceMap.end())
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "COutput::ProcessReturnPicture - gl surface not found");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "COutput::ProcessReturnPicture - gl surface not found");
|
||||
+
|
||||
return;
|
||||
}
|
||||
#ifdef GL_NV_vdpau_interop
|
||||
@@ -3326,8 +3341,8 @@ void COutput::PreCleanup()
|
||||
CheckStatus(vdp_st, __LINE__);
|
||||
|
||||
m_bufferPool.outputSurfaces[i] = VDP_INVALID_HANDLE;
|
||||
-
|
||||
- CLog::Log(LOGDEBUG, "VDPAU::PreCleanup - released output surface");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VDPAU::PreCleanup - released output surface");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
From 7859022843ada34f84b4c6b6d7a1f1f44c452030 Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||
Date: Tue, 11 Nov 2014 21:49:45 +0100
|
||||
Subject: [PATCH 3/5] IMX: Use Component Logging
|
||||
|
||||
---
|
||||
.../dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp | 64 ++++++++++++++--------
|
||||
1 file changed, 41 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
|
||||
index adbb27e..e8ccc67 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "threads/SingleLock.h"
|
||||
#include "utils/log.h"
|
||||
#include "DVDClock.h"
|
||||
+#include "settings/AdvancedSettings.h"
|
||||
#include "threads/Atomics.h"
|
||||
|
||||
#define FRAME_ALIGN 16
|
||||
@@ -171,7 +172,8 @@ bool CDVDVideoCodecIMX::VpuOpen(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "VPU Lib version : major.minor.rel=%d.%d.%d.\n", vpuVersion.nLibMajor, vpuVersion.nLibMinor, vpuVersion.nLibRelease);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "VPU Lib version : major.minor.rel=%d.%d.%d.\n", vpuVersion.nLibMajor, vpuVersion.nLibMinor, vpuVersion.nLibRelease);
|
||||
}
|
||||
|
||||
ret = VPU_DecQueryMem(&memInfo);
|
||||
@@ -363,19 +365,23 @@ bool CDVDVideoCodecIMX::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
|
||||
}
|
||||
|
||||
m_hints = hints;
|
||||
- CLog::Log(LOGDEBUG, "Let's decode with iMX VPU\n");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "Let's decode with iMX VPU\n");
|
||||
|
||||
#ifdef MEDIAINFO
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: fpsrate %d / fpsscale %d\n", m_hints.fpsrate, m_hints.fpsscale);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: CodecID %d \n", m_hints.codec);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: StreamType %d \n", m_hints.type);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Level %d \n", m_hints.level);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Profile %d \n", m_hints.profile);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: PTS_invalid %d \n", m_hints.ptsinvalid);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Tag %d \n", m_hints.codec_tag);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: %dx%d \n", m_hints.width, m_hints.height);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: fpsrate %d / fpsscale %d\n", m_hints.fpsrate, m_hints.fpsscale);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: CodecID %d \n", m_hints.codec);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: StreamType %d \n", m_hints.type);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Level %d \n", m_hints.level);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Profile %d \n", m_hints.profile);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: PTS_invalid %d \n", m_hints.ptsinvalid);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Tag %d \n", m_hints.codec_tag);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: %dx%d \n", m_hints.width, m_hints.height);
|
||||
+ }
|
||||
{ uint8_t *pb = (uint8_t*)&m_hints.codec_tag;
|
||||
- if (isalnum(pb[0]) && isalnum(pb[1]) && isalnum(pb[2]) && isalnum(pb[3]))
|
||||
+ if ((isalnum(pb[0]) && isalnum(pb[1]) && isalnum(pb[2]) && isalnum(pb[3])) && g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Tag fourcc %c%c%c%c\n", pb[0], pb[1], pb[2], pb[3]);
|
||||
}
|
||||
if (m_hints.extrasize)
|
||||
@@ -384,10 +390,15 @@ bool CDVDVideoCodecIMX::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
|
||||
|
||||
for (unsigned int i=0; i < m_hints.extrasize; i++)
|
||||
sprintf(buf+i*2, "%02x", ((uint8_t*)m_hints.extradata)[i]);
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: extradata %d %s\n", m_hints.extrasize, buf);
|
||||
+
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: extradata %d %s\n", m_hints.extrasize, buf);
|
||||
+ }
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: %d / %d \n", m_hints.width, m_hints.height);
|
||||
+ CLog::Log(LOGDEBUG, "Decode: aspect %f - forced aspect %d\n", m_hints.aspect, m_hints.forced_aspect);
|
||||
}
|
||||
- CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: %d / %d \n", m_hints.width, m_hints.height);
|
||||
- CLog::Log(LOGDEBUG, "Decode: aspect %f - forced aspect %d\n", m_hints.aspect, m_hints.forced_aspect);
|
||||
#endif
|
||||
|
||||
m_convert_bitstream = false;
|
||||
@@ -647,11 +658,14 @@ int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts)
|
||||
ret = VPU_DecGetInitialInfo(m_vpuHandle, &m_initInfo);
|
||||
if (ret == VPU_DEC_RET_SUCCESS)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - VPU Init Stream Info : %dx%d (interlaced : %d - Minframe : %d)"\
|
||||
- " - Align : %d bytes - crop : %d %d %d %d - Q16Ratio : %x\n", __FUNCTION__,
|
||||
- m_initInfo.nPicWidth, m_initInfo.nPicHeight, m_initInfo.nInterlace, m_initInfo.nMinFrameBufferCount,
|
||||
- m_initInfo.nAddressAlignment, m_initInfo.PicCropRect.nLeft, m_initInfo.PicCropRect.nTop,
|
||||
- m_initInfo.PicCropRect.nRight, m_initInfo.PicCropRect.nBottom, m_initInfo.nQ16ShiftWidthDivHeightRatio);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "%s - VPU Init Stream Info : %dx%d (interlaced : %d - Minframe : %d)"\
|
||||
+ " - Align : %d bytes - crop : %d %d %d %d - Q16Ratio : %x\n", __FUNCTION__,
|
||||
+ m_initInfo.nPicWidth, m_initInfo.nPicHeight, m_initInfo.nInterlace, m_initInfo.nMinFrameBufferCount,
|
||||
+ m_initInfo.nAddressAlignment, m_initInfo.PicCropRect.nLeft, m_initInfo.PicCropRect.nTop,
|
||||
+ m_initInfo.PicCropRect.nRight, m_initInfo.PicCropRect.nBottom, m_initInfo.nQ16ShiftWidthDivHeightRatio);
|
||||
+ }
|
||||
if (VpuAllocFrameBuffers())
|
||||
{
|
||||
ret = VPU_DecRegisterFrameBuffer(m_vpuHandle, m_vpuFrameBuffers, m_vpuFrameBufferNum);
|
||||
@@ -744,11 +758,13 @@ int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts)
|
||||
|
||||
if (decRet & VPU_DEC_OUTPUT_REPEAT)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - Frame repeat.\n", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - Frame repeat.\n", __FUNCTION__);
|
||||
}
|
||||
if (decRet & VPU_DEC_OUTPUT_DROPPED)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - Frame dropped.\n", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - Frame dropped.\n", __FUNCTION__);
|
||||
}
|
||||
if (decRet & VPU_DEC_NO_ENOUGH_BUF)
|
||||
{
|
||||
@@ -756,7 +772,8 @@ int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts)
|
||||
}
|
||||
if (decRet & VPU_DEC_SKIP)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - Frame skipped.\n", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - Frame skipped.\n", __FUNCTION__);
|
||||
}
|
||||
if (decRet & VPU_DEC_FLUSH)
|
||||
{
|
||||
@@ -823,7 +840,8 @@ void CDVDVideoCodecIMX::Reset()
|
||||
{
|
||||
int ret;
|
||||
|
||||
- CLog::Log(LOGDEBUG, "%s - called\n", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - called\n", __FUNCTION__);
|
||||
|
||||
// Release last buffer
|
||||
if(m_lastBuffer)
|
||||
|
||||
From 52ffc3f187a6288c71dc460257969fad94c1ab6b Mon Sep 17 00:00:00 2001
|
||||
From: Memphiz <memphis@machzwo.de>
|
||||
Date: Wed, 12 Nov 2014 13:36:21 +0100
|
||||
Subject: [PATCH 4/5] [vtb/vda] - use component debug logging
|
||||
|
||||
---
|
||||
.../dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp | 4 +++-
|
||||
.../DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp | 24 ++++++++++++++--------
|
||||
2 files changed, 19 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
|
||||
index 6db3ed4..14d9e91 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
|
||||
@@ -39,6 +39,7 @@ extern "C" {
|
||||
#include "utils/StringUtils.h"
|
||||
#include "utils/TimeUtils.h"
|
||||
#include "settings/Settings.h"
|
||||
+#include "settings/AdvancedSettings.h"
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <VideoDecodeAcceleration/VDADecoder.h>
|
||||
@@ -609,7 +610,8 @@ void CDVDVideoCodecVDA::VDADecoderCallback(
|
||||
}
|
||||
if (kVDADecodeInfo_FrameDropped & infoFlags)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
|
||||
index 60f70f9..67ae61b 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "DVDCodecUtils.h"
|
||||
#include "DVDVideoCodecVideoToolBox.h"
|
||||
#include "settings/Settings.h"
|
||||
+#include "settings/AdvancedSettings.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/TimeUtils.h"
|
||||
#include "osx/DarwinUtils.h"
|
||||
@@ -196,7 +197,8 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V
|
||||
char *attrs_str;
|
||||
|
||||
attrs_str = vtutil_object_to_string(prop_attrs);
|
||||
- CLog::Log(LOGDEBUG, "%s = %s\n", name_str, attrs_str);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s = %s\n", name_str, attrs_str);
|
||||
free(attrs_str);
|
||||
}
|
||||
|
||||
@@ -206,7 +208,8 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V
|
||||
char *value_str;
|
||||
|
||||
value_str = vtutil_object_to_string(prop_value);
|
||||
- CLog::Log(LOGDEBUG, "%s = %s\n", name_str, value_str);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s = %s\n", name_str, value_str);
|
||||
free(value_str);
|
||||
|
||||
if (prop_value != NULL)
|
||||
@@ -214,7 +217,8 @@ vtdec_session_dump_property(CFStringRef prop_name, CFDictionaryRef prop_attrs, V
|
||||
}
|
||||
else
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s = <failed to query: %d>\n", name_str, (int)status);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s = <failed to query: %d>\n", name_str, (int)status);
|
||||
}
|
||||
|
||||
free(name_str);
|
||||
@@ -235,7 +239,8 @@ void vtdec_session_dump_properties(VTDecompressionSessionRef session)
|
||||
return;
|
||||
|
||||
error:
|
||||
- CLog::Log(LOGDEBUG, "failed to dump properties\n");
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "failed to dump properties\n");
|
||||
}
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------------
|
||||
@@ -342,7 +347,8 @@ CreateFormatDescriptionFromCodecData(VTFormatId format_id, int width, int height
|
||||
|
||||
if (CDarwinUtils::GetIOSVersion() < 4.3)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - GetIOSVersion says < 4.3", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - GetIOSVersion says < 4.3", __FUNCTION__);
|
||||
status = FigVideoHack.FigVideoFormatDescriptionCreateWithSampleDescriptionExtensionAtom1(
|
||||
NULL,
|
||||
format_id,
|
||||
@@ -355,7 +361,8 @@ CreateFormatDescriptionFromCodecData(VTFormatId format_id, int width, int height
|
||||
}
|
||||
else
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - GetIOSVersion says >= 4.3", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - GetIOSVersion says >= 4.3", __FUNCTION__);
|
||||
status = FigVideoHack.FigVideoFormatDescriptionCreateWithSampleDescriptionExtensionAtom2(
|
||||
NULL,
|
||||
format_id,
|
||||
@@ -1459,7 +1466,7 @@ bool CDVDVideoCodecVideoToolBox::GetPicture(DVDVideoPicture* pDvdVideoPicture)
|
||||
DisplayQueuePop();
|
||||
|
||||
static double old_pts;
|
||||
- if (pDvdVideoPicture->pts < old_pts)
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO) && pDvdVideoPicture->pts < old_pts)
|
||||
CLog::Log(LOGDEBUG, "%s - VTBDecoderDecode dts(%f), pts(%f), old_pts(%f)", __FUNCTION__,
|
||||
pDvdVideoPicture->dts, pDvdVideoPicture->pts, old_pts);
|
||||
old_pts = pDvdVideoPicture->pts;
|
||||
@@ -1624,7 +1631,8 @@ CDVDVideoCodecVideoToolBox::VTDecoderCallback(
|
||||
}
|
||||
if (kVTDecodeInfo_FrameDropped & infoFlags)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s - frame dropped", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
From 3f2af95a02519ae63e2c4c6c0e0fbca442e26779 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Wed, 12 Nov 2014 16:52:15 +0000
|
||||
Subject: [PATCH 5/5] MMAL: Use Component Logging v2
|
||||
|
||||
---
|
||||
xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp | 170 +++++++++------------
|
||||
1 file changed, 76 insertions(+), 94 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp
|
||||
index 664376c..098910e 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp
|
||||
@@ -41,21 +41,17 @@
|
||||
#include "cores/VideoRenderers/RenderFlags.h"
|
||||
#include "settings/DisplaySettings.h"
|
||||
#include "cores/VideoRenderers/RenderManager.h"
|
||||
+#include "settings/AdvancedSettings.h"
|
||||
|
||||
#include "linux/RBP.h"
|
||||
|
||||
-#ifdef _DEBUG
|
||||
-#define MMAL_DEBUG_VERBOSE
|
||||
-#endif
|
||||
-
|
||||
#define CLASSNAME "CMMALVideoBuffer"
|
||||
|
||||
CMMALVideoBuffer::CMMALVideoBuffer(CMMALVideo *omv)
|
||||
: m_omv(omv), m_refs(0)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
mmal_buffer = NULL;
|
||||
width = 0;
|
||||
height = 0;
|
||||
@@ -67,18 +63,16 @@ CMMALVideoBuffer::CMMALVideoBuffer(CMMALVideo *omv)
|
||||
|
||||
CMMALVideoBuffer::~CMMALVideoBuffer()
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
}
|
||||
|
||||
|
||||
CMMALVideoBuffer* CMMALVideoBuffer::Acquire()
|
||||
{
|
||||
long count = AtomicIncrement(&m_refs);
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p (%p) ref:%ld", CLASSNAME, __func__, this, mmal_buffer, count);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p (%p) ref:%ld", CLASSNAME, __func__, this, mmal_buffer, count);
|
||||
(void)count;
|
||||
return this;
|
||||
}
|
||||
@@ -86,9 +80,8 @@ CMMALVideoBuffer* CMMALVideoBuffer::Acquire()
|
||||
long CMMALVideoBuffer::Release()
|
||||
{
|
||||
long count = AtomicDecrement(&m_refs);
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
-CLog::Log(LOGDEBUG, "%s::%s %p (%p) ref:%ld", CLASSNAME, __func__, this, mmal_buffer, count);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p (%p) ref:%ld", CLASSNAME, __func__, this, mmal_buffer, count);
|
||||
if (count == 0)
|
||||
{
|
||||
m_omv->ReleaseBuffer(this);
|
||||
@@ -101,9 +94,8 @@ CLog::Log(LOGDEBUG, "%s::%s %p (%p) ref:%ld", CLASSNAME, __func__, this, mmal_bu
|
||||
|
||||
CMMALVideo::CMMALVideo()
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
pthread_mutex_init(&m_output_mutex, NULL);
|
||||
|
||||
m_drop_state = false;
|
||||
@@ -140,9 +132,8 @@ CMMALVideo::CMMALVideo()
|
||||
|
||||
CMMALVideo::~CMMALVideo()
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, this);
|
||||
assert(m_finished);
|
||||
Reset();
|
||||
|
||||
@@ -203,7 +194,8 @@ void CMMALVideo::PortSettingsChanged(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *bu
|
||||
m_aspect_ratio = (float)(m_es_format->es->video.par.num * m_es_format->es->video.crop.width) / (m_es_format->es->video.par.den * m_es_format->es->video.crop.height);
|
||||
m_decoded_width = m_es_format->es->video.crop.width;
|
||||
m_decoded_height = m_es_format->es->video.crop.height;
|
||||
- CLog::Log(LOGDEBUG, "%s::%s format changed: %dx%d %.2f frame:%d", CLASSNAME, __func__, m_decoded_width, m_decoded_height, m_aspect_ratio, m_changed_count);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s format changed: %dx%d %.2f frame:%d", CLASSNAME, __func__, m_decoded_width, m_decoded_height, m_aspect_ratio, m_changed_count);
|
||||
}
|
||||
else
|
||||
CLog::Log(LOGERROR, "%s::%s format changed: Unexpected %dx%d", CLASSNAME, __func__, m_es_format->es->video.crop.width, m_es_format->es->video.crop.height);
|
||||
@@ -220,7 +212,8 @@ void CMMALVideo::dec_control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *bu
|
||||
}
|
||||
else if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s::%s format changed", CLASSNAME, __func__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s format changed", CLASSNAME, __func__);
|
||||
PortSettingsChanged(port, buffer);
|
||||
}
|
||||
else
|
||||
@@ -238,19 +231,18 @@ static void dec_control_port_cb_static(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *
|
||||
|
||||
static void dec_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s port:%p buffer %p, len %d cmd:%x", CLASSNAME, __func__, port, buffer, buffer->length, buffer->cmd);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s port:%p buffer %p, len %d cmd:%x", CLASSNAME, __func__, port, buffer, buffer->length, buffer->cmd);
|
||||
mmal_buffer_header_release(buffer);
|
||||
}
|
||||
|
||||
|
||||
void CMMALVideo::dec_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
if (!(buffer->cmd == 0 && buffer->length > 0))
|
||||
- CLog::Log(LOGDEBUG, "%s::%s port:%p buffer %p, len %d cmd:%x", CLASSNAME, __func__, port, buffer, buffer->length, buffer->cmd);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s port:%p buffer %p, len %d cmd:%x", CLASSNAME, __func__, port, buffer, buffer->length, buffer->cmd);
|
||||
+
|
||||
bool kept = false;
|
||||
|
||||
if (buffer->cmd == 0)
|
||||
@@ -273,16 +265,16 @@ void CMMALVideo::dec_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf
|
||||
|
||||
if (m_drop_state)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - dropping %p (drop:%d)", CLASSNAME, __func__, buffer, m_drop_state);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - dropping %p (drop:%d)", CLASSNAME, __func__, buffer, m_drop_state);
|
||||
}
|
||||
else
|
||||
{
|
||||
CMMALVideoBuffer *omvb = new CMMALVideoBuffer(this);
|
||||
m_output_busy++;
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - %p (%p) buffer_size(%u) dts:%.3f pts:%.3f flags:%x:%x frame:%d",
|
||||
- CLASSNAME, __func__, buffer, omvb, buffer->length, dts*1e-6, buffer->pts*1e-6, buffer->flags, buffer->type->video.flags, omvb->m_changed_count);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - %p (%p) buffer_size(%u) dts:%.3f pts:%.3f flags:%x:%x frame:%d",
|
||||
+ CLASSNAME, __func__, buffer, omvb, buffer->length, dts*1e-6, buffer->pts*1e-6, buffer->flags, buffer->type->video.flags, omvb->m_changed_count);
|
||||
omvb->mmal_buffer = buffer;
|
||||
buffer->user_data = (void *)omvb;
|
||||
omvb->m_changed_count = m_changed_count;
|
||||
@@ -314,7 +306,8 @@ static void dec_output_port_cb_static(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *b
|
||||
bool CMMALVideo::change_dec_output_format()
|
||||
{
|
||||
MMAL_STATUS_T status;
|
||||
- CLog::Log(LOGDEBUG, "%s::%s", CLASSNAME, __func__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s", CLASSNAME, __func__);
|
||||
|
||||
MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T interlace_type = {{ MMAL_PARAMETER_VIDEO_INTERLACE_TYPE, sizeof( interlace_type )}};
|
||||
status = mmal_port_parameter_get( m_dec_output, &interlace_type.hdr );
|
||||
@@ -323,7 +316,8 @@ bool CMMALVideo::change_dec_output_format()
|
||||
{
|
||||
if (m_interlace_mode != interlace_type.eMode)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s::%s Interlace mode %d->%d", CLASSNAME, __func__, m_interlace_mode, interlace_type.eMode);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s Interlace mode %d->%d", CLASSNAME, __func__, m_interlace_mode, interlace_type.eMode);
|
||||
m_interlace_mode = interlace_type.eMode;
|
||||
}
|
||||
}
|
||||
@@ -345,7 +339,8 @@ bool CMMALVideo::CreateDeinterlace(EINTERLACEMETHOD interlace_method)
|
||||
{
|
||||
MMAL_STATUS_T status;
|
||||
|
||||
- CLog::Log(LOGDEBUG, "%s::%s method:%d", CLASSNAME, __func__, interlace_method);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s method:%d", CLASSNAME, __func__, interlace_method);
|
||||
|
||||
assert(!m_deint);
|
||||
assert(m_dec_output == m_dec->output[0]);
|
||||
@@ -428,7 +423,8 @@ bool CMMALVideo::DestroyDeinterlace()
|
||||
{
|
||||
MMAL_STATUS_T status;
|
||||
|
||||
- CLog::Log(LOGDEBUG, "%s::%s", CLASSNAME, __func__);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s", CLASSNAME, __func__);
|
||||
|
||||
assert(m_deint);
|
||||
assert(m_dec_output == m_deint->output[0]);
|
||||
@@ -496,9 +492,8 @@ bool CMMALVideo::SendCodecConfigData()
|
||||
buffer->length = std::min(m_hints.extrasize, buffer->alloc_size);
|
||||
memcpy(buffer->data, m_hints.extradata, buffer->length);
|
||||
buffer->flags |= MMAL_BUFFER_HEADER_FLAG_FRAME_END | MMAL_BUFFER_HEADER_FLAG_CONFIG;
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - %-8p %-6d flags:%x", CLASSNAME, __func__, buffer, buffer->length, buffer->flags);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - %-8p %-6d flags:%x", CLASSNAME, __func__, buffer, buffer->length, buffer->flags);
|
||||
status = mmal_port_send_buffer(m_dec_input, buffer);
|
||||
if (status != MMAL_SUCCESS)
|
||||
{
|
||||
@@ -510,9 +505,8 @@ bool CMMALVideo::SendCodecConfigData()
|
||||
|
||||
bool CMMALVideo::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options, MMALVideoPtr myself)
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s usemmal:%d software:%d %dx%d", CLASSNAME, __func__, CSettings::Get().GetBool("videoplayer.usemmal"), hints.software, hints.width, hints.height);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s usemmal:%d software:%d %dx%d", CLASSNAME, __func__, CSettings::Get().GetBool("videoplayer.usemmal"), hints.software, hints.width, hints.height);
|
||||
|
||||
// we always qualify even if DVDFactoryCodec does this too.
|
||||
if (!CSettings::Get().GetBool("videoplayer.usemmal") || hints.software)
|
||||
@@ -716,9 +710,8 @@ void CMMALVideo::Dispose()
|
||||
done = true;
|
||||
m_finished = true;
|
||||
pthread_mutex_unlock(&m_output_mutex);
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s dts_queue(%d) ready_queue(%d) busy_queue(%d) done:%d", CLASSNAME, __func__, m_dts_queue.size(), m_output_ready.size(), m_output_busy, done);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s dts_queue(%d) ready_queue(%d) busy_queue(%d) done:%d", CLASSNAME, __func__, m_dts_queue.size(), m_output_ready.size(), m_output_busy, done);
|
||||
if (done)
|
||||
{
|
||||
assert(m_dts_queue.empty());
|
||||
@@ -728,10 +721,9 @@ void CMMALVideo::Dispose()
|
||||
|
||||
void CMMALVideo::SetDropState(bool bDrop)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
if (m_drop_state != bDrop)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - m_drop_state(%d)", CLASSNAME, __func__, bDrop);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - m_drop_state(%d)", CLASSNAME, __func__, bDrop);
|
||||
m_drop_state = bDrop;
|
||||
if (m_drop_state)
|
||||
{
|
||||
@@ -756,10 +748,9 @@ void CMMALVideo::SetDropState(bool bDrop)
|
||||
|
||||
int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- //CLog::Log(LOGDEBUG, "%s::%s - %-8p %-6d dts:%.3f pts:%.3f dts_queue(%d) ready_queue(%d) busy_queue(%d)",
|
||||
- // CLASSNAME, __func__, pData, iSize, dts == DVD_NOPTS_VALUE ? 0.0 : dts*1e-6, pts == DVD_NOPTS_VALUE ? 0.0 : pts*1e-6, m_dts_queue.size(), m_output_ready.size(), m_output_busy);
|
||||
- #endif
|
||||
+ //if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ // CLog::Log(LOGDEBUG, "%s::%s - %-8p %-6d dts:%.3f pts:%.3f dts_queue(%d) ready_queue(%d) busy_queue(%d)",
|
||||
+ // CLASSNAME, __func__, pData, iSize, dts == DVD_NOPTS_VALUE ? 0.0 : dts*1e-6, pts == DVD_NOPTS_VALUE ? 0.0 : pts*1e-6, m_dts_queue.size(), m_output_ready.size(), m_output_busy);
|
||||
|
||||
unsigned int demuxer_bytes = 0;
|
||||
uint8_t *demuxer_content = NULL;
|
||||
@@ -845,10 +836,9 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
|
||||
if (demuxer_bytes == 0)
|
||||
buffer->flags |= MMAL_BUFFER_HEADER_FLAG_FRAME_END;
|
||||
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - %-8p %-6d/%-6d dts:%.3f pts:%.3f flags:%x dts_queue(%d) ready_queue(%d) busy_queue(%d) demux_queue(%d) space(%d)",
|
||||
- CLASSNAME, __func__, buffer, buffer->length, demuxer_bytes, dts == DVD_NOPTS_VALUE ? 0.0 : dts*1e-6, pts == DVD_NOPTS_VALUE ? 0.0 : pts*1e-6, buffer->flags, m_dts_queue.size(), m_output_ready.size(), m_output_busy, m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - %-8p %-6d/%-6d dts:%.3f pts:%.3f flags:%x dts_queue(%d) ready_queue(%d) busy_queue(%d) demux_queue(%d) space(%d)",
|
||||
+ CLASSNAME, __func__, buffer, buffer->length, demuxer_bytes, dts == DVD_NOPTS_VALUE ? 0.0 : dts*1e-6, pts == DVD_NOPTS_VALUE ? 0.0 : pts*1e-6, buffer->flags, m_dts_queue.size(), m_output_ready.size(), m_output_busy, m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size);
|
||||
assert((int)buffer->length > 0);
|
||||
status = mmal_port_send_buffer(m_dec_input, buffer);
|
||||
if (status != MMAL_SUCCESS)
|
||||
@@ -875,7 +865,8 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
|
||||
}
|
||||
if (m_changed_count_dec != m_changed_count)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s::%s format changed frame:%d(%d)", CLASSNAME, __func__, m_changed_count_dec, m_changed_count);
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s format changed frame:%d(%d)", CLASSNAME, __func__, m_changed_count_dec, m_changed_count);
|
||||
m_changed_count_dec = m_changed_count;
|
||||
if (!change_dec_output_format())
|
||||
{
|
||||
@@ -915,21 +906,20 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
|
||||
int ret = 0;
|
||||
if (!m_output_ready.empty())
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - got output picture:%d", CLASSNAME, __func__, m_output_ready.size());
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - got space for output: demux_queue(%d) space(%d)", CLASSNAME, __func__, m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size);
|
||||
ret |= VC_PICTURE;
|
||||
}
|
||||
if (mmal_queue_length(m_dec_input_pool->queue) > 0 && !m_demux_queue_length)
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - got space for output: demux_queue(%d) space(%d)", CLASSNAME, __func__, m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - got output picture:%d", CLASSNAME, __func__, m_output_ready.size());
|
||||
ret |= VC_BUFFER;
|
||||
}
|
||||
if (!ret)
|
||||
{
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - Nothing to do: dts_queue(%d) ready_queue(%d) busy_queue(%d) demux_queue(%d) space(%d)",
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - Nothing to do: dts_queue(%d) ready_queue(%d) busy_queue(%d) demux_queue(%d) space(%d)",
|
||||
CLASSNAME, __func__, m_dts_queue.size(), m_output_ready.size(), m_output_busy, m_demux_queue_length, mmal_queue_length(m_dec_input_pool->queue) * m_dec_input->buffer_size);
|
||||
Sleep(10); // otherwise we busy spin
|
||||
}
|
||||
@@ -938,9 +928,8 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
|
||||
|
||||
void CMMALVideo::Reset(void)
|
||||
{
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s", CLASSNAME, __func__);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s", CLASSNAME, __func__);
|
||||
|
||||
if (m_dec_input)
|
||||
mmal_port_disable(m_dec_input);
|
||||
@@ -979,26 +968,23 @@ void CMMALVideo::Reset(void)
|
||||
|
||||
void CMMALVideo::ReturnBuffer(CMMALVideoBuffer *buffer)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p (%d)", CLASSNAME, __func__, buffer, m_output_busy);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p (%d)", CLASSNAME, __func__, buffer, m_output_busy);
|
||||
|
||||
mmal_buffer_header_release(buffer->mmal_buffer);
|
||||
}
|
||||
|
||||
void CMMALVideo::Recycle(MMAL_BUFFER_HEADER_T *buffer)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, buffer);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p", CLASSNAME, __func__, buffer);
|
||||
|
||||
MMAL_STATUS_T status;
|
||||
mmal_buffer_header_reset(buffer);
|
||||
buffer->cmd = 0;
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s Send buffer %p from pool to decoder output port %p dts_queue(%d) ready_queue(%d) busy_queue(%d)", CLASSNAME, __func__, buffer, m_dec_output,
|
||||
- m_dts_queue.size(), m_output_ready.size(), m_output_busy);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s Send buffer %p from pool to decoder output port %p dts_queue(%d) ready_queue(%d) busy_queue(%d)", CLASSNAME, __func__, buffer, m_dec_output,
|
||||
+ m_dts_queue.size(), m_output_ready.size(), m_output_busy);
|
||||
status = mmal_port_send_buffer(m_dec_output, buffer);
|
||||
if (status != MMAL_SUCCESS)
|
||||
{
|
||||
@@ -1022,9 +1008,8 @@ void CMMALVideo::ReleaseBuffer(CMMALVideoBuffer *buffer)
|
||||
pthread_mutex_unlock(&m_output_mutex);
|
||||
if (done)
|
||||
m_myself.reset();
|
||||
- #if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s %p (%p) dts_queue(%d) ready_queue(%d) busy_queue(%d) done:%d", CLASSNAME, __func__, buffer, buffer->mmal_buffer, m_dts_queue.size(), m_output_ready.size(), m_output_busy, done);
|
||||
- #endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s %p (%p) dts_queue(%d) ready_queue(%d) busy_queue(%d) done:%d", CLASSNAME, __func__, buffer, buffer->mmal_buffer, m_dts_queue.size(), m_output_ready.size(), m_output_busy, done);
|
||||
delete buffer;
|
||||
}
|
||||
|
||||
@@ -1067,11 +1052,10 @@ bool CMMALVideo::GetPicture(DVDVideoPicture* pDvdVideoPicture)
|
||||
|
||||
pDvdVideoPicture->MMALBuffer->Acquire();
|
||||
pDvdVideoPicture->iFlags = DVP_FLAG_ALLOCATED;
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGINFO, "%s::%s dts:%.3f pts:%.3f flags:%x:%x MMALBuffer:%p mmal_buffer:%p", CLASSNAME, __func__,
|
||||
- pDvdVideoPicture->dts == DVD_NOPTS_VALUE ? 0.0 : pDvdVideoPicture->dts*1e-6, pDvdVideoPicture->pts == DVD_NOPTS_VALUE ? 0.0 : pDvdVideoPicture->pts*1e-6,
|
||||
- pDvdVideoPicture->iFlags, buffer->mmal_buffer->flags, pDvdVideoPicture->MMALBuffer, pDvdVideoPicture->MMALBuffer->mmal_buffer);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGINFO, "%s::%s dts:%.3f pts:%.3f flags:%x:%x MMALBuffer:%p mmal_buffer:%p", CLASSNAME, __func__,
|
||||
+ pDvdVideoPicture->dts == DVD_NOPTS_VALUE ? 0.0 : pDvdVideoPicture->dts*1e-6, pDvdVideoPicture->pts == DVD_NOPTS_VALUE ? 0.0 : pDvdVideoPicture->pts*1e-6,
|
||||
+ pDvdVideoPicture->iFlags, buffer->mmal_buffer->flags, pDvdVideoPicture->MMALBuffer, pDvdVideoPicture->MMALBuffer->mmal_buffer);
|
||||
assert(!(buffer->mmal_buffer->flags & MMAL_BUFFER_HEADER_FLAG_DECODEONLY));
|
||||
}
|
||||
else
|
||||
@@ -1092,9 +1076,8 @@ bool CMMALVideo::ClearPicture(DVDVideoPicture* pDvdVideoPicture)
|
||||
{
|
||||
if (pDvdVideoPicture->format == RENDER_FMT_MMAL)
|
||||
{
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- CLog::Log(LOGDEBUG, "%s::%s - %p (%p)", CLASSNAME, __func__, pDvdVideoPicture->MMALBuffer, pDvdVideoPicture->MMALBuffer->mmal_buffer);
|
||||
-#endif
|
||||
+ if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ CLog::Log(LOGDEBUG, "%s::%s - %p (%p)", CLASSNAME, __func__, pDvdVideoPicture->MMALBuffer, pDvdVideoPicture->MMALBuffer->mmal_buffer);
|
||||
pDvdVideoPicture->MMALBuffer->Release();
|
||||
}
|
||||
memset(pDvdVideoPicture, 0, sizeof *pDvdVideoPicture);
|
||||
@@ -1106,8 +1089,7 @@ bool CMMALVideo::GetCodecStats(double &pts, int &droppedPics)
|
||||
pts = m_decoderPts;
|
||||
droppedPics = m_droppedPics;
|
||||
m_droppedPics = 0;
|
||||
-#if defined(MMAL_DEBUG_VERBOSE)
|
||||
- //CLog::Log(LOGDEBUG, "%s::%s - pts:%.0f droppedPics:%d", CLASSNAME, __func__, pts, droppedPics);
|
||||
-#endif
|
||||
+ //if (g_advancedSettings.CanLogComponent(LOGVIDEO))
|
||||
+ // CLog::Log(LOGDEBUG, "%s::%s - pts:%.0f droppedPics:%d", CLASSNAME, __func__, pts, droppedPics);
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
From 411b2097affa681e22e8e0fe1a1c30bebd574a0e Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||
Date: Sat, 1 Nov 2014 12:44:54 +0100
|
||||
Subject: [PATCH] AdvancedSettings: Add minimalSampleRate to ActiveAE cause of
|
||||
broken AVRs out there
|
||||
|
||||
---
|
||||
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 7 +++++++
|
||||
xbmc/settings/AdvancedSettings.cpp | 3 +++
|
||||
xbmc/settings/AdvancedSettings.h | 2 ++
|
||||
3 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
|
||||
index 0e4d8da..b9d74bf 100644
|
||||
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
|
||||
@@ -1505,6 +1505,13 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett
|
||||
format.m_channelLayout = AE_CH_LAYOUT_2_0;
|
||||
}
|
||||
|
||||
+ // OpenELEC workaround to define a minimum sample Rate for broken AVRs
|
||||
+ if (format.m_sampleRate < g_advancedSettings.m_minimumSampleRate)
|
||||
+ {
|
||||
+ format.m_sampleRate = g_advancedSettings.m_minimumSampleRate;
|
||||
+ CLog::Log(LOGDEBUG, "CActiveAE::MinimumSampleRate - Forced by use to samplerate %d", format.m_sampleRate);
|
||||
+ }
|
||||
+
|
||||
if (m_settings.config == AE_CONFIG_FIXED)
|
||||
{
|
||||
format.m_sampleRate = m_settings.samplerate;
|
||||
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
|
||||
index 7d04872..3d5432a 100644
|
||||
--- a/xbmc/settings/AdvancedSettings.cpp
|
||||
+++ b/xbmc/settings/AdvancedSettings.cpp
|
||||
@@ -107,6 +107,8 @@ void CAdvancedSettings::Initialize()
|
||||
return;
|
||||
|
||||
m_audioHeadRoom = 0;
|
||||
+ // OpenELEC workaround for broken AVRs
|
||||
+ m_minimumSampleRate = 8000;
|
||||
m_ac3Gain = 12.0f;
|
||||
m_audioApplyDrc = true;
|
||||
m_dvdplayerIgnoreDTSinWAV = false;
|
||||
@@ -475,6 +477,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
|
||||
{
|
||||
XMLUtils::GetFloat(pElement, "ac3downmixgain", m_ac3Gain, -96.0f, 96.0f);
|
||||
XMLUtils::GetInt(pElement, "headroom", m_audioHeadRoom, 0, 12);
|
||||
+ XMLUtils::GetInt(pElement, "minimumsamplerate", m_minimumSampleRate, 8000, 192000);
|
||||
XMLUtils::GetString(pElement, "defaultplayer", m_audioDefaultPlayer);
|
||||
// 101 on purpose - can be used to never automark as watched
|
||||
XMLUtils::GetFloat(pElement, "playcountminimumpercent", m_audioPlayCountMinimumPercent, 0.0f, 101.0f);
|
||||
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
|
||||
index 7df586e..9b79a8a 100644
|
||||
--- a/xbmc/settings/AdvancedSettings.h
|
||||
+++ b/xbmc/settings/AdvancedSettings.h
|
||||
@@ -136,6 +136,8 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
|
||||
static void SettingOptionsLoggingComponentsFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t, void *data);
|
||||
|
||||
int m_audioHeadRoom;
|
||||
+ // OpenELEC workaround for minimum sample Rate
|
||||
+ int m_minimumSampleRate;
|
||||
float m_ac3Gain;
|
||||
CStdString m_audioDefaultPlayer;
|
||||
float m_audioPlayCountMinimumPercent;
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=Kodi clean debug logs
|
||||
ConditionKernelCommandLine=!debugging
|
||||
ConditionPathExists=!/storage/.cache/debug.openelec
|
||||
Before=kodi.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@@ -10,4 +10,4 @@ ExecStart=-/bin/sh -c 'rm -rf /storage/.kodi/userdata/addon_data/*/*.log /storag
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.service
|
||||
WantedBy=sysinit.target
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/src/joystick/linux/SDL_sysjoystick.c 2014-03-16 03:31:41.000000000 +0100
|
||||
+++ b/src/joystick/linux/SDL_sysjoystick.c 2014-09-08 01:42:32.987502340 +0200
|
||||
@@ -500,7 +500,7 @@
|
||||
++joystick->nbuttons;
|
||||
}
|
||||
}
|
||||
- for (i = 0; i < ABS_MISC; ++i) {
|
||||
+ for (i = 0; i < ABS_MAX; ++i) {
|
||||
/* Skip hats */
|
||||
if (i == ABS_HAT0X) {
|
||||
i = ABS_HAT3Y;
|
||||
@@ -761,10 +761,6 @@
|
||||
}
|
||||
break;
|
||||
case EV_ABS:
|
||||
- if (code >= ABS_MISC) {
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
switch (code) {
|
||||
case ABS_HAT0X:
|
||||
case ABS_HAT0Y:
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="ffmpeg"
|
||||
PKG_VERSION="2.4.2"
|
||||
PKG_VERSION="2.4.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
@@ -32,17 +32,17 @@ PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert a
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
if [ "$VAAPI" = yes ]; then
|
||||
# configure GPU drivers and dependencies:
|
||||
get_graphicdrivers
|
||||
|
||||
if [ "$VAAPI_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver"
|
||||
FFMPEG_VAAPI="--enable-vaapi"
|
||||
else
|
||||
FFMPEG_VAAPI="--disable-vaapi"
|
||||
fi
|
||||
|
||||
if [ "$VDPAU" = yes ]; then
|
||||
if [ "$VDPAU_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau"
|
||||
FFMPEG_VDPAU="--enable-vdpau"
|
||||
else
|
||||
@@ -55,12 +55,6 @@ else
|
||||
FFMPEG_DEBUG="--disable-debug --enable-stripping"
|
||||
fi
|
||||
|
||||
if [ "$OPTIMIZATIONS" = size ]; then
|
||||
FFMPEG_OPTIM="--disable-small"
|
||||
else
|
||||
FFMPEG_OPTIM="--disable-small"
|
||||
fi
|
||||
|
||||
case "$TARGET_ARCH" in
|
||||
arm)
|
||||
FFMPEG_CPU=""
|
||||
@@ -158,7 +152,7 @@ configure_target() {
|
||||
--disable-gnutls --enable-libressl \
|
||||
--disable-gray \
|
||||
--enable-swscale-alpha \
|
||||
$FFMPEG_OPTIM \
|
||||
--disable-small \
|
||||
--enable-dct \
|
||||
--enable-fft \
|
||||
--enable-mdct \
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libass"
|
||||
PKG_VERSION="0.11.1"
|
||||
PKG_VERSION="0.12.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
|
||||
@@ -37,7 +37,7 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-werror \
|
||||
--disable-optimizations \
|
||||
--with-gnu-ld"
|
||||
|
||||
if [ "$AACS_SUPPORT" = "yes" ]; then
|
||||
if [ "$BLURAY_AACS_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libaacs"
|
||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --with-libaacs"
|
||||
else
|
||||
|
||||
@@ -32,11 +32,11 @@ PKG_LONGDESC="libbluray is an open-source library designed for Blu-Ray Discs pla
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
if [ "$AACS_SUPPORT" = "yes" ]; then
|
||||
if [ "$BLURAY_AACS_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libaacs"
|
||||
fi
|
||||
|
||||
if [ "$BDPLUS_SUPPORT" = "yes" ]; then
|
||||
if [ "$BLURAY_BDPLUS_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libbdplus"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Nru vdr-1.7.15-vanilla/eitscan.c vdr-1.7.15-disable_eitscan/eitscan.c
|
||||
--- vdr-1.7.15-vanilla/eitscan.c 2010-06-06 19:11:14.000000000 +0300
|
||||
+++ vdr-1.7.15-disable_eitscan/eitscan.c 2010-06-06 20:44:07.000000000 +0300
|
||||
@@ -146,7 +146,7 @@
|
||||
if (Device) {
|
||||
for (cScanData *ScanData = scanList->First(); ScanData; ScanData = scanList->Next(ScanData)) {
|
||||
const cChannel *Channel = ScanData->GetChannel();
|
||||
- if (Channel) {
|
||||
+ if (Channel && !cSource::IsType(Channel->Source(), 'I')) {
|
||||
if (!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= CA_ENCRYPTED_MIN) {
|
||||
if (Device->ProvidesTransponder(Channel)) {
|
||||
if (!Device->Receiving()) {
|
||||
@@ -16,20 +16,13 @@
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
|
||||
# TODO: update to libssh-0.6.3 fails in xbmc with
|
||||
# ld.gold: error: libsmbclient.a: multiple definition of 'string_free'
|
||||
# ld.gold: libssh.a: previous definition here
|
||||
|
||||
PKG_NAME="libssh"
|
||||
PKG_VERSION="0.5.5"
|
||||
PKG_VERSION="0.6.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OpenSource"
|
||||
PKG_SITE="http://www.libssh.org/"
|
||||
# PKG_URL="http://www.libssh.org/files/0.5/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
# PKG_URL="https://red.libssh.org/attachments/download/51/$PKG_NAME-$PKG_VERSION.tar.gz" # actually down
|
||||
PKG_URL="http://pkgs.fedoraproject.org/repo/pkgs/libssh/$PKG_NAME-$PKG_VERSION.tar.gz/bb308196756c7255c0969583d917136b/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="https://red.libssh.org/attachments/download/87/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain zlib libressl"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="network"
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
diff -urN a/source3/include/proto.h b/source3/include/proto.h
|
||||
--- a/source3/include/proto.h 2014-06-23 08:03:27.000000000 +0200
|
||||
+++ b/source3/include/proto.h 2014-11-01 13:02:42.918300338 +0100
|
||||
@@ -947,7 +947,7 @@
|
||||
size_t maxlength);
|
||||
char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n);
|
||||
bool in_list(const char *s, const char *list, bool casesensitive);
|
||||
-void string_free(char **s);
|
||||
+void smb_string_free(char **s);
|
||||
bool string_set(char **dest,const char *src);
|
||||
void string_sub2(char *s,const char *pattern, const char *insert, size_t len,
|
||||
bool remove_unsafe_characters, bool replace_once,
|
||||
diff -urN a/source3/lib/util_str.c b/source3/lib/util_str.c
|
||||
--- a/source3/lib/util_str.c 2014-06-23 08:03:27.000000000 +0200
|
||||
+++ b/source3/lib/util_str.c 2014-11-01 13:03:11.113658974 +0100
|
||||
@@ -764,7 +764,7 @@
|
||||
Free a string value.
|
||||
**/
|
||||
|
||||
-void string_free(char **s)
|
||||
+void smb_string_free(char **s)
|
||||
{
|
||||
if (!s || !(*s))
|
||||
return;
|
||||
@@ -780,7 +780,7 @@
|
||||
|
||||
bool string_set(char **dest,const char *src)
|
||||
{
|
||||
- string_free(dest);
|
||||
+ smb_string_free(dest);
|
||||
return(string_init(dest,src));
|
||||
}
|
||||
|
||||
diff -urN a/source3/param/loadparm.c b/source3/param/loadparm.c
|
||||
--- a/source3/param/loadparm.c 2014-06-23 08:03:27.000000000 +0200
|
||||
+++ b/source3/param/loadparm.c 2014-11-01 13:03:03.872057887 +0100
|
||||
@@ -4998,7 +4998,7 @@
|
||||
if ((parm.type == P_STRING) ||
|
||||
(parm.type == P_USTRING))
|
||||
{
|
||||
- string_free((char**)parm_ptr);
|
||||
+ smb_string_free((char**)parm_ptr);
|
||||
} else if (parm.type == P_LIST) {
|
||||
TALLOC_FREE(*((char***)parm_ptr));
|
||||
}
|
||||
@@ -5160,7 +5160,7 @@
|
||||
if (!done_init) {
|
||||
/* The logfile can be set before this is invoked. Free it if so. */
|
||||
if (Globals.szLogFile != NULL) {
|
||||
- string_free(&Globals.szLogFile);
|
||||
+ smb_string_free(&Globals.szLogFile);
|
||||
Globals.szLogFile = NULL;
|
||||
}
|
||||
done_init = True;
|
||||
@@ -6108,7 +6108,7 @@
|
||||
|
||||
while (data) {
|
||||
if (strwicmp(data->key, param_key) == 0) {
|
||||
- string_free(¶m_key);
|
||||
+ smb_string_free(¶m_key);
|
||||
return data;
|
||||
}
|
||||
data = data->next;
|
||||
@@ -6120,14 +6120,14 @@
|
||||
data = Globals.param_opt;
|
||||
while (data) {
|
||||
if (strwicmp(data->key, param_key) == 0) {
|
||||
- string_free(¶m_key);
|
||||
+ smb_string_free(¶m_key);
|
||||
return data;
|
||||
}
|
||||
data = data->next;
|
||||
}
|
||||
}
|
||||
|
||||
- string_free(¶m_key);
|
||||
+ smb_string_free(¶m_key);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -6350,8 +6350,8 @@
|
||||
}
|
||||
opt = *popts;
|
||||
while (opt != NULL) {
|
||||
- string_free(&opt->key);
|
||||
- string_free(&opt->value);
|
||||
+ smb_string_free(&opt->key);
|
||||
+ smb_string_free(&opt->value);
|
||||
TALLOC_FREE(opt->list);
|
||||
next_opt = opt->next;
|
||||
SAFE_FREE(opt);
|
||||
@@ -6375,7 +6375,7 @@
|
||||
|
||||
free_parameters(pservice);
|
||||
|
||||
- string_free(&pservice->szService);
|
||||
+ smb_string_free(&pservice->szService);
|
||||
TALLOC_FREE(pservice->copymap);
|
||||
|
||||
free_param_opts(&pservice->param_opt);
|
||||
@@ -7085,7 +7085,7 @@
|
||||
overridden */
|
||||
return;
|
||||
}
|
||||
- string_free(&opt->value);
|
||||
+ smb_string_free(&opt->value);
|
||||
TALLOC_FREE(opt->list);
|
||||
opt->value = SMB_STRDUP(opt_value);
|
||||
opt->flags = flags;
|
||||
diff -urN a/source3/smbd/conn.c b/source3/smbd/conn.c
|
||||
--- a/source3/smbd/conn.c 2014-06-23 08:03:27.000000000 +0200
|
||||
+++ b/source3/smbd/conn.c 2014-11-01 13:02:49.008926676 +0100
|
||||
@@ -412,8 +412,8 @@
|
||||
free_namearray(conn->veto_oplock_list);
|
||||
free_namearray(conn->aio_write_behind_list);
|
||||
|
||||
- string_free(&conn->connectpath);
|
||||
- string_free(&conn->origpath);
|
||||
+ smb_string_free(&conn->connectpath);
|
||||
+ smb_string_free(&conn->origpath);
|
||||
|
||||
ZERO_STRUCTP(conn);
|
||||
talloc_destroy(conn);
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Samba configfile writer
|
||||
After=local-fs.target samba-defaults.service
|
||||
After=samba-defaults.service
|
||||
Requires=samba-defaults.service
|
||||
|
||||
ConditionPathExists=/storage/.cache/services/samba.conf
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[Unit]
|
||||
Description=Samba defaults
|
||||
After=local-fs.target
|
||||
|
||||
ConditionPathExists=!/storage/.cache/services/samba.conf
|
||||
ConditionPathExists=!/storage/.cache/services/samba.disabled
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="wireless-regdb"
|
||||
PKG_VERSION="2014.10.07"
|
||||
PKG_VERSION="2014.11.07"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user