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


C++ Package::getType方法代码示例

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


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

示例1: processPackage

void AbstractHost::processPackage()
{
	Package *constructedPackage = new Package(parseBuffer);
	if(!constructedPackage->isValid())
	{
		sendPackage(constructAcknowledgementPackage(constructedPackage, "invalid"));
		delete constructedPackage;
	}
	else if(!server->packageRouterInstance()->isAllowed(type, constructedPackage))
	{
		sendPackageAndDelete(constructAcknowledgementPackage(constructedPackage, "forbidden"));
		delete constructedPackage;
	}
	else if(constructedPackage->getType() == ConnectionManagement)
	{
		updateNextPackageID(constructedPackage->getID());
		handlePackage(constructedPackage);
	}
	else if(state == Established)
	{
		updateNextPackageID(constructedPackage->getID());
		server->packageRouterInstance()->processPackage(this, constructedPackage);
	}
	else
	{
		sendPackage(constructAcknowledgementPackage(constructedPackage, "invalid"));
		delete constructedPackage;
	}


	parseBuffer.clear();
}
开发者ID:profmaad,项目名称:yonderboy,代码行数:32,代码来源:abstract_host.cpp

示例2: main


//.........这里部分代码省略.........
        
        for (iter1 = material.topPackages.begin(); iter1 != material.topPackages.end(); iter1++)
        {
            MaterialPackage* topPackage = *iter1;
        
            // check operational pattern
            if (!fcpxml && topPackage->op != OPERATIONAL_PATTERN_ATOM)
            {
                packagesToErase.push_back(topPackage);
                continue;
            }
            
            // check package edit rate        
            Rational packageEditRate = getVideoEditRate(topPackage, material.packages);
            if (packageEditRate != targetEditRate && packageEditRate != g_nullRational)
            {
                packagesToErase.push_back(topPackage);
                continue;
            }
        
            // check video resolution IDs
            vector<Track*>::const_iterator iter2;
            for (iter2 = topPackage->tracks.begin(); iter2 != topPackage->tracks.end(); iter2++)
            {
                Track* track = *iter2;
                
                SourcePackage dummy;
                dummy.uid = track->sourceClip->sourcePackageUID;
                PackageSet::iterator result = material.packages.find(&dummy);
                if (result != material.packages.end())
                {
                    Package* package = *result;
                    
                    if (package->getType() != SOURCE_PACKAGE || package->tracks.size() == 0)
                    {
                        continue;
                    }
                    SourcePackage* sourcePackage = dynamic_cast<SourcePackage*>(package);
                    if (sourcePackage->descriptor->getType() != FILE_ESSENCE_DESC_TYPE)
                    {
                        continue;
                    }
                    
                    FileEssenceDescriptor* fileDescriptor = dynamic_cast<FileEssenceDescriptor*>(
                        sourcePackage->descriptor);
                    if (fileDescriptor->videoResolutionID != 0 && 
                        fileDescriptor->videoResolutionID != videoResolutionID)
                    {
                        // material package has wrong video resolution
                        packagesToErase.push_back(topPackage);
                        break; // break out of track loop
                    }
                }
        
            }
        }    
        vector<prodauto::MaterialPackage *>::const_iterator it;
        for (it = packagesToErase.begin(); it != packagesToErase.end(); it++)
        {
            material.topPackages.erase(*it);
        }
        
        if (verbose)
        {
            if (packagesToErase.size() > 0)
            {
开发者ID:UIKit0,项目名称:bbc-ingex,代码行数:67,代码来源:create_aaf.cpp


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