summaryrefslogtreecommitdiffstats
path: root/loader/dmo/dmo_interfaces.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-12 15:30:21 +0200
committerwm4 <wm4@nowhere>2012-08-16 17:16:33 +0200
commitaebfbbf2bdda8e18beef90c16da97bd335f7d3b0 (patch)
treea7362bf3ef6f2d80a47b2e539a2ea4efe5e2e079 /loader/dmo/dmo_interfaces.h
parentc6b03ffef6250096373c4a81a489dae9fbff9087 (diff)
downloadmpv-aebfbbf2bdda8e18beef90c16da97bd335f7d3b0.tar.bz2
mpv-aebfbbf2bdda8e18beef90c16da97bd335f7d3b0.tar.xz
Remove win32/qt/xanim/real binary codecs loading
Remove the win32 loader - the win32 emulation layer, as well as the code for using DirectShow/DMO/VFW codecs. Remove loading of xanim, QuickTime, and RealMedia codecs. The win32 emulation layer is based on a very old version of wine. Apparently, wine code was copied and hacked until it was somehow able to load a limited collection of binary codecs. It poked around in the code segment of some known binary codecs to disable unsupported win32 API calls to make them work. Example from module.c: for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads Just to show how utterly insane this code is. You wouldn't want even your worst enemy to have to maintain this. In fact, it seems nobody made major changes to this code ever since it was committed. Most formats can be decoded by libavcodecs these days, and the loader couldn't be used on 64 bit platforms anyway. The same is (probably) true for the other binary codecs. General note about how support for win32 codecs could be added back: It's not possible to replace the win32 loader code by using wine as library, because modern wine can not be linked with native Linux programs for certain reasons. It would be possible to to move DirectShow video decoding into a separate process linked with wine, like the CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which uses the dshownative library to use DirectShow codecs on Windows.
Diffstat (limited to 'loader/dmo/dmo_interfaces.h')
-rw-r--r--loader/dmo/dmo_interfaces.h194
1 files changed, 0 insertions, 194 deletions
diff --git a/loader/dmo/dmo_interfaces.h b/loader/dmo/dmo_interfaces.h
deleted file mode 100644
index d0e72f227f..0000000000
--- a/loader/dmo/dmo_interfaces.h
+++ /dev/null
@@ -1,194 +0,0 @@
-#ifndef MPLAYER_DMO_INTERFACES_H
-#define MPLAYER_DMO_INTERFACES_H
-
-#include "dmo.h"
-
-/*
- * IMediaBuffer interface
- */
-typedef struct IMediaBuffer IMediaBuffer;
-typedef struct IMediaBuffer_vt
-{
- INHERIT_IUNKNOWN();
-
- HRESULT STDCALL ( *SetLength )(IMediaBuffer* This,
- unsigned long cbLength);
- HRESULT STDCALL ( *GetMaxLength )(IMediaBuffer* This,
- /* [out] */ unsigned long *pcbMaxLength);
- HRESULT STDCALL ( *GetBufferAndLength )(IMediaBuffer* This,
- /* [out] */ char** ppBuffer,
- /* [out] */ unsigned long* pcbLength);
-} IMediaBuffer_vt;
-struct IMediaBuffer { IMediaBuffer_vt* vt; };
-
-
-typedef struct DMO_OUTPUT_DATA_BUFFER
-{
- IMediaBuffer *pBuffer;
- unsigned long dwStatus;
- REFERENCE_TIME rtTimestamp;
- REFERENCE_TIME rtTimelength;
-} DMO_OUTPUT_DATA_BUFFER;
-
-
-/*
- * IMediaObject interface
- */
-typedef struct IMediaObject IMediaObject;
-typedef struct IMediaObject_vt
-{
- INHERIT_IUNKNOWN();
-
- HRESULT STDCALL ( *GetStreamCount )(IMediaObject * This,
- /* [out] */ unsigned long *pcInputStreams,
- /* [out] */ unsigned long *pcOutputStreams);
- HRESULT STDCALL ( *GetInputStreamInfo )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- /* [out] */ unsigned long *pdwFlags);
- HRESULT STDCALL ( *GetOutputStreamInfo )(IMediaObject * This,
- unsigned long dwOutputStreamIndex,
- /* [out] */ unsigned long *pdwFlags);
- HRESULT STDCALL ( *GetInputType )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- unsigned long dwTypeIndex,
- /* [out] */ DMO_MEDIA_TYPE *pmt);
- HRESULT STDCALL ( *GetOutputType )(IMediaObject * This,
- unsigned long dwOutputStreamIndex,
- unsigned long dwTypeIndex,
- /* [out] */ DMO_MEDIA_TYPE *pmt);
- HRESULT STDCALL ( *SetInputType )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- /* [in] */ const DMO_MEDIA_TYPE *pmt,
- unsigned long dwFlags);
- HRESULT STDCALL ( *SetOutputType )(IMediaObject * This,
- unsigned long dwOutputStreamIndex,
- /* [in] */ const DMO_MEDIA_TYPE *pmt,
- unsigned long dwFlags);
- HRESULT STDCALL ( *GetInputCurrentType )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- /* [out] */ DMO_MEDIA_TYPE *pmt);
- HRESULT STDCALL ( *GetOutputCurrentType )(IMediaObject * This,
- unsigned long dwOutputStreamIndex,
- /* [out] */ DMO_MEDIA_TYPE *pmt);
- HRESULT STDCALL ( *GetInputSizeInfo )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- /* [out] */ unsigned long *pcbSize,
- /* [out] */ unsigned long *pcbMaxLookahead,
- /* [out] */ unsigned long *pcbAlignment);
- HRESULT STDCALL ( *GetOutputSizeInfo )(IMediaObject * This,
- unsigned long dwOutputStreamIndex,
- /* [out] */ unsigned long *pcbSize,
- /* [out] */ unsigned long *pcbAlignment);
- HRESULT STDCALL ( *GetInputMaxLatency )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- /* [out] */ REFERENCE_TIME *prtMaxLatency);
- HRESULT STDCALL ( *SetInputMaxLatency )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- REFERENCE_TIME rtMaxLatency);
- HRESULT STDCALL ( *Flush )(IMediaObject * This);
- HRESULT STDCALL ( *Discontinuity )(IMediaObject * This,
- unsigned long dwInputStreamIndex);
- HRESULT STDCALL ( *AllocateStreamingResources )(IMediaObject * This);
- HRESULT STDCALL ( *FreeStreamingResources )(IMediaObject * This);
- HRESULT STDCALL ( *GetInputStatus )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- /* [out] */ unsigned long *dwFlags);
- HRESULT STDCALL ( *ProcessInput )(IMediaObject * This,
- unsigned long dwInputStreamIndex,
- IMediaBuffer *pBuffer,
- unsigned long dwFlags,
- REFERENCE_TIME rtTimestamp,
- REFERENCE_TIME rtTimelength);
- HRESULT STDCALL ( *ProcessOutput )(IMediaObject * This,
- unsigned long dwFlags,
- unsigned long cOutputBufferCount,
- /* [size_is][out][in] */ DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
- /* [out] */ unsigned long *pdwStatus);
- HRESULT STDCALL ( *Lock )(IMediaObject * This, long bLock);
-} IMediaObject_vt;
-struct IMediaObject { IMediaObject_vt* vt; };
-
-/*
- * IEnumDMO interface
- */
-typedef struct IEnumDMO IEnumDMO;
-typedef struct IEnumDMO_vt
-{
- INHERIT_IUNKNOWN();
-
- HRESULT STDCALL ( *Next )(IEnumDMO * This,
- unsigned long cItemsToFetch,
- /* [length_is][size_is][out] */ CLSID *pCLSID,
- /* [string][length_is][size_is][out] */ WCHAR **Names,
- /* [out] */ unsigned long *pcItemsFetched);
- HRESULT STDCALL ( *Skip )(IEnumDMO * This,
- unsigned long cItemsToSkip);
- HRESULT STDCALL ( *Reset )(IEnumDMO * This);
- HRESULT STDCALL ( *Clone )(IEnumDMO * This,
- /* [out] */ IEnumDMO **ppEnum);
-} IEnumDMO_vt;
-struct IEnumDMO { IEnumDMO_vt* vt; };
-
-/*
- * IMediaObjectInPlace interface
- */
-typedef struct IMediaObjectInPlace IMediaObjectInPlace;
-typedef struct IMediaObjectInPlace_vt
-{
- INHERIT_IUNKNOWN();
-
- HRESULT STDCALL ( *Process )(IMediaObjectInPlace * This,
- /* [in] */ unsigned long ulSize,
- /* [size_is][out][in] */ BYTE *pData,
- /* [in] */ REFERENCE_TIME refTimeStart,
- /* [in] */ unsigned long dwFlags);
- HRESULT STDCALL ( *Clone )(IMediaObjectInPlace * This,
- /* [out] */ IMediaObjectInPlace **ppMediaObject);
- HRESULT STDCALL ( *GetLatency )(IMediaObjectInPlace * This,
- /* [out] */ REFERENCE_TIME *pLatencyTime);
-
-} IMediaObjectInPlace_vt;
-struct IMediaObjectInPlace { IMediaObjectInPlace_vt* vt; };
-
-
-/*
- * IDMOQualityControl interface
- */
-typedef struct IDMOQualityControl IDMOQualityControl;
-typedef struct IDMOQualityControl_vt
-{
- INHERIT_IUNKNOWN();
-
- HRESULT STDCALL ( *SetNow )(IDMOQualityControl * This,
- /* [in] */ REFERENCE_TIME rtNow);
- HRESULT STDCALL ( *SetStatus )(IDMOQualityControl * This,
- /* [in] */ unsigned long dwFlags);
- HRESULT STDCALL ( *GetStatus )(IDMOQualityControl * This,
- /* [out] */ unsigned long *pdwFlags);
-} IDMOQualityControl_vt;
-struct IDMOQualityControl { IDMOQualityControl_vt* vt; };
-
-/*
- * IDMOVideoOutputOptimizations interface
- */
-typedef struct IDMOVideoOutputOptimizations IDMOVideoOutputOptimizations;
-typedef struct IDMOVideoOutputOptimizations_vt
-{
- INHERIT_IUNKNOWN();
-
- HRESULT STDCALL ( *QueryOperationModePreferences )(IDMOVideoOutputOptimizations * This,
- unsigned long ulOutputStreamIndex,
- unsigned long *pdwRequestedCapabilities);
- HRESULT STDCALL ( *SetOperationMode )(IDMOVideoOutputOptimizations * This,
- unsigned long ulOutputStreamIndex,
- unsigned long dwEnabledFeatures);
- HRESULT STDCALL ( *GetCurrentOperationMode )(IDMOVideoOutputOptimizations * This,
- unsigned long ulOutputStreamIndex,
- unsigned long *pdwEnabledFeatures);
- HRESULT STDCALL ( *GetCurrentSampleRequirements )(IDMOVideoOutputOptimizations * This,
- unsigned long ulOutputStreamIndex,
- unsigned long *pdwRequestedFeatures);
-} IDMOVideoOutputOptimizations_vt;
-struct IDMOVideoOutputOptimizations { IDMOVideoOutputOptimizations_vt* vt; };
-
-#endif /* MPLAYER_DMO_INTERFACES_H */