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
f9c2d8e2
Commit
f9c2d8e2
authored
Apr 19, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Add some more tests and fix wine to pass them.
parent
810a933f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
7 deletions
+97
-7
dsoundrender.c
dlls/quartz/dsoundrender.c
+2
-1
enumpins.c
dlls/quartz/enumpins.c
+12
-1
nullrenderer.c
dlls/quartz/nullrenderer.c
+2
-1
filtergraph.c
dlls/quartz/tests/filtergraph.c
+13
-2
videorenderer.c
dlls/quartz/tests/videorenderer.c
+64
-0
transform.c
dlls/quartz/transform.c
+2
-1
videorenderer.c
dlls/quartz/videorenderer.c
+2
-1
No files found.
dlls/quartz/dsoundrender.c
View file @
f9c2d8e2
...
...
@@ -599,7 +599,8 @@ static HRESULT WINAPI DSoundRender_GetSyncSource(IBaseFilter * iface, IReference
EnterCriticalSection
(
&
This
->
csFilter
);
{
*
ppClock
=
This
->
pClock
;
IReferenceClock_AddRef
(
This
->
pClock
);
if
(
This
->
pClock
)
IReferenceClock_AddRef
(
This
->
pClock
);
}
LeaveCriticalSection
(
&
This
->
csFilter
);
...
...
dlls/quartz/enumpins.c
View file @
f9c2d8e2
...
...
@@ -36,7 +36,12 @@ static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl;
HRESULT
IEnumPinsImpl_Construct
(
const
ENUMPINDETAILS
*
pDetails
,
IEnumPins
**
ppEnum
)
{
IEnumPinsImpl
*
pEnumPins
=
CoTaskMemAlloc
(
sizeof
(
IEnumPinsImpl
));
IEnumPinsImpl
*
pEnumPins
;
if
(
!
ppEnum
)
return
E_POINTER
;
pEnumPins
=
CoTaskMemAlloc
(
sizeof
(
IEnumPinsImpl
));
if
(
!
pEnumPins
)
{
*
ppEnum
=
NULL
;
...
...
@@ -109,6 +114,12 @@ static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin **
TRACE
(
"(%u, %p, %p)
\n
"
,
cPins
,
ppPins
,
pcFetched
);
if
(
!
ppPins
)
return
E_POINTER
;
if
(
cPins
>
1
&&
!
pcFetched
)
return
E_INVALIDARG
;
if
(
cFetched
>
0
)
{
ULONG
i
;
...
...
dlls/quartz/nullrenderer.c
View file @
f9c2d8e2
...
...
@@ -463,7 +463,8 @@ static HRESULT WINAPI NullRenderer_GetSyncSource(IBaseFilter * iface, IReference
EnterCriticalSection
(
&
This
->
csFilter
);
{
*
ppClock
=
This
->
pClock
;
IReferenceClock_AddRef
(
This
->
pClock
);
if
(
This
->
pClock
)
IReferenceClock_AddRef
(
This
->
pClock
);
}
LeaveCriticalSection
(
&
This
->
csFilter
);
...
...
dlls/quartz/tests/filtergraph.c
View file @
f9c2d8e2
...
...
@@ -50,11 +50,21 @@ static void rungraph(void)
HRESULT
hr
;
IMediaControl
*
pmc
;
IMediaEvent
*
pme
;
IMediaFilter
*
pmf
;
HANDLE
hEvent
;
hr
=
IGraphBuilder_QueryInterface
(
pgraph
,
&
IID_IMediaControl
,
(
LPVOID
*
)
&
pmc
);
ok
(
hr
==
S_OK
,
"Cannot get IMediaControl interface returned: %x
\n
"
,
hr
);
hr
=
IGraphBuilder_QueryInterface
(
pgraph
,
&
IID_IMediaFilter
,
(
LPVOID
*
)
&
pmf
);
ok
(
hr
==
S_OK
,
"Cannot get IMediaFilter interface returned: %x
\n
"
,
hr
);
IMediaControl_Stop
(
pmc
);
IMediaFilter_SetSyncSource
(
pmf
,
NULL
);
IMediaFilter_Release
(
pmf
);
hr
=
IMediaControl_Run
(
pmc
);
ok
(
hr
==
S_FALSE
,
"Cannot run the graph returned: %x
\n
"
,
hr
);
...
...
@@ -64,6 +74,8 @@ static void rungraph(void)
hr
=
IMediaControl_Stop
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot stop the graph returned: %x
\n
"
,
hr
);
IGraphBuilder_SetDefaultSyncSource
(
pgraph
);
Sleep
(
10
);
trace
(
"stop -> pause
\n
"
);
hr
=
IMediaControl_Pause
(
pmc
);
...
...
@@ -97,7 +109,6 @@ static void rungraph(void)
hr
=
IMediaControl_Run
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot start the graph returned: %x
\n
"
,
hr
);
hr
=
IGraphBuilder_QueryInterface
(
pgraph
,
&
IID_IMediaEvent
,
(
LPVOID
*
)
&
pme
);
ok
(
hr
==
S_OK
,
"Cannot get IMediaEvent interface returned: %x
\n
"
,
hr
);
...
...
@@ -107,7 +118,7 @@ static void rungraph(void)
/* WaitForSingleObject(hEvent, INFINITE); */
Sleep
(
20000
);
hr
=
IMedia
Control
_Release
(
pme
);
hr
=
IMedia
Event
_Release
(
pme
);
ok
(
hr
==
2
,
"Releasing mediaevent returned: %x
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
pmc
);
...
...
dlls/quartz/tests/videorenderer.c
View file @
f9c2d8e2
...
...
@@ -86,6 +86,69 @@ static void test_query_interface(void)
RELEASE_EXPECT
(
pVideoWindow
,
1
);
}
static
void
test_pin
(
IPin
*
pin
)
{
IMemInputPin
*
mpin
=
NULL
;
IPin_QueryInterface
(
pin
,
&
IID_IMemInputPin
,
(
void
**
)
&
mpin
);
ok
(
mpin
!=
NULL
,
"No IMemInputPin found!
\n
"
);
if
(
mpin
)
{
ok
(
IMemInputPin_ReceiveCanBlock
(
mpin
)
==
S_OK
,
"Receive can't block for pin!
\n
"
);
IMemInputPin_Release
(
mpin
);
}
/* TODO */
}
static
void
test_basefilter
(
void
)
{
IEnumPins
*
pin_enum
=
NULL
;
IBaseFilter
*
base
=
NULL
;
IPin
*
pins
[
2
];
ULONG
ref
;
HRESULT
hr
;
IUnknown_QueryInterface
(
pVideoRenderer
,
&
IID_IBaseFilter
,
(
void
*
)
&
base
);
if
(
base
==
NULL
)
{
/* test_query_interface handles this case */
skip
(
"No IBaseFilter
\n
"
);
return
;
}
hr
=
IBaseFilter_EnumPins
(
base
,
NULL
);
ok
(
hr
==
E_POINTER
,
"hr = %08x and not E_POINTER
\n
"
,
hr
);
hr
=
IBaseFilter_EnumPins
(
base
,
&
pin_enum
);
ok
(
hr
==
S_OK
,
"hr = %08x and not S_OK
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
pin_enum
,
1
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"hr = %08x and not E_POINTER
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
pin_enum
,
2
,
pins
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"hr = %08x and not E_INVALIDARG
\n
"
,
hr
);
pins
[
0
]
=
(
void
*
)
0xdead
;
pins
[
1
]
=
(
void
*
)
0xdeed
;
hr
=
IEnumPins_Next
(
pin_enum
,
2
,
pins
,
&
ref
);
ok
(
hr
==
S_FALSE
,
"hr = %08x instead of S_FALSE
\n
"
,
hr
);
ok
(
pins
[
0
]
!=
(
void
*
)
0xdead
&&
pins
[
0
]
!=
NULL
,
"pins[0] = %p
\n
"
,
pins
[
0
]);
if
(
pins
[
0
]
!=
(
void
*
)
0xdead
&&
pins
[
0
]
!=
NULL
)
{
test_pin
(
pins
[
0
]);
IPin_Release
(
pins
[
0
]);
}
ok
(
pins
[
1
]
==
(
void
*
)
0xdeed
,
"pins[1] = %p
\n
"
,
pins
[
1
]);
ref
=
IEnumPins_Release
(
pin_enum
);
ok
(
ref
==
0
,
"ref is %u and not 0!
\n
"
,
ref
);
IBaseFilter_Release
(
base
);
}
START_TEST
(
videorenderer
)
{
CoInitialize
(
NULL
);
...
...
@@ -93,6 +156,7 @@ START_TEST(videorenderer)
return
;
test_query_interface
();
test_basefilter
();
release_video_renderer
();
}
dlls/quartz/transform.c
View file @
f9c2d8e2
...
...
@@ -424,7 +424,8 @@ static HRESULT WINAPI TransformFilter_GetSyncSource(IBaseFilter * iface, IRefere
EnterCriticalSection
(
&
This
->
csFilter
);
{
*
ppClock
=
This
->
pClock
;
IReferenceClock_AddRef
(
This
->
pClock
);
if
(
This
->
pClock
)
IReferenceClock_AddRef
(
This
->
pClock
);
}
LeaveCriticalSection
(
&
This
->
csFilter
);
...
...
dlls/quartz/videorenderer.c
View file @
f9c2d8e2
...
...
@@ -754,7 +754,8 @@ static HRESULT WINAPI VideoRenderer_GetSyncSource(IBaseFilter * iface, IReferenc
EnterCriticalSection
(
&
This
->
csFilter
);
{
*
ppClock
=
This
->
pClock
;
IReferenceClock_AddRef
(
This
->
pClock
);
if
(
This
->
pClock
)
IReferenceClock_AddRef
(
This
->
pClock
);
}
LeaveCriticalSection
(
&
This
->
csFilter
);
...
...
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