streaming/remote fallback tuner: Add option to always descramble
authorErik Slagter <erik@openpli.org>
Sat, 24 Oct 2015 09:40:32 +0000 (11:40 +0200)
committerErik Slagter <erik@openpli.org>
Sat, 24 Oct 2015 09:40:32 +0000 (11:40 +0200)
incoming streams.

With this option enabled (default: off), you can remove
decryption at your remote tuner (softcam/CI/etc) completely.

Notes: this will only work on receivers that can do
"offline decoding". Also it will use descrambling demuxers
instead of the non-descrambling demuxers normally used. The
amount of those is limited. It will probably be no problem
anyway if you have a receiver that has no tuners
active/connected.

YMMV.

data/setup.xml
lib/python/Components/UsageConfig.py
lib/service/servicedvb.cpp
lib/service/servicedvbrecord.cpp

index b3b9c64..41a6e11 100644 (file)
@@ -26,6 +26,7 @@
                <item level="2" text="Include AIT in http streams" description="When enabled, AIT data will be included in http streams. This allows a client receiver to use HbbTV.">config.streaming.stream_ait</item>
                <item level="2" text="Include ECM in http streams" description="When enabled, ECM data will be included in http streams. This allows a client receiver to do the descrambling.">config.streaming.stream_ecm</item>
                <item level="2" text="Descramble http streams" description="When enabled, http streams are descrambled on the server side. The (remote) client receiver does not have to do descrambling.">config.streaming.descramble</item>
+               <item level="2" text="Descramble receiving http streams" description="When enabled, always descramble receiving http streams. This takes up more resources (descrambling demuxers), only enable if necessary. Individual streams are always descrambled if 0x100 is added to the service type, regardless of this setting.">config.streaming.descramble_client</item>
                <item level="2" text="Require authentication for http streams" description="When enabled, authentication is required to watch http streams.">config.streaming.authentication</item>
                <item level="2" text="Fan operation" description="Configure how the fan should operate" requires="Fan">config.usage.fan</item>
                <item level="2" text="Fan speed" description="Configure the speed of the fan" requires="FanPWM">config.usage.fanspeed</item>
index 0f03b5a..b7c9b00 100644 (file)
@@ -575,6 +575,7 @@ def InitUsageConfig():
        config.streaming = ConfigSubsection()
        config.streaming.stream_ecm = ConfigYesNo(default = False)
        config.streaming.descramble = ConfigYesNo(default = True)
+       config.streaming.descramble_client = ConfigYesNo(default = False)
        config.streaming.stream_eit = ConfigYesNo(default = True)
        config.streaming.stream_ait = ConfigYesNo(default = True)
        config.streaming.authentication = ConfigYesNo(default = False)
index 68eb303..d613c9f 100644 (file)
@@ -1368,7 +1368,13 @@ RESULT eDVBServicePlay::start()
                 * streams are considered to be descrambled by default;
                 * user can indicate a stream is scrambled, by using servicetype id + 0x100
                 */
+               bool config_descramble_client = eConfigManager::getConfigBoolValue("config.streaming.descramble_client", false);
+
                scrambled = (m_reference.type == eServiceFactoryDVB::id + 0x100);
+
+               if(config_descramble_client)
+                       scrambled = true;
+
                type = eDVBServicePMTHandler::streamclient;
        }
 
index c11293d..40c8b92 100644 (file)
@@ -8,7 +8,7 @@
        /* for cutlist */
 #include <byteswap.h>
 #include <netinet/in.h>
-
+#include <lib/base/nconfig.h> // access to python config
 
 DEFINE_REF(eDVBServiceRecord);
 
@@ -241,7 +241,13 @@ int eDVBServiceRecord::doPrepare()
                                * streams are considered to be descrambled by default;
                                * user can indicate a stream is scrambled, by using servicetype id + 0x100
                                */
+                               bool config_descramble_client = eConfigManager::getConfigBoolValue("config.streaming.descramble_client", false);
+
                                m_descramble = (m_ref.type == eServiceFactoryDVB::id + 0x100);
+
+                               if(config_descramble_client)
+                                       m_descramble = true;
+
                                m_record_ecm = false;
                                servicetype = eDVBServicePMTHandler::streamclient;
                                eHttpStream *f = new eHttpStream();