Added some stubs.
[wine] / dlls / quartz / filesink.h
1 /*
2  * Implements CLSID_FileWriter.
3  *
4  * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef WINE_DSHOW_FILESINK_H
22 #define WINE_DSHOW_FILESINK_H
23
24 #include "iunk.h"
25 #include "basefilt.h"
26 #include "seekpass.h"
27
28 typedef struct CFileWriterImpl  CFileWriterImpl;
29 typedef struct CFileWriterPinImpl       CFileWriterPinImpl;
30
31
32 typedef struct FileWriterPin_IStreamImpl
33 {
34         ICOM_VFIELD(IStream);
35 } FileWriterPin_IStreamImpl;
36
37 typedef struct FileWriter_IFileSinkFilter2Impl
38 {
39         ICOM_VFIELD(IFileSinkFilter2);
40 } FileWriter_IFileSinkFilter2Impl;
41
42 struct CFileWriterImpl
43 {
44         QUARTZ_IUnkImpl unk;
45         CBaseFilterImpl basefilter;
46         FileWriter_IFileSinkFilter2Impl filesink;
47         QUARTZ_IFDelegation     qiext;
48
49         CSeekingPassThru*       pSeekPass;
50         CFileWriterPinImpl* pPin;
51
52         CRITICAL_SECTION        m_csReceive;
53         BOOL    m_fInFlush;
54
55         /* for writing */
56         HANDLE  m_hFile;
57         WCHAR*  m_pszFileName;
58         DWORD   m_cbFileName;
59         DWORD   m_dwMode;
60         AM_MEDIA_TYPE   m_mt;
61 };
62
63 struct CFileWriterPinImpl
64 {
65         QUARTZ_IUnkImpl unk;
66         CPinBaseImpl    pin;
67         CMemInputPinBaseImpl    meminput;
68         FileWriterPin_IStreamImpl       stream;
69
70         CFileWriterImpl* pRender;
71 };
72
73 #define CFileWriterImpl_THIS(iface,member)      CFileWriterImpl*        This = ((CFileWriterImpl*)(((char*)iface)-offsetof(CFileWriterImpl,member)))
74 #define CFileWriterPinImpl_THIS(iface,member)   CFileWriterPinImpl*     This = ((CFileWriterPinImpl*)(((char*)iface)-offsetof(CFileWriterPinImpl,member)))
75
76
77 HRESULT CFileWriterPinImpl_InitIStream( CFileWriterPinImpl* This );
78 HRESULT CFileWriterPinImpl_UninitIStream( CFileWriterPinImpl* This );
79 HRESULT CFileWriterImpl_InitIFileSinkFilter2( CFileWriterImpl* This );
80 HRESULT CFileWriterImpl_UninitIFileSinkFilter2( CFileWriterImpl* This );
81
82 HRESULT QUARTZ_CreateFileWriter(IUnknown* punkOuter,void** ppobj);
83 HRESULT QUARTZ_CreateFileWriterPin(
84         CFileWriterImpl* pFilter,
85         CRITICAL_SECTION* pcsPin,
86         CRITICAL_SECTION* pcsPinReceive,
87         CFileWriterPinImpl** ppPin);
88
89
90 #endif  /* WINE_DSHOW_FILESINK_H */