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
eb0b1d55
Commit
eb0b1d55
authored
Jun 22, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Implement GetDirectDraw().
parent
17283f9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
Makefile.in
dlls/amstream/Makefile.in
+1
-1
mediastream.c
dlls/amstream/mediastream.c
+18
-3
amstream.c
dlls/amstream/tests/amstream.c
+16
-0
No files found.
dlls/amstream/Makefile.in
View file @
eb0b1d55
MODULE
=
amstream.dll
IMPORTS
=
strmiids strmbase uuid ole32 advapi32
IMPORTS
=
strmiids strmbase uuid ole32 advapi32
ddraw
C_SRCS
=
\
amstream.c
\
...
...
dlls/amstream/mediastream.c
View file @
eb0b1d55
...
...
@@ -42,6 +42,7 @@ typedef struct {
IMultiMediaStream
*
parent
;
MSPID
purpose_id
;
STREAM_TYPE
stream_type
;
IDirectDraw7
*
ddraw
;
}
DirectDrawMediaStreamImpl
;
static
inline
DirectDrawMediaStreamImpl
*
impl_from_DirectDrawMediaStream_IAMMediaStream
(
IAMMediaStream
*
iface
)
...
...
@@ -94,7 +95,11 @@ static ULONG WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_Release(IAMMediaStr
TRACE
(
"(%p/%p)->(): new ref = %u
\n
"
,
iface
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
ddraw
)
IDirectDraw7_Release
(
This
->
ddraw
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
...
...
@@ -373,11 +378,21 @@ static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetFormat
}
static
HRESULT
WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetDirectDraw
(
IDirectDrawMediaStream
*
iface
,
IDirectDraw
**
ppDirectD
raw
)
IDirectDraw
**
dd
raw
)
{
FIXME
(
"(%p)->(%p) stub!
\n
"
,
iface
,
ppDirectDraw
);
DirectDrawMediaStreamImpl
*
This
=
impl_from_IDirectDrawMediaStream
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
ddraw
);
*
ddraw
=
NULL
;
if
(
!
This
->
ddraw
)
{
HRESULT
hr
=
DirectDrawCreateEx
(
NULL
,
(
void
**
)
&
This
->
ddraw
,
&
IID_IDirectDraw7
,
NULL
);
if
(
FAILED
(
hr
))
return
hr
;
}
return
IDirectDraw7_QueryInterface
(
This
->
ddraw
,
&
IID_IDirectDraw
,
(
void
**
)
ddraw
);
}
static
HRESULT
WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetDirectDraw
(
IDirectDrawMediaStream
*
iface
,
...
...
dlls/amstream/tests/amstream.c
View file @
eb0b1d55
...
...
@@ -458,6 +458,8 @@ static void test_IDirectDrawStreamSample(void)
IDirectDrawMediaStream
*
pddstream
=
NULL
;
IDirectDrawStreamSample
*
pddsample
=
NULL
;
IDirectDrawSurface
*
surface
,
*
surface2
;
IDirectDraw
*
ddraw
,
*
ddraw2
;
IDirectDraw7
*
ddraw7
;
RECT
rect
;
if
(
!
(
pams
=
create_ammultimediastream
()))
...
...
@@ -482,6 +484,20 @@ static void test_IDirectDrawStreamSample(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
error
;
hr
=
IDirectDrawMediaStream_GetDirectDraw
(
pddstream
,
&
ddraw
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDirectDrawMediaStream_GetDirectDraw
(
pddstream
,
&
ddraw2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ddraw
==
ddraw2
,
"got %p, %p
\n
"
,
ddraw
,
ddraw2
);
hr
=
IDirectDraw_QueryInterface
(
ddraw
,
&
IID_IDirectDraw7
,
(
void
**
)
&
ddraw7
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDirectDraw7_Release
(
ddraw7
);
IDirectDraw_Release
(
ddraw2
);
IDirectDraw_Release
(
ddraw
);
hr
=
IDirectDrawMediaStream_CreateSample
(
pddstream
,
NULL
,
NULL
,
0
,
&
pddsample
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
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