2003-06-13 20:06:44 +02:00
|
|
|
/* DirectShow private interfaces (QUARTZ.DLL)
|
|
|
|
*
|
|
|
|
* Copyright 2002 Lionel Ulmer
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-06-13 20:06:44 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __QUARTZ_PRIVATE_INCLUDED__
|
|
|
|
#define __QUARTZ_PRIVATE_INCLUDED__
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2019-08-05 17:25:58 +02:00
|
|
|
#include <wchar.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
|
2004-10-07 05:06:48 +02:00
|
|
|
#define COBJMACROS
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
2003-06-13 20:06:44 +02:00
|
|
|
#include "winbase.h"
|
|
|
|
#include "wtypes.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "dshow.h"
|
2020-05-07 02:28:49 +02:00
|
|
|
#include "dvdmedia.h"
|
2019-03-04 03:11:49 +01:00
|
|
|
#include "wine/debug.h"
|
2019-03-14 18:12:21 +01:00
|
|
|
#include "wine/heap.h"
|
2010-10-04 16:48:25 +02:00
|
|
|
#include "wine/strmbase.h"
|
2008-06-10 18:06:08 +02:00
|
|
|
#include "wine/list.h"
|
2003-06-13 20:06:44 +02:00
|
|
|
|
2020-01-31 02:05:17 +01:00
|
|
|
static inline const char *debugstr_time(REFERENCE_TIME time)
|
|
|
|
{
|
|
|
|
ULONGLONG abstime = time >= 0 ? time : -time;
|
|
|
|
unsigned int i = 0, j = 0;
|
|
|
|
char buffer[23], rev[23];
|
|
|
|
|
|
|
|
while (abstime || i <= 8)
|
|
|
|
{
|
|
|
|
buffer[i++] = '0' + (abstime % 10);
|
|
|
|
abstime /= 10;
|
|
|
|
if (i == 7) buffer[i++] = '.';
|
|
|
|
}
|
|
|
|
if (time < 0) buffer[i++] = '-';
|
|
|
|
|
|
|
|
while (i--) rev[j++] = buffer[i];
|
2020-03-26 18:08:45 +01:00
|
|
|
while (rev[j-1] == '0' && rev[j-2] != '.') --j;
|
2020-01-31 02:05:17 +01:00
|
|
|
rev[j] = 0;
|
|
|
|
|
|
|
|
return wine_dbg_sprintf("%s", rev);
|
|
|
|
}
|
|
|
|
|
2017-06-19 21:15:31 +02:00
|
|
|
/* see IAsyncReader::Request on MSDN for the explanation of this */
|
2003-09-26 01:50:06 +02:00
|
|
|
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
|
2019-09-21 00:35:06 +02:00
|
|
|
#define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
|
2003-09-26 01:50:06 +02:00
|
|
|
|
2020-03-12 03:10:10 +01:00
|
|
|
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT avi_dec_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT async_reader_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT filter_graph_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT filter_graph_no_thread_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT filter_mapper_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT mem_allocator_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT system_clock_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
2020-03-13 03:34:11 +01:00
|
|
|
HRESULT seeking_passthrough_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
2020-03-12 03:10:10 +01:00
|
|
|
HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT vmr7_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT vmr9_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
2003-07-01 06:29:48 +02:00
|
|
|
|
2011-05-13 17:52:39 +02:00
|
|
|
extern const char * qzdebugstr_guid(const GUID * id) DECLSPEC_HIDDEN;
|
2010-11-29 10:44:16 +01:00
|
|
|
extern void video_unregister_windowclass(void) DECLSPEC_HIDDEN;
|
2003-08-07 00:04:45 +02:00
|
|
|
|
2019-08-06 21:58:35 +02:00
|
|
|
BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID *source_clsid) DECLSPEC_HIDDEN;
|
2013-02-21 16:29:55 +01:00
|
|
|
|
2020-04-03 06:20:46 +02:00
|
|
|
struct video_window
|
2020-03-12 03:10:11 +01:00
|
|
|
{
|
|
|
|
IVideoWindow IVideoWindow_iface;
|
2020-05-07 02:28:52 +02:00
|
|
|
IBasicVideo IBasicVideo_iface;
|
|
|
|
|
|
|
|
RECT src, dst;
|
2020-05-08 03:50:23 +02:00
|
|
|
BOOL default_dst;
|
2020-03-12 03:10:11 +01:00
|
|
|
|
|
|
|
BOOL AutoShow;
|
2020-05-08 03:50:23 +02:00
|
|
|
HWND hwnd;
|
2020-03-12 03:10:11 +01:00
|
|
|
HWND hwndDrain;
|
|
|
|
HWND hwndOwner;
|
|
|
|
struct strmbase_filter *pFilter;
|
|
|
|
struct strmbase_pin *pPin;
|
2020-04-03 06:20:48 +02:00
|
|
|
const struct video_window_ops *ops;
|
2020-04-03 06:20:46 +02:00
|
|
|
};
|
2020-03-12 03:10:11 +01:00
|
|
|
|
2020-04-03 06:20:48 +02:00
|
|
|
struct video_window_ops
|
|
|
|
{
|
|
|
|
RECT (*get_default_rect)(struct video_window *window);
|
2020-05-07 02:28:52 +02:00
|
|
|
HRESULT (*get_current_image)(struct video_window *window, LONG *size, LONG *image);
|
2020-04-03 06:20:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void video_window_cleanup(struct video_window *window) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT video_window_create_window(struct video_window *window) DECLSPEC_HIDDEN;
|
2020-04-06 02:49:42 +02:00
|
|
|
void video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl,
|
2020-04-03 06:20:47 +02:00
|
|
|
struct strmbase_filter *filter, struct strmbase_pin *pin, const struct video_window_ops *ops) DECLSPEC_HIDDEN;
|
2020-03-12 03:10:13 +01:00
|
|
|
void video_window_unregister_class(void) DECLSPEC_HIDDEN;
|
2020-03-12 03:10:11 +01:00
|
|
|
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_QueryInterface(IVideoWindow *iface, REFIID iid, void **out) DECLSPEC_HIDDEN;
|
|
|
|
ULONG WINAPI BaseControlWindowImpl_AddRef(IVideoWindow *iface) DECLSPEC_HIDDEN;
|
|
|
|
ULONG WINAPI BaseControlWindowImpl_Release(IVideoWindow *iface) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT *pctinfo) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR strCaption) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Caption(IVideoWindow *iface, BSTR *strCaption) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG WindowStyle) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *WindowStyle) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow *iface, LONG WindowStyleEx) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow *iface, LONG *WindowStyleEx) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_AutoShow(IVideoWindow *iface, LONG AutoShow) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_AutoShow(IVideoWindow *iface, LONG *AutoShow) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG WindowState) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow *iface, LONG BackgroundPalette) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow *iface, LONG *pBackgroundPalette) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Visible(IVideoWindow *iface, LONG Visible) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *pVisible) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Left(IVideoWindow *iface, LONG Left) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Left(IVideoWindow *iface, LONG *pLeft) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Width(IVideoWindow *iface, LONG Width) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Width(IVideoWindow *iface, LONG *pWidth) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Top(IVideoWindow *iface, LONG Top) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Top(IVideoWindow *iface, LONG *pTop) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Height(IVideoWindow *iface, LONG Height) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Height(IVideoWindow *iface, LONG *pHeight) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND Owner) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_Owner(IVideoWindow *iface, OAHWND *Owner) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain(IVideoWindow *iface, OAHWND Drain) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain(IVideoWindow *iface, OAHWND *Drain) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_BorderColor(IVideoWindow *iface, LONG *Color) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_BorderColor(IVideoWindow *iface, LONG Color) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_get_FullScreenMode(IVideoWindow *iface, LONG *FullScreenMode) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode(IVideoWindow *iface, LONG FullScreenMode) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG Focus) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden) DECLSPEC_HIDDEN;
|
|
|
|
|
2003-06-13 20:06:44 +02:00
|
|
|
#endif /* __QUARTZ_PRIVATE_INCLUDED__ */
|