Commit 34289e74 authored by Alexandre Julliard's avatar Alexandre Julliard

wineqtdecoder: Remove the QuickTime decoder.

QuickTime is deprecated on macOS, so remove the module instead of doing the work to convert it to msvcrt. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f98d956e
......@@ -749,7 +749,6 @@ LIBWINE_LDFLAGS
LIBWINE_SHAREDLIB
METAL_LIBS
CARBON_LIBS
QUICKTIME_LIBS
OPENCL_LIBS
OPENAL_LIBS
COREAUDIO_LIBS
......@@ -909,7 +908,6 @@ with_oss
with_pcap
with_pthread
with_pulse
with_quicktime
with_sane
with_sdl
with_udev
......@@ -1725,7 +1723,6 @@ enable_winemapi
enable_wineoss_drv
enable_wineps_drv
enable_winepulse_drv
enable_wineqtdecoder
enable_wineusb_sys
enable_winevulkan
enable_winex11_drv
......@@ -2695,7 +2692,6 @@ Optional Packages:
--without-pcap do not use the Packet Capture library
--without-pthread do not use the pthread library
--without-pulse do not use PulseAudio sound support
--without-quicktime do not use QuickTime support
--without-sane do not use SANE (scanner support)
--without-sdl do not use SDL
--without-udev do not use udev (plug and play support)
......@@ -4615,13 +4611,6 @@ then :
fi
# Check whether --with-quicktime was given.
if test ${with_quicktime+y}
then :
withval=$with_quicktime;
fi
# Check whether --with-sane was given.
if test ${with_sane+y}
then :
......@@ -8216,12 +8205,6 @@ then :
printf "%s\n" "#define HAVE_OPENCL_OPENCL_H 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "QuickTime/ImageCompression.h" "ac_cv_header_QuickTime_ImageCompression_h" "$ac_includes_default"
if test "x$ac_cv_header_QuickTime_ImageCompression_h" = xyes
then :
printf "%s\n" "#define HAVE_QUICKTIME_IMAGECOMPRESSION_H 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "Security/Security.h" "ac_cv_header_Security_Security_h" "$ac_includes_default"
if test "x$ac_cv_header_Security_Security_h" = xyes
then :
......@@ -10547,53 +10530,6 @@ fi
LIBS="$ac_save_LIBS"
fi
if test "x$with_quicktime" != "xno"
then
if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes"
then
ac_save_LIBS="$LIBS"
LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo $LIBS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the QuickTime framework" >&5
printf %s "checking for the QuickTime framework... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <QuickTime/ImageCompression.h>
int
main (void)
{
CodecManagerVersion(NULL);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
QUICKTIME_LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo"
enable_wineqtdecoder=${enable_wineqtdecoder:-yes}
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
ac_cv_header_QuickTime_ImageCompression_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_save_LIBS"
fi
fi
if test "$ac_cv_header_QuickTime_ImageCompression_h" != "yes"
then :
case "x$with_quicktime" in
x) as_fn_append wine_notices "|QuickTime ${notice_platform}development files not found, video decoding won't be supported." ;;
xno) ;;
*) as_fn_error $? "QuickTime ${notice_platform}development files not found, video decoding won't be supported.
This is an error since --with-quicktime was requested." "$LINENO" 5 ;;
esac
fi
if test "$ac_cv_header_Carbon_Carbon_h" = "yes"
then
CARBON_LIBS="-framework Carbon"
......@@ -11141,7 +11077,6 @@ fi
esac
enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
enable_wineqtdecoder=${enable_wineqtdecoder:-no}
enable_wineandroid_drv=${enable_wineandroid_drv:-no}
enable_winemac_drv=${enable_winemac_drv:-no}
test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
......@@ -16176,9 +16111,7 @@ fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
if test "x$with_gstreamer" = xyes -o "x$with_quicktime" = xno -o "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes
then
if test "x$ac_glib2_broken" != xyes -a "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" != xyes
if test "x$ac_glib2_broken" != xyes -a "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" != xyes
then :
case "x$with_gstreamer" in
x) as_fn_append wine_notices "|gstreamer-1.0 base plugins ${notice_platform}development files not found, GStreamer won't be supported." ;;
......@@ -16186,10 +16119,8 @@ then :
*) as_fn_error $? "gstreamer-1.0 base plugins ${notice_platform}development files not found, GStreamer won't be supported.
This is an error since --with-gstreamer was requested." "$LINENO" 5 ;;
esac
fi
enable_winegstreamer=${enable_winegstreamer:-no}
fi
test "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" = xyes || enable_winegstreamer=${enable_winegstreamer:-no}
ALSA_LIBS=""
......@@ -21798,7 +21729,6 @@ wine_fn_config_makefile dlls/wineoss.drv enable_wineoss_drv
wine_fn_config_makefile dlls/wineps.drv enable_wineps_drv
wine_fn_config_makefile dlls/wineps16.drv16 enable_win16
wine_fn_config_makefile dlls/winepulse.drv enable_winepulse_drv
wine_fn_config_makefile dlls/wineqtdecoder enable_wineqtdecoder
wine_fn_config_makefile dlls/wineusb.sys enable_wineusb_sys
wine_fn_config_makefile dlls/winevulkan enable_winevulkan
wine_fn_config_makefile dlls/winex11.drv enable_winex11_drv
......@@ -23015,7 +22945,6 @@ SECURITY_LIBS = $SECURITY_LIBS
COREAUDIO_LIBS = $COREAUDIO_LIBS
OPENAL_LIBS = $OPENAL_LIBS
OPENCL_LIBS = $OPENCL_LIBS
QUICKTIME_LIBS = $QUICKTIME_LIBS
CARBON_LIBS = $CARBON_LIBS
METAL_LIBS = $METAL_LIBS
LIBWINE_SHAREDLIB = $LIBWINE_SHAREDLIB
......
......@@ -57,7 +57,6 @@ AC_ARG_WITH(pcap, AS_HELP_STRING([--without-pcap],[do not use the Packet Ca
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
AC_ARG_WITH(pulse, AS_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
AC_ARG_WITH(quicktime, AS_HELP_STRING([--without-quicktime],[do not use QuickTime support]))
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
AC_ARG_WITH(sdl, AS_HELP_STRING([--without-sdl],[do not use SDL]))
AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev],[do not use udev (plug and play support)]))
......@@ -427,7 +426,6 @@ AC_CHECK_HEADERS(\
IOKit/hid/IOHIDLib.h \
OpenAL/al.h \
OpenCL/opencl.h \
QuickTime/ImageCompression.h \
Security/Security.h \
SystemConfiguration/SCDynamicStoreCopyDHCPInfo.h \
SystemConfiguration/SCNetworkConfiguration.h \
......@@ -787,27 +785,6 @@ case $host_os in
LIBS="$ac_save_LIBS"
fi
dnl *** Check for QuickTime ***
if test "x$with_quicktime" != "xno"
then
if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes"
then
dnl Make sure we can actually use the QuickTime framework
ac_save_LIBS="$LIBS"
LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo $LIBS"
AC_MSG_CHECKING([for the QuickTime framework])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <QuickTime/ImageCompression.h>]],[[CodecManagerVersion(NULL);]])],
[AC_MSG_RESULT([yes])
AC_SUBST(QUICKTIME_LIBS,"-framework QuickTime -framework ApplicationServices -framework CoreVideo")
enable_wineqtdecoder=${enable_wineqtdecoder:-yes}],
[AC_MSG_RESULT([no])
ac_cv_header_QuickTime_ImageCompression_h=no])
LIBS="$ac_save_LIBS"
fi
fi
WINE_NOTICE_WITH(quicktime,[test "$ac_cv_header_QuickTime_ImageCompression_h" != "yes"],
[QuickTime ${notice_platform}development files not found, video decoding won't be supported.])
if test "$ac_cv_header_Carbon_Carbon_h" = "yes"
then
AC_SUBST(CARBON_LIBS,"-framework Carbon")
......@@ -920,7 +897,6 @@ case $host_os in
esac
enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
enable_wineqtdecoder=${enable_wineqtdecoder:-no}
enable_wineandroid_drv=${enable_wineandroid_drv:-no}
enable_winemac_drv=${enable_winemac_drv:-no}
test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
......@@ -1503,12 +1479,9 @@ then
ac_glib2_broken=yes
WINE_NOTICE([glib-2.0 pkgconfig configuration is for the wrong architecture, winegstreamer won't be built.])])])])
fi
if test "x$with_gstreamer" = xyes -o "x$with_quicktime" = xno -o "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes
then
WINE_NOTICE_WITH(gstreamer,[test "x$ac_glib2_broken" != xyes -a "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" != xyes],
[gstreamer-1.0 base plugins ${notice_platform}development files not found, GStreamer won't be supported.])
fi
test "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" = xyes || enable_winegstreamer=${enable_winegstreamer:-no}
WINE_NOTICE_WITH(gstreamer,[test "x$ac_glib2_broken" != xyes -a "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" != xyes],
[gstreamer-1.0 base plugins ${notice_platform}development files not found, GStreamer won't be supported.],
[enable_winegstreamer])
dnl **** Check for ALSA 1.x ****
AC_SUBST(ALSA_LIBS,"")
......@@ -3473,7 +3446,6 @@ WINE_CONFIG_MAKEFILE(dlls/wineoss.drv)
WINE_CONFIG_MAKEFILE(dlls/wineps.drv)
WINE_CONFIG_MAKEFILE(dlls/wineps16.drv16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/winepulse.drv)
WINE_CONFIG_MAKEFILE(dlls/wineqtdecoder)
WINE_CONFIG_MAKEFILE(dlls/wineusb.sys)
WINE_CONFIG_MAKEFILE(dlls/winevulkan)
WINE_CONFIG_MAKEFILE(dlls/winex11.drv)
......
MODULE = wineqtdecoder.dll
IMPORTS = strmiids uuid ole32 advapi32
EXTRALIBS = $(QUICKTIME_LIBS)
PARENTSRC = ../strmbase
EXTRADLLFLAGS = -mcygwin
C_SRCS = \
filter.c \
main.c \
mediatype.c \
outputqueue.c \
pin.c \
qtdatahandler.c \
qtsplitter.c \
qtutils.c \
qtvdecoder.c \
seeking.c
RC_SRCS = \
rsrc.rc
IDL_SRCS = \
wineqtdecoder_classes.idl
/*
* DirectShow filter for QuickTime Toolkit on Mac OS X
*
* Copyright (C) 2010 Aric Stewart, CodeWeavers
* Copyright (C) 2019 Zebediah Figura
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#define WINE_NO_NAMELESS_EXTENSION
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winerror.h"
#include "objbase.h"
#include "uuids.h"
#include "strmif.h"
#include "rpcproxy.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/strmbase.h"
#include "wineqtdecoder_classes.h"
#include "initguid.h"
DEFINE_GUID(WINESUBTYPE_QTSplitter, 0xFFFFFFFF, 0x5927, 0x4894, 0xA3,0x86, 0x35,0x94,0x60,0xEE,0x87,0xC9);
WINE_DEFAULT_DEBUG_CHANNEL(qtdecoder);
extern HRESULT video_decoder_create(IUnknown *outer, IUnknown **out);
extern HRESULT qt_splitter_create(IUnknown *outer, IUnknown **out);
static const WCHAR wQTVName[] =
{'Q','T',' ','V','i','d','e','o',' ','D','e','c','o','d','e','r',0};
static const WCHAR wQTDName[] =
{'Q','T',' ','V','i','d','e','o',' ','D','e','m','u','x',0};
struct class_factory
{
IClassFactory IClassFactory_iface;
HRESULT (*create_instance)(IUnknown *outer, IUnknown **out);
};
static inline struct class_factory *impl_from_IClassFactory(IClassFactory *iface)
{
return CONTAINING_RECORD(iface, struct class_factory, IClassFactory_iface);
}
static HRESULT WINAPI class_factory_QueryInterface(IClassFactory *iface, REFIID iid, void **out)
{
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IClassFactory))
{
*out = iface;
IClassFactory_AddRef(iface);
return S_OK;
}
*out = NULL;
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
return E_NOINTERFACE;
}
static ULONG WINAPI class_factory_AddRef(IClassFactory *iface)
{
return 2;
}
static ULONG WINAPI class_factory_Release(IClassFactory *iface)
{
return 1;
}
static HRESULT WINAPI class_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID iid, void **out)
{
struct class_factory *factory = impl_from_IClassFactory(iface);
IUnknown *unk;
HRESULT hr;
TRACE("iface %p, outer %p, iid %s, out %p.\n", iface, outer, debugstr_guid(iid), out);
if (outer && !IsEqualGUID(iid, &IID_IUnknown))
return E_NOINTERFACE;
*out = NULL;
if (SUCCEEDED(hr = factory->create_instance(outer, &unk)))
{
hr = IUnknown_QueryInterface(unk, iid, out);
IUnknown_Release(unk);
}
return hr;
}
static HRESULT WINAPI class_factory_LockServer(IClassFactory *iface, BOOL lock)
{
TRACE("iface %p, lock %d.\n", iface, lock);
return S_OK;
}
static const IClassFactoryVtbl class_factory_vtbl =
{
class_factory_QueryInterface,
class_factory_AddRef,
class_factory_Release,
class_factory_CreateInstance,
class_factory_LockServer,
};
static struct class_factory qt_splitter_cf = {{&class_factory_vtbl}, qt_splitter_create};
static struct class_factory video_decoder_cf = {{&class_factory_vtbl}, video_decoder_create};
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
{
struct class_factory *factory;
TRACE("clsid %s, iid %s, out %p.\n", debugstr_guid(clsid), debugstr_guid(iid), out);
if (IsEqualGUID(clsid, &CLSID_QTSplitter))
factory = &qt_splitter_cf;
else if (IsEqualGUID(clsid, &CLSID_QTVDecoder))
factory = &video_decoder_cf;
else
{
FIXME("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid));
return CLASS_E_CLASSNOTAVAILABLE;
}
return IClassFactory_QueryInterface(&factory->IClassFactory_iface, iid, out);
}
static const REGPINTYPES reg_audio_mt = {&MEDIATYPE_Audio, &GUID_NULL};
static const REGPINTYPES reg_stream_mt = {&MEDIATYPE_Stream, &GUID_NULL};
static const REGPINTYPES reg_video_mt = {&MEDIATYPE_Video, &GUID_NULL};
static const REGFILTERPINS2 reg_qt_splitter_pins[3] =
{
{
.nMediaTypes = 1,
.lpMediaType = &reg_stream_mt,
},
{
.dwFlags = REG_PINFLAG_B_OUTPUT | REG_PINFLAG_B_ZERO,
.nMediaTypes = 1,
.lpMediaType = &reg_audio_mt,
},
{
.dwFlags = REG_PINFLAG_B_OUTPUT | REG_PINFLAG_B_ZERO,
.nMediaTypes = 1,
.lpMediaType = &reg_video_mt,
},
};
static const REGFILTER2 reg_qt_splitter =
{
.dwVersion = 2,
.dwMerit = MERIT_NORMAL - 1,
.u.s2.cPins2 = 3,
.u.s2.rgPins2 = reg_qt_splitter_pins,
};
static const REGFILTERPINS2 reg_video_decoder_pins[2] =
{
{
.nMediaTypes = 1,
.lpMediaType = &reg_video_mt,
},
{
.dwFlags = REG_PINFLAG_B_OUTPUT,
.nMediaTypes = 1,
.lpMediaType = &reg_video_mt,
},
};
static const REGFILTER2 reg_video_decoder =
{
.dwVersion = 2,
.dwMerit = MERIT_NORMAL - 1,
.u.s2.cPins2 = 2,
.u.s2.rgPins2 = reg_video_decoder_pins,
};
HRESULT WINAPI DllRegisterServer(void)
{
IFilterMapper2 *mapper;
HRESULT hr;
TRACE(".\n");
if (FAILED(hr = __wine_register_resources()))
return hr;
if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
&IID_IFilterMapper2, (void **)&mapper)))
return hr;
IFilterMapper2_RegisterFilter(mapper, &CLSID_QTSplitter, wQTDName, NULL, NULL, NULL, &reg_qt_splitter);
IFilterMapper2_RegisterFilter(mapper, &CLSID_QTVDecoder, wQTVName, NULL, NULL, NULL, &reg_video_decoder);
IFilterMapper2_Release(mapper);
return S_OK;
}
HRESULT WINAPI DllUnregisterServer(void)
{
IFilterMapper2 *mapper;
HRESULT hr;
TRACE(".\n");
if (FAILED(hr = __wine_unregister_resources()))
return hr;
if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
&IID_IFilterMapper2, (void **)&mapper)))
return hr;
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_QTSplitter);
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_QTVDecoder);
IFilterMapper2_Release(mapper);
return S_OK;
}
/*
* QuickTime Toolkit decoder header
*
* Copyright 2011 Aric Stewart, CodeWeavers
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
typedef struct WineDataRefRecordTag
{
IAsyncReader* pReader;
GUID streamSubtype;
} WineDataRefRecord;
HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStream);
void RegisterWineDataHandler( void );
/*
* QuickTime Toolkit decoder utils
*
* Copyright 2011 Aric Stewart, CodeWeavers
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#define ULONG CoreFoundation_ULONG
#define HRESULT CoreFoundation_HRESULT
#define LoadResource __carbon_LoadResource
#define CompareString __carbon_CompareString
#define GetCurrentThread __carbon_GetCurrentThread
#define GetCurrentProcess __carbon_GetCurrentProcess
#define AnimatePalette __carbon_AnimatePalette
#define EqualRgn __carbon_EqualRgn
#define FillRgn __carbon_FillRgn
#define FrameRgn __carbon_FrameRgn
#define GetPixel __carbon_GetPixel
#define InvertRgn __carbon_InvertRgn
#define LineTo __carbon_LineTo
#define OffsetRgn __carbon_OffsetRgn
#define PaintRgn __carbon_PaintRgn
#define Polygon __carbon_Polygon
#define ResizePalette __carbon_ResizePalette
#define SetRectRgn __carbon_SetRectRgn
#define CheckMenuItem __carbon_CheckMenuItem
#define DeleteMenu __carbon_DeleteMenu
#define DrawMenuBar __carbon_DrawMenuBar
#define EnableMenuItem __carbon_EnableMenuItem
#define EqualRect __carbon_EqualRect
#define FillRect __carbon_FillRect
#define FrameRect __carbon_FrameRect
#define GetCursor __carbon_GetCursor
#define GetMenu __carbon_GetMenu
#define InvertRect __carbon_InvertRect
#define IsWindowVisible __carbon_IsWindowVisible
#define MoveWindow __carbon_MoveWindow
#define OffsetRect __carbon_OffsetRect
#define PtInRect __carbon_PtInRect
#define SetCursor __carbon_SetCursor
#define SetRect __carbon_SetRect
#define ShowCursor __carbon_ShowCursor
#define ShowWindow __carbon_ShowWindow
#define UnionRect __carbon_UnionRect
#include <CoreVideo/CVPixelBuffer.h>
#undef LoadResource
#undef CompareString
#undef GetCurrentThread
#undef _CDECL
#undef GetCurrentProcess
#undef AnimatePalette
#undef EqualRgn
#undef FillRgn
#undef FrameRgn
#undef GetPixel
#undef InvertRgn
#undef LineTo
#undef OffsetRgn
#undef PaintRgn
#undef Polygon
#undef ResizePalette
#undef SetRectRgn
#undef CheckMenuItem
#undef DeleteMenu
#undef DrawMenuBar
#undef EnableMenuItem
#undef EqualRect
#undef FillRect
#undef FrameRect
#undef GetCursor
#undef GetMenu
#undef InvertRect
#undef IsWindowVisible
#undef MoveWindow
#undef OffsetRect
#undef PtInRect
#undef SetCursor
#undef SetRect
#undef ShowCursor
#undef ShowWindow
#undef UnionRect
#undef ULONG
#undef HRESULT
#undef STDMETHODCALLTYPE
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "winuser.h"
#include "dshow.h"
#include "wine/debug.h"
#include "qtprivate.h"
WINE_DEFAULT_DEBUG_CHANNEL(qtdecoder);
typedef struct {
UInt8 a; /* Alpha Channel */
UInt8 r; /* red component */
UInt8 g; /* green component */
UInt8 b; /* blue component */
} ARGBPixelRecord, *ARGBPixelPtr, **ARGBPixelHdl;
HRESULT AccessPixelBufferPixels( CVPixelBufferRef pixelBuffer, LPBYTE pbDstStream)
{
LPBYTE pPixels = NULL;
size_t bytesPerRow = 0, height = 0, width = 0;
OSType actualType;
int i;
actualType = CVPixelBufferGetPixelFormatType(pixelBuffer);
if (k32ARGBPixelFormat != actualType)
{
ERR("Pixel Buffer is not desired Type\n");
return E_FAIL;
}
CVPixelBufferLockBaseAddress(pixelBuffer,0);
pPixels = (LPBYTE)CVPixelBufferGetBaseAddress(pixelBuffer);
bytesPerRow = CVPixelBufferGetBytesPerRow(pixelBuffer);
height = CVPixelBufferGetHeight(pixelBuffer);
width = CVPixelBufferGetWidth(pixelBuffer);
for (i = 1; i <= height; i++)
{
int j;
LPBYTE out = pbDstStream + ((height - i) * width * 3);
for (j = 0; j < width; j++)
{
*((DWORD*)out) = (((ARGBPixelPtr)pPixels)[j].r) << 16
| (((ARGBPixelPtr)pPixels)[j].g) << 8
| (((ARGBPixelPtr)pPixels)[j].b);
out+=3;
}
pPixels += bytesPerRow;
}
CVPixelBufferUnlockBaseAddress(pixelBuffer,0);
return S_OK;
}
/*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WINE_FILEDESCRIPTION_STR "Wine QT Decoder"
#define WINE_FILENAME_STR "wineqtdecoder.dll"
#define WINE_FILEVERSION 0,0,1,0
#define WINE_FILEVERSION_STR "0.0.1.0"
#define WINE_PRODUCTVERSION 0,0,1,0
#define WINE_PRODUCTVERSION_STR "1.0.1.0"
#define WINE_EXTRAVALUES VALUE "OLESelfRegister",""
#include "wine/wine_common_ver.rc"
/* @makedep: wineqtdecoder.rgs */
2 WINE_REGISTRY wineqtdecoder.rgs
HKCR
{
NoRemove 'Media Type'
{
NoRemove '{E436EB83-524F-11CE-9F53-0020AF0BA770}'
{
ForceRemove '{FFFFFFFF-5927-4894-A386-359460EE87C9}'
{
val '0' = s '0,1,00,0'
val 'Source Filter' = s '{E436EBB5-524F-11CE-9F53-0020AF0BA770}'
}
}
}
}
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
/*
* COM classes for wineqtdecoder
*
* Copyright 2019 Zebediah Figura
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep header
#pragma makedep ident
#pragma makedep register
[
helpstring("Wine QuickTime splitter"),
threading(both),
uuid(d0e70e49-5927-4894-a386-359460ee87c9)
]
coclass QTSplitter {}
[
helpstring("Wine QuickTime video decoder"),
threading(both),
uuid(683ddacb-4354-490c-a058-e05ad0f20537)
]
coclass QTVDecoder {}
......@@ -419,9 +419,6 @@
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define to 1 if you have the <QuickTime/ImageCompression.h> header file. */
#undef HAVE_QUICKTIME_IMAGECOMPRESSION_H
/* Define to 1 if the system has the type `request_sense'. */
#undef HAVE_REQUEST_SENSE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment