bool CDVDInputStreamHTSP::GetChannels(SChannelV &channels, SChannelV::iterator &it) { for(SChannels::iterator it2 = m_channels.begin(); it2 != m_channels.end(); ++it2) { if(m_tag == 0 || it2->second.MemberOf(m_tag)) channels.push_back(it2->second); } sort(channels.begin(), channels.end()); for(it = channels.begin(); it != channels.end(); ++it) if(it->id == m_channel) return true; return false; }
bool CDVDInputStreamHTSP::PrevChannel(bool preview/* = false*/) { SChannelV channels; SChannelV::iterator it; if(!GetChannels(channels, it)) return false; SChannelC circ(channels.begin(), channels.end(), it); if(--circ == it) return false; else return SetChannel(circ->id); }
bool CDVDInputStreamHTSP::NextChannel() { SChannelV channels; SChannelV::iterator it; if(!GetChannels(channels, it)) return false; SChannelC circ(channels.begin(), channels.end(), it); if(++circ == it) return false; else return SetChannel(circ->id); }