libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayC#.TCallbackFunc Type

Callback function prototype.

C#
public delegate int TCallbackFunc(uint objptr, int user_data, TCallbackMessage msg, uint param1, uint param2);
Parameters 
Description 
objptr 
Class instance. Use cast to ZPlay instance. 
user_data 
User data specified by SetCallbackFunc
msg 
param1 
First message parameter. Specifies additional message-specific information. 
param2 
Second message parameter. Specifies additional message-specific information. 

Return value depends on msg parameter. 

See TCallbackMessage for return value of each message.

This is prototype for callback function. 

Use SetCallbackFunc to enable callback mechanism. 

There are 2 types of messages. Sync (blocking) and async (non blocking) messages. 

Sync message is sent from decoding thread and thread is waiting until callback function returns, so thread is blocked until user process sync message. Return value from sync message can be used to control decoding thread. 

Note: DON'T CALL other interface function from sync message because this will block decoding thread and calling thread. 

Async message is sent from another thread and this message is not blocking, decoding thread continues to play. Return value from async message is not used. 

Warning: Protect callback function from garbage collector. 

Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr