Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2d5c9d06
Commit
2d5c9d06
authored
Jun 20, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase/transform: Store the pins inline in the TransformFilter structure.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2adc44df
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
127 deletions
+62
-127
acmwrapper.c
dlls/quartz/acmwrapper.c
+2
-11
avidec.c
dlls/quartz/avidec.c
+2
-9
transform.c
dlls/strmbase/transform.c
+52
-102
gsttffilter.c
dlls/winegstreamer/gsttffilter.c
+2
-2
qtvdecoder.c
dlls/wineqtdecoder/qtvdecoder.c
+2
-2
strmbase.h
include/wine/strmbase.h
+2
-1
No files found.
dlls/quartz/acmwrapper.c
View file @
2d5c9d06
...
...
@@ -59,7 +59,6 @@ static inline ACMWrapperImpl *impl_from_TransformFilter( TransformFilter *iface
static
HRESULT
WINAPI
ACMWrapper_Receive
(
TransformFilter
*
tf
,
IMediaSample
*
pSample
)
{
ACMWrapperImpl
*
This
=
impl_from_TransformFilter
(
tf
);
AM_MEDIA_TYPE
amt
;
IMediaSample
*
pOutSample
=
NULL
;
DWORD
cbDstStream
,
cbSrcStream
;
LPBYTE
pbDstStream
;
...
...
@@ -103,20 +102,12 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
TRACE
(
"Sample data ptr = %p, size = %d
\n
"
,
pbSrcStream
,
cbSrcStream
);
hr
=
IPin_ConnectionMediaType
(
This
->
tf
.
ppPins
[
0
],
&
amt
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to retrieve media type
\n
"
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
return
hr
;
}
ash
.
pbSrc
=
pbSrcStream
;
ash
.
cbSrcLength
=
cbSrcStream
;
while
(
hr
==
S_OK
&&
ash
.
cbSrcLength
)
{
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
&
pOutSample
,
NULL
,
NULL
,
0
);
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
tf
.
source
,
&
pOutSample
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get delivery buffer (%x)
\n
"
,
hr
);
...
...
@@ -216,7 +207,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
TRACE
(
"Sample stop time: %u.%03u
\n
"
,
(
DWORD
)(
tStart
/
10000000
),
(
DWORD
)((
tStart
/
10000
)
%
1000
));
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
hr
=
BaseOutputPinImpl_Deliver
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
pOutSample
);
hr
=
BaseOutputPinImpl_Deliver
(
&
This
->
tf
.
source
,
pOutSample
);
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
if
(
hr
!=
S_OK
&&
hr
!=
VFW_E_NOT_CONNECTED
)
{
...
...
dlls/quartz/avidec.c
View file @
2d5c9d06
...
...
@@ -105,7 +105,6 @@ static int AVIDec_DropSample(AVIDecImpl *This, REFERENCE_TIME tStart) {
static
HRESULT
WINAPI
AVIDec_Receive
(
TransformFilter
*
tf
,
IMediaSample
*
pSample
)
{
AVIDecImpl
*
This
=
impl_from_TransformFilter
(
tf
);
AM_MEDIA_TYPE
amt
;
HRESULT
hr
;
DWORD
res
;
IMediaSample
*
pOutSample
=
NULL
;
...
...
@@ -128,16 +127,10 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
TRACE
(
"Sample data ptr = %p, size = %d
\n
"
,
pbSrcStream
,
cbSrcStream
);
hr
=
IPin_ConnectionMediaType
(
This
->
tf
.
ppPins
[
0
],
&
amt
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to retrieve media type
\n
"
);
goto
error
;
}
/* Update input size to match sample size */
This
->
pBihIn
->
biSizeImage
=
cbSrcStream
;
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
&
pOutSample
,
NULL
,
NULL
,
0
);
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
tf
.
source
,
&
pOutSample
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get delivery buffer (%x)
\n
"
,
hr
);
goto
error
;
...
...
@@ -195,7 +188,7 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample)
IMediaSample_SetMediaTime
(
pOutSample
,
NULL
,
NULL
);
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
hr
=
BaseOutputPinImpl_Deliver
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
pOutSample
);
hr
=
BaseOutputPinImpl_Deliver
(
&
This
->
tf
.
source
,
pOutSample
);
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
if
(
hr
!=
S_OK
&&
hr
!=
VFW_E_NOT_CONNECTED
)
ERR
(
"Error sending sample (%x)
\n
"
,
hr
);
...
...
dlls/strmbase/transform.c
View file @
2d5c9d06
...
...
@@ -30,21 +30,6 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl;
static
const
IPinVtbl
TransformFilter_OutputPin_Vtbl
;
static
const
IQualityControlVtbl
TransformFilter_QualityControl_Vtbl
;
static
inline
BaseInputPin
*
impl_BaseInputPin_from_BasePin
(
BasePin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BaseInputPin
,
pin
);
}
static
inline
BaseInputPin
*
impl_BaseInputPin_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BaseInputPin
,
pin
.
IPin_iface
);
}
static
inline
BaseOutputPin
*
impl_BaseOutputPin_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BaseOutputPin
,
pin
.
IPin_iface
);
}
static
inline
TransformFilter
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TransformFilter
,
filter
.
IBaseFilter_iface
);
...
...
@@ -55,13 +40,16 @@ static inline TransformFilter *impl_from_BaseFilter( BaseFilter *iface )
return
CONTAINING_RECORD
(
iface
,
TransformFilter
,
filter
);
}
static
inline
TransformFilter
*
impl_from_sink_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TransformFilter
,
sink
.
pin
.
IPin_iface
);
}
static
HRESULT
WINAPI
TransformFilter_Input_CheckMediaType
(
BasePin
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_BasePin
(
iface
);
TransformFilter
*
pTransform
;
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
&
iface
->
IPin_iface
);
TRACE
(
"%p
\n
"
,
iface
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
if
(
pTransform
->
pFuncsTable
->
pfnCheckInputType
)
return
pTransform
->
pFuncsTable
->
pfnCheckInputType
(
pTransform
,
pmt
);
...
...
@@ -72,10 +60,10 @@ static HRESULT WINAPI TransformFilter_Input_CheckMediaType(BasePin *iface, const
static
HRESULT
WINAPI
TransformFilter_Input_Receive
(
BaseInputPin
*
This
,
IMediaSample
*
pInSample
)
{
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
&
This
->
pin
.
IPin_iface
);
HRESULT
hr
;
TransformFilter
*
pTransform
;
TRACE
(
"%p
\n
"
,
This
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
EnterCriticalSection
(
&
pTransform
->
csReceive
);
if
(
pTransform
->
filter
.
state
==
State_Stopped
)
...
...
@@ -99,9 +87,14 @@ static HRESULT WINAPI TransformFilter_Input_Receive(BaseInputPin *This, IMediaSa
return
hr
;
}
static
inline
TransformFilter
*
impl_from_source_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TransformFilter
,
source
.
pin
.
IPin_iface
);
}
static
HRESULT
WINAPI
TransformFilter_Output_CheckMediaType
(
BasePin
*
This
,
const
AM_MEDIA_TYPE
*
pmt
)
{
TransformFilter
*
pTransformFilter
=
impl_from_
IBaseFilter
(
This
->
pinInfo
.
pFilter
);
TransformFilter
*
pTransformFilter
=
impl_from_
source_IPin
(
&
This
->
IPin_iface
);
AM_MEDIA_TYPE
*
outpmt
=
&
pTransformFilter
->
pmt
;
if
(
IsEqualIID
(
&
pmt
->
majortype
,
&
outpmt
->
majortype
)
...
...
@@ -112,13 +105,13 @@ static HRESULT WINAPI TransformFilter_Output_CheckMediaType(BasePin *This, const
static
HRESULT
WINAPI
TransformFilter_Output_DecideBufferSize
(
BaseOutputPin
*
This
,
IMemAllocator
*
pAlloc
,
ALLOCATOR_PROPERTIES
*
ppropInputRequest
)
{
TransformFilter
*
pTransformFilter
=
impl_from_
IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
TransformFilter
*
pTransformFilter
=
impl_from_
source_IPin
(
&
This
->
pin
.
IPin_iface
);
return
pTransformFilter
->
pFuncsTable
->
pfnDecideBufferSize
(
pTransformFilter
,
pAlloc
,
ppropInputRequest
);
}
static
HRESULT
WINAPI
TransformFilter_Output_GetMediaType
(
BasePin
*
This
,
int
iPosition
,
AM_MEDIA_TYPE
*
pmt
)
{
TransformFilter
*
pTransform
=
impl_from_
IBaseFilter
(
This
->
pinInfo
.
pFilter
);
TransformFilter
*
pTransform
=
impl_from_
source_IPin
(
&
This
->
IPin_iface
);
if
(
iPosition
<
0
)
return
E_INVALIDARG
;
...
...
@@ -132,33 +125,27 @@ static IPin *transform_get_pin(BaseFilter *iface, unsigned int index)
{
TransformFilter
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
index
>=
2
)
if
(
index
==
0
)
return
&
filter
->
sink
.
pin
.
IPin_iface
;
else
if
(
index
==
1
)
return
&
filter
->
source
.
pin
.
IPin_iface
;
return
NULL
;
return
filter
->
ppPins
[
index
];
}
static
void
transform_destroy
(
BaseFilter
*
iface
)
{
TransformFilter
*
filter
=
impl_from_BaseFilter
(
iface
);
ULONG
i
;
for
(
i
=
0
;
i
<
2
;
++
i
)
{
IPin
*
peer
;
if
(
SUCCEEDED
(
IPin_ConnectedTo
(
filter
->
ppPins
[
i
],
&
peer
)))
{
IPin_Disconnect
(
peer
);
IPin_Release
(
peer
);
}
IPin_Disconnect
(
filter
->
ppPins
[
i
]);
}
if
(
filter
->
sink
.
pin
.
pConnectedTo
)
IPin_Disconnect
(
filter
->
sink
.
pin
.
pConnectedTo
);
IPin_Disconnect
(
&
filter
->
sink
.
pin
.
IPin_iface
);
BaseInputPin_Destroy
(
impl_BaseInputPin_from_IPin
(
filter
->
ppPins
[
0
]));
BaseOutputPin_Destroy
(
impl_BaseOutputPin_from_IPin
(
filter
->
ppPins
[
1
]));
if
(
filter
->
source
.
pin
.
pConnectedTo
)
IPin_Disconnect
(
filter
->
source
.
pin
.
pConnectedTo
);
IPin_Disconnect
(
&
filter
->
source
.
pin
.
IPin_iface
);
CoTaskMemFree
(
filter
->
ppPins
);
strmbase_sink_cleanup
(
&
filter
->
sink
);
strmbase_source_cleanup
(
&
filter
->
source
);
filter
->
csReceive
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
filter
->
csReceive
);
...
...
@@ -205,7 +192,7 @@ static HRESULT WINAPI TransformFilterImpl_Stop(IBaseFilter *iface)
if
(
This
->
pFuncsTable
->
pfnStopStreaming
)
hr
=
This
->
pFuncsTable
->
pfnStopStreaming
(
This
);
if
(
SUCCEEDED
(
hr
))
hr
=
BaseOutputPinImpl_Inactive
(
impl_BaseOutputPin_from_IPin
(
This
->
ppPins
[
1
])
);
hr
=
BaseOutputPinImpl_Inactive
(
&
This
->
source
);
}
LeaveCriticalSection
(
&
This
->
csReceive
);
...
...
@@ -245,11 +232,11 @@ static HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME
{
if
(
This
->
filter
.
state
==
State_Stopped
)
{
impl_BaseInputPin_from_IPin
(
This
->
ppPins
[
0
])
->
end_of_stream
=
FALSE
;
This
->
sink
.
end_of_stream
=
FALSE
;
if
(
This
->
pFuncsTable
->
pfnStartStreaming
)
hr
=
This
->
pFuncsTable
->
pfnStartStreaming
(
This
);
if
(
SUCCEEDED
(
hr
))
hr
=
BaseOutputPinImpl_Active
(
impl_BaseOutputPin_from_IPin
(
This
->
ppPins
[
1
])
);
hr
=
BaseOutputPinImpl_Active
(
&
This
->
source
);
}
if
(
SUCCEEDED
(
hr
))
...
...
@@ -285,6 +272,7 @@ static const IBaseFilterVtbl transform_vtbl =
static
HRESULT
strmbase_transform_init
(
IUnknown
*
outer
,
const
CLSID
*
clsid
,
const
TransformFilterFuncTable
*
func_table
,
TransformFilter
*
filter
)
{
ISeekingPassThru
*
passthru
;
HRESULT
hr
;
PIN_INFO
piInput
;
PIN_INFO
piOutput
;
...
...
@@ -299,8 +287,6 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
filter
->
pFuncsTable
=
func_table
;
ZeroMemory
(
&
filter
->
pmt
,
sizeof
(
filter
->
pmt
));
filter
->
ppPins
=
CoTaskMemAlloc
(
2
*
sizeof
(
IPin
*
));
/* construct input pin */
piInput
.
dir
=
PINDIR_INPUT
;
piInput
.
pFilter
=
&
filter
->
filter
.
IBaseFilter_iface
;
...
...
@@ -309,41 +295,30 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
piOutput
.
pFilter
=
&
filter
->
filter
.
IBaseFilter_iface
;
lstrcpynW
(
piOutput
.
achName
,
wcsOutputPinName
,
ARRAY_SIZE
(
piOutput
.
achName
));
hr
=
BaseInputPin_Construct
(
&
TransformFilter_InputPin_Vtbl
,
sizeof
(
BaseInputPin
)
,
&
piInput
,
&
tf_input_BaseInputFuncTable
,
&
filter
->
filter
.
csFilter
,
NULL
,
&
filter
->
ppPins
[
0
]
);
strmbase_sink_init
(
&
filter
->
sink
,
&
TransformFilter_InputPin_Vtbl
,
&
piInput
,
&
tf_input_BaseInputFuncTable
,
&
filter
->
filter
.
csFilter
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
BaseOutputPin_Construct
(
&
TransformFilter_OutputPin_Vtbl
,
sizeof
(
BaseOutputPin
),
&
piOutput
,
&
tf_output_BaseOutputFuncTable
,
&
filter
->
filter
.
csFilter
,
&
filter
->
ppPins
[
1
]);
strmbase_source_init
(
&
filter
->
source
,
&
TransformFilter_OutputPin_Vtbl
,
&
piOutput
,
&
tf_output_BaseOutputFuncTable
,
&
filter
->
filter
.
csFilter
);
if
(
FAILED
(
hr
))
ERR
(
"Cannot create output pin (%x)
\n
"
,
hr
);
else
{
QualityControlImpl_Create
(
filter
->
ppPins
[
0
],
QualityControlImpl_Create
(
&
filter
->
sink
.
pin
.
IPin_iface
,
&
filter
->
filter
.
IBaseFilter_iface
,
&
filter
->
qcimpl
);
filter
->
qcimpl
->
IQualityControl_iface
.
lpVtbl
=
&
TransformFilter_QualityControl_Vtbl
;
}
}
if
(
SUCCEEDED
(
hr
))
{
ISeekingPassThru
*
passthru
;
filter
->
seekthru_unk
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
&
filter
->
filter
.
IBaseFilter_iface
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
filter
->
seekthru_unk
);
if
(
SUCCEEDED
(
hr
))
{
IUnknown_QueryInterface
(
filter
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
filter
->
ppPins
[
0
]
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
&
filter
->
sink
.
pin
.
IPin_iface
);
ISeekingPassThru_Release
(
passthru
);
}
}
if
(
FAILED
(
hr
))
{
CoTaskMemFree
(
filter
->
ppPins
);
strmbase_sink_cleanup
(
&
filter
->
sink
);
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
}
...
...
@@ -383,40 +358,22 @@ HRESULT WINAPI TransformFilterImpl_Notify(TransformFilter *iface, IBaseFilter *s
static
HRESULT
WINAPI
TransformFilter_InputPin_EndOfStream
(
IPin
*
iface
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TransformFilter
*
pTransform
;
IPin
*
ppin
;
HRESULT
hr
;
TransformFilter
*
filter
=
impl_from_sink_IPin
(
iface
);
TRACE
(
"
(%p)->()
\n
"
,
iface
);
TRACE
(
"
iface %p.
\n
"
,
iface
);
/* Since we process samples synchronously, just forward notification downstream */
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
if
(
!
pTransform
)
hr
=
E_FAIL
;
else
hr
=
IPin_ConnectedTo
(
pTransform
->
ppPins
[
1
],
&
ppin
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IPin_EndOfStream
(
ppin
);
IPin_Release
(
ppin
);
}
if
(
FAILED
(
hr
))
ERR
(
"%x
\n
"
,
hr
);
return
hr
;
if
(
filter
->
source
.
pin
.
pConnectedTo
)
return
IPin_EndOfStream
(
filter
->
source
.
pin
.
pConnectedTo
);
return
VFW_E_NOT_CONNECTED
;
}
static
HRESULT
WINAPI
TransformFilter_InputPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TransformFilter
*
pTransform
;
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%p, %p)
\n
"
,
iface
,
pReceivePin
,
pmt
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
if
(
pTransform
->
pFuncsTable
->
pfnSetMediaType
)
hr
=
pTransform
->
pFuncsTable
->
pfnSetMediaType
(
pTransform
,
PINDIR_INPUT
,
pmt
);
...
...
@@ -435,12 +392,10 @@ static HRESULT WINAPI TransformFilter_InputPin_ReceiveConnection(IPin * iface, I
static
HRESULT
WINAPI
TransformFilter_InputPin_Disconnect
(
IPin
*
iface
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TransformFilter
*
pTransform
;
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
if
(
pTransform
->
pFuncsTable
->
pfnBreakConnect
)
pTransform
->
pFuncsTable
->
pfnBreakConnect
(
pTransform
,
PINDIR_INPUT
);
...
...
@@ -449,13 +404,11 @@ static HRESULT WINAPI TransformFilter_InputPin_Disconnect(IPin * iface)
static
HRESULT
WINAPI
TransformFilter_InputPin_BeginFlush
(
IPin
*
iface
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TransformFilter
*
pTransform
;
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
EnterCriticalSection
(
&
pTransform
->
filter
.
csFilter
);
if
(
pTransform
->
pFuncsTable
->
pfnBeginFlush
)
hr
=
pTransform
->
pFuncsTable
->
pfnBeginFlush
(
pTransform
);
...
...
@@ -467,13 +420,11 @@ static HRESULT WINAPI TransformFilter_InputPin_BeginFlush(IPin * iface)
static
HRESULT
WINAPI
TransformFilter_InputPin_EndFlush
(
IPin
*
iface
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TransformFilter
*
pTransform
;
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
EnterCriticalSection
(
&
pTransform
->
filter
.
csFilter
);
if
(
pTransform
->
pFuncsTable
->
pfnEndFlush
)
hr
=
pTransform
->
pFuncsTable
->
pfnEndFlush
(
pTransform
);
...
...
@@ -485,13 +436,11 @@ static HRESULT WINAPI TransformFilter_InputPin_EndFlush(IPin * iface)
static
HRESULT
WINAPI
TransformFilter_InputPin_NewSegment
(
IPin
*
iface
,
REFERENCE_TIME
tStart
,
REFERENCE_TIME
tStop
,
double
dRate
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
TransformFilter
*
pTransform
;
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%s %s %e)
\n
"
,
iface
,
wine_dbgstr_longlong
(
tStart
),
wine_dbgstr_longlong
(
tStop
),
dRate
);
pTransform
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
EnterCriticalSection
(
&
pTransform
->
filter
.
csFilter
);
if
(
pTransform
->
pFuncsTable
->
pfnNewSegment
)
hr
=
pTransform
->
pFuncsTable
->
pfnNewSegment
(
pTransform
,
tStart
,
tStop
,
dRate
);
...
...
@@ -525,7 +474,8 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
static
HRESULT
WINAPI
transform_source_QueryInterface
(
IPin
*
iface
,
REFIID
iid
,
void
**
out
)
{
TransformFilter
*
filter
=
impl_from_IBaseFilter
(
impl_BaseOutputPin_from_IPin
(
iface
)
->
pin
.
pinInfo
.
pFilter
);
TransformFilter
*
filter
=
impl_from_source_IPin
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
iid
,
&
IID_IPin
))
*
out
=
iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IQualityControl
))
...
...
dlls/winegstreamer/gsttffilter.c
View file @
2d5c9d06
...
...
@@ -168,7 +168,7 @@ GstFlowReturn got_data(GstPad *pad, GstObject *parent, GstBuffer *buf)
gst_buffer_map
(
buf
,
&
info
,
GST_MAP_READ
);
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
&
sample
,
NULL
,
NULL
,
0
);
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
tf
.
source
,
&
sample
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Could not get output buffer: %08x
\n
"
,
hr
);
return
GST_FLOW_FLUSHING
;
...
...
@@ -205,7 +205,7 @@ GstFlowReturn got_data(GstPad *pad, GstObject *parent, GstBuffer *buf)
IMediaSample_SetSyncPoint
(
sample
,
!
GST_BUFFER_FLAG_IS_SET
(
buf
,
GST_BUFFER_FLAG_DELTA_UNIT
));
IMediaSample_SetActualDataLength
(
sample
,
gst_buffer_get_size
(
buf
));
hr
=
BaseOutputPinImpl_Deliver
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
sample
);
hr
=
BaseOutputPinImpl_Deliver
(
&
This
->
tf
.
source
,
sample
);
IMediaSample_Release
(
sample
);
gst_buffer_unref
(
buf
);
if
(
FAILED
(
hr
))
...
...
dlls/wineqtdecoder/qtvdecoder.c
View file @
2d5c9d06
...
...
@@ -185,7 +185,7 @@ static void trackingCallback(
}
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
&
pOutSample
,
NULL
,
NULL
,
0
);
hr
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
tf
.
source
,
&
pOutSample
,
NULL
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Unable to get delivery buffer (%x)
\n
"
,
hr
);
goto
error
;
...
...
@@ -236,7 +236,7 @@ static void trackingCallback(
}
LeaveCriticalSection
(
&
This
->
tf
.
csReceive
);
hr
=
BaseOutputPinImpl_Deliver
(
(
BaseOutputPin
*
)
This
->
tf
.
ppPins
[
1
]
,
pOutSample
);
hr
=
BaseOutputPinImpl_Deliver
(
&
This
->
tf
.
source
,
pOutSample
);
EnterCriticalSection
(
&
This
->
tf
.
csReceive
);
if
(
hr
!=
S_OK
&&
hr
!=
VFW_E_NOT_CONNECTED
)
ERR
(
"Error sending sample (%x)
\n
"
,
hr
);
...
...
include/wine/strmbase.h
View file @
2d5c9d06
...
...
@@ -207,8 +207,9 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu
typedef
struct
TransformFilter
{
BaseFilter
filter
;
BaseOutputPin
source
;
BaseInputPin
sink
;
IPin
**
ppPins
;
AM_MEDIA_TYPE
pmt
;
CRITICAL_SECTION
csReceive
;
...
...
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