Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
27bfdc2a
Commit
27bfdc2a
authored
18 years ago
by
Ivan Leo Puoti
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
amstream: Implement IAMMultiMediaStreamImpl_OpenFile and IAMMultiMediaStreamImpl_OpenMoniker.
parent
81745f1c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/amstream/amstream.c
+66
-4
66 additions, 4 deletions
dlls/amstream/amstream.c
with
66 additions
and
4 deletions
dlls/amstream/amstream.c
+
66
−
4
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
;
FIXM
E
(
"(%p/%p)->(%s,%lx)
stub!
\n
"
,
This
,
iface
,
debugstr_w
(
pszFileName
),
dwFlags
);
TRAC
E
(
"(%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
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment