public void getMtsInfo(int source) { this.mCurSource = source; if (mCurSource == TvCommonManager.INPUT_SOURCE_DTV) { mAudioInfo = TvChannelManager.getInstance().getAudioInfo(); mCurDTVAudioIndex = mAudioInfo.currentAudioIndex; if (mCurDTVAudioIndex < 0 || mCurDTVAudioIndex >= mAudioInfo.audioLangNum) { mCurDTVAudioIndex = 0; } showMtsInfo(); } else if (mCurSource == TvCommonManager.INPUT_SOURCE_ATV) { mAtvStrId = getSoundFormat(); showMtsInfo(); } }
public void changeMtsInfo(int source) { Log.e(TAG, "Change MTS information."); this.mCurSource = source; if (mCurSource == TvCommonManager.INPUT_SOURCE_DTV) { mAudioInfo = TvChannelManager.getInstance().getAudioInfo(); mCurDTVAudioIndex = mAudioInfo.currentAudioIndex; if (mCurDTVAudioIndex < 0 || mCurDTVAudioIndex >= mAudioInfo.audioLangNum) { mCurDTVAudioIndex = 0; } if (mCurDTVAudioIndex == 0 && mCurDTVAudioIndex < mAudioInfo.audioLangNum - 1) { mCurDTVAudioIndex = 1; } else if (mCurDTVAudioIndex == 1) { mCurDTVAudioIndex = 0; } showMtsInfo(); TvChannelManager.getInstance().switchAudioTrack(mCurDTVAudioIndex); } else if (mCurSource == TvCommonManager.INPUT_SOURCE_ATV) { TvCommonManager.getInstance().setToNextAtvMtsMode(); mAtvStrId = getSoundFormat(); showMtsInfo(); } mRefreshHandler.removeMessages(DIMISSCHANNELINFO); mRefreshHandler.sendEmptyMessageDelayed(DIMISSCHANNELINFO, DELAYDIMISSTIME); }