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


C++ ChannelList类代码示例

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


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

示例1:

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

示例2: getQuality

JPEGCodec::JPEGCodec(const Header &header, const ChannelList &channels) :
	VideoCodec(header, channels),
	_descriptor(header.frameRate(), header.width(), header.height(), MoxMxf::VideoDescriptor::VideoCodecJPEG)
{
	setWindows(_descriptor, header);
	
	assert(channels.size() == 3);
	
	const Channel *r_channel = channels.findChannel("R");
	
	if(r_channel)
	{
		assert(r_channel->type == UINT8);
	}
	else
		assert(false);
	
	
	MoxMxf::RGBADescriptor::RGBALayout layout;
	
	layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('R', 8));
	layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('G', 8));
	layout.push_back(MoxMxf::RGBADescriptor::RGBALayoutItem('B', 8));
	
	_descriptor.setPixelLayout(layout);
	
	
	_quality = (isLossless(header) ? 100 : getQuality(header));
}
开发者ID:MOXfiles,项目名称:libmox,代码行数:29,代码来源:JPEGCodec.cpp

示例3: 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

示例4: onAccountManagerReady

void ConnectionsModel::onAccountManagerReady(Tp::PendingOperation* )
{
    InfTubeConnectionRetriever r;
    const ChannelList channels = r.retrieveChannels();
    if ( channels.size() > 0 ){
        beginInsertRows(QModelIndex(), 0, channels.size() - 1);
        m_connections = channels;
        endInsertRows();
    }
    kDebug() << "channels:" << m_connections;
    foreach ( const QVariantMap& channelData, m_connections ) {
        kDebug() << "constructing tube for channel" << channelData;
        kDebug() << "accounts:" << m_accountManager->allAccounts();
        foreach ( const Tp::AccountPtr account,  m_accountManager->allAccounts() ) {
            kDebug() << account->objectPath();
        }
        Tp::AccountPtr account = m_accountManager->accountForPath(channelData["accountPath"].toString());
        Tp::StreamTubeChannelPtr channel = Tp::StreamTubeChannel::create(account->connection(),
                                                                         channelData["channelIdentifier"].toString(),
                                                                         QVariantMap());
        m_channels << channel;
        connect(channel->becomeReady(Tp::Features() << Tp::StreamTubeChannel::FeatureCore),
                SIGNAL(finished(Tp::PendingOperation*)),
                SLOT(onChannelReady(Tp::PendingOperation*)));
    }
开发者ID:KDE,项目名称:kte-collaborative,代码行数:25,代码来源:connectionswidget.cpp

示例5: getChannelByChannelID

CZapitChannel* CBouquet::getChannelByChannelID(const t_channel_id channel_id, const unsigned char serviceType)
{
	CZapitChannel* result = NULL;

	ChannelList* channels = &tvChannels;
	
	switch (serviceType)
	{
		case ST_RESERVED: // ?
		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;
	}

	unsigned int i;
	for (i=0; (i<channels->size()) && ((*channels)[i]->getChannelID() != channel_id); i++);

	if (i<channels->size())
		result = (*channels)[i];

	if ((serviceType == ST_RESERVED) && (result == NULL))
	{
		result = getChannelByChannelID(channel_id, ST_DIGITAL_RADIO_SOUND_SERVICE);
	}

	return result;
}
开发者ID:silid,项目名称:tuxbox-cvs-apps,代码行数:33,代码来源:bouquets.cpp

示例6: channelsInView

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

示例7: channelInAllViews

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: _outputFile

RgbaOutputFile::RgbaOutputFile (const char name[],
				const Imath::Box2i &displayWindow,
				const Imath::Box2i &dataWindow,
				RgbaChannels rgbaChannels,
				float pixelAspectRatio,
				const Imath::V2f screenWindowCenter,
				float screenWindowWidth,
				LineOrder lineOrder,
				Compression compression):
    _outputFile (0)
{
    Header hd (displayWindow,
	       dataWindow.isEmpty()? displayWindow: dataWindow,
	       pixelAspectRatio,
	       screenWindowCenter,
	       screenWindowWidth,
	       lineOrder,
	       compression);

    ChannelList ch;

    if (rgbaChannels & WRITE_R)
	ch.insert ("R", Channel (HALF, 1, 1));
    if (rgbaChannels & WRITE_G)
	ch.insert ("G", Channel (HALF, 1, 1));
    if (rgbaChannels & WRITE_B)
	ch.insert ("B", Channel (HALF, 1, 1));
    if (rgbaChannels & WRITE_A)
	ch.insert ("A", Channel (HALF, 1, 1));

    hd.channels() = ch;
    _outputFile = new OutputFile (name, hd);
}
开发者ID:hunduan2018,项目名称:GPU-Gems,代码行数:33,代码来源:ImfRgbaFile.cpp

示例9: getChannelList

void Chat::removeUserFromAllChannels(Player* player)
{
	ChannelList list = getChannelList(player);

	while (!list.empty())
	{
		ChatChannel* channel = list.front();
		list.pop_front();
		channel->removeUser(player);

		if (channel->getOwner() == player->getGUID())
		{
			deleteChannel(player, channel->getId());
		}
	}

	for (NormalChannelMap::iterator it = m_normalChannels.begin(); it != m_normalChannels.end(); ++it)
	{
		it->second->removeUser(player);
	}

	for (GuildChannelMap::iterator it = m_guildChannels.begin(); it != m_guildChannels.end(); ++it)
	{
		it->second->removeUser(player);
	}
}
开发者ID:edubart,项目名称:otserv,代码行数:26,代码来源:chat.cpp

示例10: 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

示例11: Channel

MPEGCodec::MPEGCodec(const MoxMxf::VideoDescriptor &descriptor, Header &header, ChannelList &channels) :
	VideoCodec(descriptor, header, channels),
	_descriptor(dynamic_cast<const MoxMxf::MPEGDescriptor &>(descriptor))
{
	assert(header.width() == _descriptor.getStoredWidth());
	assert(header.height() == _descriptor.getStoredHeight());
	
	channels.insert("R", Channel(MoxFiles::UINT8));
	channels.insert("G", Channel(MoxFiles::UINT8));
	channels.insert("B", Channel(MoxFiles::UINT8));
}
开发者ID:Rio,项目名称:libmox,代码行数:11,代码来源:MPEGCodec.cpp

示例12: getPublicChannels

ChannelList Chat::getPublicChannels() const
{
	ChannelList list;
	for(NormalChannelMap::const_iterator it = m_normalChannels.begin(); it != m_normalChannels.end(); ++it)
	{
		if(isPublicChannel(it->first))
			list.push_back(it->second);
	}

	return list;
}
开发者ID:Codex-NG,项目名称:thecrystalserver,代码行数:11,代码来源:chat.cpp

示例13: ExecuteSQL_SelectFromSensorDataTable

SensorDataSet SensorDB::ExecuteSQL_SelectFromSensorDataTable(std::string sqlcommand)
{
    SensorDataSet ds;
	ChannelList channelist;
    int channel_num;
    int datatype_id;
    int operator_id;
    int device_id;
    int position_id;
    int activity_id;
    int activitybeginframe_id;
    int activityendframe_id;
    double samplerate;
    QDateTime createtime;
    if(db.isOpen()){
        QSqlQuery query;
        QString sqlcmd = string2qstring(sqlcommand);
        if(query.exec(sqlcmd)){
                while(query.next()){
					datatype_id = query.value("DataTypeID").toInt();
                    activity_id = query.value("ActivityID").toInt();
                    device_id = query.value("DeviceID").toInt();
                    operator_id = query.value("OperatorID").toInt();
                    position_id = query.value("PositionID").toInt();
                    activitybeginframe_id = query.value("ActivityBeginFrameID").toInt();
                    activityendframe_id = query.value("ActivityEndFrameID").toInt();
                    samplerate = query.value("SampleRate").toDouble();
                    createtime = query.value("CreateTime").toDateTime();
					channel_num = query.value("TotalChannelNum").toInt();
					channelist.clear();
					for(int i=1;i<=channel_num;i++){
                        if(query.value(i).isNull()){
                            break;
                        }					
						string ch = "channel_"+int2string(i);						
						//qDebug() << query.value(string2qstring(ch.c_str())).toString();
						channelist.push_back(Channel(query.value(string2qstring(ch.c_str())).toString().toStdString()));
						//qDebug() << string2qstring((channelist[channelist.size()-1].ToString()));
					}
					ds.PushBackSensorData(SensorData(channelist,channel_num,datatype_id,operator_id,device_id,position_id,
                                         activity_id,activitybeginframe_id,activityendframe_id, samplerate,createtime));
                }
        }
        else{
            qDebug()<<query.lastError();
        }
    }
    else{
        qDebug()<<"DataBase is not opened";
    }
    return ds;
}
开发者ID:BloodyPudding,项目名称:SensorDB_API,代码行数:52,代码来源:sensordb.cpp

示例14: getChannelList

void Chat::removeUserFromAllChannels(Player* player)
{
	ChannelList list = getChannelList(player);
	while(list.size()){
		ChatChannel *channel = list.front();
		list.pop_front();
			
		channel->removeUser(player);
		
		if(channel->getOwner() == player->getGUID())
			deleteChannel(player, channel->getId());
	}
}
开发者ID:gianflogao,项目名称:divinity-ots,代码行数:13,代码来源:chat.cpp

示例15:

JPEGCodec::JPEGCodec(const MoxMxf::VideoDescriptor &descriptor, Header &header, ChannelList &channels) :
	VideoCodec(descriptor, header, channels),
	_descriptor(dynamic_cast<const MoxMxf::RGBADescriptor &>(descriptor))
{
	assert(_descriptor.getVideoCodec() == MoxMxf::VideoDescriptor::VideoCodecJPEG);

	const MoxMxf::RGBADescriptor::RGBALayout &pixelLayout = _descriptor.getPixelLayout();
	
	assert(pixelLayout.size() == 3 && pixelLayout.at(0).depth == 8);
	
	channels.insert("R", UINT8);
	channels.insert("G", UINT8);
	channels.insert("B", UINT8);
}
开发者ID:MOXfiles,项目名称:libmox,代码行数:14,代码来源:JPEGCodec.cpp


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