Output plug-ins

Decoder plug-ins must implement and export the functions defined in output_plug.h.

ULONG _System output_init(void **a)
ULONG _System output_uninit(void *a)

Init function is called when the user requests the use of your output plug-in So only one output plug-in is active at any given time. It should initialize the control variables for an eventual call to OUTPUT_OPEN. decoder_uninit is called when another output plug-in is request by the user and should free the allocated memory for a.

ULONG _System output_command(void *a, ULONG msg, OUTPUT_PARAMS *info)

There is a lot of commands to implement for this function. Parameters needed for each of the are described in the definition of the structure in the .h file. The output MUST WinPostMsg() the following messages to hwnd: ULONG _System output_playing_samples(void *a, FORMAT_INFO *info, char *buf, int len); This function is used by visual plug-ins so the user can visualize what is currently being played. len is usually not so big, so check that amount usually required by your visual plug-ins before making complicated buffering functions in your output plug-in.

int _System output_play_samples(void *a, FORMAT_INFO *format, char *buf,int len, int posmarker)

This function is called by the decoder or last in chain filter plug-in to play samples.

ULONG _System output_playing_pos(void *a)

This function returns the posmarker from the buffer that the user currently hears.

BOOL _System output_playing_data(void *a)

Returns TRUE if the output plug-in still has some buffers to play.


Last revised July 3, 2000, Copyright © Taneli Leppä <rosmo@sektori.com>, Samuel Audet <guardia@cam.org>