Пример #1
0
void vodInit()
{
    int i;
    int code = 0;
    int count = 0;
    if (!vodroot)
        return;
    memset(&vodctx, 0, sizeof(vodctx));
    memset(&charsinfo, 0, sizeof(charsinfo));
    hashmap = calloc(1000000 / 32, sizeof(long));
    //sprintf(vodroot,"%s",hp->pchWebPath);
    cats.name = "";
    cats.hash = GetCategoryHash(&cats);
    cats.next = 0;
    prefixlen = strlen(vodroot) + 1;
    EnumDir(vodroot);

    fpdup = fopen("htdocs/dup.htm", "w");
    fprintf(fpdup, "<html><body>");
    for (i = 0; i < filecount; i++)
    {
        if (!AddClip(filelist[i])) count++;
    }
    fprintf(fpdup, "</body></html>");
    fclose(fpdup);

    printf("\n\nCount: %d\n", count);
}
Пример #2
0
//-----------------------------------------------------------------------------
// Fills all gaps in a film track with slugs
//-----------------------------------------------------------------------------
void CDmeTrack::FillAllGapsWithSlugs( const char *pSlugName, DmeTime_t startTime, DmeTime_t endTime )
{
	if ( !IsFilmTrack() )
		return;

	FixOverlaps();

	// Create temporary slugs to fill in the gaps
	bool bSlugAdded = false;
	int c = GetClipCount();
	for ( int i = 0; i < c; ++i )
	{
		CDmeClip *pFilmClip = GetClip(i);
		DmeTime_t clipStartTime = pFilmClip->GetStartTime();
		if ( clipStartTime > startTime )
		{
			// There's a gap, create a slug
			CDmeFilmClip *pSlug = CreateSlugClip( pSlugName, startTime, clipStartTime, GetFileId() );

			// This will add the slug to the end; so we don't have to
			// worry about iterating over it (we've cached off the initial count)
			AddClip( pSlug );

			bSlugAdded = true;
		}
		startTime = pFilmClip->GetEndTime();
	}

	if ( endTime > startTime )
	{
		// There's a gap, create a temporary slug
		CDmeFilmClip *pSlug = CreateSlugClip( pSlugName, startTime, endTime, GetFileId() );

		// This will add the slug to the end; so we don't have to
		// worry about iterating over it (we've cached off the initial count)
		AddClip( pSlug );

		bSlugAdded = true;
	}

	if ( bSlugAdded )
	{
		FixOverlaps();
	}
}
Пример #3
0
void TrackDataInfo::ChangeClip(const int iOldInPoint, const int iNewInPoint, ClipDataRect* pClipData)
{
	DeleteClip(iOldInPoint);
	AddClip(iNewInPoint, pClipData);
}