view loader/dshow/DS_AudioDecoder.h @ 35840:bd190ad6b204

Avoid calling FreeLibrary() twice. FreeLibrary() decreases a per-process reference/usage counter. This counter is set to 1 when a library is loaded at startup and increased with each LoadLibrary() call. Calling FreeLibrary() twice could unload the library (that is loaded at startup) and break code that calls its functions directly. In MPlayer this seems to happen with fontconfig package.
author iive
date Sat, 09 Mar 2013 16:58:26 +0000
parents 837cd9762b4e
children
line wrap: on
line source

#ifndef MPLAYER_DS_AUDIODECODER_H
#define MPLAYER_DS_AUDIODECODER_H

#include "loader/com.h"
#include "loader/wine/mmreg.h"

typedef struct DS_AudioDecoder DS_AudioDecoder;

//DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf);
DS_AudioDecoder * DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf);

void DS_AudioDecoder_Destroy(DS_AudioDecoder *this);

int DS_AudioDecoder_Convert(DS_AudioDecoder *this, const void* in_data, unsigned int in_size,
			     void* out_data, unsigned int out_size,
			     unsigned int* size_read, unsigned int* size_written);

int DS_AudioDecoder_GetSrcSize(DS_AudioDecoder *this, int dest_size);

#endif /* MPLAYER_DS_AUDIODECODER_H */