解决mstar芯片638平台onAtvSignalEvent事件不上报问题

来源:互联网 发布:恒讯营销软件 编辑:程序博客网 时间:2024/05/21 05:17

        系统开发过程中,发现对模拟信号源的电缆进行插拔操作,界面显示没有变化,跟踪代码发现原来onAtvSignalEvent事件没有上报上来,继续追溯源码,跟踪致HAL层,发现原来Mstar的源码对这一块有特殊处理,默认当输入信号源是ATV时不上报无信号的状态,把原本的条件去掉就行了,Mark一下!

        / vendor/mstar/supernova/projects/msrv/common/src/MSrv_Player.cpp

BOOL MSrv_Player::noSignalCheck_Handler(EN_SIGNAL_LOCK_CHECK_TYPE &status){    //mapi_scope_lock(lock, &m_mutex);    BOOL ret = TRUE;    U32 MAX_NO_SIGNAL_RETRY_COUNT = 0;    if(IsSrcDTV(m_CurrentSrcType) || IsSrcHDMI(m_CurrentSrcType))    {        if(MSrv_Control::GetInstance()->IsSourceChanging())        {            return ret;        }        MAX_NO_SIGNAL_RETRY_COUNT = DIGITAL_NO_SIGNAL_RETRY_COUNT;    }    else    {        MAX_NO_SIGNAL_RETRY_COUNT = ANALOG_NO_SIGNAL_RETRY_COUNT;    }    if(IsSignalStable() == TRUE)    {        status = E_SIGNAL_ALREADY_LOCK;        m_u16SignalUnLockedCount = 0;        if(m_u16SignalLockedCount == 0)        {            status = E_SIGNAL_LOCK;            m_u16SignalLockedCount = 1;            printf("Detect >>>>>>>>>>>>>>>> Signal Locked!!!\n");#if (MSTAR_TVOS == 0)            //CTV Patch Begin , removed by Haming , Post signal_lock event when current input source is ATV;            //if(m_CurrentSrcType != MAPI_INPUT_SOURCE_ATV)#endif            //{                if(m_PipXCWin == MAPI_MAIN_WINDOW)                {                    if (m_enSignalStatus != E_SIGNAL_LOCK)                    {                        ret = PostEvent(0, EV_SIGNAL_LOCK, m_CurrentSrcType);                        if (FALSE == ret)                        {                            m_u16SignalLockedCount = 0; // force re-send this event                        }                        else                        {                            m_enSignalStatus = E_SIGNAL_LOCK;                        }                    }                }            //}            // CTV Patch End        }    }    else    {        BOOL bExceedRetryCount = FALSE;        status = E_SIGNAL_UNLOCK;        m_u16SignalLockedCount = 0;        if(IsSrcDTV(m_CurrentSrcType)|| IsSrcHDMI(m_CurrentSrcType))        {            if(m_u16SignalUnLockedCount == DIGITAL_NO_SIGNAL_RETRY_COUNT)            {                bExceedRetryCount = TRUE;            }        }        else        {            if(m_u16SignalUnLockedCount == ANALOG_NO_SIGNAL_RETRY_COUNT)            {                bExceedRetryCount = TRUE;            }        }        if(bExceedRetryCount)        {            status = E_NOSIGNAL;            m_u16SignalUnLockedCount++;            printf("Detect >>>>>>>>>>>>>>>> Signal unLocked!!!\n");            // CTV Patch Begin            char value[8] = {};            char atvBlueScreenProperty[8] = {};            property_get("client.config",value,"0");            property_get("ro.sys.atvbluescreen",atvBlueScreenProperty,"0");            //CTV Patch Begin , removed by Haming , Post signal_lock event when current input source is ATV            //if((m_CurrentSrcType != MAPI_INPUT_SOURCE_ATV) || (strcmp("PPTV",value) == 0) || (strncmp("1",atvBlueScreenProperty,1) == 0))            // CTV Patch End            //{                printf(">>>>>>>>>>>>>>>> Set buleScreen!!!\n");                if(m_PipXCWin == MAPI_MAIN_WINDOW)                {                    if (m_enSignalStatus != E_NOSIGNAL)                    {                        ret = PostEvent(0, EV_SIGNAL_UNLOCK, m_CurrentSrcType);                        if (FALSE == ret)                        {                            m_u16SignalUnLockedCount--; // force re-send this event                        }                        else                        {                            m_enSignalStatus = E_NOSIGNAL;                            // CTV Patch Begin                            if (!IsSrcStorage(m_CurrentSrcType))                            {                                MS_BOOT_SETTING value;                                MSrv_Control::GetInstance()->GetMSrvSystemDatabase()->GetBootSetting(&value);                                mapi_video *pVideo;                                pVideo = mapi_interface::Get_mapi_video(MSrv_Control::GetInstance()->GetCurrentInputSource());                                if ((pVideo != NULL)                                    && ((mapi_video_datatype::E_SCREEN_MUTE_BLACK != value.enMuteColor)// Bluescreen Flag                                    || (mapi_video_datatype::E_SCREEN_MUTE_BLACK != value.enFrameColor)))                                {                                    pVideo->setMuteColor((mapi_video_datatype::MAPI_VIDEO_Screen_Mute_Color)value.enMuteColor, MUTE_ENGINE_XC);                                    pVideo->setFrameColor((mapi_video_datatype::MAPI_VIDEO_Screen_Mute_Color)value.enFrameColor, MUTE_ENGINE_XC);                                    if (pVideo->IsVideoMute() == MAPI_FALSE)                                    {                                        pVideo->SetVideoMute(MAPI_TRUE);                                    }                                }                            }                            // CTV Patch End                        }                    }                }            //}            // CTV Patch End , removed by Haming        }        else if(m_u16SignalUnLockedCount < MAX_NO_SIGNAL_RETRY_COUNT)        {            ret = FALSE;            m_u16SignalUnLockedCount++;        }    }    return ret;}


原创粉丝点击