Author: cwittich
Date: Sat Feb 6 22:46:26 2010
New Revision: 45472
URL:
http://svn.reactos.org/svn/reactos?rev=45472&view=rev
Log:
[QEDIT]
sync qedit to wine 1.1.38
Added:
trunk/reactos/dll/directx/qedit/samplegrabber.c (with props)
Modified:
trunk/reactos/dll/directx/qedit/main.c
trunk/reactos/dll/directx/qedit/mediadet.c
trunk/reactos/dll/directx/qedit/qedit.rbuild
trunk/reactos/dll/directx/qedit/qedit_private.h
trunk/reactos/dll/directx/qedit/regsvr.c
trunk/reactos/include/dxsdk/qedit.idl
trunk/reactos/include/dxsdk/uuids.h
Modified: trunk/reactos/dll/directx/qedit/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/main.c?r…
==============================================================================
--- trunk/reactos/dll/directx/qedit/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/qedit/main.c [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -53,6 +53,7 @@
static const struct object_creation_info object_creation[] =
{
{ &CLSID_MediaDet, MediaDet_create },
+ { &CLSID_SampleGrabber, SampleGrabber_create },
};
static HRESULT WINAPI
Modified: trunk/reactos/dll/directx/qedit/mediadet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/mediadet…
==============================================================================
--- trunk/reactos/dll/directx/qedit/mediadet.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/qedit/mediadet.c [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -112,7 +112,7 @@
return E_NOTIMPL;
}
-static HRESULT WINAPI MediaDet_get_OutputStreams(IMediaDet* iface, long *pVal)
+static HRESULT WINAPI MediaDet_get_OutputStreams(IMediaDet* iface, LONG *pVal)
{
MediaDetImpl *This = (MediaDetImpl *)iface;
IEnumPins *pins;
@@ -156,7 +156,7 @@
return S_OK;
}
-static HRESULT WINAPI MediaDet_get_CurrentStream(IMediaDet* iface, long *pVal)
+static HRESULT WINAPI MediaDet_get_CurrentStream(IMediaDet* iface, LONG *pVal)
{
MediaDetImpl *This = (MediaDetImpl *)iface;
TRACE("(%p)\n", This);
@@ -209,16 +209,16 @@
return S_OK;
}
-static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, long newVal)
-{
- MediaDetImpl *This = (MediaDetImpl *)iface;
- HRESULT hr;
-
- TRACE("(%p)->(%ld)\n", This, newVal);
+static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, LONG newVal)
+{
+ MediaDetImpl *This = (MediaDetImpl *)iface;
+ HRESULT hr;
+
+ TRACE("(%p)->(%d)\n", This, newVal);
if (This->num_streams == -1)
{
- long n;
+ LONG n;
hr = MediaDet_get_OutputStreams(iface, &n);
if (FAILED(hr))
return hr;
@@ -310,7 +310,11 @@
hr = IPropertyBag_Read(pPropBagCat, wszClsidName, pvar, NULL);
if (SUCCEEDED(hr))
+ {
hr = CLSIDFromString(V_UNION(pvar, bstrVal), pclsid);
+ VariantClear(pvar);
+ V_VT(pvar) = VT_BSTR;
+ }
if (SUCCEEDED(hr))
hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, pvar, NULL);
@@ -387,10 +391,14 @@
hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER,
&IID_IBaseFilter, (void **) &splitter);
if (FAILED(hr))
- return hr;
+ {
+ VariantClear(&var);
+ return hr;
+ }
hr = IGraphBuilder_AddFilter(This->graph, splitter,
V_UNION(&var, bstrVal));
+ VariantClear(&var);
if (FAILED(hr))
{
IBaseFilter_Release(splitter);
@@ -461,21 +469,21 @@
static HRESULT WINAPI MediaDet_GetBitmapBits(IMediaDet* iface,
double StreamTime,
- long *pBufferSize, char *pBuffer,
- long Width, long Height)
-{
- MediaDetImpl *This = (MediaDetImpl *)iface;
- FIXME("(%p)->(%f %p %p %ld %ld): not implemented!\n", This, StreamTime,
pBufferSize, pBuffer,
+ LONG *pBufferSize, char *pBuffer,
+ LONG Width, LONG Height)
+{
+ MediaDetImpl *This = (MediaDetImpl *)iface;
+ FIXME("(%p)->(%f %p %p %d %d): not implemented!\n", This, StreamTime,
pBufferSize, pBuffer,
Width, Height);
return E_NOTIMPL;
}
static HRESULT WINAPI MediaDet_WriteBitmapBits(IMediaDet* iface,
- double StreamTime, long Width,
- long Height, BSTR Filename)
-{
- MediaDetImpl *This = (MediaDetImpl *)iface;
- FIXME("(%p)->(%f %ld %ld %p): not implemented!\n", This, StreamTime,
Width, Height, Filename);
+ double StreamTime, LONG Width,
+ LONG Height, BSTR Filename)
+{
+ MediaDetImpl *This = (MediaDetImpl *)iface;
+ FIXME("(%p)->(%f %d %d %p): not implemented!\n", This, StreamTime,
Width, Height, Filename);
return E_NOTIMPL;
}
Modified: trunk/reactos/dll/directx/qedit/qedit.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/qedit.rb…
==============================================================================
--- trunk/reactos/dll/directx/qedit/qedit.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/qedit/qedit.rbuild [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -8,6 +8,7 @@
<file>main.c</file>
<file>mediadet.c</file>
<file>regsvr.c</file>
+ <file>samplegrabber.c</file>
<library>wine</library>
<library>strmiids</library>
<library>uuid</library>
Modified: trunk/reactos/dll/directx/qedit/qedit_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/qedit_pr…
==============================================================================
--- trunk/reactos/dll/directx/qedit/qedit_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/qedit/qedit_private.h [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -37,5 +37,6 @@
#include "qedit.h"
HRESULT MediaDet_create(IUnknown *pUnkOuter, LPVOID *ppObj);
+HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppObj);
#endif /* __QEDIT_PRIVATE_INCLUDED__ */
Modified: trunk/reactos/dll/directx/qedit/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/regsvr.c…
==============================================================================
--- trunk/reactos/dll/directx/qedit/regsvr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/qedit/regsvr.c [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -294,6 +294,12 @@
"qedit.dll",
"Both"
},
+ { &CLSID_SampleGrabber,
+ "Sample Grabber",
+ NULL,
+ "qedit.dll",
+ "Both"
+ },
{ NULL } /* list terminator */
};
Added: trunk/reactos/dll/directx/qedit/samplegrabber.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/samplegr…
==============================================================================
--- trunk/reactos/dll/directx/qedit/samplegrabber.c (added)
+++ trunk/reactos/dll/directx/qedit/samplegrabber.c [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -1,0 +1,453 @@
+/* DirectShow Sample Grabber object (QEDIT.DLL)
+ *
+ * Copyright 2009 Paul Chitescu
+ *
+ * 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 <assert.h>
+#include <stdarg.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+
+#include "qedit_private.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(qedit);
+
+static WCHAR const vendor_name[] = { 'W', 'i', 'n', 'e',
0 };
+
+/* Sample Grabber filter implementation */
+typedef struct _SG_Impl {
+ const IBaseFilterVtbl* IBaseFilter_Vtbl;
+ const ISampleGrabberVtbl* ISampleGrabber_Vtbl;
+ /* TODO: IMediaPosition, IMediaSeeking, IQualityControl */
+ LONG refCount;
+ FILTER_INFO info;
+ FILTER_STATE state;
+ IMemAllocator *allocator;
+ IReferenceClock *refClock;
+} SG_Impl;
+
+/* Get the SampleGrabber implementation This pointer from various interface pointers */
+static inline SG_Impl *impl_from_IBaseFilter(IBaseFilter *iface)
+{
+ return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, IBaseFilter_Vtbl));
+}
+
+static inline SG_Impl *impl_from_ISampleGrabber(ISampleGrabber *iface)
+{
+ return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, ISampleGrabber_Vtbl));
+}
+
+
+/* Cleanup at end of life */
+static void SampleGrabber_cleanup(SG_Impl *This)
+{
+ TRACE("(%p)\n", This);
+ if (This->info.pGraph)
+ WARN("(%p) still joined to filter graph %p\n", This, This->info.pGraph);
+ if (This->allocator)
+ IMemAllocator_Release(This->allocator);
+ if (This->refClock)
+ IReferenceClock_Release(This->refClock);
+}
+
+/* Common helper AddRef called from all interfaces */
+static ULONG SampleGrabber_addref(SG_Impl *This)
+{
+ ULONG refCount = InterlockedIncrement(&This->refCount);
+ TRACE("(%p) new ref = %u\n", This, refCount);
+ return refCount;
+}
+
+/* Common helper Release called from all interfaces */
+static ULONG SampleGrabber_release(SG_Impl *This)
+{
+ ULONG refCount = InterlockedDecrement(&This->refCount);
+ TRACE("(%p) new ref = %u\n", This, refCount);
+ if (refCount == 0)
+ {
+ SampleGrabber_cleanup(This);
+ CoTaskMemFree(This);
+ return 0;
+ }
+ return refCount;
+}
+
+/* Common helper QueryInterface called from all interfaces */
+static HRESULT SampleGrabber_query(SG_Impl *This, REFIID riid, void **ppvObject)
+{
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
+
+ if (IsEqualIID(riid, &IID_IUnknown) ||
+ IsEqualIID(riid, &IID_IPersist) ||
+ IsEqualIID(riid, &IID_IMediaFilter) ||
+ IsEqualIID(riid, &IID_IBaseFilter)) {
+ SampleGrabber_addref(This);
+ *ppvObject = &(This->IBaseFilter_Vtbl);
+ return S_OK;
+ }
+ else if (IsEqualIID(riid, &IID_ISampleGrabber)) {
+ SampleGrabber_addref(This);
+ *ppvObject = &(This->ISampleGrabber_Vtbl);
+ return S_OK;
+ }
+ else if (IsEqualIID(riid, &IID_IMemInputPin))
+ FIXME("IMemInputPin not implemented\n");
+ else if (IsEqualIID(riid, &IID_IMediaPosition))
+ FIXME("IMediaPosition not implemented\n");
+ else if (IsEqualIID(riid, &IID_IMediaSeeking))
+ FIXME("IMediaSeeking not implemented\n");
+ else if (IsEqualIID(riid, &IID_IQualityControl))
+ FIXME("IQualityControl not implemented\n");
+ *ppvObject = NULL;
+ WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject);
+ return E_NOINTERFACE;
+}
+
+
+/* SampleGrabber implementation of IBaseFilter interface */
+
+/* IUnknown */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_QueryInterface(IBaseFilter *iface, REFIID riid, void
**ppvObject)
+{
+ return SampleGrabber_query(impl_from_IBaseFilter(iface), riid, ppvObject);
+}
+
+/* IUnknown */
+static ULONG WINAPI
+SampleGrabber_IBaseFilter_AddRef(IBaseFilter *iface)
+{
+ return SampleGrabber_addref(impl_from_IBaseFilter(iface));
+}
+
+/* IUnknown */
+static ULONG WINAPI
+SampleGrabber_IBaseFilter_Release(IBaseFilter *iface)
+{
+ return SampleGrabber_release(impl_from_IBaseFilter(iface));
+}
+
+/* IPersist */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_GetClassID(IBaseFilter *iface, CLSID *pClassID)
+{
+ TRACE("(%p)\n", pClassID);
+ if (!pClassID)
+ return E_POINTER;
+ *pClassID = CLSID_SampleGrabber;
+ return S_OK;
+}
+
+/* IMediaFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_Stop(IBaseFilter *iface)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)\n", This);
+ This->state = State_Stopped;
+ return S_OK;
+}
+
+/* IMediaFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_Pause(IBaseFilter *iface)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)\n", This);
+ This->state = State_Paused;
+ return S_OK;
+}
+
+/* IMediaFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)\n", This);
+ This->state = State_Running;
+ return S_OK;
+}
+
+/* IMediaFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_GetState(IBaseFilter *iface, DWORD msTout, FILTER_STATE
*state)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)->(%u, %p)\n", This, msTout, state);
+ if (!state)
+ return E_POINTER;
+ *state = This->state;
+ return S_OK;
+}
+
+/* IMediaFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)->(%p)\n", This, clock);
+ if (clock != This->refClock)
+ {
+ if (clock)
+ IReferenceClock_AddRef(clock);
+ if (This->refClock)
+ IReferenceClock_Release(This->refClock);
+ This->refClock = clock;
+ }
+ return S_OK;
+}
+
+/* IMediaFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_GetSyncSource(IBaseFilter *iface, IReferenceClock **clock)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)->(%p)\n", This, clock);
+ if (!clock)
+ return E_POINTER;
+ if (This->refClock)
+ IReferenceClock_AddRef(This->refClock);
+ *clock = This->refClock;
+ return S_OK;
+}
+
+/* IBaseFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_EnumPins(IBaseFilter *iface, IEnumPins **pins)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ FIXME("(%p)->(%p): stub\n", This, pins);
+ if (!pins)
+ return E_POINTER;
+ return E_OUTOFMEMORY;
+}
+
+/* IBaseFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_FindPin(IBaseFilter *iface, LPCWSTR id, IPin **pin)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ FIXME("(%p)->(%s, %p): stub\n", This, debugstr_w(id), pin);
+ if (!id || !pin)
+ return E_POINTER;
+ *pin = NULL;
+ return VFW_E_NOT_FOUND;
+}
+
+/* IBaseFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *info)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)->(%p)\n", This, info);
+ if (!info)
+ return E_POINTER;
+ if (This->info.pGraph)
+ IFilterGraph_AddRef(This->info.pGraph);
+ *info = This->info;
+ return S_OK;
+}
+
+/* IBaseFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *graph,
LPCWSTR name)
+{
+ SG_Impl *This = impl_from_IBaseFilter(iface);
+ TRACE("(%p)->(%p, %s)\n", This, graph, debugstr_w(name));
+ This->info.pGraph = graph;
+ if (name)
+ lstrcpynW(This->info.achName,name,MAX_FILTER_NAME);
+ return S_OK;
+}
+
+/* IBaseFilter */
+static HRESULT WINAPI
+SampleGrabber_IBaseFilter_QueryVendorInfo(IBaseFilter *iface, LPWSTR *vendor)
+{
+ TRACE("(%p)\n", vendor);
+ if (!vendor)
+ return E_POINTER;
+ *vendor = CoTaskMemAlloc(sizeof(vendor_name));
+ CopyMemory(*vendor, vendor_name, sizeof(vendor_name));
+ return S_OK;
+}
+
+
+/* SampleGrabber implementation of ISampleGrabber interface */
+
+/* IUnknown */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_QueryInterface(ISampleGrabber *iface, REFIID riid, void
**ppvObject)
+{
+ return SampleGrabber_query(impl_from_ISampleGrabber(iface), riid, ppvObject);
+}
+
+/* IUnknown */
+static ULONG WINAPI
+SampleGrabber_ISampleGrabber_AddRef(ISampleGrabber *iface)
+{
+ return SampleGrabber_addref(impl_from_ISampleGrabber(iface));
+}
+
+/* IUnknown */
+static ULONG WINAPI
+SampleGrabber_ISampleGrabber_Release(ISampleGrabber *iface)
+{
+ return SampleGrabber_release(impl_from_ISampleGrabber(iface));
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_SetOneShot(ISampleGrabber *iface, BOOL oneShot)
+{
+ SG_Impl *This = impl_from_ISampleGrabber(iface);
+ FIXME("(%p)->(%u): stub\n", This, oneShot);
+ return E_NOTIMPL;
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_TYPE
*type)
+{
+ SG_Impl *This = impl_from_ISampleGrabber(iface);
+ FIXME("(%p)->(%p): stub\n", This, type);
+ if (!type)
+ return E_POINTER;
+ return E_NOTIMPL;
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MEDIA_TYPE
*type)
+{
+ SG_Impl *This = impl_from_ISampleGrabber(iface);
+ FIXME("(%p)->(%p): stub\n", This, type);
+ if (!type)
+ return E_POINTER;
+ return E_NOTIMPL;
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_SetBufferSamples(ISampleGrabber *iface, BOOL bufferEm)
+{
+ TRACE("(%u)\n", bufferEm);
+ if (bufferEm) {
+ FIXME("buffering not implemented\n");
+ return E_NOTIMPL;
+ }
+ return S_OK;
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_GetCurrentBuffer(ISampleGrabber *iface, LONG *bufSize, LONG
*buffer)
+{
+ FIXME("(%p, %p): stub\n", bufSize, buffer);
+ if (!bufSize)
+ return E_POINTER;
+ return E_INVALIDARG;
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_GetCurrentSample(ISampleGrabber *iface, IMediaSample
**sample)
+{
+ /* MS doesn't implement it either, noone should call it */
+ WARN("(%p): not implemented\n", sample);
+ return E_NOTIMPL;
+}
+
+/* ISampleGrabber */
+static HRESULT WINAPI
+SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB *cb,
LONG whichMethod)
+{
+ SG_Impl *This = impl_from_ISampleGrabber(iface);
+ FIXME("(%p)->(%p, %u): stub\n", This, cb, whichMethod);
+ return E_NOTIMPL;
+}
+
+
+/* SampleGrabber vtables and constructor */
+
+static const IBaseFilterVtbl IBaseFilter_VTable =
+{
+ SampleGrabber_IBaseFilter_QueryInterface,
+ SampleGrabber_IBaseFilter_AddRef,
+ SampleGrabber_IBaseFilter_Release,
+ SampleGrabber_IBaseFilter_GetClassID,
+ SampleGrabber_IBaseFilter_Stop,
+ SampleGrabber_IBaseFilter_Pause,
+ SampleGrabber_IBaseFilter_Run,
+ SampleGrabber_IBaseFilter_GetState,
+ SampleGrabber_IBaseFilter_SetSyncSource,
+ SampleGrabber_IBaseFilter_GetSyncSource,
+ SampleGrabber_IBaseFilter_EnumPins,
+ SampleGrabber_IBaseFilter_FindPin,
+ SampleGrabber_IBaseFilter_QueryFilterInfo,
+ SampleGrabber_IBaseFilter_JoinFilterGraph,
+ SampleGrabber_IBaseFilter_QueryVendorInfo,
+};
+
+static const ISampleGrabberVtbl ISampleGrabber_VTable =
+{
+ SampleGrabber_ISampleGrabber_QueryInterface,
+ SampleGrabber_ISampleGrabber_AddRef,
+ SampleGrabber_ISampleGrabber_Release,
+ SampleGrabber_ISampleGrabber_SetOneShot,
+ SampleGrabber_ISampleGrabber_SetMediaType,
+ SampleGrabber_ISampleGrabber_GetConnectedMediaType,
+ SampleGrabber_ISampleGrabber_SetBufferSamples,
+ SampleGrabber_ISampleGrabber_GetCurrentBuffer,
+ SampleGrabber_ISampleGrabber_GetCurrentSample,
+ SampleGrabber_ISampleGrabber_SetCallback,
+};
+
+HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv)
+{
+ SG_Impl* obj = NULL;
+
+ TRACE("(%p,%p)\n", ppv, pUnkOuter);
+
+ if (pUnkOuter)
+ return CLASS_E_NOAGGREGATION;
+
+ obj = CoTaskMemAlloc(sizeof(SG_Impl));
+ if (NULL == obj) {
+ *ppv = NULL;
+ return E_OUTOFMEMORY;
+ }
+ ZeroMemory(obj, sizeof(SG_Impl));
+
+ obj->refCount = 1;
+ obj->IBaseFilter_Vtbl = &IBaseFilter_VTable;
+ obj->ISampleGrabber_Vtbl = &ISampleGrabber_VTable;
+ obj->info.achName[0] = 0;
+ obj->info.pGraph = NULL;
+ obj->state = State_Stopped;
+ obj->allocator = NULL;
+ obj->refClock = NULL;
+ *ppv = obj;
+
+ return S_OK;
+}
Propchange: trunk/reactos/dll/directx/qedit/samplegrabber.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/include/dxsdk/qedit.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/qedit.idl?re…
==============================================================================
--- trunk/reactos/include/dxsdk/qedit.idl [iso-8859-1] (original)
+++ trunk/reactos/include/dxsdk/qedit.idl [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -37,7 +37,7 @@
HRESULT BufferCB(
double SampleTime,
BYTE * pBuffer,
- long BufferLen
+ LONG BufferLen
);
}
@@ -66,8 +66,8 @@
);
HRESULT GetCurrentBuffer(
- [in,out] long * pBufferSize,
- [out] long * pBuffer
+ [in,out] LONG * pBufferSize,
+ [out] LONG * pBuffer
);
HRESULT GetCurrentSample(
@@ -76,7 +76,7 @@
HRESULT SetCallback(
ISampleGrabberCB * pCallback,
- long WhichMethodToCallback
+ LONG WhichMethodToCallback
);
};
@@ -96,15 +96,15 @@
);
HRESULT get_OutputStreams(
- [out] long *pVal
+ [out] LONG *pVal
);
HRESULT get_CurrentStream(
- [out] long *pVal
+ [out] LONG *pVal
);
HRESULT put_CurrentStream(
- long newVal
+ LONG newVal
);
HRESULT get_StreamType(
@@ -129,16 +129,16 @@
HRESULT GetBitmapBits(
double StreamTime,
- long * pBufferSize,
+ LONG * pBufferSize,
char * pBuffer,
- long Width,
- long Height
+ LONG Width,
+ LONG Height
);
HRESULT WriteBitmapBits(
double StreamTime,
- long Width,
- long Height,
+ LONG Width,
+ LONG Height,
BSTR Filename
);
Modified: trunk/reactos/include/dxsdk/uuids.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/uuids.h?rev=…
==============================================================================
--- trunk/reactos/include/dxsdk/uuids.h [iso-8859-1] (original)
+++ trunk/reactos/include/dxsdk/uuids.h [iso-8859-1] Sat Feb 6 22:46:26 2010
@@ -135,6 +135,7 @@
OUR_GUID_ENTRY(CLSID_QTDec, 0xfdfe9681, 0x74a3, 0x11d0, 0xaf,
0xa7, 0x00, 0xaa, 0x00, 0xb6, 0x7a, 0x42)
OUR_GUID_ENTRY(CLSID_AVIDoc, 0xd3588ab0, 0x0781, 0x11ce, 0xb0,
0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(CLSID_AVIDocWriter, 0xd3588ab1, 0x0781, 0x11ce, 0xb0,
0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
+OUR_GUID_ENTRY(CLSID_SampleGrabber, 0xc1f400a0, 0x3f08, 0x11d3, 0x9f,
0x0b, 0x00, 0x60, 0x08, 0x03, 0x9e, 0x37)
OUR_GUID_ENTRY(CLSID_NullRenderer, 0xc1f400a4, 0x3f08, 0x11d3, 0x9f,
0x0b, 0x00, 0x60, 0x08, 0x03, 0x9e, 0x37)
OUR_GUID_ENTRY(CLSID_VideoRenderer, 0x70e102b0, 0x5556, 0x11ce, 0x97,
0xc0, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
OUR_GUID_ENTRY(CLSID_VideoRendererDefault, 0x6bc1cffa, 0x8fc1, 0x4261, 0xac,
0x22, 0xcf, 0xb4, 0xcc, 0x38, 0xdb, 0x50)