fragmentcollector_mpd.cpp
/**
 * @brief Check if adaptation set is of a given media type
 *
 * @param[in]  adaptationSet Adaptation set
 * @param[in]  mediaType     Media type
 *
 * @retval true if adaptation set is of the given media type
 */
@brief Check if adaptation set is of a given media type
@param[in]  adaptationSet Adaptation set
@param[in]  mediaType     Media type

@retval true if adaptation set is of the given media type
@brief Check if adaptation set is of a given media type @param [ in ] adaptationSet Adaptation set @param [ in ] mediaType Media type @retval true if adaptation set is of the given media type
static bool IsContentType(IAdaptationSet *adaptationSet, MediaType mediaType )
{
	const char *name = mMediaTypeName[mediaType];
	if (adaptationSet->GetContentType() == name)
	{
		return true;
	}
	else if (adaptationSet->GetContentType() == "muxed")
	{
		logprintf("excluding muxed content\n");
	}
	else
	{
		if (IsCompatibleMimeType(adaptationSet->GetMimeType(), mediaType) )
		{
			return true;
		}
		const std::vector<IRepresentation *>representation = adaptationSet->GetRepresentation();
		for (int i = 0; i < representation.size(); i++)
		{
			if (IsCompatibleMimeType(representation.at(i)->GetMimeType(), mediaType) )
			{
				return true;
			}
		}
		const std::vector<IContentComponent *>contentComponent = adaptationSet->GetContentComponent();
		for( int i = 0; i < contentComponent.size(); i++)
		{
			if (contentComponent.at(i)->GetContentType() == name)
			{
				return true;
			}
		}
	}
	return false;
}
static bool IsContentType ( IAdaptationSet * adaptationSet , MediaType mediaType ) { const char * name = mMediaTypeName [ mediaType ] ; if ( adaptationSet -> GetContentType ( ) == name ) { return true ; } else if ( adaptationSet -> GetContentType ( ) == " " ) { logprintf ( " \n " ) ; } else { if ( IsCompatibleMimeType ( adaptationSet -> GetMimeType ( ) , mediaType ) ) { return true ; } const std :: vector < IRepresentation * > representation = adaptationSet -> GetRepresentation ( ) ; for ( int i = 0 ; i < representation . size ( ) ; i ++ ) { if ( IsCompatibleMimeType ( representation . at ( i ) -> GetMimeType ( ) , mediaType ) ) { return true ; } } const std :: vector < IContentComponent * > contentComponent = adaptationSet -> GetContentComponent ( ) ; for ( int i = 0 ; i < contentComponent . size ( ) ; i ++ ) { if ( contentComponent . at ( i ) -> GetContentType ( ) == name ) { return true ; } } } return false ; }
@brief Check if adaptation set is of a given media type
 @param[in]  adaptationSet Adaptation set
 @param[in]  mediaType     Media type
@brief Check if adaptation set is of a given media type @param [ in ] adaptationSet Adaptation set @param [ in ] mediaType Media type