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
71fdcf3b
Commit
71fdcf3b
authored
Sep 25, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap: Use BasePinImpl_QueryInterface().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b89ad0a7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
106 deletions
+50
-106
avico.c
dlls/qcap/avico.c
+16
-12
smartteefilter.c
dlls/qcap/smartteefilter.c
+17
-3
vfwcapture.c
dlls/qcap/vfwcapture.c
+17
-30
pin.c
dlls/strmbase/pin.c
+0
-59
strmbase.h
include/wine/strmbase.h
+0
-2
No files found.
dlls/qcap/avico.c
View file @
71fdcf3b
...
...
@@ -318,11 +318,6 @@ static inline AVICompressor *impl_from_IPin(IPin *iface)
return
impl_from_strmbase_filter
(
CONTAINING_RECORD
(
iface
,
struct
strmbase_pin
,
IPin_iface
)
->
filter
);
}
static
HRESULT
WINAPI
AVICompressorIn_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
BaseInputPinImpl_QueryInterface
(
iface
,
riid
,
ppv
);
}
static
HRESULT
WINAPI
AVICompressorIn_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pConnector
,
const
AM_MEDIA_TYPE
*
pmt
)
{
...
...
@@ -359,7 +354,7 @@ static HRESULT WINAPI AVICompressorIn_Disconnect(IPin *iface)
}
static
const
IPinVtbl
AVICompressorInputPinVtbl
=
{
AVICompressorIn
_QueryInterface
,
BasePinImpl
_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
...
...
@@ -406,6 +401,19 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE
return
res
==
ICERR_OK
?
S_OK
:
S_FALSE
;
}
static
HRESULT
sink_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
AVICompressor
*
filter
=
impl_from_strmbase_pin
(
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
AVICompressorIn_Receive
(
BaseInputPin
*
base
,
IMediaSample
*
pSample
)
{
AVICompressor
*
This
=
impl_from_strmbase_pin
(
&
base
->
pin
);
...
...
@@ -497,16 +505,12 @@ static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl =
{
.
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
=
AVICompressorIn_Receive
,
};
static
HRESULT
WINAPI
AVICompressorOut_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
BaseInputPinImpl_QueryInterface
(
iface
,
riid
,
ppv
);
}
static
const
IPinVtbl
AVICompressorOutputPinVtbl
=
{
AVICompressorOut
_QueryInterface
,
BasePinImpl
_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseOutputPinImpl_Connect
,
...
...
dlls/qcap/smartteefilter.c
View file @
71fdcf3b
...
...
@@ -142,7 +142,7 @@ static const struct strmbase_filter_ops filter_ops =
};
static
const
IPinVtbl
SmartTeeFilterInputVtbl
=
{
Base
Input
PinImpl_QueryInterface
,
BasePinImpl_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
...
...
@@ -194,6 +194,19 @@ static HRESULT sink_get_media_type(struct strmbase_pin *base,
return
hr
;
}
static
HRESULT
sink_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
SmartTeeFilter
*
filter
=
impl_from_strmbase_pin
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IMemInputPin
))
*
out
=
&
filter
->
sink
.
IMemInputPin_iface
;
else
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
HRESULT
copy_sample
(
IMediaSample
*
inputSample
,
IMemAllocator
*
allocator
,
IMediaSample
**
pOutputSample
)
{
REFERENCE_TIME
startTime
,
endTime
;
...
...
@@ -319,11 +332,12 @@ static const BaseInputPinFuncTable SmartTeeFilterInputFuncs =
{
.
base
.
pin_query_accept
=
sink_query_accept
,
.
base
.
pin_get_media_type
=
sink_get_media_type
,
.
base
.
pin_query_interface
=
sink_query_interface
,
.
pfnReceive
=
SmartTeeFilterInput_Receive
,
};
static
const
IPinVtbl
SmartTeeFilterCaptureVtbl
=
{
Base
Output
PinImpl_QueryInterface
,
BasePinImpl_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseOutputPinImpl_Connect
,
...
...
@@ -387,7 +401,7 @@ static const struct strmbase_source_ops capture_ops =
};
static
const
IPinVtbl
SmartTeeFilterPreviewVtbl
=
{
Base
Output
PinImpl_QueryInterface
,
BasePinImpl_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseOutputPinImpl_Connect
,
...
...
dlls/qcap/vfwcapture.c
View file @
71fdcf3b
...
...
@@ -82,11 +82,6 @@ static inline VfwCapture *impl_from_IPersistPropertyBag(IPersistPropertyBag *ifa
return
CONTAINING_RECORD
(
iface
,
VfwCapture
,
IPersistPropertyBag_iface
);
}
static
inline
VfwCapture
*
impl_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
VfwCapture
,
source
.
pin
.
IPin_iface
);
}
static
IPin
*
vfw_capture_get_pin
(
struct
strmbase_filter
*
iface
,
unsigned
int
index
)
{
VfwCapture
*
This
=
impl_from_strmbase_filter
(
iface
);
...
...
@@ -536,6 +531,21 @@ static HRESULT source_get_media_type(struct strmbase_pin *pin,
return
hr
;
}
static
HRESULT
source_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
VfwCapture
*
filter
=
impl_from_strmbase_pin
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IKsPropertySet
))
*
out
=
&
filter
->
IKsPropertySet_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IAMStreamConfig
))
*
out
=
&
filter
->
IAMStreamConfig_iface
;
else
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
HRESULT
WINAPI
VfwPin_DecideBufferSize
(
struct
strmbase_source
*
iface
,
IMemAllocator
*
pAlloc
,
ALLOCATOR_PROPERTIES
*
ppropInputRequest
)
{
...
...
@@ -557,38 +567,15 @@ 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
=
VfwPin_DecideBufferSize
,
.
pfnDecideAllocator
=
BaseOutputPinImpl_DecideAllocator
,
};
static
HRESULT
WINAPI
VfwPin_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
VfwCapture
*
filter
=
impl_from_IPin
(
iface
);
TRACE
(
"%s %p
\n
"
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IPin
))
*
ppv
=
&
filter
->
source
.
pin
.
IPin_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsPropertySet
))
*
ppv
=
&
filter
->
IKsPropertySet_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IAMStreamConfig
))
*
ppv
=
&
filter
->
IAMStreamConfig_iface
;
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)(
*
ppv
));
return
S_OK
;
}
FIXME
(
"No interface for %s!
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
const
IPinVtbl
VfwPin_Vtbl
=
{
VfwPin
_QueryInterface
,
BasePinImpl
_QueryInterface
,
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseOutputPinImpl_Connect
,
...
...
dlls/strmbase/pin.c
View file @
71fdcf3b
...
...
@@ -362,35 +362,6 @@ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface )
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_source
,
pin
.
IPin_iface
);
}
HRESULT
WINAPI
BaseOutputPinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
struct
strmbase_source
*
This
=
impl_source_from_IPin
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IPin
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
)
||
IsEqualIID
(
riid
,
&
IID_IQualityControl
))
{
return
IBaseFilter_QueryInterface
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
,
riid
,
ppv
);
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)(
*
ppv
));
return
S_OK
;
}
FIXME
(
"No interface for %s!
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
HRESULT
WINAPI
BaseOutputPinImpl_Connect
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
HRESULT
hr
;
...
...
@@ -758,36 +729,6 @@ static inline BaseInputPin *impl_BaseInputPin_from_IPin( IPin *iface )
return
CONTAINING_RECORD
(
iface
,
BaseInputPin
,
pin
.
IPin_iface
);
}
HRESULT
WINAPI
BaseInputPinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IPin
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMemInputPin
))
*
ppv
=
&
This
->
IMemInputPin_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
{
return
IBaseFilter_QueryInterface
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
,
&
IID_IMediaSeeking
,
ppv
);
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)(
*
ppv
));
return
S_OK
;
}
FIXME
(
"No interface for %s!
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
HRESULT
WINAPI
BaseInputPinImpl_Connect
(
IPin
*
iface
,
IPin
*
pin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
ERR
(
"(%p)->(%p, %p) outgoing connection on an input pin!
\n
"
,
iface
,
pin
,
pmt
);
...
...
include/wine/strmbase.h
View file @
71fdcf3b
...
...
@@ -113,7 +113,6 @@ HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin,
HRESULT
WINAPI
BasePinImpl_NewSegment
(
IPin
*
iface
,
REFERENCE_TIME
tStart
,
REFERENCE_TIME
tStop
,
double
dRate
);
/* Base Output Pin */
HRESULT
WINAPI
BaseOutputPinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
BaseOutputPinImpl_Connect
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
BaseOutputPinImpl_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
BaseOutputPinImpl_Disconnect
(
IPin
*
iface
);
...
...
@@ -135,7 +134,6 @@ void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, str
const
WCHAR
*
name
,
const
struct
strmbase_source_ops
*
func_table
);
/* Base Input Pin */
HRESULT
WINAPI
BaseInputPinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
BaseInputPinImpl_Connect
(
IPin
*
iface
,
IPin
*
pConnector
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
BaseInputPinImpl_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
BaseInputPinImpl_QueryAccept
(
IPin
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
);
...
...
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