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
7e6ab5e5
Commit
7e6ab5e5
authored
May 09, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Move "AttemptConnection" to the base source pin function table.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e48559b2
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
27 additions
and
35 deletions
+27
-35
mediastream.c
dlls/amstream/mediastream.c
+0
-2
avico.c
dlls/qcap/avico.c
+1
-2
avimux.c
dlls/qcap/avimux.c
+2
-3
smartteefilter.c
dlls/qcap/smartteefilter.c
+2
-3
vfwcapture.c
dlls/qcap/vfwcapture.c
+1
-1
filesource.c
dlls/quartz/filesource.c
+4
-4
parser.c
dlls/quartz/parser.c
+1
-1
pin.c
dlls/strmbase/pin.c
+8
-9
renderer.c
dlls/strmbase/renderer.c
+0
-1
transform.c
dlls/strmbase/transform.c
+1
-2
gstdemux.c
dlls/winegstreamer/gstdemux.c
+1
-1
qtsplitter.c
dlls/wineqtdecoder/qtsplitter.c
+1
-1
strmbase.h
include/wine/strmbase.h
+5
-5
No files found.
dlls/amstream/mediastream.c
View file @
7e6ab5e5
...
...
@@ -591,7 +591,6 @@ static const BaseInputPinFuncTable DirectDrawMediaStreamInputPin_FuncTable =
{
{
DirectDrawMediaStreamInputPin_CheckMediaType
,
NULL
,
DirectDrawMediaStreamInputPin_GetMediaTypeVersion
,
DirectDrawMediaStreamInputPin_GetMediaType
,
},
...
...
@@ -1135,7 +1134,6 @@ static const BaseInputPinFuncTable AudioMediaStreamInputPin_FuncTable =
{
{
AudioMediaStreamInputPin_CheckMediaType
,
NULL
,
AudioMediaStreamInputPin_GetMediaTypeVersion
,
AudioMediaStreamInputPin_GetMediaType
,
},
...
...
dlls/qcap/avico.c
View file @
7e6ab5e5
...
...
@@ -574,7 +574,6 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
static
const
BaseInputPinFuncTable
AVICompressorBaseInputPinVtbl
=
{
{
AVICompressorIn_CheckMediaType
,
NULL
,
AVICompressorIn_GetMediaTypeVersion
,
AVICompressorIn_GetMediaType
},
...
...
@@ -679,10 +678,10 @@ static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base)
static
const
BaseOutputPinFuncTable
AVICompressorBaseOutputPinVtbl
=
{
{
NULL
,
BaseOutputPinImpl_AttemptConnection
,
AVICompressorOut_GetMediaTypeVersion
,
AVICompressorOut_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
AVICompressorOut_DecideBufferSize
,
AVICompressorOut_DecideAllocator
,
AVICompressorOut_BreakConnect
...
...
dlls/qcap/avimux.c
View file @
7e6ab5e5
...
...
@@ -1229,7 +1229,7 @@ static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYP
return
S_OK
;
}
static
HRESULT
WINAPI
AviMuxOut_AttemptConnection
(
BasePin
*
base
,
static
HRESULT
WINAPI
AviMuxOut_AttemptConnection
(
Base
Output
Pin
*
base
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
PIN_DIRECTION
dir
;
...
...
@@ -1306,10 +1306,10 @@ static HRESULT WINAPI AviMuxOut_BreakConnect(BaseOutputPin *base)
static
const
BaseOutputPinFuncTable
AviMuxOut_BaseOutputFuncTable
=
{
{
AviMuxOut_CheckMediaType
,
AviMuxOut_AttemptConnection
,
AviMuxOut_GetMediaTypeVersion
,
AviMuxOut_GetMediaType
},
AviMuxOut_AttemptConnection
,
NULL
,
AviMuxOut_DecideAllocator
,
AviMuxOut_BreakConnect
...
...
@@ -1701,7 +1701,6 @@ static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample
static
const
BaseInputPinFuncTable
AviMuxIn_BaseInputFuncTable
=
{
{
AviMuxIn_CheckMediaType
,
NULL
,
AviMuxIn_GetMediaTypeVersion
,
AviMuxIn_GetMediaType
},
...
...
dlls/qcap/smartteefilter.c
View file @
7e6ab5e5
...
...
@@ -425,7 +425,6 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp
static
const
BaseInputPinFuncTable
SmartTeeFilterInputFuncs
=
{
{
SmartTeeFilterInput_CheckMediaType
,
NULL
,
SmartTeeFilterInput_GetMediaTypeVersion
,
SmartTeeFilterInput_GetMediaType
},
...
...
@@ -522,10 +521,10 @@ static HRESULT WINAPI SmartTeeFilterCapture_BreakConnect(BaseOutputPin *base)
static
const
BaseOutputPinFuncTable
SmartTeeFilterCaptureFuncs
=
{
{
SmartTeeFilterCapture_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
SmartTeeFilterCapture_GetMediaTypeVersion
,
SmartTeeFilterCapture_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
NULL
,
SmartTeeFilterCapture_DecideAllocator
,
SmartTeeFilterCapture_BreakConnect
...
...
@@ -621,10 +620,10 @@ static HRESULT WINAPI SmartTeeFilterPreview_BreakConnect(BaseOutputPin *base)
static
const
BaseOutputPinFuncTable
SmartTeeFilterPreviewFuncs
=
{
{
SmartTeeFilterPreview_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
SmartTeeFilterPreview_GetMediaTypeVersion
,
SmartTeeFilterPreview_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
NULL
,
SmartTeeFilterPreview_DecideAllocator
,
SmartTeeFilterPreview_BreakConnect
...
...
dlls/qcap/vfwcapture.c
View file @
7e6ab5e5
...
...
@@ -707,10 +707,10 @@ static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocato
static
const
BaseOutputPinFuncTable
output_BaseOutputFuncTable
=
{
{
VfwPin_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
VfwPin_GetMediaTypeVersion
,
VfwPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
VfwPin_DecideBufferSize
,
BaseOutputPinImpl_DecideAllocator
,
BaseOutputPinImpl_BreakConnect
...
...
dlls/quartz/filesource.c
View file @
7e6ab5e5
...
...
@@ -862,9 +862,9 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl =
/* specific AM_MEDIA_TYPE - it cannot be NULL */
/* this differs from standard OutputPin_AttemptConnection only in that it
* doesn't need the IMemInputPin interface on the receiving pin */
static
HRESULT
WINAPI
FileAsyncReaderPin_AttemptConnection
(
BasePin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
static
HRESULT
WINAPI
FileAsyncReaderPin_AttemptConnection
(
BaseOutputPin
*
This
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
BaseOutputPin
*
This
=
impl_BaseOutputPin_from_BasePin
(
iface
);
HRESULT
hr
;
TRACE
(
"%p->(%p, %p)
\n
"
,
This
,
pReceivePin
,
pmt
);
...
...
@@ -876,7 +876,7 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BasePin * iface, IPin
IPin_AddRef
(
pReceivePin
);
CopyMediaType
(
&
This
->
pin
.
mtCurrent
,
pmt
);
hr
=
IPin_ReceiveConnection
(
pReceivePin
,
&
iface
->
IPin_iface
,
pmt
);
hr
=
IPin_ReceiveConnection
(
pReceivePin
,
&
This
->
pin
.
IPin_iface
,
pmt
);
if
(
FAILED
(
hr
))
{
...
...
@@ -909,10 +909,10 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface,
static
const
BaseOutputPinFuncTable
output_BaseOutputFuncTable
=
{
{
FileAsyncReaderPin_CheckMediaType
,
FileAsyncReaderPin_AttemptConnection
,
BasePinImpl_GetMediaTypeVersion
,
FileAsyncReaderPin_GetMediaType
},
FileAsyncReaderPin_AttemptConnection
,
FileAsyncReaderPin_DecideBufferSize
,
BaseOutputPinImpl_DecideAllocator
,
BaseOutputPinImpl_BreakConnect
...
...
dlls/quartz/parser.c
View file @
7e6ab5e5
...
...
@@ -424,10 +424,10 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
static
const
BaseOutputPinFuncTable
output_BaseOutputFuncTable
=
{
{
Parser_OutputPin_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
BasePinImpl_GetMediaTypeVersion
,
Parser_OutputPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
Parser_OutputPin_DecideBufferSize
,
Parser_OutputPin_DecideAllocator
,
Parser_OutputPin_BreakConnect
...
...
dlls/strmbase/pin.c
View file @
7e6ab5e5
...
...
@@ -414,7 +414,7 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
/* if we have been a specific type to connect with, then we can either connect
* with that or fail. We cannot choose different AM_MEDIA_TYPE */
if
(
pmt
&&
!
IsEqualGUID
(
&
pmt
->
majortype
,
&
GUID_NULL
)
&&
!
IsEqualGUID
(
&
pmt
->
subtype
,
&
GUID_NULL
))
hr
=
This
->
p
in
.
pFuncsTable
->
pfnAttemptConnection
(
&
This
->
pin
,
pReceivePin
,
pmt
);
hr
=
This
->
p
FuncsTable
->
pfnAttemptConnection
(
This
,
pReceivePin
,
pmt
);
else
{
/* negotiate media type */
...
...
@@ -434,8 +434,8 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
if
(
!
IsEqualGUID
(
&
FORMAT_None
,
&
pmtCandidate
->
formattype
)
&&
!
IsEqualGUID
(
&
GUID_NULL
,
&
pmtCandidate
->
formattype
))
assert
(
pmtCandidate
->
pbFormat
);
if
((
!
pmt
||
CompareMediaTypes
(
pmt
,
pmtCandidate
,
TRUE
)
)
&&
(
This
->
pin
.
pFuncsTable
->
pfnAttemptConnection
(
&
This
->
pin
,
pReceivePin
,
pmtCandidate
)
==
S_OK
)
)
if
((
!
pmt
||
CompareMediaTypes
(
pmt
,
pmtCandidate
,
TRUE
))
&&
This
->
pFuncsTable
->
pfnAttemptConnection
(
This
,
pReceivePin
,
pmtCandidate
)
==
S_OK
)
{
hr
=
S_OK
;
DeleteMediaType
(
pmtCandidate
);
...
...
@@ -458,8 +458,8 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
{
assert
(
pmtCandidate
);
dump_AM_MEDIA_TYPE
(
pmtCandidate
);
if
((
!
pmt
||
CompareMediaTypes
(
pmt
,
pmtCandidate
,
TRUE
)
)
&&
(
This
->
pin
.
pFuncsTable
->
pfnAttemptConnection
(
&
This
->
pin
,
pReceivePin
,
pmtCandidate
)
==
S_OK
)
)
if
((
!
pmt
||
CompareMediaTypes
(
pmt
,
pmtCandidate
,
TRUE
))
&&
This
->
pFuncsTable
->
pfnAttemptConnection
(
This
,
pReceivePin
,
pmtCandidate
)
==
S_OK
)
{
hr
=
S_OK
;
DeleteMediaType
(
pmtCandidate
);
...
...
@@ -699,9 +699,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputP
/* Function called as a helper to IPin_Connect */
/* specific AM_MEDIA_TYPE - it cannot be NULL */
HRESULT
WINAPI
BaseOutputPinImpl_AttemptConnection
(
Base
Pin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
HRESULT
WINAPI
BaseOutputPinImpl_AttemptConnection
(
Base
OutputPin
*
This
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
BaseOutputPin
*
This
=
impl_BaseOutputPin_from_BasePin
(
iface
);
HRESULT
hr
;
IMemAllocator
*
pMemAlloc
=
NULL
;
...
...
@@ -715,7 +714,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pRecei
IPin_AddRef
(
pReceivePin
);
CopyMediaType
(
&
This
->
pin
.
mtCurrent
,
pmt
);
hr
=
IPin_ReceiveConnection
(
pReceivePin
,
&
iface
->
IPin_iface
,
pmt
);
hr
=
IPin_ReceiveConnection
(
pReceivePin
,
&
This
->
pin
.
IPin_iface
,
pmt
);
/* get the IMemInputPin interface we will use to deliver samples to the
* connected pin */
...
...
@@ -792,7 +791,7 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
}
assert
(
outputpin_size
>=
sizeof
(
BaseOutputPin
));
assert
(
vtbl
->
base
.
pfnAttemptConnection
);
assert
(
vtbl
->
pfnAttemptConnection
);
pPinImpl
=
CoTaskMemAlloc
(
outputpin_size
);
...
...
dlls/strmbase/renderer.c
View file @
7e6ab5e5
...
...
@@ -219,7 +219,6 @@ static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
static
const
BaseInputPinFuncTable
input_BaseInputFuncTable
=
{
{
BaseRenderer_Input_CheckMediaType
,
NULL
,
BasePinImpl_GetMediaTypeVersion
,
BasePinImpl_GetMediaType
},
...
...
dlls/strmbase/transform.c
View file @
7e6ab5e5
...
...
@@ -152,7 +152,6 @@ static const BaseFilterFuncTable tfBaseFuncTable = {
static
const
BaseInputPinFuncTable
tf_input_BaseInputFuncTable
=
{
{
TransformFilter_Input_CheckMediaType
,
NULL
,
BasePinImpl_GetMediaTypeVersion
,
BasePinImpl_GetMediaType
},
...
...
@@ -162,10 +161,10 @@ static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
static
const
BaseOutputPinFuncTable
tf_output_BaseOutputFuncTable
=
{
{
TransformFilter_Output_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
BasePinImpl_GetMediaTypeVersion
,
TransformFilter_Output_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
TransformFilter_Output_DecideBufferSize
,
BaseOutputPinImpl_DecideAllocator
,
BaseOutputPinImpl_BreakConnect
...
...
dlls/winegstreamer/gstdemux.c
View file @
7e6ab5e5
...
...
@@ -1872,10 +1872,10 @@ static const IPinVtbl GST_OutputPin_Vtbl = {
static
const
BaseOutputPinFuncTable
output_BaseOutputFuncTable
=
{
{
GSTOutPin_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
BasePinImpl_GetMediaTypeVersion
,
GSTOutPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
GSTOutPin_DecideBufferSize
,
GSTOutPin_DecideAllocator
,
GSTOutPin_BreakConnect
...
...
dlls/wineqtdecoder/qtsplitter.c
View file @
7e6ab5e5
...
...
@@ -1515,10 +1515,10 @@ static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = {
static
const
BaseOutputPinFuncTable
output_BaseOutputFuncTable
=
{
{
QTOutPin_CheckMediaType
,
BaseOutputPinImpl_AttemptConnection
,
BasePinImpl_GetMediaTypeVersion
,
QTOutPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection
,
QTOutPin_DecideBufferSize
,
QTOutPin_DecideAllocator
,
QTOutPin_BreakConnect
...
...
include/wine/strmbase.h
View file @
7e6ab5e5
...
...
@@ -44,15 +44,12 @@ typedef struct BasePin
}
BasePin
;
typedef
HRESULT
(
WINAPI
*
BasePin_CheckMediaType
)(
BasePin
*
This
,
const
AM_MEDIA_TYPE
*
pmt
);
typedef
HRESULT
(
WINAPI
*
BasePin_AttemptConnection
)(
BasePin
*
This
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
typedef
LONG
(
WINAPI
*
BasePin_GetMediaTypeVersion
)(
BasePin
*
This
);
typedef
HRESULT
(
WINAPI
*
BasePin_GetMediaType
)(
BasePin
*
This
,
int
iPosition
,
AM_MEDIA_TYPE
*
amt
);
typedef
struct
BasePinFuncTable
{
/* Required for
Input Pins
*/
/* Required for
QueryAccept(), Connect(), ReceiveConnection().
*/
BasePin_CheckMediaType
pfnCheckMediaType
;
/* Required for Output Pins*/
BasePin_AttemptConnection
pfnAttemptConnection
;
/* Required for BasePinImpl_EnumMediaTypes */
BasePin_GetMediaTypeVersion
pfnGetMediaTypeVersion
;
BasePin_GetMediaType
pfnGetMediaType
;
...
...
@@ -68,6 +65,7 @@ typedef struct BaseOutputPin
const
struct
BaseOutputPinFuncTable
*
pFuncsTable
;
}
BaseOutputPin
;
typedef
HRESULT
(
WINAPI
*
BaseOutputPin_AttemptConnection
)(
BaseOutputPin
*
pin
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
);
typedef
HRESULT
(
WINAPI
*
BaseOutputPin_DecideBufferSize
)(
BaseOutputPin
*
This
,
IMemAllocator
*
pAlloc
,
ALLOCATOR_PROPERTIES
*
ppropInputRequest
);
typedef
HRESULT
(
WINAPI
*
BaseOutputPin_DecideAllocator
)(
BaseOutputPin
*
This
,
IMemInputPin
*
pPin
,
IMemAllocator
**
pAlloc
);
typedef
HRESULT
(
WINAPI
*
BaseOutputPin_BreakConnect
)(
BaseOutputPin
*
This
);
...
...
@@ -75,6 +73,8 @@ typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This);
typedef
struct
BaseOutputPinFuncTable
{
BasePinFuncTable
base
;
/* Required for Connect(). */
BaseOutputPin_AttemptConnection
pfnAttemptConnection
;
/* Required for BaseOutputPinImpl_DecideAllocator */
BaseOutputPin_DecideBufferSize
pfnDecideBufferSize
;
/* Required for BaseOutputPinImpl_AttemptConnection */
...
...
@@ -135,7 +135,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This);
HRESULT
WINAPI
BaseOutputPinImpl_Inactive
(
BaseOutputPin
*
This
);
HRESULT
WINAPI
BaseOutputPinImpl_InitAllocator
(
BaseOutputPin
*
This
,
IMemAllocator
**
pMemAlloc
);
HRESULT
WINAPI
BaseOutputPinImpl_DecideAllocator
(
BaseOutputPin
*
This
,
IMemInputPin
*
pPin
,
IMemAllocator
**
pAlloc
);
HRESULT
WINAPI
BaseOutputPinImpl_AttemptConnection
(
Base
Pin
*
This
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
p
mt
);
HRESULT
WINAPI
BaseOutputPinImpl_AttemptConnection
(
Base
OutputPin
*
pin
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
);
HRESULT
WINAPI
BaseOutputPin_Construct
(
const
IPinVtbl
*
OutputPin_Vtbl
,
LONG
outputpin_size
,
const
PIN_INFO
*
pPinInfo
,
const
BaseOutputPinFuncTable
*
pBaseOutputFuncsTable
,
LPCRITICAL_SECTION
pCritSec
,
IPin
**
ppPin
);
HRESULT
WINAPI
BaseOutputPin_Destroy
(
BaseOutputPin
*
This
);
...
...
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