X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d58ca4cf34b7621aea4e2c1ff07bed6b2cd6b763..8dee6503eab837f0f1c0d2713f434c878dd63d08:/lib/service/servicedvb.cpp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 14c849db..60fb80ea 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1133,7 +1133,7 @@ RESULT eDVBServicePlay::pause(ePtr &ptr) RESULT eDVBServicePlay::setSlowMotion(int ratio) { - assert(ratio); /* The API changed: instead of calling setSlowMotion(0), call play! */ + ASSERT(ratio); /* The API changed: instead of calling setSlowMotion(0), call play! */ eDebug("eDVBServicePlay::setSlowMotion(%d)", ratio); setFastForward_internal(0); if (m_decoder) @@ -1145,7 +1145,7 @@ RESULT eDVBServicePlay::setSlowMotion(int ratio) RESULT eDVBServicePlay::setFastForward(int ratio) { eDebug("eDVBServicePlay::setFastForward(%d)", ratio); - assert(ratio); + ASSERT(ratio); return setFastForward_internal(ratio); } @@ -1184,7 +1184,7 @@ RESULT eDVBServicePlay::setFastForward_internal(int ratio) return -1; if (ffratio == 0) - ; /* return m_decoder->play(); is done in caller*/ + return 0; /* return m_decoder->play(); is done in caller*/ else if (ffratio != 1) return m_decoder->setFastForward(ffratio); else @@ -1684,6 +1684,8 @@ int eDVBServicePlay::selectAudioStream(int i) eDebug("set audio pid failed"); return -4; } + + m_decoder->set(); /* if we are not in PVR mode, timeshift is not active and we are not in pip mode, check if we need to enable the rds reader */ if (!(m_is_pvr || m_timeshift_active || !m_is_primary)) @@ -2291,8 +2293,18 @@ void eDVBServicePlay::updateDecoder() } } } - m_decoder->setAC3Delay(ac3_delay == -1 ? 0 : ac3_delay); - m_decoder->setPCMDelay(pcm_delay == -1 ? 0 : pcm_delay); + + std::string config_delay; + int config_delay_int = 0; + if(ePythonConfigQuery::getConfigValue("config.av.generalAC3delay", config_delay) == 0) + config_delay_int = atoi(config_delay.c_str()); + m_decoder->setAC3Delay(ac3_delay == -1 ? config_delay_int : ac3_delay + config_delay_int); + + if(ePythonConfigQuery::getConfigValue("config.av.generalPCMdelay", config_delay) == 0) + config_delay_int = atoi(config_delay.c_str()); + else + config_delay_int = 0; + m_decoder->setPCMDelay(pcm_delay == -1 ? config_delay_int : pcm_delay + config_delay_int); m_decoder->setVideoPID(vpid, vpidtype); selectAudioStream(); @@ -2306,13 +2318,6 @@ void eDVBServicePlay::updateDecoder() m_teletext_parser->start(program.textPid); -/* if (!m_is_primary) - m_decoder->setTrickmode(); - else */ if (m_is_paused) - m_decoder->pause(); - else - m_decoder->play(); - if (vpid > 0 && vpid < 0x2000) ; else @@ -2322,6 +2327,13 @@ void eDVBServicePlay::updateDecoder() m_decoder->setRadioPic(radio_pic); } +/* if (!m_is_primary) + m_decoder->setTrickmode(); + else */ if (m_is_paused) + m_decoder->pause(); + else + m_decoder->play(); + m_decoder->setAudioChannel(achannel); /* don't worry about non-existing services, nor pvr services */