PVR_ERROR PVRClientMythTV::GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP &group) { if (g_bExtraDebug) XBMC->Log(LOG_DEBUG, "%s - group: %s", __FUNCTION__, group.strGroupName); int i=0; for (std::vector<int>::iterator it = m_channelGroups.at(group.strGroupName).begin(); it != m_channelGroups.at(group.strGroupName).end(); it++) { PVR_CHANNEL_GROUP_MEMBER tag; memset(&tag, 0, sizeof(PVR_CHANNEL_GROUP_MEMBER)); if (m_channels.find(*it) != m_channels.end()) { MythChannel chan = m_channels.at(*it); if (group.bIsRadio == chan.IsRadio()) { tag.iChannelNumber = i++; tag.iChannelUniqueId = chan.ID(); PVR_STRCPY(tag.strGroupName, group.strGroupName); PVR->TransferChannelGroupMember(handle, &tag); } } } if (g_bExtraDebug) XBMC->Log(LOG_DEBUG, "%s - Done", __FUNCTION__); return PVR_ERROR_NO_ERROR; }
bool MythRecorder::IsTunable(MythChannel &channel) { m_conn.Lock(); XBMC->Log(LOG_DEBUG, "%s: called for recorder %i, channel %i", __FUNCTION__, ID(), channel.ID()); cmyth_inputlist_t inputlist = cmyth_get_free_inputlist(*m_recorder_t); bool ret = false; for (int i = 0; i < inputlist->input_count; ++i) { cmyth_input_t input = inputlist->input_list[i]; if ((int)input->sourceid != channel.SourceID()) { XBMC->Log(LOG_DEBUG, "%s: skip input, source id differs (channel: %i, input: %i)", __FUNCTION__, channel.SourceID(), input->sourceid); continue; } if (input->multiplexid && (int)input->multiplexid != channel.MultiplexID()) { XBMC->Log(LOG_DEBUG, "%s: skip input, multiplex id id differs (channel: %i, input: %i)", __FUNCTION__, channel.MultiplexID(), input->multiplexid); continue; } XBMC->Log(LOG_DEBUG,"%s: using recorder, input is tunable: source id: %i, multiplex id: channel: %i, input: %i)", __FUNCTION__, channel.SourceID(), channel.MultiplexID(), input->multiplexid); ret = true; break; } ref_release(inputlist); m_conn.Unlock(); if (!ret) { XBMC->Log(LOG_DEBUG,"%s: recorder is not tunable", __FUNCTION__); } return ret; }