本文整理汇总了C++中CPVRChannel::IsRecording方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannel::IsRecording方法的具体用法?C++ CPVRChannel::IsRecording怎么用?C++ CPVRChannel::IsRecording使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannel
的用法示例。
在下文中一共展示了CPVRChannel::IsRecording方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartRecordingOnPlayingChannel
bool CPVRManager::StartRecordingOnPlayingChannel(bool bOnOff)
{
bool bReturn = false;
CPVRChannel channel;
if (!m_addons->GetPlayingChannel(channel))
return bReturn;
if (m_addons->HasTimerSupport(channel.ClientID()))
{
/* timers are supported on this channel */
if (bOnOff && !channel.IsRecording())
{
CPVRTimerInfoTag *newTimer = m_timers->InstantTimer(&channel);
if (!newTimer)
CGUIDialogOK::ShowAndGetInput(19033,0,19164,0);
else
bReturn = true;
}
else if (!bOnOff && channel.IsRecording())
{
/* delete active timers */
bReturn = m_timers->DeleteTimersOnChannel(channel, false, true);
}
}
return bReturn;
}
示例2: ToggleRecordingOnChannel
bool CPVRManager::ToggleRecordingOnChannel(unsigned int iChannelId)
{
bool bReturn = false;
CPVRChannel *channel;
channel = m_channelGroups->GetChannelById(iChannelId);
if (!channel)
return bReturn;
if (m_addons->HasTimerSupport(channel->ClientID()))
{
/* timers are supported on this channel */
if (!channel->IsRecording())
{
CPVRTimerInfoTag *newTimer = m_timers->InstantTimer(channel);
if (!newTimer)
CGUIDialogOK::ShowAndGetInput(19033,0,19164,0);
else
bReturn = true;
}
else
{
/* delete active timers */
bReturn = m_timers->DeleteTimersOnChannel(*channel, false, true);
}
}
return bReturn;
}
示例3: UpdateFromClient
bool CPVRChannel::UpdateFromClient(const CPVRChannel &channel)
{
bool bChanged = false;
bChanged = SetClientID(channel.ClientID()) || bChanged;
bChanged = SetClientChannelNumber(channel.ClientChannelNumber()) || bChanged;
bChanged = SetClientChannelName(channel.ClientChannelName()) || bChanged;
bChanged = SetInputFormat(channel.InputFormat()) || bChanged;
bChanged = SetStreamURL(channel.StreamURL()) || bChanged;
bChanged = SetEncryptionSystem(channel.EncryptionSystem()) || bChanged;
bChanged = SetRecording(channel.IsRecording()) || bChanged;
if (m_strChannelName.IsEmpty())
{
m_strChannelName = channel.ClientChannelName();
bChanged = true;
}
if (m_strIconPath.IsEmpty())
{
m_strIconPath = channel.IconPath();
bChanged = true;
}
return bChanged;
}
示例4: RecordCurrentChannel
JSON_STATUS CPVROperations::RecordCurrentChannel(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
{
if (!g_PVRManager.IsStarted())
{
CLog::Log(LOGDEBUG, "JSONRPC: PVR not started");
return FailedToExecute;
}
CPVRChannel currentChannel;
if (g_PVRManager.GetCurrentChannel(currentChannel))
{
bool bOnOff = !currentChannel.IsRecording();
if (g_PVRManager.StartRecordingOnPlayingChannel(bOnOff))
{
CLog::Log(LOGDEBUG, "JSONRPC: set recording on currently playing channel to '%s'", bOnOff ? "on" : "off" );
return ACK;
}
else
{
CLog::Log(LOGERROR, "JSONRPC: unable to set recording to '%s'", bOnOff ? "on" : "off" );
return InternalError;
}
}
else
{
CLog::Log(LOGERROR, "JSONRPC: failed to start recording - no channel is playing");
return FailedToExecute;
}
}
示例5: WriteClientChannelInfo
void CPVRClient::WriteClientChannelInfo(const CPVRChannel &xbmcChannel, PVR_CHANNEL &addonChannel)
{
addonChannel.iUniqueId = xbmcChannel.UniqueID();
addonChannel.iChannelNumber = xbmcChannel.ClientChannelNumber();
addonChannel.strChannelName = xbmcChannel.ClientChannelName().c_str();
addonChannel.strIconPath = xbmcChannel.IconPath().c_str();
addonChannel.iEncryptionSystem = xbmcChannel.EncryptionSystem();
addonChannel.bIsRadio = xbmcChannel.IsRadio();
addonChannel.bIsHidden = xbmcChannel.IsHidden();
addonChannel.bIsRecording = xbmcChannel.IsRecording();
addonChannel.strInputFormat = xbmcChannel.InputFormat().c_str();
addonChannel.strStreamURL = xbmcChannel.StreamURL().c_str();
}
示例6: GetContextButtons
void CGUIWindowPVRChannels::GetContextButtons(int itemNumber, CContextButtons &buttons) const
{
if (itemNumber < 0 || itemNumber >= m_parent->m_vecItems->Size())
return;
CFileItemPtr pItem = m_parent->m_vecItems->Get(itemNumber);
CPVRChannel *channel = pItem->GetPVRChannelInfoTag();
if (pItem->GetPath() == "pvr://channels/.add.channel")
{
/* If yes show only "New Channel" on context menu */
buttons.Add(CONTEXT_BUTTON_ADD, 19046); /* add new channel */
}
else
{
buttons.Add(CONTEXT_BUTTON_INFO, 19047); /* channel info */
buttons.Add(CONTEXT_BUTTON_FIND, 19003); /* find similar program */
buttons.Add(CONTEXT_BUTTON_PLAY_ITEM, 19000); /* switch to channel */
buttons.Add(CONTEXT_BUTTON_RECORD_ITEM, channel->IsRecording() ? 19256 : 19255); /* start/stop recording on channel */
buttons.Add(CONTEXT_BUTTON_SET_THUMB, 20019); /* change icon */
buttons.Add(CONTEXT_BUTTON_GROUP_MANAGER, 19048); /* group manager */
buttons.Add(CONTEXT_BUTTON_HIDE, m_bShowHiddenChannels ? 19049 : 19054); /* show/hide channel */
if (m_parent->m_vecItems->Size() > 1 && !m_bShowHiddenChannels)
buttons.Add(CONTEXT_BUTTON_MOVE, 116); /* move channel up or down */
if (m_bShowHiddenChannels || g_PVRChannelGroups->GetGroupAllTV()->GetNumHiddenChannels() > 0)
buttons.Add(CONTEXT_BUTTON_SHOW_HIDDEN, m_bShowHiddenChannels ? 19050 : 19051); /* show hidden/visible channels */
if (g_PVRClients->HasMenuHooks(pItem->GetPVRChannelInfoTag()->ClientID(), PVR_MENUHOOK_CHANNEL))
buttons.Add(CONTEXT_BUTTON_MENU_HOOKS, 19195); /* PVR client specific action */
CPVRChannel *channel = pItem->GetPVRChannelInfoTag();
buttons.Add(CONTEXT_BUTTON_ADD_LOCK, channel->IsLocked() ? 19258 : 19257); /* show lock/unlock channel */
buttons.Add(CONTEXT_BUTTON_FILTER, 19249); /* filter channels */
buttons.Add(CONTEXT_BUTTON_UPDATE_EPG, 19251); /* update EPG information */
}
}
示例7: IsRecordingOnPlayingChannel
bool CPVRClients::IsRecordingOnPlayingChannel(void) const
{
CPVRChannel currentChannel;
return GetPlayingChannel(currentChannel) && currentChannel.IsRecording();
}