Mercurial > mplayer.hg
view loader/dshow/iunk.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
/* * Modified for use with MPlayer, detailed changelog at * http://svn.mplayerhq.hu/mplayer/trunk/ */ #ifndef MPLAYER_IUNK_H #define MPLAYER_IUNK_H #include "guids.h" #define INHERIT_IUNKNOWN() \ long STDCALL ( *QueryInterface )(IUnknown * This, const GUID* riid, void **ppvObject); \ long STDCALL ( *AddRef )(IUnknown * This); \ long STDCALL ( *Release )(IUnknown * This); #define DECLARE_IUNKNOWN() \ int refcount; #define IMPLEMENT_IUNKNOWN(CLASSNAME) \ static long STDCALL CLASSNAME ## _QueryInterface(IUnknown * This, \ const GUID* riid, void **ppvObject) \ { \ CLASSNAME * me = (CLASSNAME *)This; \ GUID* r; unsigned int i = 0; \ Debug printf(#CLASSNAME "_QueryInterface(%p) called\n", This);\ if (!ppvObject) return E_POINTER; \ for(r=me->interfaces; i<sizeof(me->interfaces)/sizeof(me->interfaces[0]); r++, i++) \ if(!memcmp(r, riid, sizeof(*r))) \ { \ me->vt->AddRef((IUnknown*)This); \ *ppvObject=This; \ return 0; \ } \ Debug printf("Query failed! (GUID: 0x%x)\n", *(unsigned int*)riid); \ return E_NOINTERFACE; \ } \ \ static long STDCALL CLASSNAME ## _AddRef(IUnknown * This) \ { \ CLASSNAME * me=( CLASSNAME *)This; \ Debug printf(#CLASSNAME "_AddRef(%p) called (ref:%d)\n", This, me->refcount); \ return ++(me->refcount); \ } \ \ static long STDCALL CLASSNAME ## _Release(IUnknown * This) \ { \ CLASSNAME* me=( CLASSNAME *)This; \ Debug printf(#CLASSNAME "_Release(%p) called (new ref:%d)\n", This, me->refcount - 1); \ if(--(me->refcount) == 0) \ CLASSNAME ## _Destroy(me); \ return 0; \ } #endif /* MPLAYER_IUNK_H */