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
6c55e734
Commit
6c55e734
authored
Sep 01, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Move multimedia_stream_create() to avoid forward declarations.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0d7d1ba2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
31 deletions
+28
-31
multimedia.c
dlls/amstream/multimedia.c
+28
-31
No files found.
dlls/amstream/multimedia.c
View file @
6c55e734
...
...
@@ -50,37 +50,6 @@ static inline struct multimedia_stream *impl_from_IAMMultiMediaStream(IAMMultiMe
return
CONTAINING_RECORD
(
iface
,
struct
multimedia_stream
,
IAMMultiMediaStream_iface
);
}
static
const
struct
IAMMultiMediaStreamVtbl
multimedia_stream_vtbl
;
HRESULT
multimedia_stream_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
struct
multimedia_stream
*
object
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppObj
);
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
(
object
=
heap_alloc_zero
(
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
object
->
IAMMultiMediaStream_iface
.
lpVtbl
=
&
multimedia_stream_vtbl
;
object
->
ref
=
1
;
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
CLSID_MediaStreamFilter
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMediaStreamFilter
,
(
void
**
)
&
object
->
filter
)))
{
ERR
(
"Failed to create stream filter, hr %#x.
\n
"
,
hr
);
heap_free
(
object
);
return
hr
;
}
*
ppObj
=
&
object
->
IAMMultiMediaStream_iface
;
return
S_OK
;
}
/*** IUnknown methods ***/
static
HRESULT
WINAPI
multimedia_stream_QueryInterface
(
IAMMultiMediaStream
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -492,3 +461,31 @@ static const IAMMultiMediaStreamVtbl multimedia_stream_vtbl =
multimedia_stream_OpenMoniker
,
multimedia_stream_Render
};
HRESULT
multimedia_stream_create
(
IUnknown
*
outer
,
void
**
out
)
{
struct
multimedia_stream
*
object
;
HRESULT
hr
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
(
object
=
heap_alloc_zero
(
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
object
->
IAMMultiMediaStream_iface
.
lpVtbl
=
&
multimedia_stream_vtbl
;
object
->
ref
=
1
;
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
CLSID_MediaStreamFilter
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMediaStreamFilter
,
(
void
**
)
&
object
->
filter
)))
{
ERR
(
"Failed to create stream filter, hr %#x.
\n
"
,
hr
);
heap_free
(
object
);
return
hr
;
}
TRACE
(
"Created multimedia stream %p.
\n
"
,
object
);
*
out
=
&
object
->
IAMMultiMediaStream_iface
;
return
S_OK
;
}
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