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
f53fa4f0
Commit
f53fa4f0
authored
Mar 04, 2013
by
Alessandro Pignotti
Committed by
Alexandre Julliard
Mar 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Remove code duplicated by every user of ISeekingPassThruImpl.
parent
c76f0bee
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
97 deletions
+26
-97
acmwrapper.c
dlls/quartz/acmwrapper.c
+1
-25
avidec.c
dlls/quartz/avidec.c
+1
-24
transform.c
dlls/strmbase/transform.c
+20
-0
gsttffilter.c
dlls/winegstreamer/gsttffilter.c
+1
-24
qtvdecoder.c
dlls/wineqtdecoder/qtvdecoder.c
+1
-24
strmbase.h
include/wine/strmbase.h
+2
-0
No files found.
dlls/quartz/acmwrapper.c
View file @
f53fa4f0
...
...
@@ -42,7 +42,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
typedef
struct
ACMWrapperImpl
{
TransformFilter
tf
;
IUnknown
*
seekthru_unk
;
HACMSTREAM
has
;
LPWAVEFORMATEX
pWfIn
;
...
...
@@ -399,14 +398,6 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv)
if
(
FAILED
(
hr
))
return
hr
;
else
{
ISeekingPassThru
*
passthru
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
This
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
This
->
seekthru_unk
);
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
This
->
tf
.
ppPins
[
0
]);
ISeekingPassThru_Release
(
passthru
);
}
*
ppv
=
This
;
This
->
lasttime_real
=
This
->
lasttime_sent
=
-
1
;
...
...
@@ -414,24 +405,9 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv)
return
hr
;
}
static
HRESULT
WINAPI
ACMWrapper_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
HRESULT
hr
;
ACMWrapperImpl
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p/%p)->(%s, %p)
\n
"
,
This
,
iface
,
qzdebugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
hr
=
TransformFilterImpl_QueryInterface
(
iface
,
riid
,
ppv
);
return
hr
;
}
static
const
IBaseFilterVtbl
ACMWrapper_Vtbl
=
{
ACMWrapper
_QueryInterface
,
TransformFilterImpl
_QueryInterface
,
BaseFilterImpl_AddRef
,
TransformFilterImpl_Release
,
BaseFilterImpl_GetClassID
,
...
...
dlls/quartz/avidec.c
View file @
f53fa4f0
...
...
@@ -43,7 +43,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
typedef
struct
AVIDecImpl
{
TransformFilter
tf
;
IUnknown
*
seekthru_unk
;
HIC
hvid
;
BITMAPINFOHEADER
*
pBihIn
;
...
...
@@ -417,14 +416,6 @@ HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv)
if
(
FAILED
(
hr
))
return
hr
;
else
{
ISeekingPassThru
*
passthru
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
This
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
This
->
seekthru_unk
);
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
This
->
tf
.
ppPins
[
0
]);
ISeekingPassThru_Release
(
passthru
);
}
This
->
hvid
=
NULL
;
This
->
pBihIn
=
NULL
;
...
...
@@ -435,23 +426,9 @@ HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv)
return
hr
;
}
static
HRESULT
WINAPI
AVIDec_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
HRESULT
hr
;
AVIDecImpl
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p/%p)->(%s, %p)
\n
"
,
This
,
iface
,
qzdebugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
hr
=
TransformFilterImpl_QueryInterface
(
iface
,
riid
,
ppv
);
return
hr
;
}
static
const
IBaseFilterVtbl
AVIDec_Vtbl
=
{
AVIDec
_QueryInterface
,
TransformFilterImpl
_QueryInterface
,
BaseFilterImpl_AddRef
,
TransformFilterImpl_Release
,
BaseFilterImpl_GetClassID
,
...
...
dlls/strmbase/transform.c
View file @
f53fa4f0
...
...
@@ -238,6 +238,20 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p
pTransformFilter
->
qcimpl
->
IQualityControl_iface
.
lpVtbl
=
&
TransformFilter_QualityControl_Vtbl
;
}
}
if
(
SUCCEEDED
(
hr
))
{
ISeekingPassThru
*
passthru
;
pTransformFilter
->
seekthru_unk
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
pTransformFilter
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pTransformFilter
->
seekthru_unk
);
if
(
SUCCEEDED
(
hr
))
{
IUnknown_QueryInterface
(
pTransformFilter
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
pTransformFilter
->
ppPins
[
0
]);
ISeekingPassThru_Release
(
passthru
);
}
}
if
(
FAILED
(
hr
))
{
CoTaskMemFree
(
pTransformFilter
->
ppPins
);
...
...
@@ -283,6 +297,11 @@ HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, REFIID ri
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
)
||
IsEqualIID
(
riid
,
&
IID_IMediaPosition
))
{
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
}
hr
=
BaseFilterImpl_QueryInterface
(
iface
,
riid
,
ppv
);
if
(
FAILED
(
hr
)
&&
!
IsEqualIID
(
riid
,
&
IID_IPin
)
&&
!
IsEqualIID
(
riid
,
&
IID_IVideoWindow
)
&&
...
...
@@ -325,6 +344,7 @@ ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface)
FreeMediaType
(
&
This
->
pmt
);
QualityControlImpl_Destroy
(
This
->
qcimpl
);
CoTaskMemFree
(
This
);
IUnknown_Release
(
This
->
seekthru_unk
);
return
0
;
}
...
...
dlls/winegstreamer/gsttffilter.c
View file @
f53fa4f0
...
...
@@ -115,7 +115,6 @@ static const char *Gstreamer_FindMatch(const char *strcaps)
typedef
struct
GstTfImpl
{
TransformFilter
tf
;
IUnknown
*
seekthru_unk
;
const
char
*
gstreamer_name
;
GstElement
*
filter
;
GstPad
*
my_src
,
*
my_sink
,
*
their_src
,
*
their_sink
;
...
...
@@ -450,14 +449,6 @@ static HRESULT Gstreamer_transform_create(IUnknown *punkout, const CLSID *clsid,
if
(
FAILED
(
TransformFilter_Construct
(
&
GSTTf_Vtbl
,
sizeof
(
GstTfImpl
),
clsid
,
vtbl
,
(
IBaseFilter
**
)
&
This
)))
return
E_OUTOFMEMORY
;
else
{
ISeekingPassThru
*
passthru
;
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
This
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
This
->
seekthru_unk
);
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
(
IPin
*
)
This
->
tf
.
ppPins
[
0
]);
ISeekingPassThru_Release
(
passthru
);
}
This
->
gstreamer_name
=
name
;
*
obj
=
This
;
...
...
@@ -830,23 +821,9 @@ IUnknown * CALLBACK Gstreamer_AudioConvert_create(IUnknown *punkout, HRESULT *ph
return
obj
;
}
static
HRESULT
WINAPI
GSTTf_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
HRESULT
hr
;
GstTfImpl
*
This
=
(
GstTfImpl
*
)
iface
;
TRACE
(
"(%p/%p)->(%s, %p)
\n
"
,
This
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
)
||
IsEqualIID
(
riid
,
&
IID_IMediaPosition
))
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
hr
=
TransformFilterImpl_QueryInterface
(
iface
,
riid
,
ppv
);
return
hr
;
}
static
const
IBaseFilterVtbl
GSTTf_Vtbl
=
{
GSTTf
_QueryInterface
,
TransformFilterImpl
_QueryInterface
,
BaseFilterImpl_AddRef
,
TransformFilterImpl_Release
,
BaseFilterImpl_GetClassID
,
...
...
dlls/wineqtdecoder/qtvdecoder.c
View file @
f53fa4f0
...
...
@@ -136,7 +136,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qtdecoder);
typedef
struct
QTVDecoderImpl
{
TransformFilter
tf
;
IUnknown
*
seekthru_unk
;
ImageDescriptionHandle
hImageDescription
;
CFMutableDictionaryRef
outputBufferAttributes
;
...
...
@@ -545,36 +544,14 @@ IUnknown * CALLBACK QTVDecoder_create(IUnknown * pUnkOuter, HRESULT* phr)
*
phr
=
hr
;
return
NULL
;
}
else
{
ISeekingPassThru
*
passthru
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
This
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
This
->
seekthru_unk
);
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
This
->
tf
.
ppPins
[
0
]);
ISeekingPassThru_Release
(
passthru
);
}
*
phr
=
hr
;
return
(
IUnknown
*
)
This
;
}
HRESULT
WINAPI
QTVDecoder_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
HRESULT
hr
;
QTVDecoderImpl
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p/%p)->(%s, %p)
\n
"
,
This
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
)
||
IsEqualIID
(
riid
,
&
IID_IMediaPosition
))
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
);
hr
=
TransformFilterImpl_QueryInterface
(
iface
,
riid
,
ppv
);
return
hr
;
}
static
const
IBaseFilterVtbl
QTVDecoder_Vtbl
=
{
QTVDecoder
_QueryInterface
,
TransformFilterImpl
_QueryInterface
,
BaseFilterImpl_AddRef
,
TransformFilterImpl_Release
,
BaseFilterImpl_GetClassID
,
...
...
include/wine/strmbase.h
View file @
f53fa4f0
...
...
@@ -207,6 +207,8 @@ typedef struct TransformFilter
const
struct
TransformFilterFuncTable
*
pFuncsTable
;
struct
QualityControlImpl
*
qcimpl
;
/* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */
IUnknown
*
seekthru_unk
;
}
TransformFilter
;
typedef
HRESULT
(
WINAPI
*
TransformFilter_DecideBufferSize
)
(
TransformFilter
*
iface
,
IMemAllocator
*
pAlloc
,
ALLOCATOR_PROPERTIES
*
ppropInputRequest
);
...
...
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