// we don't allow skipping in menu's cause it will remove menu overlays void CDVDInputStreamNavigator::OnPrevious() { if (m_dvdnav && !IsInMenu()) { m_dll.dvdnav_prev_pg_search(m_dvdnav); } }
// we don't allow skipping in menu's cause it will remove menu overlays void CDVDInputStreamNavigator::OnPrevious() { if (m_dvdnav && !(IsInMenu() && GetTotalButtons() > 0)) { m_dll.dvdnav_prev_pg_search(m_dvdnav); } }
// we don't allow skipping in menu's cause it will remove menu overlays void CDVDInputStreamNavigator::OnNext() { if (m_dvdnav && !IsInMenu()) { m_dll.dvdnav_next_pg_search(m_dvdnav); } }
bool CDVDInputStreamNavigator::SeekChapter(int iChapter) { if (!m_dvdnav) return false; // cannot allow to return true in case of buttons (overlays) because otherwise back in DVDPlayer FlushBuffers will remove menu overlays // therefore we just skip the request in case there are buttons and return false if (IsInMenu() && GetTotalButtons() > 0) { CLog::Log(LOGDEBUG, "%s - Seeking chapter is not allowed in menu set with buttons", __FUNCTION__); return false; } bool enabled = IsSubtitleStreamEnabled(); int audio = GetActiveAudioStream(); int subtitle = GetActiveSubtitleStream(); if (iChapter == (m_iPart + 1)) { if (m_dll.dvdnav_next_pg_search(m_dvdnav) == DVDNAV_STATUS_ERR) { CLog::Log(LOGERROR, "dvdnav: dvdnav_next_pg_search( %s )", m_dll.dvdnav_err_to_string(m_dvdnav)); return false; } } else if (iChapter == (m_iPart - 1)) { if (m_dll.dvdnav_prev_pg_search(m_dvdnav) == DVDNAV_STATUS_ERR) { CLog::Log(LOGERROR, "dvdnav: dvdnav_prev_pg_search( %s )", m_dll.dvdnav_err_to_string(m_dvdnav)); return false; } } else if (m_dll.dvdnav_part_play(m_dvdnav, m_iTitle, iChapter) == DVDNAV_STATUS_ERR) { CLog::Log(LOGERROR, "dvdnav: dvdnav_part_play failed( %s )", m_dll.dvdnav_err_to_string(m_dvdnav)); return false; } SetActiveSubtitleStream(subtitle); SetActiveAudioStream(audio); EnableSubtitleStream(enabled); return true; }
bool BDRingBuffer::HandleAction(const QStringList &actions, int64_t pts) { if (!m_isHDMVNavigation) return false; if (actions.contains(ACTION_MENUTEXT)) { PressButton(BD_VK_POPUP, pts); return true; } if (!IsInMenu()) return false; bool handled = true; if (actions.contains(ACTION_UP) || actions.contains(ACTION_CHANNELUP)) { PressButton(BD_VK_UP, pts); } else if (actions.contains(ACTION_DOWN) || actions.contains(ACTION_CHANNELDOWN)) { PressButton(BD_VK_DOWN, pts); } else if (actions.contains(ACTION_LEFT) || actions.contains(ACTION_SEEKRWND)) { PressButton(BD_VK_LEFT, pts); } else if (actions.contains(ACTION_RIGHT) || actions.contains(ACTION_SEEKFFWD)) { PressButton(BD_VK_RIGHT, pts); } else if (actions.contains(ACTION_0)) { PressButton(BD_VK_0, pts); } else if (actions.contains(ACTION_1)) { PressButton(BD_VK_1, pts); } else if (actions.contains(ACTION_2)) { PressButton(BD_VK_2, pts); } else if (actions.contains(ACTION_3)) { PressButton(BD_VK_3, pts); } else if (actions.contains(ACTION_4)) { PressButton(BD_VK_4, pts); } else if (actions.contains(ACTION_5)) { PressButton(BD_VK_5, pts); } else if (actions.contains(ACTION_6)) { PressButton(BD_VK_6, pts); } else if (actions.contains(ACTION_7)) { PressButton(BD_VK_7, pts); } else if (actions.contains(ACTION_8)) { PressButton(BD_VK_8, pts); } else if (actions.contains(ACTION_9)) { PressButton(BD_VK_9, pts); } else if (actions.contains(ACTION_SELECT)) { PressButton(BD_VK_ENTER, pts); } else handled = false; return handled; }