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
e1a72011
Commit
e1a72011
authored
Mar 30, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: More additions to BaseRenderer for video renderers.
parent
821ead20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
renderer.c
dlls/strmbase/renderer.c
+39
-0
strmbase.h
include/wine/strmbase.h
+4
-0
No files found.
dlls/strmbase/renderer.c
View file @
e1a72011
...
...
@@ -82,6 +82,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
if
(
renderer
->
pFuncsTable
->
pfnBreakConnect
)
hr
=
renderer
->
pFuncsTable
->
pfnBreakConnect
(
renderer
);
}
BaseRendererImpl_ClearPendingSample
(
renderer
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
return
hr
;
...
...
@@ -254,6 +255,9 @@ HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtb
InitializeCriticalSection
(
&
This
->
csRenderLock
);
This
->
csRenderLock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": BaseRenderer.csRenderLock"
);
This
->
evComplete
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
This
->
ThreadSignal
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
This
->
RenderEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
This
->
pMediaSample
=
NULL
;
}
return
hr
;
...
...
@@ -291,7 +295,11 @@ ULONG WINAPI BaseRendererImpl_Release(IBaseFilter* iface)
This
->
csRenderLock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
csRenderLock
);
BaseRendererImpl_ClearPendingSample
(
This
);
CloseHandle
(
This
->
evComplete
);
CloseHandle
(
This
->
ThreadSignal
);
CloseHandle
(
This
->
RenderEvent
);
}
return
refCount
;
}
...
...
@@ -318,6 +326,9 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
}
}
This
->
pMediaSample
=
pSample
;
IMediaSample_AddRef
(
pSample
);
if
(
This
->
pFuncsTable
->
pfnPrepareReceive
)
hr
=
This
->
pFuncsTable
->
pfnPrepareReceive
(
This
,
pSample
);
if
(
FAILED
(
hr
))
...
...
@@ -368,6 +379,8 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
if
(
SUCCEEDED
(
hr
))
hr
=
This
->
pFuncsTable
->
pfnDoRenderSample
(
This
,
pSample
);
BaseRendererImpl_ClearPendingSample
(
This
);
LeaveCriticalSection
(
&
This
->
csRenderLock
);
return
hr
;
...
...
@@ -405,6 +418,8 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
This
->
pFuncsTable
->
pfnOnStopStreaming
(
This
);
This
->
filter
.
state
=
State_Stopped
;
SetEvent
(
This
->
evComplete
);
SetEvent
(
This
->
ThreadSignal
);
SetEvent
(
This
->
RenderEvent
);
}
LeaveCriticalSection
(
&
This
->
csRenderLock
);
...
...
@@ -423,6 +438,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
goto
out
;
SetEvent
(
This
->
evComplete
);
ResetEvent
(
This
->
ThreadSignal
);
if
(
This
->
pInputPin
->
pin
.
pConnectedTo
)
{
...
...
@@ -443,6 +459,9 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
{
if
(
This
->
pFuncsTable
->
pfnOnStartStreaming
)
This
->
pFuncsTable
->
pfnOnStartStreaming
(
This
);
if
(
This
->
filter
.
state
==
State_Stopped
)
BaseRendererImpl_ClearPendingSample
(
This
);
SetEvent
(
This
->
RenderEvent
);
This
->
filter
.
state
=
State_Running
;
}
out:
...
...
@@ -469,9 +488,14 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
}
else
if
(
This
->
pFuncsTable
->
pfnOnStopStreaming
)
This
->
pFuncsTable
->
pfnOnStopStreaming
(
This
);
if
(
This
->
filter
.
state
==
State_Stopped
)
BaseRendererImpl_ClearPendingSample
(
This
);
ResetEvent
(
This
->
RenderEvent
);
This
->
filter
.
state
=
State_Paused
;
}
}
ResetEvent
(
This
->
ThreadSignal
);
LeaveCriticalSection
(
&
This
->
csRenderLock
);
return
S_OK
;
...
...
@@ -520,6 +544,9 @@ HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface)
HRESULT
WINAPI
BaseRendererImpl_BeginFlush
(
BaseRenderer
*
iface
)
{
TRACE
(
"(%p)
\n
"
,
iface
);
BaseRendererImpl_ClearPendingSample
(
iface
);
SetEvent
(
iface
->
ThreadSignal
);
SetEvent
(
iface
->
RenderEvent
);
return
S_OK
;
}
...
...
@@ -527,5 +554,17 @@ HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface)
{
TRACE
(
"(%p)
\n
"
,
iface
);
RendererPosPassThru_ResetMediaTime
(
iface
->
pPosition
);
ResetEvent
(
iface
->
ThreadSignal
);
ResetEvent
(
iface
->
RenderEvent
);
return
S_OK
;
}
HRESULT
WINAPI
BaseRendererImpl_ClearPendingSample
(
BaseRenderer
*
iface
)
{
if
(
iface
->
pMediaSample
)
{
IMediaSample_Release
(
iface
->
pMediaSample
);
iface
->
pMediaSample
=
NULL
;
}
return
S_OK
;
}
include/wine/strmbase.h
View file @
e1a72011
...
...
@@ -583,6 +583,9 @@ typedef struct BaseRendererTag
IUnknown
*
pPosition
;
CRITICAL_SECTION
csRenderLock
;
HANDLE
evComplete
;
HANDLE
ThreadSignal
;
HANDLE
RenderEvent
;
IMediaSample
*
pMediaSample
;
const
struct
BaseRendererFuncTable
*
pFuncsTable
;
}
BaseRenderer
;
...
...
@@ -639,6 +642,7 @@ HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsT
HRESULT
WINAPI
BaseRendererImpl_EndOfStream
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRendererImpl_BeginFlush
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRendererImpl_EndFlush
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRendererImpl_ClearPendingSample
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRenderer_Init
(
BaseRenderer
*
This
,
const
IBaseFilterVtbl
*
Vtbl
,
IUnknown
*
pUnkOuter
,
const
CLSID
*
pClsid
,
DWORD_PTR
DebugInfo
,
const
BaseRendererFuncTable
*
pBaseFuncsTable
);
...
...
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