Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7e32b11a
Commit
7e32b11a
authored
Mar 11, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Mar 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap: Add better findpin stub for CaptureGraphBuilder.
ICaptureGraphBuilder::RenderStream needs to enumerate pins, and to prevent duplication I implemented a bit of findpin first.
parent
9617b326
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
4 deletions
+85
-4
capturegraph.c
dlls/qcap/capturegraph.c
+85
-4
No files found.
dlls/qcap/capturegraph.c
View file @
7e32b11a
...
...
@@ -34,10 +34,10 @@
#include "evcode.h"
#include "strmif.h"
#include "control.h"
#include "vfwmsgs.h"
/*
*#include "amvideo.h"
*#include "mmreg.h"
*#include "vfwmsgs.h"
*#include "dshow.h"
*#include "ddraw.h"
*/
...
...
@@ -326,6 +326,27 @@ fnCaptureGraphBuilder2_CopyCaptureFile(ICaptureGraphBuilder2 * iface,
return
E_NOTIMPL
;
}
static
BOOL
pin_matches
(
IPin
*
pin
,
PIN_DIRECTION
direction
,
const
GUID
*
cat
,
const
GUID
*
type
,
BOOL
unconnected
)
{
IPin
*
partner
;
PIN_DIRECTION
pindir
;
IPin_QueryDirection
(
pin
,
&
pindir
);
if
(
pindir
!=
direction
)
return
FALSE
;
if
(
unconnected
&&
IPin_ConnectedTo
(
pin
,
&
partner
)
==
S_OK
)
{
IPin_Release
(
partner
);
return
FALSE
;
}
if
(
cat
||
type
)
FIXME
(
"Ignoring category/type
\n
"
);
return
TRUE
;
}
static
HRESULT
WINAPI
fnCaptureGraphBuilder2_FindPin
(
ICaptureGraphBuilder2
*
iface
,
IUnknown
*
pSource
,
...
...
@@ -333,16 +354,76 @@ fnCaptureGraphBuilder2_FindPin(ICaptureGraphBuilder2 * iface,
const
GUID
*
pCategory
,
const
GUID
*
pType
,
BOOL
fUnconnected
,
int
num
,
INT
num
,
IPin
**
ppPin
)
{
HRESULT
hr
;
IEnumPins
*
enumpins
=
NULL
;
IPin
*
pin
;
CaptureGraphImpl
*
This
=
impl_from_ICaptureGraphBuilder2
(
iface
);
FIXME
(
"(%p/%p)->(%p, %x, %s, %s, %d, %i, %p) Stub!
\n
"
,
This
,
iface
,
TRACE
(
"(%p/%p)->(%p, %x, %s, %s, %d, %i, %p)
\n
"
,
This
,
iface
,
pSource
,
pindir
,
debugstr_guid
(
pCategory
),
debugstr_guid
(
pType
),
fUnconnected
,
num
,
ppPin
);
return
E_NOTIMPL
;
pin
=
NULL
;
hr
=
IUnknown_QueryInterface
(
pSource
,
&
IID_IPin
,
(
void
**
)
&
pin
);
if
(
hr
==
E_NOINTERFACE
)
{
IBaseFilter
*
filter
=
NULL
;
int
numcurrent
=
0
;
hr
=
IUnknown_QueryInterface
(
pSource
,
&
IID_IBaseFilter
,
(
void
**
)
&
filter
);
if
(
hr
==
E_NOINTERFACE
)
{
WARN
(
"Input not filter or pin?!
\n
"
);
return
E_FAIL
;
}
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enumpins
);
if
(
FAILED
(
hr
))
{
WARN
(
"Could not enumerate
\n
"
);
return
hr
;
}
IEnumPins_Reset
(
enumpins
);
while
(
1
)
{
hr
=
IEnumPins_Next
(
enumpins
,
1
,
&
pin
,
NULL
);
if
(
hr
==
VFW_E_ENUM_OUT_OF_SYNC
)
{
numcurrent
=
0
;
IEnumPins_Reset
(
enumpins
);
pin
=
NULL
;
continue
;
}
if
(
hr
!=
S_OK
)
break
;
if
(
pin_matches
(
pin
,
pindir
,
pCategory
,
pType
,
fUnconnected
)
&&
numcurrent
++
==
num
)
break
;
IPin_Release
(
pin
);
pin
=
NULL
;
}
IEnumPins_Release
(
enumpins
);
if
(
hr
!=
S_OK
)
{
WARN
(
"Could not find pin # %d
\n
"
,
numcurrent
);
return
E_FAIL
;
}
}
else
if
(
!
pin_matches
(
pin
,
pindir
,
pCategory
,
pType
,
fUnconnected
))
{
IPin_Release
(
pin
);
return
E_FAIL
;
}
*
ppPin
=
pin
;
return
S_OK
;
}
static
const
ICaptureGraphBuilder2Vtbl
builder2_Vtbl
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment