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
2eb66373
Commit
2eb66373
authored
Jun 10, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jun 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Implement IMediaSeeking in the video renderer.
parent
29b6dbab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
2 deletions
+64
-2
videorenderer.c
dlls/quartz/tests/videorenderer.c
+2
-2
videorenderer.c
dlls/quartz/videorenderer.c
+62
-0
No files found.
dlls/quartz/tests/videorenderer.c
View file @
2eb66373
...
...
@@ -68,6 +68,8 @@ static void test_query_interface(void)
RELEASE_EXPECT
(
pBaseFilter
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IBasicVideo
,
pBasicVideo
);
RELEASE_EXPECT
(
pBasicVideo
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IMediaSeeking
,
pMediaSeeking
);
RELEASE_EXPECT
(
pMediaSeeking
,
1
);
todo_wine
{
QI_SUCCEED
(
pVideoRenderer
,
IID_IDirectDrawVideo
,
pDirectDrawVideo
);
RELEASE_EXPECT
(
pDirectDrawVideo
,
1
);
...
...
@@ -75,8 +77,6 @@ static void test_query_interface(void)
RELEASE_EXPECT
(
pKsPropertySet
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IMediaPosition
,
pMediaPosition
);
RELEASE_EXPECT
(
pMediaPosition
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IMediaSeeking
,
pMediaSeeking
);
RELEASE_EXPECT
(
pMediaSeeking
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IQualityControl
,
pQualityControl
);
RELEASE_EXPECT
(
pQualityControl
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IQualProp
,
pQualProp
);
...
...
dlls/quartz/videorenderer.c
View file @
2eb66373
...
...
@@ -86,6 +86,7 @@ typedef struct VideoRendererImpl
BOOL
bUnkOuterValid
;
BOOL
bAggregatable
;
REFERENCE_TIME
rtLastStop
;
MediaSeekingImpl
mediaSeeking
;
}
VideoRendererImpl
;
static
LRESULT
CALLBACK
VideoWndProcA
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -482,6 +483,62 @@ static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt
return
S_FALSE
;
}
static
inline
VideoRendererImpl
*
impl_from_IMediaSeeking
(
IMediaSeeking
*
iface
)
{
return
(
VideoRendererImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
VideoRendererImpl
,
mediaSeeking
.
lpVtbl
));
}
static
HRESULT
WINAPI
VideoRendererImpl_Seeking_QueryInterface
(
IMediaSeeking
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
VideoRendererImpl
*
This
=
impl_from_IMediaSeeking
(
iface
);
return
IUnknown_QueryInterface
((
IUnknown
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
VideoRendererImpl_Seeking_AddRef
(
IMediaSeeking
*
iface
)
{
VideoRendererImpl
*
This
=
impl_from_IMediaSeeking
(
iface
);
return
IUnknown_AddRef
((
IUnknown
*
)
This
);
}
static
ULONG
WINAPI
VideoRendererImpl_Seeking_Release
(
IMediaSeeking
*
iface
)
{
VideoRendererImpl
*
This
=
impl_from_IMediaSeeking
(
iface
);
return
IUnknown_Release
((
IUnknown
*
)
This
);
}
static
const
IMediaSeekingVtbl
VideoRendererImpl_Seeking_Vtbl
=
{
VideoRendererImpl_Seeking_QueryInterface
,
VideoRendererImpl_Seeking_AddRef
,
VideoRendererImpl_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
};
static
HRESULT
VideoRendererImpl_Change
(
IBaseFilter
*
iface
)
{
TRACE
(
"(%p)
\n
"
,
iface
);
return
S_OK
;
}
HRESULT
VideoRenderer_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
{
HRESULT
hr
;
...
...
@@ -525,6 +582,9 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
if
(
SUCCEEDED
(
hr
))
{
MediaSeekingImpl_Init
((
IBaseFilter
*
)
pVideoRenderer
,
VideoRendererImpl_Change
,
VideoRendererImpl_Change
,
VideoRendererImpl_Change
,
&
pVideoRenderer
->
mediaSeeking
,
&
pVideoRenderer
->
csFilter
);
pVideoRenderer
->
mediaSeeking
.
lpVtbl
=
&
VideoRendererImpl_Seeking_Vtbl
;
*
ppv
=
(
LPVOID
)
pVideoRenderer
;
}
else
...
...
@@ -568,6 +628,8 @@ static HRESULT WINAPI VideoRendererInner_QueryInterface(IUnknown * iface, REFIID
*
ppv
=
(
LPVOID
)
&
(
This
->
IBasicVideo_vtbl
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IVideoWindow
))
*
ppv
=
(
LPVOID
)
&
(
This
->
IVideoWindow_vtbl
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
*
ppv
=
&
This
->
mediaSeeking
;
if
(
*
ppv
)
{
...
...
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