Exemple #1
0
static int WriteList(playlist* p, const tchar_t* Path,const tchar_t* DispName,tick_t Length)
{
	if (Path)
	{
		if (p->No++<0)
			StreamPrintf(p->Stream,T("#EXTM3U\n"));

		if (Length >= 0 || DispName[0])
			StreamPrintf(p->Stream,T("#EXTINF:%d,%s\n"),Length/TICKSPERSEC,DispName);

		StreamPrintf(p->Stream,T("%s\n"),Path);
	}
	return ERR_NONE;
}
Exemple #2
0
static int WriteList(pls* p, const tchar_t* Path,const tchar_t* DispName,tick_t Length)
{
	if (p->Playlist.No<0)
	{
		p->Playlist.No=0;
		StreamPrintf(p->Playlist.Stream,T("[playlist]\n"));
	}

	if (Path)
	{
		++p->Playlist.No;
		StreamPrintf(p->Playlist.Stream,T("File%d=%s\n"),p->Playlist.No,Path);
		if (DispName[0]) StreamPrintf(p->Playlist.Stream,T("Title%d=%s\n"),p->Playlist.No,DispName);
		if (Length>=0) StreamPrintf(p->Playlist.Stream,T("Length%d=%d\n"),p->Playlist.No,Length/TICKSPERSEC);
	}
	else
	{
		StreamPrintf(p->Playlist.Stream,T("NumberOfEntries=%d\n"),p->Playlist.No);
		StreamPrintf(p->Playlist.Stream,T("Version=2\n"));
	}
	return ERR_NONE;
}
Exemple #3
0
StreamPrintf mfprintf(std::ostream &stream) {
    return StreamPrintf(stream);
}