Skip to content

Commit

Permalink
[multistream] errors and typos fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dvb-adenin committed Oct 16, 2016
1 parent 7840248 commit c2ca218
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
9 changes: 5 additions & 4 deletions lib/dvb/db.cpp
Expand Up @@ -14,6 +14,7 @@
#include <dvbsi++/descriptor_tag.h>
#include <dvbsi++/service_descriptor.h>
#include <dvbsi++/satellite_delivery_system_descriptor.h>
#include <dvbsi++/s2_satellite_delivery_system_descriptor.h>
#include <dirent.h>

DEFINE_REF(eDVBService);
Expand Down Expand Up @@ -681,8 +682,8 @@ void eDVBDB::saveServicelist(const char *file)
sat.system, sat.modulation, sat.rolloff, sat.pilot);

if (sat.is_id != NO_STREAM_ID_FILTER ||
(sat.pls_code & 0x3FFFF) != eDVBFrontendParametersSatellite::PLS_Root ||
(sat.pls_mode & 3) != 0)
(sat.pls_code & 0x3FFFF) != 0 ||
(sat.pls_mode & 3) != eDVBFrontendParametersSatellite::PLS_Root)
{
fprintf(f, ":%d:%d:%d",
sat.is_id, sat.pls_code & 0x3FFFF, sat.pls_mode & 3);
Expand Down Expand Up @@ -1196,8 +1197,8 @@ PyObject *eDVBDB::readSatellites(ePyObject sat_list, ePyObject sat_dict, ePyObje
pilot = eDVBFrontendParametersSatellite::Pilot_Unknown;
rolloff = eDVBFrontendParametersSatellite::RollOff_alpha_0_35;
is_id = NO_STREAM_ID_FILTER;
pls_code = eDVBFrontendParametersSatellite::PLS_Root;
pls_mode = 0;
pls_mode = eDVBFrontendParametersSatellite::PLS_Root;
pls_code = 0;
tsid = -1;
onid = -1;

Expand Down
1 change: 1 addition & 0 deletions lib/dvb/fastscan.h
Expand Up @@ -14,6 +14,7 @@
#include <dvbsi++/network_name_descriptor.h>
#include <dvbsi++/service_list_descriptor.h>
#include <dvbsi++/satellite_delivery_system_descriptor.h>
#include <dvbsi++/s2_satellite_delivery_system_descriptor.h>

/* HACK: fastscan table uses a nonstandard version of the LogicalChannel descriptor, with 14bit channel numbers (instead of 10bit), and a nonstandard definition of a 'hidden' flag */
class FastScanLogicalChannel
Expand Down
24 changes: 22 additions & 2 deletions lib/dvb/frontend.cpp
Expand Up @@ -81,6 +81,22 @@ void eDVBDiseqcCommand::setCommandString(const char *str)
len = slen/2;
}

void eDVBFrontendParametersSatellite::set(const S2SatelliteDeliverySystemDescriptor &descriptor)
{
if(descriptor.getScramblingSequenceSelector())
{
is_id = descriptor.getInputStreamIdentifier();
pls_mode = eDVBFrontendParametersSatellite::PLS_Root;
pls_code = descriptor.getScramblingSequenceIndex();
}
else
{
is_id = NO_STREAM_ID_FILTER;
pls_mode = eDVBFrontendParametersSatellite::PLS_Root;
pls_code = 0;
}
}

void eDVBFrontendParametersSatellite::set(const SatelliteDeliverySystemDescriptor &descriptor)
{
frequency = descriptor.getFrequency() * 10;
Expand Down Expand Up @@ -3404,7 +3420,10 @@ eDVBRegisteredFrontend *eDVBFrontend::getLast(eDVBRegisteredFrontend *fe)

bool eDVBFrontend::is_multistream()
{
#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 8
//#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 8
#if DVB_API_VERSION >= 5
if(!strcmp(m_description, "TBS-5925"))
return true;
if(!strcmp(m_description, "GIGA DVB-S2 NIM (SP2246T)"))
return true;
return fe_info.caps & FE_CAN_MULTISTREAM;
Expand Down Expand Up @@ -3442,7 +3461,8 @@ std::string eDVBFrontend::getCapabilities()
if (fe_info.caps & FE_CAN_8VSB) ss << "FE_CAN_8VSB" << std::endl;
if (fe_info.caps & FE_CAN_16VSB) ss << "FE_CAN_16VSB" << std::endl;
if (fe_info.caps & FE_HAS_EXTENDED_CAPS) ss << "FE_HAS_EXTENDED_CAPS" << std::endl;
#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 8
//#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 8
#if DVB_API_VERSION >= 5
if (fe_info.caps & FE_CAN_MULTISTREAM) ss << "FE_CAN_MULTISTREAM" << std::endl;
#endif
if (fe_info.caps & FE_CAN_TURBO_FEC) ss << "FE_CAN_TURBO_FEC" << std::endl;
Expand Down
2 changes: 2 additions & 0 deletions lib/dvb/frontendparms.h
Expand Up @@ -4,6 +4,7 @@
#include <vector>

#include <dvbsi++/satellite_delivery_system_descriptor.h>
#include <dvbsi++/s2_satellite_delivery_system_descriptor.h>
#include <dvbsi++/cable_delivery_system_descriptor.h>
#include <dvbsi++/terrestrial_delivery_system_descriptor.h>
#include <dvbsi++/t2_delivery_system_descriptor.h>
Expand All @@ -20,6 +21,7 @@ struct eDVBFrontendParametersSatellite
{
#ifndef SWIG
void set(const SatelliteDeliverySystemDescriptor &);
void set(const S2SatelliteDeliverySystemDescriptor &);
#endif
enum {
Polarisation_Horizontal, Polarisation_Vertical, Polarisation_CircularLeft, Polarisation_CircularRight
Expand Down
9 changes: 9 additions & 0 deletions lib/dvb/scan.cpp
Expand Up @@ -3,6 +3,7 @@
#include <dvbsi++/descriptor_tag.h>
#include <dvbsi++/service_descriptor.h>
#include <dvbsi++/satellite_delivery_system_descriptor.h>
#include <dvbsi++/s2_satellite_delivery_system_descriptor.h>
#include <dvbsi++/terrestrial_delivery_system_descriptor.h>
#include <dvbsi++/t2_delivery_system_descriptor.h>
#include <dvbsi++/logical_channel_descriptor.h>
Expand Down Expand Up @@ -740,6 +741,14 @@ void eDVBScan::channelDone()
// we handle it later
break;
}
case S2_SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR:
{
eDebug("[adenin] S2_SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR found");
if (system != iDVBFrontend::feSatellite)
break; // when current locked transponder is no satellite transponder ignore this descriptor

S2SatelliteDeliverySystemDescriptor &d = (S2SatelliteDeliverySystemDescriptor&)**desc;
}
case SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR:
{
if (system != iDVBFrontend::feSatellite)
Expand Down
2 changes: 2 additions & 0 deletions lib/python/Screens/ScanSetup.py
Expand Up @@ -899,6 +899,8 @@ def createConfig(self):
defaultSat["rolloff"] = frontendData.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35)
defaultSat["pilot"] = frontendData.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown)
defaultSat["is_id"] = frontendData.get("is_id", 0)
defaultSat["pls_mode"] = frontendData.get("pls_mode", eDVBFrontendParametersSatellite.PLS_Root)
defaultSat["pls_code"] = frontendData.get("pls_code", 0)
else:
defaultSat["fec"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
defaultSat["modulation"] = frontendData.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
Expand Down

0 comments on commit c2ca218

Please sign in to comment.