Jacek Caban : qcap: Added AVI compressor Start and Stop implementations.
Alexandre Julliard
julliard at winehq.org
Tue Dec 31 11:11:43 CST 2013
Module: wine
Branch: master
Commit: 47cc78c45470285e9836e74363e33a08d8746a15
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47cc78c45470285e9836e74363e33a08d8746a15
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Dec 30 20:22:25 2013 +0100
qcap: Added AVI compressor Start and Stop implementations.
---
dlls/qcap/avico.c | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c
index 6ac9da3..4720ae3 100644
--- a/dlls/qcap/avico.c
+++ b/dlls/qcap/avico.c
@@ -45,6 +45,8 @@ typedef struct {
VIDEOINFOHEADER *videoinfo;
size_t videoinfo_size;
DWORD driver_flags;
+
+ DWORD frame_cnt;
} AVICompressor;
static inline AVICompressor *impl_from_BaseFilter(BaseFilter *filter)
@@ -166,8 +168,15 @@ static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface)
static HRESULT WINAPI AVICompressor_Stop(IBaseFilter *iface)
{
AVICompressor *This = impl_from_IBaseFilter(iface);
- FIXME("(%p)\n", This);
- return E_NOTIMPL;
+
+ TRACE("(%p)\n", This);
+
+ if(This->filter.state == State_Stopped)
+ return S_OK;
+
+ ICCompressEnd(This->hic);
+ This->filter.state = State_Stopped;
+ return S_OK;
}
static HRESULT WINAPI AVICompressor_Pause(IBaseFilter *iface)
@@ -180,8 +189,23 @@ static HRESULT WINAPI AVICompressor_Pause(IBaseFilter *iface)
static HRESULT WINAPI AVICompressor_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
{
AVICompressor *This = impl_from_IBaseFilter(iface);
- FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(tStart));
- return E_NOTIMPL;
+ HRESULT hres;
+
+ TRACE("(%p)->(%s)\n", This, wine_dbgstr_longlong(tStart));
+
+ if(This->filter.state == State_Running)
+ return S_OK;
+
+ hres = IMemAllocator_Commit(This->out->pAllocator);
+ if(FAILED(hres)) {
+ FIXME("Commit failed: %08x\n", hres);
+ return hres;
+ }
+
+ This->frame_cnt = 0;
+
+ This->filter.state = State_Running;
+ return S_OK;
}
static HRESULT WINAPI AVICompressor_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
More information about the wine-cvs
mailing list