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
a43d8173
Commit
a43d8173
authored
Dec 12, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase/renderer: Use base sink streaming methods.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da5a544b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
74 deletions
+63
-74
renderer.c
dlls/strmbase/renderer.c
+63
-74
No files found.
dlls/strmbase/renderer.c
View file @
a43d8173
...
...
@@ -40,77 +40,6 @@ static inline struct strmbase_renderer *impl_from_IPin(IPin *iface)
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_renderer
,
sink
.
pin
.
IPin_iface
);
}
static
HRESULT
WINAPI
BaseRenderer_InputPin_EndOfStream
(
IPin
*
iface
)
{
struct
strmbase_renderer
*
filter
=
impl_from_IPin
(
iface
);
IFilterGraph
*
graph
=
filter
->
filter
.
filterInfo
.
pGraph
;
IMediaEventSink
*
event_sink
;
HRESULT
hr
=
S_OK
;
TRACE
(
"iface %p.
\n
"
,
iface
);
EnterCriticalSection
(
&
filter
->
csRenderLock
);
filter
->
eos
=
TRUE
;
if
(
graph
&&
SUCCEEDED
(
IFilterGraph_QueryInterface
(
graph
,
&
IID_IMediaEventSink
,
(
void
**
)
&
event_sink
)))
{
IMediaEventSink_Notify
(
event_sink
,
EC_COMPLETE
,
S_OK
,
(
LONG_PTR
)
&
filter
->
filter
.
IBaseFilter_iface
);
IMediaEventSink_Release
(
event_sink
);
}
RendererPosPassThru_EOS
(
filter
->
pPosition
);
SetEvent
(
filter
->
state_event
);
if
(
filter
->
pFuncsTable
->
pfnEndOfStream
)
hr
=
filter
->
pFuncsTable
->
pfnEndOfStream
(
filter
);
LeaveCriticalSection
(
&
filter
->
csRenderLock
);
return
hr
;
}
static
HRESULT
WINAPI
BaseRenderer_InputPin_BeginFlush
(
IPin
*
iface
)
{
struct
strmbase_renderer
*
pFilter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
EnterCriticalSection
(
&
pFilter
->
filter
.
csFilter
);
hr
=
BaseInputPinImpl_BeginFlush
(
iface
);
if
(
SUCCEEDED
(
hr
))
{
BaseRendererImpl_ClearPendingSample
(
pFilter
);
SetEvent
(
pFilter
->
flush_event
);
}
LeaveCriticalSection
(
&
pFilter
->
filter
.
csFilter
);
return
hr
;
}
static
HRESULT
WINAPI
BaseRenderer_InputPin_EndFlush
(
IPin
*
iface
)
{
struct
strmbase_renderer
*
pFilter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
EnterCriticalSection
(
&
pFilter
->
filter
.
csFilter
);
EnterCriticalSection
(
&
pFilter
->
csRenderLock
);
pFilter
->
eos
=
FALSE
;
hr
=
BaseInputPinImpl_EndFlush
(
iface
);
if
(
SUCCEEDED
(
hr
))
{
QualityControlRender_Start
(
pFilter
->
qcimpl
,
pFilter
->
stream_start
);
RendererPosPassThru_ResetMediaTime
(
pFilter
->
pPosition
);
ResetEvent
(
pFilter
->
flush_event
);
if
(
pFilter
->
pFuncsTable
->
pfnEndFlush
)
hr
=
pFilter
->
pFuncsTable
->
pfnEndFlush
(
pFilter
);
}
LeaveCriticalSection
(
&
pFilter
->
csRenderLock
);
LeaveCriticalSection
(
&
pFilter
->
filter
.
csFilter
);
return
hr
;
}
static
const
IPinVtbl
BaseRenderer_InputPin_Vtbl
=
{
BasePinImpl_QueryInterface
,
...
...
@@ -127,9 +56,9 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
BasePinImpl_QueryAccept
,
BasePinImpl_EnumMediaTypes
,
BasePinImpl_QueryInternalConnections
,
Base
Renderer_InputPin
_EndOfStream
,
Base
Renderer_InputPin
_BeginFlush
,
Base
Renderer_InputPin
_EndFlush
,
Base
InputPinImpl
_EndOfStream
,
Base
InputPinImpl
_BeginFlush
,
Base
InputPinImpl
_EndFlush
,
BaseInputPinImpl_NewSegment
};
...
...
@@ -289,6 +218,63 @@ static void sink_disconnect(struct strmbase_sink *iface)
filter
->
pFuncsTable
->
pfnBreakConnect
(
filter
);
}
static
HRESULT
sink_eos
(
struct
strmbase_sink
*
iface
)
{
struct
strmbase_renderer
*
filter
=
impl_from_IPin
(
&
iface
->
pin
.
IPin_iface
);
IFilterGraph
*
graph
=
filter
->
filter
.
filterInfo
.
pGraph
;
IMediaEventSink
*
event_sink
;
HRESULT
hr
=
S_OK
;
EnterCriticalSection
(
&
filter
->
csRenderLock
);
filter
->
eos
=
TRUE
;
if
(
graph
&&
SUCCEEDED
(
IFilterGraph_QueryInterface
(
graph
,
&
IID_IMediaEventSink
,
(
void
**
)
&
event_sink
)))
{
IMediaEventSink_Notify
(
event_sink
,
EC_COMPLETE
,
S_OK
,
(
LONG_PTR
)
&
filter
->
filter
.
IBaseFilter_iface
);
IMediaEventSink_Release
(
event_sink
);
}
RendererPosPassThru_EOS
(
filter
->
pPosition
);
SetEvent
(
filter
->
state_event
);
if
(
filter
->
pFuncsTable
->
pfnEndOfStream
)
hr
=
filter
->
pFuncsTable
->
pfnEndOfStream
(
filter
);
LeaveCriticalSection
(
&
filter
->
csRenderLock
);
return
hr
;
}
static
HRESULT
sink_begin_flush
(
struct
strmbase_sink
*
iface
)
{
struct
strmbase_renderer
*
filter
=
impl_from_IPin
(
&
iface
->
pin
.
IPin_iface
);
BaseRendererImpl_ClearPendingSample
(
filter
);
SetEvent
(
filter
->
flush_event
);
return
S_OK
;
}
static
HRESULT
sink_end_flush
(
struct
strmbase_sink
*
iface
)
{
struct
strmbase_renderer
*
filter
=
impl_from_IPin
(
&
iface
->
pin
.
IPin_iface
);
HRESULT
hr
=
S_OK
;
EnterCriticalSection
(
&
filter
->
csRenderLock
);
filter
->
eos
=
FALSE
;
QualityControlRender_Start
(
filter
->
qcimpl
,
filter
->
stream_start
);
RendererPosPassThru_ResetMediaTime
(
filter
->
pPosition
);
ResetEvent
(
filter
->
flush_event
);
if
(
filter
->
pFuncsTable
->
pfnEndFlush
)
hr
=
filter
->
pFuncsTable
->
pfnEndFlush
(
filter
);
LeaveCriticalSection
(
&
filter
->
csRenderLock
);
return
hr
;
}
static
const
struct
strmbase_sink_ops
sink_ops
=
{
.
base
.
pin_query_accept
=
sink_query_accept
,
...
...
@@ -297,6 +283,9 @@ static const struct strmbase_sink_ops sink_ops =
.
pfnReceive
=
BaseRenderer_Receive
,
.
sink_connect
=
sink_connect
,
.
sink_disconnect
=
sink_disconnect
,
.
sink_eos
=
sink_eos
,
.
sink_begin_flush
=
sink_begin_flush
,
.
sink_end_flush
=
sink_end_flush
,
};
void
strmbase_renderer_cleanup
(
struct
strmbase_renderer
*
filter
)
...
...
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