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

Check if stream data is free.

C++
__stdcall __declspec(dllimport) int zplay_IsStreamDataFree(ZPLAY_HANDLE handle, const void * sMemNewData);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
const void * sMemNewData 
Pointer to memory block. This must be one of values added with PushDataToStream or zplay_PushDataToStream
Return Values 
Description 
sMemNewData isn't in stream anymore, you can destroy this data. 
sMemNewData is still in stream, don't destroy this data yet. 

When you push memory block to non buffered stream with PushDataToStream or zplay_PushDataToStream you need to keep this data into memory because class is using this data. With this function you can check is specified buffer (pointer) is in stream queue. If specified buffer is free, you can destroy this data, free memory ...

ZPlay C++ Class interface

instance->PushDataToStream(tmp, 8000); // push data to stream
if(instance->IsStreamDataFree(tmp)) // check if this data is still in stream
  free(tmp);

 

C Style interface

zplay_PushDataToStream(instance, tmp, 8000); // push data to stream
if(zplay_IsStreamDataFree(instance, tmp)) // check if this data is still in stream
  free(tmp);
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr