annotate loader/dshow/inputpin.c @ 22298:a34c7ed7ff6d

Move EDL code to separate functions
author uau
date Thu, 22 Feb 2007 21:05:31 +0000
parents 24dc4ec0d08d
children 3d1b23cf3d08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15166
f5537cc95b02 Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents: 9964
diff changeset
1 /*
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 15166
diff changeset
2 * Modified for use with MPlayer, detailed changelog at
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 15166
diff changeset
3 * http://svn.mplayerhq.hu/mplayer/trunk/
15166
f5537cc95b02 Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents: 9964
diff changeset
4 * $Id$
f5537cc95b02 Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents: 9964
diff changeset
5 */
f5537cc95b02 Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents: 9964
diff changeset
6
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
7 #include "inputpin.h"
2069
ce45cce7f7a5 sync with avifile
arpi
parents: 1545
diff changeset
8 #include "wine/winerror.h"
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
9 #include <string.h>
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
10 #include <stdio.h>
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
11 #include <stdlib.h>
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
12
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3467
diff changeset
13 static inline int unimplemented(const char* s, void* p)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
14 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
15 Debug printf("%s(%p) called (UNIMPLEMENTED)", s, p);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
16 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
17 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
18
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
19 /***********
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
20 * EnumPins
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
21 ***********/
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
22
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
23 typedef struct
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
24 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
25 IEnumPins_vt* vt;
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
26 DECLARE_IUNKNOWN();
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
27 IPin* pin1;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
28 IPin* pin2;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
29 int counter;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
30 GUID interfaces[2];
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
31 } CEnumPins;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
32
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
33 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
34 * \brief IEnumPins:Next (retrives a specified number of pins )
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
35 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
36 * \param[in] This pointer to CEnumPins object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
37 * \param[in] cMediaTypes number of pins to retrive
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
38 * \param[out] ppMediaTypes array of IPin interface pointers of size cMediaTypes
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
39 * \param[out] pcFetched address of variables that receives number of returned pins
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
40 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
41 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
42 * \return S_FALSE - did not return as meny pins as requested
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
43 * \return E_INVALIDARG Invalid argument
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
44 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
45 * \return VFW_E_ENUM_OUT_OF_SYNC - filter's state has changed and is now inconsistent with enumerator
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
46 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
47 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
48 static long STDCALL CEnumPins_Next(IEnumPins* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
49 /* [in] */ unsigned long cMediaTypes,
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
50 /* [size_is][out] */ IPin** ppMediaTypes,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
51 /* [out] */ unsigned long* pcFetched)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
52 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
53 CEnumPins* pin = (CEnumPins*)This;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
54
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
55 Debug printf("CEnumPins_Next(%p) called\n", This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
56 if (!ppMediaTypes)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
57 return E_INVALIDARG;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
58 if (!pcFetched && (cMediaTypes!=1))
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
59 return E_INVALIDARG;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
60 if (cMediaTypes<=0)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
61 return 0;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
62
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
63 //lcounter = ((CEnumPins*)This)->counter;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
64 //lpin1 = ((CEnumPins*)This)->pin1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
65 //lpin2 = ((CEnumPins*)This)->pin2;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
66 if (((pin->counter == 2) && pin->pin2)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
67 || ((pin->counter == 1) && !pin->pin2))
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
68 {
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
69 if (pcFetched)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
70 *pcFetched=0;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
71 return 1;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
72 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
73
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
74 if (pcFetched)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
75 *pcFetched=1;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
76 if (pin->counter==0)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
77 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
78 *ppMediaTypes = pin->pin1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
79 pin->pin1->vt->AddRef((IUnknown*)pin->pin1);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
80 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
81 else
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
82 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
83 *ppMediaTypes = pin->pin2;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
84 pin->pin2->vt->AddRef((IUnknown*)pin->pin2);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
85 }
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
86 pin->counter++;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
87 if (cMediaTypes == 1)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
88 return 0;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
89 return 1;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
90 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
91
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
92 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
93 * \brief IEnumPins::Skip (skips over a specified number of pins)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
94 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
95 * \param[in] This pointer to CEnumPinss object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
96 * \param[in] cMediaTypes number of pins to skip
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
97 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
98 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
99 * \return S_FALSE - skipped past the end of the sequence
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
100 * \return VFW_E_ENUM_OUT_OF_SYNC - filter's state has changed and is now inconsistent with enumerator
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
101 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
102 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
103 static long STDCALL CEnumPins_Skip(IEnumPins* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
104 /* [in] */ unsigned long cMediaTypes)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
105 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
106 Debug unimplemented("CEnumPins_Skip", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
107 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
108 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
109
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
110 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
111 * \brief IEnumPins::Reset (resets enumeration sequence to beginning)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
112 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
113 * \param[in] This pointer to CEnumPins object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
114 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
115 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
116 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
117 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
118 static long STDCALL CEnumPins_Reset(IEnumPins* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
119 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
120 Debug printf("CEnumPins_Reset(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
121 ((CEnumPins*)This)->counter = 0;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
122 return 0;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
123 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
124
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
125 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
126 * \brief IEnumPins::Clone (makes a copy of enumerator, returned object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
127 * starts at the same position as original)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
128 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
129 * \param[in] This pointer to CEnumPins object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
130 * \param[out] ppEnum address of variable that receives pointer to IEnumPins interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
131 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
132 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
133 * \return E_OUTOFMEMRY - Insufficient memory
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
134 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
135 * \return VFW_E_ENUM_OUT_OF_SYNC - filter's state has changed and is now inconsistent with enumerator
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
136 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
137 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
138 static long STDCALL CEnumPins_Clone(IEnumPins* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
139 /* [out] */ IEnumPins** ppEnum)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
140 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
141 Debug unimplemented("CEnumPins_Clone", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
142 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
143 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
144
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
145 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
146 * \brief CEnumPins destructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
147 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
148 * \param[in] This pointer to CEnumPins object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
149 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
150 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
151 static void CEnumPins_Destroy(CEnumPins* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
152 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
153 free(This->vt);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
154 free(This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
155 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
156
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
157 IMPLEMENT_IUNKNOWN(CEnumPins)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
158
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
159 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
160 * \brief CEnumPins constructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
161 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
162 * \param[in] p first pin for enumerator
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
163 * \param[in] pp second pin for enumerator
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
164 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
165 * \return pointer to CEnumPins object or NULL if error occured
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
166 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
167 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
168 static CEnumPins* CEnumPinsCreate(IPin* p, IPin* pp)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
169 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
170 CEnumPins* This = (CEnumPins*) malloc(sizeof(CEnumPins));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
171
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
172 if (!This)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
173 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
174
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
175 This->refcount = 1;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
176 This->pin1 = p;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
177 This->pin2 = pp;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
178 This->counter = 0;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
179
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
180 This->vt = (IEnumPins_vt*) malloc(sizeof(IEnumPins_vt));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
181 if (!This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
182 {
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
183 free(This);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
184 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
185 }
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
186 This->vt->QueryInterface = CEnumPins_QueryInterface;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
187 This->vt->AddRef = CEnumPins_AddRef;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
188 This->vt->Release = CEnumPins_Release;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
189 This->vt->Next = CEnumPins_Next;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
190 This->vt->Skip = CEnumPins_Skip;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
191 This->vt->Reset = CEnumPins_Reset;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
192 This->vt->Clone = CEnumPins_Clone;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
193
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
194 This->interfaces[0] = IID_IUnknown;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
195 This->interfaces[1] = IID_IEnumPins;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
196
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
197 return This;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
198 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
199
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
200
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
201
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
202 /***********
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
203 * InputPin
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
204 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
205 * WARNING:
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
206 * This is implementation of OUTPUT pin in DirectShow's terms
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
207 *
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
208 ***********/
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
209
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
210 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
211 * \brief IPin::Connect (connects pin to another pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
212 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
213 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
214 * \param[in] pReceivePin pointer to IPin interface of remote pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
215 * \param[in] pmt suggested media type for link. Can be NULL (any media type)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
216 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
217 * \return S_OK - success.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
218 * \return VFW_E_ALREADY_CONNECTED - pin already connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
219 * \return VFW_E_NOT_STOPPED - filter is active
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
220 * \return VFW_E_TYPE_NOT_ACCEPT - type is not acceptable
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
221 * \return Apropriate error code otherwise.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
222 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
223 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
224 static long STDCALL CInputPin_Connect(IPin* This,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
225 /* [in] */ IPin* pReceivePin,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
226 /* [in] */ AM_MEDIA_TYPE* pmt)
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
227 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
228 Debug unimplemented("CInputPin_Connect", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
229 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
230 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
231
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
232 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
233 * \brief IPin::ReceiveConnection (accepts a connection from another pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
234 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
235 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
236 * \param[in] pConnector connecting pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
237 * \param[in] pmt suggested media type for connection
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
238 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
239 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
240 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
241 * \return VFW_E_ALREADY_CONNECTED - pin already connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
242 * \return VFW_E_NOT_STOPPED - filter is active
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
243 * \return VFW_E_TYPE_NOT_ACCEPT - type is not acceptable
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
244 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
245 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
246 * When returning S_OK method should also do the following:
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
247 * - store media type and return the same type in IPin::ConnectionMediaType
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
248 * - store pConnector and return it in IPin::ConnectedTo
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
249 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
250 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
251 static long STDCALL CInputPin_ReceiveConnection(IPin* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
252 /* [in] */ IPin* pConnector,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
253 /* [in] */ const AM_MEDIA_TYPE *pmt)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
254 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
255 Debug unimplemented("CInputPin_ReceiveConnection", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
256 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
257 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
258
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
259 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
260 * \brief IPin::Disconnect (accepts a connection from another pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
261 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
262 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
263 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
264 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
265 * \return S_FALSE - pin was not connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
266 * \return VFW_E_NOT_STOPPED - filter is active
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
267 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
268 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
269 * To break connection you have to also call Disconnect on other pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
270 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
271 static long STDCALL CInputPin_Disconnect(IPin* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
272 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
273 Debug unimplemented("CInputPin_Disconnect", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
274 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
275 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
276
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
277 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
278 * \brief IPin::ConnectedTo (retrieves pointer to the connected pin, if such exist)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
279 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
280 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
281 * \param[out] pPin pointer to remote pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
282 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
283 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
284 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
285 * \return VFW_E_NOT_CONNECTED - pin is not connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
286 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
287 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
288 * Caller must call Release on received IPin, when done
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
289 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
290 static long STDCALL CInputPin_ConnectedTo(IPin* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
291 /* [out] */ IPin** pPin)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
292 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
293 Debug unimplemented("CInputPin_ConnectedTo", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
294 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
295 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
296
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
297 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
298 * \brief IPin::ConnectionMediaType (retrieves media type for connection, if such exist)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
299 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
300 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
301 * \param[out] pmt pointer to AM_MEDIA_TYPE, that receives connection media type
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
302 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
303 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
304 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
305 * \return VFW_E_NOT_CONNECTED - pin is not connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
306 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
307 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
308 static long STDCALL CInputPin_ConnectionMediaType(IPin* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
309 /* [out] */ AM_MEDIA_TYPE *pmt)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
310 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
311 Debug printf("CInputPin_ConnectionMediaType(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
312 if (!pmt)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
313 return E_INVALIDARG;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
314 *pmt=((CInputPin*)This)->type;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
315 if (pmt->cbFormat > 0)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
316 {
18878
3bf0d70b4c7f rm unnecesary casts from void* - part 2
reynaldo
parents: 18783
diff changeset
317 pmt->pbFormat=malloc(pmt->cbFormat);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
318 memcpy(pmt->pbFormat, ((CInputPin*)This)->type.pbFormat, pmt->cbFormat);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
319 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
320 return 0;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
321 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
322
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
323 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
324 * \brief IPin::QueryPinInfo (retrieves information about the pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
325 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
326 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
327 * \param[out] pInfo pointer to PIN_INFO structure, that receives pin info
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
328 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
329 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
330 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
331 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
332 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
333 * If pInfo->pFilter is not NULL, then caller must call Release on pInfo->pFilter when done
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
334 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
335 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
336 static long STDCALL CInputPin_QueryPinInfo(IPin* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
337 /* [out] */ PIN_INFO *pInfo)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
338 {
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
339 CBaseFilter* lparent=((CInputPin*)This)->parent;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
340 Debug printf("CInputPin_QueryPinInfo(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
341 pInfo->dir = PINDIR_OUTPUT;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
342 pInfo->pFilter = (IBaseFilter*) lparent;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
343 lparent->vt->AddRef((IUnknown*)lparent);
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
344 pInfo->achName[0] = 0;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
345 return 0;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
346 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
347
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
348 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
349 * \brief IPin::QueryDirection (retrieves pin direction)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
350 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
351 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
352 * \param[out] pPinDir pointer to variable, that receives pin direction (PINDIR_INPUT,PINDIR_OUTPUT)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
353 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
354 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
355 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
356 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
357 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
358 static long STDCALL CInputPin_QueryDirection(IPin* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
359 /* [out] */ PIN_DIRECTION *pPinDir)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
360 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
361 *pPinDir = PINDIR_OUTPUT;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
362 Debug printf("CInputPin_QueryDirection(%p) called\n", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
363 return 0;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
364 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
365
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
366 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
367 * \brief IPin::QueryId (retrieves pin identificator)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
368 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
369 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
370 * \param[out] Id adress of variable, that receives string with pin's Id.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
371 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
372 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
373 * \return E_OUTOFMEMORY - Insufficient memory
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
374 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
375 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
376 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
377 * Pin's Id is not the same as pin's name
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
378 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
379 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
380 static long STDCALL CInputPin_QueryId(IPin* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
381 /* [out] */ unsigned short* *Id)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
382 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
383 Debug unimplemented("CInputPin_QueryId", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
384 return E_NOTIMPL;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
385 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
386
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
387 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
388 * \brief IPin::QueryAccept (determines can media type be accepted or not)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
389 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
390 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
391 * \param[in] pmt Media type to check
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
392 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
393 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
394 * \return S_FALSE - pin rejects media type
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
395 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
396 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
397 static long STDCALL CInputPin_QueryAccept(IPin* This,
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
398 /* [in] */ const AM_MEDIA_TYPE* pmt)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
399 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
400 Debug unimplemented("CInputPin_QueryAccept", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
401 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
402 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
403
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
404 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
405 * \brief IPin::EnumMediaTypes (enumerates the pin's preferred media types)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
406 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
407 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
408 * \param[out] ppEnum adress of variable that receives pointer to IEnumMEdiaTypes interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
409 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
410 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
411 * \return E_OUTOFMEMORY - Insufficient memory
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
412 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
413 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
414 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
415 * Caller must call Release on received interface when done
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
416 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
417 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
418 static long STDCALL CInputPin_EnumMediaTypes(IPin* This,
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
419 /* [out] */ IEnumMediaTypes** ppEnum)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
420 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
421 Debug unimplemented("CInputPin_EnumMediaTypes", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
422 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
423 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
424
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
425 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
426 * \brief IPin::QueryInternalConnections (retries pin's internal connections)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
427 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
428 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
429 * \param[out] apPin Array that receives pins, internally connected to this
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
430 * \param[in,out] nPint Size of an array
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
431 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
432 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
433 * \return S_FALSE - pin rejects media type
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
434 * \return E_NOTIMPL - not implemented
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
435 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
436 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
437 static long STDCALL CInputPin_QueryInternalConnections(IPin* This,
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
438 /* [out] */ IPin** apPin,
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
439 /* [out][in] */ unsigned long *nPin)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
440 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
441 Debug unimplemented("CInputPin_QueryInternalConnections", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
442 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
443 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
444
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
445 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
446 * \brief IPin::EndOfStream (notifies pin, that no data is expected, until new run command)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
447 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
448 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
449 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
450 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
451 * \return E_UNEXPECTED - The pin is output pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
452 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
453 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
454 * IMemoryInputPin::Receive,IMemoryInputPin::ReceiveMultiple, IMemoryInputPin::EndOfStream,
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
455 * IMemAllocator::GetBuffer runs in different (streaming) thread then other
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
456 * methods (application thread).
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
457 * IMemoryInputPin::NewSegment runs either in streaming or application thread.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
458 * Developer must use critical sections for thread-safing work.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
459 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
460 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
461 static long STDCALL CInputPin_EndOfStream(IPin * This)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
462 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
463 Debug unimplemented("CInputPin_EndOfStream", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
464 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
465 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
466
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
467
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
468 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
469 * \brief IPin::BeginFlush (begins a flush operation)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
470 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
471 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
472 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
473 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
474 * \return E_UNEXPECTED - The pin is output pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
475 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
476 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
477 static long STDCALL CInputPin_BeginFlush(IPin * This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
478 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
479 Debug unimplemented("CInputPin_BeginFlush", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
480 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
481 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
482
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
483
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
484 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
485 * \brief IPin::EndFlush (ends a flush operation)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
486 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
487 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
488 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
489 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
490 * \return E_UNEXPECTED - The pin is output pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
491 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
492 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
493 static long STDCALL CInputPin_EndFlush(IPin* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
494 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
495 Debug unimplemented("CInputPin_EndFlush", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
496 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
497 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
498
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
499 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
500 * \brief IPin::NewSegment (media sample received after this call grouped as segment with common
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
501 * start,stop time and rate)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
502 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
503 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
504 * \param[in] tStart start time of new segment
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
505 * \param[in] tStop end time of new segment
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
506 * \param[in] dRate rate at wich segment should be processed
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
507 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
508 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
509 * \return E_UNEXPECTED - The pin is output pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
510 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
511 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
512 static long STDCALL CInputPin_NewSegment(IPin* This,
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
513 /* [in] */ REFERENCE_TIME tStart,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
514 /* [in] */ REFERENCE_TIME tStop,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
515 /* [in] */ double dRate)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
516 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
517 Debug unimplemented("CInputPin_NewSegment", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
518 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
519 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
520
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
521 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
522 * \brief CInputPin destructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
523 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
524 * \param[in] This pointer to CInputPin class
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
525 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
526 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
527 static void CInputPin_Destroy(CInputPin* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
528 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
529 free(This->vt);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
530 free(This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
531 }
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
532
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
533 IMPLEMENT_IUNKNOWN(CInputPin)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
534
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
535 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
536 * \brief CInputPin constructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
537 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
538 * \param[in] amt media type for pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
539 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
540 * \return pointer to CInputPin if success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
541 * \return NULL if error occured
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
542 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
543 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
544 CInputPin* CInputPinCreate(CBaseFilter* p, const AM_MEDIA_TYPE* amt)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
545 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
546 CInputPin* This = (CInputPin*) malloc(sizeof(CInputPin));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
547
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
548 if (!This)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
549 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
550
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
551 This->refcount = 1;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
552 This->parent = p;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
553 This->type = *amt;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
554
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
555 This->vt= (IPin_vt*) malloc(sizeof(IPin_vt));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
556
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
557 if (!This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
558 {
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
559 free(This);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
560 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
561 }
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
562
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
563 This->vt->QueryInterface = CInputPin_QueryInterface;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
564 This->vt->AddRef = CInputPin_AddRef;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
565 This->vt->Release = CInputPin_Release;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
566 This->vt->Connect = CInputPin_Connect;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
567 This->vt->ReceiveConnection = CInputPin_ReceiveConnection;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
568 This->vt->Disconnect = CInputPin_Disconnect;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
569 This->vt->ConnectedTo = CInputPin_ConnectedTo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
570 This->vt->ConnectionMediaType = CInputPin_ConnectionMediaType;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
571 This->vt->QueryPinInfo = CInputPin_QueryPinInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
572 This->vt->QueryDirection = CInputPin_QueryDirection;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
573 This->vt->QueryId = CInputPin_QueryId;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
574 This->vt->QueryAccept = CInputPin_QueryAccept;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
575 This->vt->EnumMediaTypes = CInputPin_EnumMediaTypes;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
576 This->vt->QueryInternalConnections = CInputPin_QueryInternalConnections;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
577 This->vt->EndOfStream = CInputPin_EndOfStream;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
578 This->vt->BeginFlush = CInputPin_BeginFlush;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
579 This->vt->EndFlush = CInputPin_EndFlush;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
580 This->vt->NewSegment = CInputPin_NewSegment;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
581
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
582 This->interfaces[0]=IID_IUnknown;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
583
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
584 return This;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
585 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
586
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
587
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
588 /*************
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
589 * BaseFilter
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
590 *************/
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
591
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
592 static long STDCALL CBaseFilter_GetClassID(IBaseFilter * This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
593 /* [out] */ CLSID *pClassID)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
594 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
595 Debug unimplemented("CBaseFilter_GetClassID", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
596 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
597 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
598
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
599 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
600 * \brief IMediaFilter::Stop (stops the filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
601 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
602 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
603 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
604 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
605 * \return S_FALSE transition is not complete
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
606 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
607 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
608 * When filter is stopped it does onot deliver or process any samples and rejects any samples
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
609 * from upstream filter.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
610 * Transition may be asynchronous. In this case method should return S_FALSE.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
611 * Method always sets filter's state to State_Stopped even if error occured.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
612 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
613 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
614 static long STDCALL CBaseFilter_Stop(IBaseFilter* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
615 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
616 Debug unimplemented("CBaseFilter_Stop", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
617 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
618 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
619
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
620 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
621 * \brief IMediaFilter::Pause (pauses filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
622 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
623 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
624 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
625 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
626 * \return S_FALSE transition is not complete
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
627 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
628 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
629 * When filter is paused it can receive, process and deliver samples.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
630 * Live source filters do not deliver any samples while paused.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
631 * Transition may be asynchronous. In this case method should return S_FALSE.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
632 * Method always sets filter's state to State_Stopped even if error occured.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
633 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
634 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
635 static long STDCALL CBaseFilter_Pause(IBaseFilter* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
636 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
637 Debug unimplemented("CBaseFilter_Pause", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
638 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
639 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
640
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
641 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
642 * \brief IMediaFilter::Run (runs the filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
643 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
644 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
645 * \param[in] tStart Reference time corresponding to stream time 0.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
646 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
647 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
648 * \return S_FALSE transition is not complete
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
649 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
650 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
651 * When filter is running it can receive, process and deliver samples. Source filters
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
652 * generatesnew samples, and renderers renders them.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
653 * Stream time is calculated as the current reference time minus tStart.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
654 * Graph Manager sets tStart slightly in the future according to graph latency.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
655 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
656 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
657 static long STDCALL CBaseFilter_Run(IBaseFilter* This, REFERENCE_TIME tStart)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
658 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
659 Debug unimplemented("CBaseFilter_Run", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
660 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
661 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
662
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
663 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
664 * \brief IMediaFilter::GetState (retrieves the filter's state (running, stopped or paused))
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
665 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
666 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
667 * \param[in] dwMilliSecsTimeout Timeout interval in milliseconds. To block indifinitely pass
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
668 * INFINITE.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
669 * \param[out] State pointer to variable that receives a member of FILTER_STATE enumeration.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
670 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
671 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
672 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
673 * \return VFW_S_STATE_INTERMEDATE Intermediate state
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
674 * \return VFW_S_CANT_CUE The filter is active, but cannot deliver data.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
675 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
676 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
677 static long STDCALL CBaseFilter_GetState(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
678 /* [in] */ unsigned long dwMilliSecsTimeout,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
679 // /* [out] */ FILTER_STATE *State)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
680 void* State)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
681 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
682 Debug unimplemented("CBaseFilter_GetState", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
683 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
684 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
685
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
686 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
687 * \brief IMediaFilter::SetSyncSource (sets the reference clock)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
688 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
689 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
690 * \param[in] pClock IReferenceClock interface of reference clock
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
691 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
692 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
693 * \return apripriate error otherwise
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
694 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
695 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
696 static long STDCALL CBaseFilter_SetSyncSource(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
697 /* [in] */ IReferenceClock *pClock)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
698 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
699 Debug unimplemented("CBaseFilter_SetSyncSource", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
700 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
701 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
702
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
703 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
704 * \brief IMediafilter::GetSyncSource (gets current reference clock)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
705 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
706 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
707 * \param[out] pClock address of variable that receives pointer to clock's
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
708 * IReferenceClock interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
709 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
710 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
711 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
712 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
713 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
714 static long STDCALL CBaseFilter_GetSyncSource(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
715 /* [out] */ IReferenceClock **pClock)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
716 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
717 Debug unimplemented("CBaseFilter_GetSyncSource", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
718 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
719 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
720
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
721
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
722 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
723 * \brief IBaseFilter::EnumPins (enumerates the pins of this filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
724 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
725 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
726 * \param[out] ppEnum address of variable that receives pointer to IEnumPins interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
727 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
728 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
729 * \return E_OUTOFMEMORY Insufficient memory
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
730 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
731 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
732 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
733 static long STDCALL CBaseFilter_EnumPins(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
734 /* [out] */ IEnumPins **ppEnum)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
735 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
736 Debug printf("CBaseFilter_EnumPins(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
737 *ppEnum = (IEnumPins*) CEnumPinsCreate(((CBaseFilter*)This)->pin, ((CBaseFilter*)This)->unused_pin);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
738 return 0;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
739 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
740
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
741 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
742 * \brief IBaseFilter::FindPin (retrieves the pin with specified id)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
743 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
744 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
745 * \param[in] Id constant wide string, containing pin id
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
746 * \param[out] ppPin address of variable that receives pointer to pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
747 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
748 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
749 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
750 * \return VFW_E_NOT_FOUND Could not find a pin with specified id
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
751 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
752 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
753 * Be sure to release the interface after use.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
754 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
755 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
756 static long STDCALL CBaseFilter_FindPin(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
757 /* [string][in] */ const unsigned short* Id,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
758 /* [out] */ IPin **ppPin)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
759 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
760 Debug unimplemented("CBaseFilter_FindPin\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
761 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
762 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
763
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
764 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
765 * \brief IBaseFilter::QueryFilterInfo (retrieves information aboud the filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
766 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
767 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
768 * \param[out] pInfo pointer to FILTER_INFO structure
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
769 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
770 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
771 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
772 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
773 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
774 * If pGraph member of FILTER_INFO is not NULL, be sure to release IFilterGraph interface after use.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
775 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
776 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
777 static long STDCALL CBaseFilter_QueryFilterInfo(IBaseFilter* This,
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
778 // /* [out] */ FILTER_INFO *pInfo)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
779 void* pInfo)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
780 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
781 Debug unimplemented("CBaseFilter_QueryFilterInfo", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
782 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
783 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
784
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
785 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
786 * \brief IBaseFilter::JoinFilterGraph (notifies the filter that it has joined of left filter graph)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
787 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
788 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
789 * \param[in] pInfo pointer to graph's IFilterGraph interface or NULL if filter is leaving graph
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
790 * \param[in] pName pointer to wide character string that specifies a name for the filter
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
791 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
792 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
793 * \return apropriate error code otherwise
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
794 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
795 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
796 * Filter should not call to graph's AddRef method.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
797 * The IFilterGraph is guaranteed to be valid until graph manager calls this method again with
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
798 * the value NULL.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
799 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
800 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
801 static long STDCALL CBaseFilter_JoinFilterGraph(IBaseFilter* This,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
802 /* [in] */ IFilterGraph* pGraph,
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
803 /* [string][in] */ const unsigned short* pName)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
804 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
805 Debug unimplemented("CBaseFilter_JoinFilterGraph", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
806 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
807 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
808
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
809 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
810 * \brief IBaseFilter::QueryVendorInfo (retrieves a string containing vendor info)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
811 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
812 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
813 * \param[out] address of variable that receives pointer to a string containing vendor info
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
814 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
815 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
816 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
817 * \return E_NOTIMPL Not implemented
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
818 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
819 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
820 * Call to CoTaskMemFree to free memory allocated for string
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
821 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
822 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
823 static long STDCALL CBaseFilter_QueryVendorInfo(IBaseFilter* This,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
824 /* [string][out] */ unsigned short** pVendorInfo)
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
825 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
826 Debug unimplemented("CBaseFilter_QueryVendorInfo", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
827 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
828 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
829
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
830 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
831 * \brief CBaseFilter::GetPin (gets used pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
832 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
833 * \param[in] This pointer to CBaseFilter object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
834 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
835 * \return pointer to used pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
836 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
837 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
838 static IPin* CBaseFilter_GetPin(CBaseFilter* This)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
839 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
840 return This->pin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
841 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
842
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
843 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
844 * \brief CBaseFilter::GetUnusedPin (gets used pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
845 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
846 * \param[in] This pointer to CBaseFilter object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
847 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
848 * \return pointer to unused pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
849 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
850 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
851 static IPin* CBaseFilter_GetUnusedPin(CBaseFilter* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
852 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
853 return This->unused_pin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
854 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
855
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
856 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
857 * \brief CBaseFilter destructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
858 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
859 * \param[in] This pointer to CBaseFilter object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
860 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
861 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
862 static void CBaseFilter_Destroy(CBaseFilter* This)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
863 {
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
864 if (This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
865 free(This->vt);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
866 if (This->pin)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
867 This->pin->vt->Release((IUnknown*)This->pin);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
868 if (This->unused_pin)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
869 This->unused_pin->vt->Release((IUnknown*)This->unused_pin);
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
870 free(This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
871 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
872
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
873 IMPLEMENT_IUNKNOWN(CBaseFilter)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
874
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
875 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
876 * \brief CBaseFilter constructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
877 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
878 * \param[in] type Pointer to media type for connection
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
879 * \param[in] parent Pointer to parent CBaseFilter2 object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
880 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
881 * \return pointer to CBaseFilter object or NULL if error occured
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
882 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
883 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
884 CBaseFilter* CBaseFilterCreate(const AM_MEDIA_TYPE* type, CBaseFilter2* parent)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
885 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
886 CBaseFilter* This = (CBaseFilter*) malloc(sizeof(CBaseFilter));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
887 if (!This)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
888 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
889
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
890 This->refcount = 1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
891
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
892 This->pin = (IPin*) CInputPinCreate(This, type);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
893 This->unused_pin = (IPin*) CRemotePinCreate(This, parent->GetPin(parent));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
894
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
895 This->vt = (IBaseFilter_vt*) malloc(sizeof(IBaseFilter_vt));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
896 if (!This->vt || !This->pin || !This->unused_pin)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
897 {
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
898 CBaseFilter_Destroy(This);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
899 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
900 }
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
901
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
902 This->vt->QueryInterface = CBaseFilter_QueryInterface;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
903 This->vt->AddRef = CBaseFilter_AddRef;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
904 This->vt->Release = CBaseFilter_Release;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
905 This->vt->GetClassID = CBaseFilter_GetClassID;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
906 This->vt->Stop = CBaseFilter_Stop;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
907 This->vt->Pause = CBaseFilter_Pause;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
908 This->vt->Run = CBaseFilter_Run;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
909 This->vt->GetState = CBaseFilter_GetState;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
910 This->vt->SetSyncSource = CBaseFilter_SetSyncSource;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
911 This->vt->GetSyncSource = CBaseFilter_GetSyncSource;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
912 This->vt->EnumPins = CBaseFilter_EnumPins;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
913 This->vt->FindPin = CBaseFilter_FindPin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
914 This->vt->QueryFilterInfo = CBaseFilter_QueryFilterInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
915 This->vt->JoinFilterGraph = CBaseFilter_JoinFilterGraph;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
916 This->vt->QueryVendorInfo = CBaseFilter_QueryVendorInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
917
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
918 This->interfaces[0] = IID_IUnknown;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
919 This->interfaces[1] = IID_IBaseFilter;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
920
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
921 This->GetPin = CBaseFilter_GetPin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
922 This->GetUnusedPin = CBaseFilter_GetUnusedPin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
923
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
924 return This;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
925 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
926
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
927
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
928 /**************
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
929 * BaseFilter2
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
930 **************/
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
931
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
932
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
933 static long STDCALL CBaseFilter2_GetClassID(IBaseFilter* This,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
934 /* [out] */ CLSID* pClassID)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
935 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
936 Debug unimplemented("CBaseFilter2_GetClassID", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
937 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
938 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
939
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
940 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
941 * \brief IMediaFilter::Stop (stops the filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
942 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
943 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
944 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
945 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
946 * \return S_FALSE transition is not complete
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
947 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
948 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
949 * When filter is stopped it does onot deliver or process any samples and rejects any samples
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
950 * from upstream filter.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
951 * Transition may be asynchronous. In this case method should return S_FALSE.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
952 * Method always sets filter's state to State_Stopped even if error occured.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
953 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
954 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
955 static long STDCALL CBaseFilter2_Stop(IBaseFilter* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
956 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
957 Debug unimplemented("CBaseFilter2_Stop", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
958 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
959 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
960
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
961 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
962 * \brief IMediaFilter::Pause (pauses filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
963 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
964 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
965 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
966 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
967 * \return S_FALSE transition is not complete
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
968 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
969 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
970 * When filter is paused it can receive, process and deliver samples.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
971 * Live source filters do not deliver any samples while paused.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
972 * Transition may be asynchronous. In this case method should return S_FALSE.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
973 * Method always sets filter's state to State_Stopped even if error occured.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
974 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
975 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
976 static long STDCALL CBaseFilter2_Pause(IBaseFilter* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
977 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
978 Debug unimplemented("CBaseFilter2_Pause", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
979 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
980 }
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
981
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
982 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
983 * \brief IMediaFilter::Run (runs the filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
984 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
985 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
986 * \param[in] tStart Reference time corresponding to stream time 0.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
987 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
988 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
989 * \return S_FALSE transition is not complete
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
990 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
991 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
992 * When filter is running it can receive, process and deliver samples. Source filters
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
993 * generatesnew samples, and renderers renders them.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
994 * Stream time is calculated as the current reference time minus tStart.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
995 * Graph Manager sets tStart slightly in the future according to graph latency.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
996 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
997 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
998 static long STDCALL CBaseFilter2_Run(IBaseFilter* This, REFERENCE_TIME tStart)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
999 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1000 Debug unimplemented("CBaseFilter2_Run", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1001 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1002 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1003
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1004
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1005 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1006 * \brief IMediaFilter::GetState (retrieves the filter's state (running, stopped or paused))
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1007 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1008 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1009 * \param[in] dwMilliSecsTimeout Timeout interval in milliseconds. To block indifinitely pass
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1010 * INFINITE.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1011 * \param[out] State pointer to variable that receives a member of FILTER_STATE enumeration.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1012 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1013 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1014 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1015 * \return VFW_S_STATE_INTERMEDATE Intermediate state
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1016 * \return VFW_S_CANT_CUE The filter is active, but cannot deliver data.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1017 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1018 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1019 static long STDCALL CBaseFilter2_GetState(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1020 /* [in] */ unsigned long dwMilliSecsTimeout,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1021 // /* [out] */ FILTER_STATE *State)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1022 void* State)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1023 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1024 Debug unimplemented("CBaseFilter2_GetState", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1025 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1026 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1027
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1028 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1029 * \brief IMediaFilter::SetSyncSource (sets the reference clock)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1030 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1031 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1032 * \param[in] pClock IReferenceClock interface of reference clock
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1033 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1034 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1035 * \return apripriate error otherwise
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1036 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1037 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1038 static long STDCALL CBaseFilter2_SetSyncSource(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1039 /* [in] */ IReferenceClock* pClock)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1040 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1041 Debug unimplemented("CBaseFilter2_SetSyncSource", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1042 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1043 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1044
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1045 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1046 * \brief IMediafilter::GetSyncSource (gets current reference clock)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1047 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1048 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1049 * \param[out] pClock address of variable that receives pointer to clock's
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1050 * IReferenceClock interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1051 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1052 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1053 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1054 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1055 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1056 static long STDCALL CBaseFilter2_GetSyncSource(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1057 /* [out] */ IReferenceClock** pClock)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1058 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1059 Debug unimplemented("CBaseFilter2_GetSyncSource", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1060 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1061 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1062
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1063 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1064 * \brief IBaseFilter::EnumPins (enumerates the pins of this filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1065 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1066 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1067 * \param[out] ppEnum address of variable that receives pointer to IEnumPins interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1068 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1069 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1070 * \return E_OUTOFMEMORY Insufficient memory
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1071 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1072 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1073 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1074 static long STDCALL CBaseFilter2_EnumPins(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1075 /* [out] */ IEnumPins** ppEnum)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1076 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1077 Debug printf("CBaseFilter2_EnumPins(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1078 *ppEnum = (IEnumPins*) CEnumPinsCreate(((CBaseFilter2*)This)->pin, 0);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1079 return 0;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1080 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1081
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1082 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1083 * \brief IBaseFilter::FindPin (retrieves the pin with specified id)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1084 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1085 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1086 * \param[in] Id constant wide string, containing pin id
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1087 * \param[out] ppPin address of variable that receives pointer to pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1088 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1089 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1090 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1091 * \return VFW_E_NOT_FOUND Could not find a pin with specified id
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1092 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1093 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1094 * Be sure to release the interface after use.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1095 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1096 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1097 static long STDCALL CBaseFilter2_FindPin(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1098 /* [string][in] */ const unsigned short* Id,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1099 /* [out] */ IPin** ppPin)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1100 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1101 Debug unimplemented("CBaseFilter2_FindPin", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1102 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1103 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1104
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1105 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1106 * \brief IBaseFilter::QueryFilterInfo (retrieves information aboud the filter)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1107 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1108 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1109 * \param[out] pInfo pointer to FILTER_INFO structure
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1110 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1111 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1112 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1113 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1114 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1115 * If pGraph member of FILTER_INFO is not NULL, be sure to release IFilterGraph interface after use.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1116 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1117 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1118 static long STDCALL CBaseFilter2_QueryFilterInfo(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1119 // /* [out] */ FILTER_INFO *pInfo)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1120 void* pInfo)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1121 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1122 Debug unimplemented("CBaseFilter2_QueryFilterInfo", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1123 return E_NOTIMPL;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1124 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1125
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1126 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1127 * \brief IBaseFilter::JoinFilterGraph (notifies the filter that it has joined of left filter graph)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1128 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1129 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1130 * \param[in] pInfo pointer to graph's IFilterGraph interface or NULL if filter is leaving graph
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1131 * \param[in] pName pointer to wide character string that specifies a name for the filter
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1132 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1133 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1134 * \return apropriate error code otherwise
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1135 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1136 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1137 * Filter should not call to graph's AddRef method.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1138 * The IFilterGraph is guaranteed to be valid until graph manager calls this method again with
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1139 * the value NULL.
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1140 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1141 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1142 static long STDCALL CBaseFilter2_JoinFilterGraph(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1143 /* [in] */ IFilterGraph* pGraph,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1144 /* [string][in] */
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1145 const unsigned short* pName)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1146 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1147 Debug unimplemented("CBaseFilter2_JoinFilterGraph", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1148 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1149 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1150
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1151 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1152 * \brief IBaseFilter::QueryVendorInfo (retrieves a string containing vendor info)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1153 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1154 * \param[in] This pointer to IBaseFilter interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1155 * \param[out] address of variable that receives pointer to a string containing vendor info
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1156 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1157 * \return S_OK success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1158 * \return E_POINTER Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1159 * \return E_NOTIMPL Not implemented
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1160 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1161 * \remarks
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1162 * Call to CoTaskMemFree to free memory allocated for string
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1163 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1164 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1165 static long STDCALL CBaseFilter2_QueryVendorInfo(IBaseFilter* This,
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1166 /* [string][out] */
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1167 unsigned short** pVendorInfo)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1168 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1169 Debug unimplemented("CBaseFilter2_QueryVendorInfo", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1170 return E_NOTIMPL;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1171 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1172
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1173 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1174 * \brief CBaseFilter2::GetPin (gets used pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1175 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1176 * \param[in] This pointer to CBaseFilter2 object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1177 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1178 * \return pointer to used pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1179 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1180 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1181 static IPin* CBaseFilter2_GetPin(CBaseFilter2* This)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1182 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1183 return This->pin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1184 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1185
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1186 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1187 * \brief CBaseFilter2 destructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1188 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1189 * \param[in] This pointer to CBaseFilter2 object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1190 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1191 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1192 static void CBaseFilter2_Destroy(CBaseFilter2* This)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1193 {
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
1194 Debug printf("CBaseFilter2_Destroy(%p) called\n", This);
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1195 if (This->pin)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1196 This->pin->vt->Release((IUnknown*) This->pin);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1197 if (This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1198 free(This->vt);
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1199 free(This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1200 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1201
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1202 IMPLEMENT_IUNKNOWN(CBaseFilter2)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1203
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1204 static GUID CBaseFilter2_interf1 =
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1205 {0x76c61a30, 0xebe1, 0x11cf, {0x89, 0xf9, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xcb}};
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1206 /// IID_IAMNetShowPreroll
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1207 static GUID CBaseFilter2_interf2 =
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1208 {0xaae7e4e2, 0x6388, 0x11d1, {0x8d, 0x93, 0x00, 0x60, 0x97, 0xc9, 0xa2, 0xb2}};
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1209 /// IID_IAMRebuild
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1210 static GUID CBaseFilter2_interf3 =
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1211 {0x02ef04dd, 0x7580, 0x11d1, {0xbe, 0xce, 0x00, 0xc0, 0x4f, 0xb6, 0xe9, 0x37}};
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1212
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1213 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1214 * \brief CBaseFilter2 constructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1215 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1216 * \return pointer to CBaseFilter2 object or NULL if error occured
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1217 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1218 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1219 CBaseFilter2* CBaseFilter2Create()
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1220 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1221 CBaseFilter2* This = (CBaseFilter2*) malloc(sizeof(CBaseFilter2));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1222
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1223 if (!This)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1224 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1225
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1226 This->refcount = 1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1227 This->pin = (IPin*) CRemotePin2Create(This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1228
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1229 This->vt = (IBaseFilter_vt*) malloc(sizeof(IBaseFilter_vt));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1230
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1231 if (!This->pin || !This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1232 {
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1233 CBaseFilter2_Destroy(This);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1234 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1235 }
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1236
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1237 memset(This->vt, 0, sizeof(IBaseFilter_vt));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1238 This->vt->QueryInterface = CBaseFilter2_QueryInterface;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1239 This->vt->AddRef = CBaseFilter2_AddRef;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1240 This->vt->Release = CBaseFilter2_Release;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1241 This->vt->GetClassID = CBaseFilter2_GetClassID;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1242 This->vt->Stop = CBaseFilter2_Stop;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1243 This->vt->Pause = CBaseFilter2_Pause;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1244 This->vt->Run = CBaseFilter2_Run;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1245 This->vt->GetState = CBaseFilter2_GetState;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1246 This->vt->SetSyncSource = CBaseFilter2_SetSyncSource;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1247 This->vt->GetSyncSource = CBaseFilter2_GetSyncSource;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1248 This->vt->EnumPins = CBaseFilter2_EnumPins;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1249 This->vt->FindPin = CBaseFilter2_FindPin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1250 This->vt->QueryFilterInfo = CBaseFilter2_QueryFilterInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1251 This->vt->JoinFilterGraph = CBaseFilter2_JoinFilterGraph;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1252 This->vt->QueryVendorInfo = CBaseFilter2_QueryVendorInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1253
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1254 This->GetPin = CBaseFilter2_GetPin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1255
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1256 This->interfaces[0] = IID_IUnknown;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1257 This->interfaces[1] = IID_IBaseFilter;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1258 This->interfaces[2] = CBaseFilter2_interf1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1259 This->interfaces[3] = CBaseFilter2_interf2;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1260 This->interfaces[4] = CBaseFilter2_interf3;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1261
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1262 return This;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1263 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1264
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1265
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1266 /*************
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1267 * CRemotePin
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1268 *************/
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1269
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1270
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1271 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1272 * \brief IPin::ConnectedTo (retrieves pointer to the connected pin, if such exist)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1273 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1274 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1275 * \param[out] pPin pointer to remote pin's IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1276 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1277 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1278 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1279 * \return VFW_E_NOT_CONNECTED - pin is not connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1280 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1281 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1282 * Caller must call Release on received IPin, when done
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1283 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1284 static long STDCALL CRemotePin_ConnectedTo(IPin* This, /* [out] */ IPin** pPin)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1285 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1286 Debug printf("CRemotePin_ConnectedTo(%p) called\n", This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1287 if (!pPin)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1288 return E_INVALIDARG;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1289 *pPin = ((CRemotePin*)This)->remote_pin;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1290 (*pPin)->vt->AddRef((IUnknown*)(*pPin));
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1291 return 0;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1292 }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1293
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1294 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1295 * \brief IPin::QueryDirection (retrieves pin direction)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1296 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1297 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1298 * \param[out] pPinDir pointer to variable, that receives pin direction (PINDIR_INPUT,PINDIR_OUTPUT)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1299 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1300 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1301 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1302 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1303 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1304 static long STDCALL CRemotePin_QueryDirection(IPin* This,
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
1305 /* [out] */ PIN_DIRECTION* pPinDir)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1306 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1307 Debug printf("CRemotePin_QueryDirection(%p) called\n", This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1308 if (!pPinDir)
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1309 return E_INVALIDARG;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1310 *pPinDir=PINDIR_INPUT;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1311 return 0;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1312 }
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1313
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1314 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1315 * \brief IPin::ConnectionMediaType (retrieves media type for connection, if such exist)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1316 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1317 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1318 * \param[out] pmt pointer to AM_MEDIA_TYPE, that receives connection media type
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1319 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1320 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1321 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1322 * \return VFW_E_NOT_CONNECTED - pin is not connected
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1323 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1324 */
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1325 static long STDCALL CRemotePin_ConnectionMediaType(IPin* This, /* [out] */ AM_MEDIA_TYPE* pmt)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1326 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1327 Debug unimplemented("CRemotePin_ConnectionMediaType", This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1328 return E_NOTIMPL;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1329 }
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1330
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1331 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1332 * \brief IPin::QueryPinInfo (retrieves information about the pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1333 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1334 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1335 * \param[out] pInfo pointer to PIN_INFO structure, that receives pin info
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1336 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1337 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1338 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1339 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1340 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1341 * If pInfo->pFilter is not NULL, then caller must call Release on pInfo->pFilter when done
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1342 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1343 */
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1344 static long STDCALL CRemotePin_QueryPinInfo(IPin* This, /* [out] */ PIN_INFO* pInfo)
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1345 {
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1346 CBaseFilter* lparent = ((CRemotePin*)This)->parent;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1347 Debug printf("CRemotePin_QueryPinInfo(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1348 pInfo->dir= PINDIR_INPUT;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1349 pInfo->pFilter = (IBaseFilter*) lparent;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1350 lparent->vt->AddRef((IUnknown*)lparent);
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1351 pInfo->achName[0]=0;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1352 return 0;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1353 }
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1354
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1355 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1356 * \brief CRemotePin destructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1357 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1358 * \param[in] This pointer to CRemotePin object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1359 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1360 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1361 static void CRemotePin_Destroy(CRemotePin* This)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1362 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1363 Debug printf("CRemotePin_Destroy(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1364 free(This->vt);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1365 free(This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1366 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1367
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1368 IMPLEMENT_IUNKNOWN(CRemotePin)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1369
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1370 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1371 * \brief CRemotePin constructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1372 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1373 * \param[in] pt parent filter
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1374 * \param[in] rpin remote pin
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1375 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1376 * \return pointer to CRemotePin or NULL if error occured
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1377 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1378 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1379 CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1380 {
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1381 CRemotePin* This = (CRemotePin*) malloc(sizeof(CRemotePin));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1382
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1383 if (!This)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1384 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1385
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1386 Debug printf("CRemotePinCreate() called -> %p\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1387
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1388 This->parent = pt;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1389 This->remote_pin = rpin;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1390 This->refcount = 1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1391
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1392 This->vt = (IPin_vt*) malloc(sizeof(IPin_vt));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1393
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1394 if (!This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1395 {
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1396 free(This);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1397 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1398 }
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1399
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1400 memset(This->vt, 0, sizeof(IPin_vt));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1401 This->vt->QueryInterface = CRemotePin_QueryInterface;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1402 This->vt->AddRef = CRemotePin_AddRef;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1403 This->vt->Release = CRemotePin_Release;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1404 This->vt->QueryDirection = CRemotePin_QueryDirection;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1405 This->vt->ConnectedTo = CRemotePin_ConnectedTo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1406 This->vt->ConnectionMediaType = CRemotePin_ConnectionMediaType;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1407 This->vt->QueryPinInfo = CRemotePin_QueryPinInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1408
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1409 This->interfaces[0] = IID_IUnknown;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1410
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1411 return This;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1412 }
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1413
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1414
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1415 /*************
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
1416 * CRemotePin2
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1417 *************/
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1418
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1419
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1420 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1421 * \brief IPin::QueryPinInfo (retrieves information about the pin)
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1422 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1423 * \param[in] This pointer to IPin interface
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1424 * \param[out] pInfo pointer to PIN_INFO structure, that receives pin info
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1425 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1426 * \return S_OK - success
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1427 * \return E_POINTER - Null pointer
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1428 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1429 * \note
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1430 * If pInfo->pFilter is not NULL, then caller must call Release on pInfo->pFilter when done
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1431 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1432 */
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
1433 static long STDCALL CRemotePin2_QueryPinInfo(IPin* This,
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
1434 /* [out] */ PIN_INFO* pInfo)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1435 {
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1436 CBaseFilter2* lparent=((CRemotePin2*)This)->parent;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1437 Debug printf("CRemotePin2_QueryPinInfo(%p) called\n", This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1438 pInfo->pFilter=(IBaseFilter*)lparent;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1439 lparent->vt->AddRef((IUnknown*)lparent);
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1440 pInfo->dir=PINDIR_OUTPUT;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1441 pInfo->achName[0]=0;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1442 return 0;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1443 }
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1444
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1445 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1446 * \brief CremotePin2 destructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1447 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1448 * \param This pointer to CRemotePin2 object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1449 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1450 * FIXME - not being released!
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1451 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1452 static void CRemotePin2_Destroy(CRemotePin2* This)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1453 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1454 Debug printf("CRemotePin2_Destroy(%p) called\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1455 free(This->vt);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1456 free(This);
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1457 }
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1458
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1459 IMPLEMENT_IUNKNOWN(CRemotePin2)
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1460
22028
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1461 /**
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1462 * \brief CRemotePin2 contructor
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1463 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1464 * \param[in] p pointer to parent CBaseFilter2 object
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1465 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1466 * \return pointer to CRemotePin2 object or NULL if error occured
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1467 *
24dc4ec0d08d Doxygen comments for used DirectShow methods.
voroshil
parents: 18878
diff changeset
1468 */
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1469 CRemotePin2* CRemotePin2Create(CBaseFilter2* p)
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1470 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1471 CRemotePin2* This = (CRemotePin2*) malloc(sizeof(CRemotePin2));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1472
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1473 if (!This)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1474 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1475
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1476 Debug printf("CRemotePin2Create() called -> %p\n", This);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1477
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1478 This->parent = p;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1479 This->refcount = 1;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1480
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1481 This->vt = (IPin_vt*) malloc(sizeof(IPin_vt));
3467
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1482
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1483 if (!This->vt)
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1484 {
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1485 free(This);
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1486 return NULL;
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1487 }
e3bbf44dbab2 avifile sync
arpi
parents: 3130
diff changeset
1488
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1489 memset(This->vt, 0, sizeof(IPin_vt));
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1490 This->vt->QueryInterface = CRemotePin2_QueryInterface;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1491 This->vt->AddRef = CRemotePin2_AddRef;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1492 This->vt->Release = CRemotePin2_Release;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1493 This->vt->QueryPinInfo = CRemotePin2_QueryPinInfo;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1494
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1495 This->interfaces[0] = IID_IUnknown;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1496
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 2069
diff changeset
1497 return This;
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 168
diff changeset
1498 }