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
27bfdc2a
Commit
27bfdc2a
authored
Jun 24, 2006
by
Ivan Leo
Committed by
Alexandre Julliard
Jun 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Implement IAMMultiMediaStreamImpl_OpenFile and IAMMultiMediaStreamImpl_OpenMoniker.
parent
81745f1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
4 deletions
+66
-4
amstream.c
dlls/amstream/amstream.c
+66
-4
No files found.
dlls/amstream/amstream.c
View file @
27bfdc2a
...
...
@@ -2,6 +2,7 @@
* Implementation of IAMMultiMediaStream Interface
*
* Copyright 2004 Christian Costa
* Copyright 2006 Ivan Leo Puoti
*
* This file contains the (internal) driver registration functions,
* driver enumeration APIs and DirectDraw creation functions.
...
...
@@ -38,6 +39,8 @@ typedef struct {
IAMMultiMediaStream
lpVtbl
;
LONG
ref
;
IGraphBuilder
*
pFilterGraph
;
IPin
*
ipin
;
IGraphBuilder
*
GraphBuilder
;
ULONG
nbStreams
;
IMediaStream
**
pStreams
;
STREAM_TYPE
StreamType
;
...
...
@@ -280,11 +283,67 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
static
HRESULT
WINAPI
IAMMultiMediaStreamImpl_OpenFile
(
IAMMultiMediaStream
*
iface
,
LPCWSTR
pszFileName
,
DWORD
dwFlags
)
{
HRESULT
ret
;
IAMMultiMediaStreamImpl
*
This
=
(
IAMMultiMediaStreamImpl
*
)
iface
;
IFileSourceFilter
*
SourceFilter
;
IBaseFilter
*
BaseFilter
;
IEnumPins
*
EnumPins
;
IPin
*
ipin
;
PIN_DIRECTION
pin_direction
;
FIXME
(
"(%p/%p)->(%s,%lx) stub!
\n
"
,
This
,
iface
,
debugstr_w
(
pszFileName
),
dwFlags
);
TRACE
(
"(%p/%p)->(%s,%lx)
\n
"
,
This
,
iface
,
debugstr_w
(
pszFileName
),
dwFlags
);
return
E_NOTIMPL
;
ret
=
CoCreateInstance
(
&
CLSID_AsyncReader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFileSourceFilter
,
(
void
**
)
&
SourceFilter
);
if
(
ret
!=
S_OK
)
return
ret
;
ret
=
IFileSourceFilter_Load
(
SourceFilter
,
pszFileName
,
NULL
);
if
(
ret
!=
S_OK
)
{
IFileSourceFilter_Release
(
SourceFilter
);
return
ret
;
}
ret
=
IFileSourceFilter_QueryInterface
(
SourceFilter
,
&
IID_IBaseFilter
,
(
void
**
)
&
BaseFilter
);
if
(
ret
!=
S_OK
)
{
IFileSourceFilter_Release
(
SourceFilter
);
return
ret
;
}
ret
=
IBaseFilter_EnumPins
(
BaseFilter
,
&
EnumPins
);
if
(
ret
!=
S_OK
)
{
goto
end
;
}
ret
=
IEnumPins_Next
(
EnumPins
,
1
,
&
ipin
,
NULL
);
if
(
ret
==
S_OK
)
{
ret
=
IPin_QueryDirection
(
ipin
,
&
pin_direction
);
IEnumPins_Release
(
EnumPins
);
if
(
ret
==
S_OK
&&
pin_direction
==
PINDIR_OUTPUT
)
This
->
ipin
=
ipin
;
else
goto
end
;
}
else
{
IEnumPins_Release
(
EnumPins
);
goto
end
;
}
ret
=
IFilterGraph_QueryInterface
(
This
->
pFilterGraph
,
&
IID_IGraphBuilder
,
(
void
**
)
&
This
->
GraphBuilder
);
if
(
ret
!=
S_OK
)
{
goto
end
;
}
ret
=
IGraphBuilder_AddSourceFilter
(
This
->
GraphBuilder
,
pszFileName
,
pszFileName
,
&
BaseFilter
);
end:
IBaseFilter_Release
(
BaseFilter
);
IFileSourceFilter_Release
(
SourceFilter
);
return
ret
;
}
static
HRESULT
WINAPI
IAMMultiMediaStreamImpl_OpenMoniker
(
IAMMultiMediaStream
*
iface
,
IBindCtx
*
pCtx
,
IMoniker
*
pMoniker
,
DWORD
dwFlags
)
...
...
@@ -300,9 +359,12 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface,
{
IAMMultiMediaStreamImpl
*
This
=
(
IAMMultiMediaStreamImpl
*
)
iface
;
FIXME
(
"(%p/%p)->(%lx)
stub!
\n
"
,
This
,
iface
,
dwFlags
);
FIXME
(
"(%p/%p)->(%lx)
\n
"
,
This
,
iface
,
dwFlags
);
return
E_NOTIMPL
;
if
(
dwFlags
!=
AMMSF_NOCLOCK
)
return
E_INVALIDARG
;
return
IGraphBuilder_Render
(
This
->
GraphBuilder
,
This
->
ipin
);
}
static
const
IAMMultiMediaStreamVtbl
AM_Vtbl
=
...
...
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