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
9f053430
Commit
9f053430
authored
Oct 09, 2018
by
Brendan McGrath
Committed by
Alexandre Julliard
Oct 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Iterate over all source pins in ExploreGraph().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6db5a3a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
78 deletions
+13
-78
filtergraph.c
dlls/quartz/filtergraph.c
+13
-78
No files found.
dlls/quartz/filtergraph.c
View file @
9f053430
...
@@ -974,68 +974,6 @@ static HRESULT GetFilterInfo(IMoniker* pMoniker, VARIANT* pvar)
...
@@ -974,68 +974,6 @@ static HRESULT GetFilterInfo(IMoniker* pMoniker, VARIANT* pvar)
return
hr
;
return
hr
;
}
}
static
HRESULT
GetInternalConnections
(
IBaseFilter
*
pfilter
,
IPin
*
pinputpin
,
IPin
***
pppins
,
ULONG
*
pnb
)
{
HRESULT
hr
;
ULONG
nb
=
0
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
pfilter
,
pinputpin
,
pppins
,
pnb
);
hr
=
IPin_QueryInternalConnections
(
pinputpin
,
NULL
,
&
nb
);
if
(
hr
==
S_OK
)
{
/* Rendered input */
}
else
if
(
hr
==
S_FALSE
)
{
*
pppins
=
CoTaskMemAlloc
(
sizeof
(
IPin
*
)
*
nb
);
hr
=
IPin_QueryInternalConnections
(
pinputpin
,
*
pppins
,
&
nb
);
if
(
hr
!=
S_OK
)
{
WARN
(
"Error (%x)
\n
"
,
hr
);
}
}
else
if
(
hr
==
E_NOTIMPL
)
{
/* Input connected to all outputs */
IEnumPins
*
penumpins
;
IPin
*
ppin
;
int
i
=
0
;
TRACE
(
"E_NOTIMPL
\n
"
);
hr
=
IBaseFilter_EnumPins
(
pfilter
,
&
penumpins
);
if
(
FAILED
(
hr
))
{
WARN
(
"filter Enumpins failed (%x)
\n
"
,
hr
);
return
hr
;
}
i
=
0
;
/* Count output pins */
while
(
IEnumPins_Next
(
penumpins
,
1
,
&
ppin
,
&
nb
)
==
S_OK
)
{
PIN_DIRECTION
pindir
;
IPin_QueryDirection
(
ppin
,
&
pindir
);
if
(
pindir
==
PINDIR_OUTPUT
)
i
++
;
IPin_Release
(
ppin
);
}
*
pppins
=
CoTaskMemAlloc
(
sizeof
(
IPin
*
)
*
i
);
/* Retrieve output pins */
IEnumPins_Reset
(
penumpins
);
i
=
0
;
while
(
IEnumPins_Next
(
penumpins
,
1
,
&
ppin
,
&
nb
)
==
S_OK
)
{
PIN_DIRECTION
pindir
;
IPin_QueryDirection
(
ppin
,
&
pindir
);
if
(
pindir
==
PINDIR_OUTPUT
)
(
*
pppins
)[
i
++
]
=
ppin
;
else
IPin_Release
(
ppin
);
}
IEnumPins_Release
(
penumpins
);
nb
=
i
;
if
(
FAILED
(
hr
))
{
WARN
(
"Next failed (%x)
\n
"
,
hr
);
return
hr
;
}
}
else
if
(
FAILED
(
hr
))
{
WARN
(
"Cannot get internal connection (%x)
\n
"
,
hr
);
return
hr
;
}
*
pnb
=
nb
;
return
S_OK
;
}
/* Attempt to connect one of the output pins on filter to sink. Helper for
/* Attempt to connect one of the output pins on filter to sink. Helper for
* FilterGraph2_Connect(). */
* FilterGraph2_Connect(). */
static
HRESULT
connect_output_pin
(
IFilterGraphImpl
*
graph
,
IBaseFilter
*
filter
,
IPin
*
sink
)
static
HRESULT
connect_output_pin
(
IFilterGraphImpl
*
graph
,
IBaseFilter
*
filter
,
IPin
*
sink
)
...
@@ -2087,12 +2025,12 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF
...
@@ -2087,12 +2025,12 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF
{
{
IAMFilterMiscFlags
*
flags
;
IAMFilterMiscFlags
*
flags
;
IMediaSeeking
*
seeking
;
IMediaSeeking
*
seeking
;
IEnumPins
*
enumpins
;
PIN_DIRECTION
dir
;
HRESULT
hr
;
HRESULT
hr
;
IPin
*
pInputPin
;
IPin
*
pInputPin
;
IPin
**
ppPins
;
ULONG
nb
;
ULONG
i
;
PIN_INFO
PinInfo
;
PIN_INFO
PinInfo
;
IPin
*
pin
;
TRACE
(
"%p %p
\n
"
,
pGraph
,
pOutputPin
);
TRACE
(
"%p %p
\n
"
,
pGraph
,
pOutputPin
);
PinInfo
.
pFilter
=
NULL
;
PinInfo
.
pFilter
=
NULL
;
...
@@ -2102,26 +2040,23 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF
...
@@ -2102,26 +2040,23 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
hr
=
IPin_QueryPinInfo
(
pInputPin
,
&
PinInfo
);
hr
=
IPin_QueryPinInfo
(
pInputPin
,
&
PinInfo
);
if
(
SUCCEEDED
(
hr
))
hr
=
GetInternalConnections
(
PinInfo
.
pFilter
,
pInputPin
,
&
ppPins
,
&
nb
);
IPin_Release
(
pInputPin
);
IPin_Release
(
pInputPin
);
}
}
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
IBaseFilter_EnumPins
(
PinInfo
.
pFilter
,
&
enumpins
);
if
(
SUCCEEDED
(
hr
))
{
{
if
(
nb
)
while
(
IEnumPins_Next
(
enumpins
,
1
,
&
pin
,
NULL
)
==
S_OK
)
{
{
for
(
i
=
0
;
i
<
nb
;
i
++
)
IPin_QueryDirection
(
pin
,
&
dir
);
{
if
(
dir
==
PINDIR_OUTPUT
)
/* Explore the graph downstream from this pin
ExploreGraph
(
pGraph
,
pin
,
FoundFilter
,
data
);
* FIXME: We should prevent exploring from a pin more than once. This can happens when
IPin_Release
(
pin
);
* several input pins are connected to the same output (a MUX for instance). */
ExploreGraph
(
pGraph
,
ppPins
[
i
],
FoundFilter
,
data
);
IPin_Release
(
ppPins
[
i
]);
}
CoTaskMemFree
(
ppPins
);
}
}
IEnumPins_Release
(
enumpins
);
TRACE
(
"Doing stuff with filter %p
\n
"
,
PinInfo
.
pFilter
);
TRACE
(
"Doing stuff with filter %p
\n
"
,
PinInfo
.
pFilter
);
if
(
SUCCEEDED
(
IBaseFilter_QueryInterface
(
PinInfo
.
pFilter
,
if
(
SUCCEEDED
(
IBaseFilter_QueryInterface
(
PinInfo
.
pFilter
,
...
...
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