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


C++ ChannelList::begin方法代码示例

本文整理汇总了C++中ChannelList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ ChannelList::begin方法的具体用法?C++ ChannelList::begin怎么用?C++ ChannelList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ChannelList的用法示例。


在下文中一共展示了ChannelList::begin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: FindTunableCardIds

LiveTVPlayback::preferredCards_t LiveTVPlayback::FindTunableCardIds(const std::string& chanNum, const ChannelList& channels)
{
  // Make the set of channels matching the desired channel number
  ChannelList chanset;
  for (ChannelList::const_iterator it = channels.begin(); it != channels.end(); ++it)
  {
    if ((*it)->chanNum == chanNum)
      chanset.push_back(*it);
  }
  // Retrieve unlocked encoders and fill the list of preferred cards.
  // It is ordered by its key liveTVOrder and contains matching between channels
  // and card inputs using their respective sourceId and mplexId
  std::vector<int> ids = GetFreeCardIdList();
  preferredCards_t preferredCards;
  for (std::vector<int>::const_iterator itc = ids.begin(); itc != ids.end(); ++itc)
  {
    CardInputListPtr inputs = GetFreeInputs(*itc);
    for (CardInputList::const_iterator iti = inputs->begin(); iti != inputs->end(); ++iti)
    {
      for (ChannelList::const_iterator itchan = chanset.begin(); itchan != chanset.end(); ++itchan)
      {
        if ((*itchan)->sourceId == (*iti)->sourceId && ( (*iti)->mplexId == 0 || (*iti)->mplexId == (*itchan)->mplexId ))
        {
          preferredCards.insert(std::make_pair((*iti)->liveTVOrder, std::make_pair(*iti, *itchan)));
          DBG(MYTH_DBG_DEBUG, "%s: [%u] channel=%s(%" PRIu32 ") card=%" PRIu32 " input=%s(%" PRIu32 ") mplex=%" PRIu32 " source=%" PRIu32 "\n",
                  __FUNCTION__, (*iti)->liveTVOrder, (*itchan)->callSign.c_str(), (*itchan)->chanId,
                  (*iti)->cardId, (*iti)->inputName.c_str(), (*iti)->inputId, (*iti)->mplexId, (*iti)->sourceId);
          break;
        }
      }
    }
  }
  return preferredCards;
}
开发者ID:jshattoc,项目名称:pvr.mythtv,代码行数:34,代码来源:mythlivetvplayback.cpp

示例2: moveService

void CBouquet::moveService(const unsigned int oldPosition, const unsigned int newPosition, const unsigned char serviceType)
{
	ChannelList* channels = &tvChannels;
	switch (serviceType)
	{
		case ST_DIGITAL_TELEVISION_SERVICE:
		case ST_NVOD_REFERENCE_SERVICE:
		case ST_NVOD_TIME_SHIFTED_SERVICE:
			channels = &tvChannels;
			break;
			
		case ST_DIGITAL_RADIO_SOUND_SERVICE:
			channels = &radioChannels;
			break;
	}
	if ((oldPosition < channels->size()) && (newPosition < channels->size()))
	{
		ChannelList::iterator it = channels->begin();

		advance(it, oldPosition);
		CZapitChannel* tmp = *it;
		channels->erase(it);

		it = channels->begin();
		advance(it, newPosition);
		channels->insert(it, tmp);
	}
}
开发者ID:silid,项目名称:tuxbox-cvs-apps,代码行数:28,代码来源:bouquets.cpp

示例3: makeRemainingChannelsBouquet

void CBouquetManager::makeRemainingChannelsBouquet(void)
{
	ChannelList unusedChannels;
	set<t_channel_id> chans_processed;

	for (vector<CBouquet*>::const_iterator it = Bouquets.begin(); it != Bouquets.end(); ++it)
	{
		for (vector<CZapitChannel*>::iterator jt = (*it)->tvChannels.begin(); jt != (*it)->tvChannels.end(); ++jt)
			chans_processed.insert((*jt)->getChannelID());
		for (vector<CZapitChannel*>::iterator jt = (*it) ->radioChannels.begin(); jt != (*it)->radioChannels.end(); ++jt)
			chans_processed.insert((*jt)->getChannelID());
	}

	// TODO: use locales
	remainChannels = addBouquet(Bouquets.empty() ? "Alle Kan\xC3\xA4le" : "Andere"); // UTF-8 encoded

	for (tallchans::iterator it = allchans.begin(); it != allchans.end(); ++it)
		if (chans_processed.find(it->first) == chans_processed.end())
			unusedChannels.push_back(&(it->second));

	sort(unusedChannels.begin(), unusedChannels.end(), CmpChannelByChName());

	for (ChannelList::const_iterator it = unusedChannels.begin(); it != unusedChannels.end(); ++it)
		remainChannels->addService(findChannelByChannelID((*it)->getChannelID()));

	if ((remainChannels->tvChannels.empty()) && (remainChannels->radioChannels.empty()))
	{
		deleteBouquet(remainChannels);
		remainChannels = NULL;
	}
}
开发者ID:silid,项目名称:tuxbox-cvs-apps,代码行数:31,代码来源:bouquets.cpp

示例4: viewFromChannelName

ChannelList
channelsInView (const string & viewName,
	        const ChannelList & channelList,
		const StringVector & multiView)
{
    //
    // Return a list of all channels belonging to view viewName.
    //

    ChannelList q;

    for (ChannelList::ConstIterator i = channelList.begin();
	 i != channelList.end();
	 ++i)
    {
	//
	// Get view name for this channel
	//

	string view = viewFromChannelName (i.name(), multiView);


	//
	// Insert channel into q if it's a member of view viewName
	//

	if (view == viewName)
	   q.insert (i.name(), i.channel());
    }

    return q;
}
开发者ID:cathook,项目名称:rendering_final_proj,代码行数:32,代码来源:ImfMultiView.cpp

示例5: RemoveChannel

void ChannelMgr::RemoveChannel(Channel * chn)
{
    ChannelList::iterator itr;
    ChannelList * cl = &Channels[chn->m_team];
    DBCChannelMap::iterator itr2;
    DBCChannelMap *dbcchannel = &DBCChannels[chn->m_team];

    lock.Acquire();
    m_idToChannel.erase(chn->m_channelId);
    for(itr = cl->begin(); itr != cl->end(); itr++)
    {
        if(itr->second == chn)
        {
            cl->erase(itr);
            chn->m_lock.Release();
            delete chn;
            lock.Release();
            return;
        }
    }

    for(itr2 = dbcchannel->begin(); itr2 != dbcchannel->end(); itr2++)
    {
        if(itr2->second.second == chn)
        {
            dbcchannel->erase(itr2);
            chn->m_lock.Release();
            delete chn;
            lock.Release();
            return;
        }
    }

    lock.Release();
}
开发者ID:WowDevs,项目名称:Sandshroud,代码行数:35,代码来源:Channel.cpp

示例6:

Channel * ChannelMgr::GetChannel(const char *name, uint32 team)
{
    uint32 rteam = seperatechannels ? team : 0;

    lock.Acquire();
    ChannelList * cl = &Channels[rteam];
    for(ChannelList::iterator itr = cl->begin(); itr != cl->end(); itr++)
    {
        if(!stricmp(name, itr->first.c_str()))
        {
            lock.Release();
            return itr->second;
        }
    }

    DBCChannelMap::iterator itr2;
    DBCChannelMap *dbcchannel = &DBCChannels[rteam];
    for(itr2 = dbcchannel->begin(); itr2 != dbcchannel->end(); itr2++)
    {
        if(!stricmp(name, itr2->second.first.c_str()))
        {
            lock.Release();
            return itr2->second.second;
        }
    }

    lock.Release();
    return NULL;
}
开发者ID:WowDevs,项目名称:Sandshroud,代码行数:29,代码来源:Channel.cpp

示例7: areCounterparts

ChannelList
channelInAllViews (const string &channelName,
		   const ChannelList &channelList,
		   const StringVector &multiView)
{
    //
    // Given the name of a channel, return a
    // list of the same channel in all views.
    //

    ChannelList q;

    for (ChannelList::ConstIterator i=channelList.begin();
	 i != channelList.end();
	 ++i)
    {
	if (i.name() == channelName ||
	    areCounterparts (i.name(), channelName, multiView))
	{
	    q.insert (i.name(), i.channel());
	}
    }

    return q;
}
开发者ID:cathook,项目名称:rendering_final_proj,代码行数:25,代码来源:ImfMultiView.cpp

示例8: convertChannelNames

// Utility to fill the given array with the names of all the channels
inline void vtkOpenEXR::convertChannelNames(const ChannelList & channels, std::vector<std::string> & result)
{
    typedef ChannelList::ConstIterator CIter;

    for (CIter it = channels.begin(); it != channels.end(); ++it) {
        result.push_back(std::string(it.name()));
    }
}
开发者ID:WeiqiJust,项目名称:CHER-Ob,代码行数:9,代码来源:vtkOpenEXR.cpp

示例9: FindMatchingChannel

ChannelInfo ChannelData::FindMatchingChannel(const ChannelInfo &chanInfo,
                                             ChannelList existingChannels) const
{
    ChannelList::iterator it;
    for (it = existingChannels.begin(); it != existingChannels.end(); ++it)
    {
        if ((*it).xmltvid == chanInfo.xmltvid)
            return (*it);
    }

    QString searchKey = normalizeChannelKey(chanInfo.name);
    ChannelInfo existChan = existingChannels.value(searchKey);

    if (existChan.chanid < 1)
    {
        // Check if it is ATSC
        int chansep = chanInfo.channum.indexOf(QRegExp("\\D"));
        if (chansep > 0)
        {
            // Populate xmltvid for scanned ATSC channels
            uint major = chanInfo.channum.left(chansep).toInt();
            uint minor = chanInfo.channum.right
                         (chanInfo.channum.length() - (chansep + 1)).toInt();

            for (it = existingChannels.begin();
                 it != existingChannels.end(); ++it)
            {
                if ((*it).atsc_major_chan == major &&
                    (*it).atsc_minor_chan == minor)
                    return (*it);
            }
        }
    }

    return existChan;
}
开发者ID:,项目名称:,代码行数:36,代码来源:

示例10: begin

bool		
ChannelList::operator == (const ChannelList &other) const
{
    ConstIterator i = begin();
    ConstIterator j = other.begin();

    while (i != end() && j != other.end())
    {
	if (!(i.channel() == j.channel()))
	    return false;

	++i;
	++j;
    }

    return i == end() && j == other.end();
}
开发者ID:Archeleus,项目名称:rrender,代码行数:17,代码来源:ImfChannelList.cpp

示例11: printPixelType

void
printChannelList (const ChannelList &cl)
{
    for (ChannelList::ConstIterator i = cl.begin(); i != cl.end(); ++i)
    {
        cout << "\n    " << i.name() << ", ";

        printPixelType (i.channel().type);

        cout << ", sampling " <<
        i.channel().xSampling << " " <<
        i.channel().ySampling;

        if (i.channel().pLinear)
            cout << ", plinear";
    }
}
开发者ID:GYingchao,项目名称:openexr,代码行数:17,代码来源:main.cpp

示例12:

Channel * ChannelMgr::GetChannel(const char *name, uint32 team)
{
	ChannelList::iterator itr;
	ChannelList * cl = &Channels[0];
	if(seperatechannels)
		cl = &Channels[team];

	lock.Acquire();
	for(itr = cl->begin(); itr != cl->end(); ++itr)
	{
		if(!stricmp(name, itr->first.c_str()))
		{
			lock.Release();
			return itr->second;
		}
	}

	lock.Release();
	return NULL;
}
开发者ID:,项目名称:,代码行数:20,代码来源:

示例13:

Channel * ChannelMgr::GetChannel(const char *name, Player * p)
{
	ChannelList::iterator itr;
	ChannelList * cl = &Channels[0];
	if(seperatechannels && stricmp(name, sWorld.getGmClientChannel().c_str()))
		cl = &Channels[p->GetTeam()];

	lock.Acquire();
	for(itr = cl->begin(); itr != cl->end(); ++itr)
	{
		if(!stricmp(name, itr->first.c_str()))
		{
			lock.Release();
			return itr->second;
		}
	}

	lock.Release();
	return NULL;
}
开发者ID:Chero,项目名称:abcwow,代码行数:20,代码来源:Channel.cpp

示例14: removeService

void CBouquet::removeService(CZapitChannel* oldChannel)
{
	if (oldChannel != NULL)
	{
		ChannelList* channels = &tvChannels;
		switch (oldChannel->getServiceType())
		{
			case ST_DIGITAL_TELEVISION_SERVICE:
			case ST_NVOD_REFERENCE_SERVICE:
			case ST_NVOD_TIME_SHIFTED_SERVICE:
				channels = &tvChannels;
				break;

			case ST_DIGITAL_RADIO_SOUND_SERVICE:
				channels = &radioChannels;
				break;
		}
		(*channels).erase(remove(channels->begin(), channels->end(), oldChannel), channels->end());
	}
}
开发者ID:silid,项目名称:tuxbox-cvs-apps,代码行数:20,代码来源:bouquets.cpp

示例15: RemoveChannel

void ChannelMgr::RemoveChannel(Channel * chn)
{
	ChannelList::iterator itr;
	ChannelList * cl = &Channels[0];
	if(seperatechannels)
		cl = &Channels[chn->m_team];

	lock.Acquire();
	for(itr = cl->begin(); itr != cl->end(); ++itr)
	{
		if(itr->second == chn)
		{
			cl->erase(itr);
			delete chn;
			lock.Release();
			return;
		}
	}

	lock.Release();
}
开发者ID:Chero,项目名称:abcwow,代码行数:21,代码来源:Channel.cpp


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