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
3f3e7195
Commit
3f3e7195
authored
May 31, 2015
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jun 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap: Load the default renderer when it's not specified.
parent
982be1de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
5 deletions
+39
-5
capturegraph.c
dlls/qcap/capturegraph.c
+39
-5
No files found.
dlls/qcap/capturegraph.c
View file @
3f3e7195
...
...
@@ -371,6 +371,7 @@ fnCaptureGraphBuilder2_RenderStream(ICaptureGraphBuilder2 * iface,
{
CaptureGraphImpl
*
This
=
impl_from_ICaptureGraphBuilder2
(
iface
);
IPin
*
source_out
=
NULL
,
*
renderer_in
;
BOOL
rendererNeedsRelease
=
FALSE
;
BOOL
usedSmartTeePreviewPin
=
FALSE
;
HRESULT
hr
;
...
...
@@ -383,11 +384,6 @@ fnCaptureGraphBuilder2_RenderStream(ICaptureGraphBuilder2 * iface,
FIXME
(
"Need a capture graph
\n
"
);
return
E_UNEXPECTED
;
}
if
(
!
pfRenderer
)
{
FIXME
(
"pfRenderer == NULL not yet supported
\n
"
);
return
E_NOTIMPL
;
}
if
(
pCategory
&&
IsEqualIID
(
pCategory
,
&
PIN_CATEGORY_VBI
))
{
FIXME
(
"Tee/Sink-to-Sink filter not supported
\n
"
);
...
...
@@ -411,9 +407,45 @@ fnCaptureGraphBuilder2_RenderStream(ICaptureGraphBuilder2 * iface,
return
E_INVALIDARG
;
}
if
(
!
pfRenderer
)
{
IEnumMediaTypes
*
enumMedia
=
NULL
;
hr
=
IPin_EnumMediaTypes
(
source_out
,
&
enumMedia
);
if
(
SUCCEEDED
(
hr
))
{
AM_MEDIA_TYPE
*
mediaType
;
hr
=
IEnumMediaTypes_Next
(
enumMedia
,
1
,
&
mediaType
,
NULL
);
if
(
SUCCEEDED
(
hr
))
{
if
(
IsEqualIID
(
&
mediaType
->
majortype
,
&
MEDIATYPE_Video
))
{
hr
=
CoCreateInstance
(
&
CLSID_VideoRenderer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
pfRenderer
);
}
else
if
(
IsEqualIID
(
&
mediaType
->
majortype
,
&
MEDIATYPE_Audio
))
{
hr
=
CoCreateInstance
(
&
CLSID_DSoundRender
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
pfRenderer
);
}
else
{
FIXME
(
"cannot automatically load renderer for majortype %s
\n
"
,
debugstr_guid
(
&
mediaType
->
majortype
));
hr
=
E_FAIL
;
}
if
(
SUCCEEDED
(
hr
))
{
rendererNeedsRelease
=
TRUE
;
hr
=
IGraphBuilder_AddFilter
(
This
->
mygraph
,
pfRenderer
,
NULL
);
}
DeleteMediaType
(
mediaType
);
}
IEnumMediaTypes_Release
(
enumMedia
);
}
if
(
FAILED
(
hr
))
{
if
(
rendererNeedsRelease
)
IBaseFilter_Release
(
pfRenderer
);
IPin_Release
(
source_out
);
return
hr
;
}
}
hr
=
ICaptureGraphBuilder2_FindPin
(
iface
,
(
IUnknown
*
)
pfRenderer
,
PINDIR_INPUT
,
NULL
,
NULL
,
TRUE
,
0
,
&
renderer_in
);
if
(
FAILED
(
hr
))
{
if
(
rendererNeedsRelease
)
IBaseFilter_Release
(
pfRenderer
);
IPin_Release
(
source_out
);
return
hr
;
}
...
...
@@ -446,6 +478,8 @@ fnCaptureGraphBuilder2_RenderStream(ICaptureGraphBuilder2 * iface,
IPin_Release
(
source_out
);
IPin_Release
(
renderer_in
);
if
(
rendererNeedsRelease
)
IBaseFilter_Release
(
pfRenderer
);
if
(
SUCCEEDED
(
hr
)
&&
usedSmartTeePreviewPin
)
hr
=
VFW_S_NOPREVIEWPIN
;
return
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