本文整理汇总了C++中Channel::GetDvbLinkID方法的典型用法代码示例。如果您正苦于以下问题:C++ Channel::GetDvbLinkID方法的具体用法?C++ Channel::GetDvbLinkID怎么用?C++ Channel::GetDvbLinkID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel::GetDvbLinkID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Number
Channel::Channel(Channel& channel)
: m_id(channel.GetID()),
m_dvbLinkId(channel.GetDvbLinkID()),
m_name(channel.GetName()),
m_type(channel.GetChannelType()),
Number(channel.Number),
SubNumber(channel.SubNumber),
ChildLock(channel.ChildLock),
m_logo_url(channel.GetLogoUrl())
{
}
示例2: OpenLiveStream
bool DVBLinkClient::OpenLiveStream(const PVR_CHANNEL &channel, bool use_timeshift, bool use_transcoder, int width, int height, int bitrate, std::string audiotrack)
{
bool ret_val = false;
//if transcoding is requested and no transcoder is supported return false
if (use_transcoder && !transcoding_supported_)
{
XBMC->QueueNotification(QUEUE_ERROR, XBMC->GetLocalizedString(32024));
return false;
}
PLATFORM::CLockObject critsec(m_mutex);
if (m_live_streamer)
{
SAFE_DELETE(m_live_streamer);
}
//time-shifted playback always uses raw http stream type - no transcoding option is possible now
if (use_timeshift)
m_live_streamer = new TimeShiftBuffer(XBMC);
else
m_live_streamer = new LiveTVStreamer(XBMC);
//adjust transcoded height and width if needed
int w = width == 0 ? GUI->GetScreenWidth() : width;
int h = height == 0 ? GUI->GetScreenHeight() : height;
Channel * c = m_channelMap[channel.iUniqueId];
StreamRequest* sr = m_live_streamer->GetStreamRequest(c->GetDvbLinkID(), m_clientname, m_hostname, use_transcoder, w, h, bitrate, audiotrack);
if (sr != NULL)
{
std::string url;
if (StartStreaming(channel, sr, url))
{
m_live_streamer->Start(url);
ret_val = true;
}
else
{
delete m_live_streamer;
m_live_streamer = NULL;
}
delete sr;
}
else
{
XBMC->Log(LOG_ERROR, "m_live_streamer->GetStreamRequest returned NULL. (channel %i)", channel.iUniqueId);
delete m_live_streamer;
m_live_streamer = NULL;
}
return ret_val;
}