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
4fe2be86
Commit
4fe2be86
authored
May 22, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Oct 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Add support for MediaSeekingPassThru to transform filter.
parent
f48f6099
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
89 deletions
+12
-89
acmwrapper.c
dlls/quartz/acmwrapper.c
+1
-1
avidec.c
dlls/quartz/avidec.c
+1
-1
transform.c
dlls/quartz/transform.c
+8
-85
transform.h
dlls/quartz/transform.h
+2
-2
No files found.
dlls/quartz/acmwrapper.c
View file @
4fe2be86
...
...
@@ -326,7 +326,7 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv)
This
=
CoTaskMemAlloc
(
sizeof
(
ACMWrapperImpl
));
ZeroMemory
(
This
,
sizeof
(
ACMWrapperImpl
));
hr
=
TransformFilter_Create
(
&
(
This
->
tf
),
&
CLSID_ACMWrapper
,
&
ACMWrapper_FuncsTable
,
NULL
,
NULL
,
NULL
);
hr
=
TransformFilter_Create
(
&
(
This
->
tf
),
&
CLSID_ACMWrapper
,
&
ACMWrapper_FuncsTable
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/quartz/avidec.c
View file @
4fe2be86
...
...
@@ -331,7 +331,7 @@ HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv)
This
->
pBihIn
=
NULL
;
This
->
pBihOut
=
NULL
;
hr
=
TransformFilter_Create
(
&
(
This
->
tf
),
&
CLSID_AVIDec
,
&
AVIDec_FuncsTable
,
NULL
,
NULL
,
NULL
);
hr
=
TransformFilter_Create
(
&
(
This
->
tf
),
&
CLSID_AVIDec
,
&
AVIDec_FuncsTable
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/quartz/transform.c
View file @
4fe2be86
...
...
@@ -73,80 +73,7 @@ static HRESULT TransformFilter_Output_QueryAccept(LPVOID iface, const AM_MEDIA_T
return
S_FALSE
;
}
static
inline
TransformFilterImpl
*
impl_from_IMediaSeeking
(
IMediaSeeking
*
iface
)
{
return
(
TransformFilterImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
TransformFilterImpl
,
mediaSeeking
.
lpVtbl
));
}
static
HRESULT
WINAPI
TransformFilter_Seeking_QueryInterface
(
IMediaSeeking
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
TransformFilterImpl
*
This
=
impl_from_IMediaSeeking
(
iface
);
return
IUnknown_QueryInterface
((
IUnknown
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
TransformFilter_Seeking_AddRef
(
IMediaSeeking
*
iface
)
{
TransformFilterImpl
*
This
=
impl_from_IMediaSeeking
(
iface
);
return
IUnknown_AddRef
((
IUnknown
*
)
This
);
}
static
ULONG
WINAPI
TransformFilter_Seeking_Release
(
IMediaSeeking
*
iface
)
{
TransformFilterImpl
*
This
=
impl_from_IMediaSeeking
(
iface
);
return
IUnknown_Release
((
IUnknown
*
)
This
);
}
static
const
IMediaSeekingVtbl
TransformFilter_Seeking_Vtbl
=
{
TransformFilter_Seeking_QueryInterface
,
TransformFilter_Seeking_AddRef
,
TransformFilter_Seeking_Release
,
MediaSeekingImpl_GetCapabilities
,
MediaSeekingImpl_CheckCapabilities
,
MediaSeekingImpl_IsFormatSupported
,
MediaSeekingImpl_QueryPreferredFormat
,
MediaSeekingImpl_GetTimeFormat
,
MediaSeekingImpl_IsUsingTimeFormat
,
MediaSeekingImpl_SetTimeFormat
,
MediaSeekingImpl_GetDuration
,
MediaSeekingImpl_GetStopPosition
,
MediaSeekingImpl_GetCurrentPosition
,
MediaSeekingImpl_ConvertTimeFormat
,
MediaSeekingImpl_SetPositions
,
MediaSeekingImpl_GetPositions
,
MediaSeekingImpl_GetAvailable
,
MediaSeekingImpl_SetRate
,
MediaSeekingImpl_GetRate
,
MediaSeekingImpl_GetPreroll
};
/* These shouldn't be implemented by default.
* Usually only source filters should implement these
* and even it's not needed all of the time
*/
static
HRESULT
TransformFilter_ChangeCurrent
(
IBaseFilter
*
iface
)
{
TRACE
(
"(%p) filter hasn't implemented current position change!
\n
"
,
iface
);
return
S_OK
;
}
static
HRESULT
TransformFilter_ChangeStop
(
IBaseFilter
*
iface
)
{
TRACE
(
"(%p) filter hasn't implemented stop position change!
\n
"
,
iface
);
return
S_OK
;
}
static
HRESULT
TransformFilter_ChangeRate
(
IBaseFilter
*
iface
)
{
TRACE
(
"(%p) filter hasn't implemented rate change!
\n
"
,
iface
);
return
S_OK
;
}
HRESULT
TransformFilter_Create
(
TransformFilterImpl
*
pTransformFilter
,
const
CLSID
*
pClsid
,
const
TransformFuncsTable
*
pFuncsTable
,
CHANGEPROC
stop
,
CHANGEPROC
current
,
CHANGEPROC
rate
)
HRESULT
TransformFilter_Create
(
TransformFilterImpl
*
pTransformFilter
,
const
CLSID
*
pClsid
,
const
TransformFuncsTable
*
pFuncsTable
)
{
HRESULT
hr
;
PIN_INFO
piInput
;
...
...
@@ -195,18 +122,14 @@ HRESULT TransformFilter_Create(TransformFilterImpl* pTransformFilter, const CLSI
ERR
(
"Cannot create output pin (%x)
\n
"
,
hr
);
else
{
if
(
!
stop
)
stop
=
TransformFilter_ChangeStop
;
if
(
!
current
)
current
=
TransformFilter_ChangeCurrent
;
if
(
!
rate
)
rate
=
TransformFilter_ChangeRate
;
MediaSeekingImpl_Init
((
IBaseFilter
*
)
pTransformFilter
,
stop
,
current
,
rate
,
&
pTransformFilter
->
mediaSeeking
,
&
pTransformFilter
->
csFilter
);
pTransformFilter
->
mediaSeeking
.
lpVtbl
=
&
TransformFilter_Seeking_Vtbl
;
ISeekingPassThru
*
passthru
;
hr
=
CoCreateInstance
(
&
CLSID_SeekingPassThru
,
(
IUnknown
*
)
pTransformFilter
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pTransformFilter
->
seekthru_unk
);
IUnknown_QueryInterface
(
pTransformFilter
->
seekthru_unk
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
passthru
);
ISeekingPassThru_Init
(
passthru
,
FALSE
,
(
IPin
*
)
pTransformFilter
->
ppPins
[
0
]);
ISeekingPassThru_Release
(
passthru
);
}
}
else
if
(
FAILED
(
hr
))
{
CoTaskMemFree
(
pTransformFilter
->
ppPins
);
pTransformFilter
->
csFilter
.
DebugInfo
->
Spare
[
0
]
=
0
;
...
...
@@ -233,7 +156,7 @@ static HRESULT WINAPI TransformFilter_QueryInterface(IBaseFilter * iface, REFIID
else
if
(
IsEqualIID
(
riid
,
&
IID_IBaseFilter
))
*
ppv
=
This
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
*
ppv
=
&
This
->
mediaSeeking
;
return
IUnknown_QueryInterface
(
This
->
seekthru_unk
,
riid
,
ppv
)
;
if
(
*
ppv
)
{
...
...
dlls/quartz/transform.h
View file @
4fe2be86
...
...
@@ -34,6 +34,7 @@ typedef struct TransformFuncsTable {
struct
TransformFilterImpl
{
const
IBaseFilterVtbl
*
lpVtbl
;
IUnknown
*
seekthru_unk
;
LONG
refCount
;
CRITICAL_SECTION
csFilter
;
...
...
@@ -42,7 +43,6 @@ struct TransformFilterImpl
IReferenceClock
*
pClock
;
FILTER_INFO
filterInfo
;
CLSID
clsid
;
struct
MediaSeekingImpl
mediaSeeking
;
IPin
**
ppPins
;
ULONG
npins
;
...
...
@@ -51,4 +51,4 @@ struct TransformFilterImpl
const
TransformFuncsTable
*
pFuncsTable
;
};
HRESULT
TransformFilter_Create
(
TransformFilterImpl
*
,
const
CLSID
*
,
const
TransformFuncsTable
*
pFuncsTable
,
CHANGEPROC
stop
,
CHANGEPROC
current
,
CHANGEPROC
rate
);
HRESULT
TransformFilter_Create
(
TransformFilterImpl
*
,
const
CLSID
*
,
const
TransformFuncsTable
*
pFuncsTable
);
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