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
8601e224
Commit
8601e224
authored
Sep 25, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Use BasePinImpl_QueryInterface().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fa280172
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
35 deletions
+58
-35
nullrenderer.c
dlls/qedit/tests/nullrenderer.c
+1
-1
dsoundrender.c
dlls/quartz/tests/dsoundrender.c
+1
-1
videorenderer.c
dlls/quartz/tests/videorenderer.c
+1
-1
vmr7.c
dlls/quartz/tests/vmr7.c
+3
-3
vmr9.c
dlls/quartz/tests/vmr9.c
+3
-3
pin.c
dlls/strmbase/pin.c
+2
-2
renderer.c
dlls/strmbase/renderer.c
+15
-1
transform.c
dlls/strmbase/transform.c
+32
-23
No files found.
dlls/qedit/tests/nullrenderer.c
View file @
8601e224
...
...
@@ -88,7 +88,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
ref
=
IBaseFilter_Release
(
filter
);
...
...
dlls/quartz/tests/dsoundrender.c
View file @
8601e224
...
...
@@ -161,7 +161,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IAsyncReader
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
IBaseFilter_Release
(
filter
);
...
...
dlls/quartz/tests/videorenderer.c
View file @
8601e224
...
...
@@ -93,7 +93,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IAsyncReader
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
IBaseFilter_Release
(
filter
);
...
...
dlls/quartz/tests/vmr7.c
View file @
8601e224
...
...
@@ -239,7 +239,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
...
...
@@ -269,7 +269,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
...
...
@@ -298,7 +298,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
...
...
dlls/quartz/tests/vmr9.c
View file @
8601e224
...
...
@@ -232,7 +232,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
...
...
@@ -262,7 +262,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
...
...
@@ -291,7 +291,7 @@ static void test_interfaces(void)
check_interface
(
pin
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
pin
,
&
IID_IMediaSeeking
,
FALSE
);
IPin_Release
(
pin
);
...
...
dlls/strmbase/pin.c
View file @
8601e224
...
...
@@ -157,7 +157,7 @@ HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int ind
return
VFW_S_NO_MORE_ITEMS
;
}
HRESULT
WINAPI
BasePinImpl_QueryInterface
(
IPin
*
iface
)
HRESULT
WINAPI
BasePinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
strmbase_pin
*
pin
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
...
...
@@ -167,7 +167,7 @@ HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface)
*
out
=
NULL
;
if
(
pin
->
pFuncsTable
->
pin_query_interface
&&
SUCCEEDED
(
hr
=
pin
->
pFuncsTable
->
pin_query_interface
(
filter
,
iid
,
out
)))
&&
SUCCEEDED
(
hr
=
pin
->
pFuncsTable
->
pin_query_interface
(
pin
,
iid
,
out
)))
return
hr
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IPin
))
...
...
dlls/strmbase/renderer.c
View file @
8601e224
...
...
@@ -147,7 +147,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
static
const
IPinVtbl
BaseRenderer_InputPin_Vtbl
=
{
Base
Input
PinImpl_QueryInterface
,
BasePinImpl_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
...
...
@@ -217,6 +217,19 @@ static HRESULT sink_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *
return
filter
->
pFuncsTable
->
pfnCheckMediaType
(
filter
,
mt
);
}
static
HRESULT
sink_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
BaseRenderer
*
filter
=
impl_from_IPin
(
&
iface
->
IPin_iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IMemInputPin
))
*
out
=
&
filter
->
sink
.
IMemInputPin_iface
;
else
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
HRESULT
WINAPI
BaseRenderer_Receive
(
BaseInputPin
*
pin
,
IMediaSample
*
sample
)
{
BaseRenderer
*
filter
=
impl_from_IPin
(
&
pin
->
pin
.
IPin_iface
);
...
...
@@ -226,6 +239,7 @@ static HRESULT WINAPI BaseRenderer_Receive(BaseInputPin *pin, IMediaSample *samp
static
const
BaseInputPinFuncTable
input_BaseInputFuncTable
=
{
.
base
.
pin_query_accept
=
sink_query_accept
,
.
base
.
pin_query_interface
=
sink_query_interface
,
.
base
.
pin_get_media_type
=
strmbase_pin_get_media_type
,
.
pfnReceive
=
BaseRenderer_Receive
,
};
...
...
dlls/strmbase/transform.c
View file @
8601e224
...
...
@@ -161,17 +161,47 @@ static const struct strmbase_filter_ops filter_ops =
.
filter_destroy
=
transform_destroy
,
};
static
HRESULT
sink_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
TransformFilter
*
filter
=
impl_from_sink_IPin
(
&
iface
->
IPin_iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IMemInputPin
))
*
out
=
&
filter
->
sink
.
IMemInputPin_iface
;
else
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
const
BaseInputPinFuncTable
tf_input_BaseInputFuncTable
=
{
.
base
.
pin_query_accept
=
sink_query_accept
,
.
base
.
pin_get_media_type
=
strmbase_pin_get_media_type
,
.
base
.
pin_query_interface
=
sink_query_interface
,
.
pfnReceive
=
TransformFilter_Input_Receive
,
};
static
HRESULT
source_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
TransformFilter
*
filter
=
impl_from_source_IPin
(
&
iface
->
IPin_iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IQualityControl
))
*
out
=
&
filter
->
qcimpl
->
IQualityControl_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaSeeking
))
return
IUnknown_QueryInterface
(
filter
->
seekthru_unk
,
iid
,
out
);
else
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
const
struct
strmbase_source_ops
source_ops
=
{
.
base
.
pin_query_accept
=
source_query_accept
,
.
base
.
pin_get_media_type
=
source_get_media_type
,
.
base
.
pin_query_interface
=
source_query_interface
,
.
pfnAttemptConnection
=
BaseOutputPinImpl_AttemptConnection
,
.
pfnDecideBufferSize
=
TransformFilter_Output_DecideBufferSize
,
.
pfnDecideAllocator
=
BaseOutputPinImpl_DecideAllocator
,
...
...
@@ -439,7 +469,7 @@ static HRESULT WINAPI TransformFilter_InputPin_NewSegment(IPin * iface, REFERENC
static
const
IPinVtbl
TransformFilter_InputPin_Vtbl
=
{
Base
Input
PinImpl_QueryInterface
,
BasePinImpl_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
...
...
@@ -459,30 +489,9 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
TransformFilter_InputPin_NewSegment
};
static
HRESULT
WINAPI
transform_source_QueryInterface
(
IPin
*
iface
,
REFIID
iid
,
void
**
out
)
{
TransformFilter
*
filter
=
impl_from_source_IPin
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
iid
,
&
IID_IPin
))
*
out
=
iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IQualityControl
))
*
out
=
&
filter
->
qcimpl
->
IQualityControl_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaSeeking
))
return
IUnknown_QueryInterface
(
filter
->
seekthru_unk
,
iid
,
out
);
else
{
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
));
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
const
IPinVtbl
TransformFilter_OutputPin_Vtbl
=
{
transform_source
_QueryInterface
,
BasePinImpl
_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseOutputPinImpl_Connect
,
...
...
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