当前位置: 首页>>代码示例>>C++>>正文


C++ Channel::GetDvbLinkID方法代码示例

本文整理汇总了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())
{

}
开发者ID:janbar,项目名称:pvr.dvblink,代码行数:12,代码来源:channel.cpp

示例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;
}
开发者ID:MrMC,项目名称:pvr.dvblink,代码行数:53,代码来源:DVBLinkClient.cpp


注:本文中的Channel::GetDvbLinkID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。