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
2b016601
Commit
2b016601
authored
Nov 29, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Handle selecting default sync source better.
parent
f0ebe19b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
filtergraph.c
dlls/quartz/filtergraph.c
+30
-4
No files found.
dlls/quartz/filtergraph.c
View file @
2b016601
...
...
@@ -200,6 +200,7 @@ typedef struct _IFilterGraphImpl {
IUnknown
*
pUnkOuter
;
BOOL
bUnkOuterValid
;
BOOL
bAggregatable
;
BOOL
defaultclock
;
GUID
timeformatseek
;
REFERENCE_TIME
start_time
;
REFERENCE_TIME
pause_time
;
...
...
@@ -754,17 +755,38 @@ static HRESULT WINAPI FilterGraph2_Disconnect(IFilterGraph2 *iface, IPin *ppin)
static
HRESULT
WINAPI
FilterGraph2_SetDefaultSyncSource
(
IFilterGraph2
*
iface
)
{
ICOM_THIS_MULTI
(
IFilterGraphImpl
,
IFilterGraph2_vtbl
,
iface
);
IReferenceClock
*
pClock
=
NULL
;
HRESULT
hr
;
HRESULT
hr
=
S_OK
;
int
i
;
TRACE
(
"(%p/%p)->()
semi-stub
\n
"
,
iface
,
This
);
TRACE
(
"(%p/%p)->()
live sources not handled properly!
\n
"
,
iface
,
This
);
hr
=
CoCreateInstance
(
&
CLSID_SystemClock
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IReferenceClock
,
(
LPVOID
*
)
&
pClock
);
EnterCriticalSection
(
&
This
->
cs
);
for
(
i
=
0
;
i
<
This
->
nFilters
;
++
i
)
{
DWORD
miscflags
;
IAMFilterMiscFlags
*
flags
=
NULL
;
IUnknown_QueryInterface
(
This
->
ppFiltersInGraph
[
i
],
&
IID_IAMFilterMiscFlags
,
(
void
**
)
&
flags
);
if
(
!
flags
)
continue
;
miscflags
=
IAMFilterMiscFlags_GetMiscFlags
(
flags
);
IUnknown_Release
(
flags
);
if
(
miscflags
==
AM_FILTER_MISC_FLAGS_IS_RENDERER
)
IUnknown_QueryInterface
(
This
->
ppFiltersInGraph
[
i
],
&
IID_IReferenceClock
,
(
void
**
)
&
pClock
);
if
(
pClock
)
break
;
}
if
(
!
pClock
)
hr
=
CoCreateInstance
(
&
CLSID_SystemClock
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IReferenceClock
,
(
LPVOID
*
)
&
pClock
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaFilter_SetSyncSource
((
IMediaFilter
*
)
&
(
This
->
IMediaFilter_vtbl
),
pClock
);
This
->
defaultclock
=
TRUE
;
IReferenceClock_Release
(
pClock
);
}
LeaveCriticalSection
(
&
This
->
cs
);
return
hr
;
}
...
...
@@ -1931,6 +1953,9 @@ static HRESULT WINAPI MediaControl_Run(IMediaControl *iface) {
goto
out
;
This
->
EcCompleteCount
=
0
;
if
(
This
->
defaultclock
&&
!
This
->
refClock
)
IFilterGraph2_SetDefaultSyncSource
((
IFilterGraph2
*
)
This
);
if
(
This
->
refClock
)
{
REFERENCE_TIME
now
;
...
...
@@ -5075,6 +5100,7 @@ static HRESULT WINAPI MediaFilter_SetSyncSource(IMediaFilter *iface, IReferenceC
This
->
refClock
=
pClock
;
if
(
This
->
refClock
)
IReferenceClock_AddRef
(
This
->
refClock
);
This
->
defaultclock
=
FALSE
;
if
(
This
->
HandleEcClockChanged
)
{
...
...
@@ -5428,6 +5454,7 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
fimpl
->
pUnkOuter
=
pUnkOuter
;
fimpl
->
bUnkOuterValid
=
FALSE
;
fimpl
->
bAggregatable
=
FALSE
;
fimpl
->
defaultclock
=
TRUE
;
fimpl
->
IInner_vtbl
=
&
IInner_VTable
;
fimpl
->
IFilterGraph2_vtbl
=
&
IFilterGraph2_VTable
;
fimpl
->
IMediaControl_vtbl
=
&
IMediaControl_VTable
;
...
...
@@ -5490,7 +5517,6 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
CoTaskMemFree
(
fimpl
);
return
hr
;
}
IFilterGraph2_SetDefaultSyncSource
((
IFilterGraph2
*
)
fimpl
);
*
ppObj
=
fimpl
;
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