libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayCpp::zplay_GetFileFormatW Function

Determine stream format of specified file (UNICODE version).

C++
__stdcall __declspec(dllimport) TStreamFormat zplay_GetFileFormatW(ZPLAY_HANDLE handle, const wchar_t * pchFileName);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
const wchar_t * pchFileName 
Points to a UNICODE null-terminated string that specifies the name of the file. 

Stream format. If function can't determine file format return value is sfUnknown.

This function will try to determine format of file by parsing file name and using filename extension. If fails to determine file format using filename extension, function will try to parse file data, searching for some known headers in file. If this also fails, function will return sfUnknown.

ZPlay C++ Class interface

int format = instance->GetFileFormatW(L"test.mp3");
if(nFormat == sfUnknown)
{
  wprintf("Can't detect stream format.");
}

 

C Style interface

int format = zplay_GetFileFormatW(L"test.mp3");
if(nFormat == sfUnknown)
{
  wprintf("Can't detect stream format.");
}
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr