Mercurial > mplayer.hg
view loader/dmo/dmo_interfaces.h @ 36316:139f2b064ef9
Don't subsequently calculate original_aspect from last movie_aspect.
Instead, differentiate between the original aspect ratio stored in or
determined from the video file and the forced, i.e. current, aspect
ratio (e.g. forced by command line override).
This enables multiple independent instances of vd.c again which has
been broken by introducing a static variable in r36401.
Without the subsequent calculation of original_aspect it now contains
nothing but the pure video file aspect ratio which makes it possible
to use movie_aspect -1 to set the original aspect ratio which explains
the changes in command.c and gui/dialog/menu.c.
The changes in vd_mpegpes due to the impact of original_aspect will
fix a bug there at the same time where the condition in order to call
mpcodecs_config_vo() should only trigger once when the encoded aspect
changes. So far, the forced, i.e. current, aspect has been checked.
The whole is related to enabling special argument -1 to switch_ratio
started in r36391.
author | ib |
---|---|
date | Wed, 07 Aug 2013 20:41:34 +0000 |
parents | a8ea87c71d18 |
children |
line wrap: on
line source
#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 */