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
af50b499
Commit
af50b499
authored
Jul 20, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Remove some no longer used callbacks.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f467402
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
71 deletions
+25
-71
renderer.c
dlls/strmbase/renderer.c
+25
-61
strmbase.h
include/wine/strmbase.h
+0
-10
No files found.
dlls/strmbase/renderer.c
View file @
af50b499
...
...
@@ -194,7 +194,6 @@ static HRESULT sink_eos(struct strmbase_sink *iface)
struct
strmbase_renderer
*
filter
=
impl_from_IPin
(
&
iface
->
pin
.
IPin_iface
);
IFilterGraph
*
graph
=
filter
->
filter
.
graph
;
IMediaEventSink
*
event_sink
;
HRESULT
hr
=
S_OK
;
EnterCriticalSection
(
&
filter
->
csRenderLock
);
...
...
@@ -210,11 +209,8 @@ static HRESULT sink_eos(struct strmbase_sink *iface)
strmbase_passthrough_eos
(
&
filter
->
passthrough
);
SetEvent
(
filter
->
state_event
);
if
(
filter
->
pFuncsTable
->
pfnEndOfStream
)
hr
=
filter
->
pFuncsTable
->
pfnEndOfStream
(
filter
);
LeaveCriticalSection
(
&
filter
->
csRenderLock
);
return
hr
;
return
S_OK
;
}
static
HRESULT
sink_begin_flush
(
struct
strmbase_sink
*
iface
)
...
...
@@ -229,7 +225,6 @@ static HRESULT sink_begin_flush(struct strmbase_sink *iface)
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
);
...
...
@@ -238,11 +233,8 @@ static HRESULT sink_end_flush(struct strmbase_sink *iface)
strmbase_passthrough_invalidate_time
(
&
filter
->
passthrough
);
ResetEvent
(
filter
->
flush_event
);
if
(
filter
->
pFuncsTable
->
pfnEndFlush
)
hr
=
filter
->
pFuncsTable
->
pfnEndFlush
(
filter
);
LeaveCriticalSection
(
&
filter
->
csRenderLock
);
return
hr
;
return
S_OK
;
}
static
const
struct
strmbase_sink_ops
sink_ops
=
...
...
@@ -277,9 +269,9 @@ void strmbase_renderer_cleanup(struct strmbase_renderer *filter)
HRESULT
WINAPI
BaseRendererImpl_Receive
(
struct
strmbase_renderer
*
This
,
IMediaSample
*
pSample
)
{
HRESULT
hr
=
S_OK
;
REFERENCE_TIME
start
,
stop
;
AM_MEDIA_TYPE
*
pmt
;
HRESULT
hr
;
TRACE
(
"(%p)->%p
\n
"
,
This
,
pSample
);
...
...
@@ -301,16 +293,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
DeleteMediaType
(
pmt
);
}
if
(
This
->
pFuncsTable
->
pfnPrepareReceive
)
hr
=
This
->
pFuncsTable
->
pfnPrepareReceive
(
This
,
pSample
);
if
(
FAILED
(
hr
))
{
if
(
hr
==
VFW_E_SAMPLE_REJECTED
)
return
S_OK
;
else
return
hr
;
}
EnterCriticalSection
(
&
This
->
csRenderLock
);
if
(
This
->
filter
.
state
==
State_Paused
)
SetEvent
(
This
->
state_event
);
...
...
@@ -318,59 +300,41 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
/* Wait for render Time */
if
(
This
->
filter
.
clock
&&
SUCCEEDED
(
IMediaSample_GetTime
(
pSample
,
&
start
,
&
stop
)))
{
hr
=
S_FALSE
;
strmbase_passthrough_update_time
(
&
This
->
passthrough
,
start
);
if
(
This
->
pFuncsTable
->
pfnShouldDrawSampleNow
)
hr
=
This
->
pFuncsTable
->
pfnShouldDrawSampleNow
(
This
,
pSample
,
&
start
,
&
stop
);
if
(
hr
==
S_OK
)
;
/* Do not wait: drop through */
else
if
(
hr
==
S_FALSE
)
{
REFERENCE_TIME
now
;
DWORD_PTR
cookie
;
REFERENCE_TIME
now
;
DWORD_PTR
cookie
;
IReferenceClock_GetTime
(
This
->
filter
.
clock
,
&
now
);
strmbase_passthrough_update_time
(
&
This
->
passthrough
,
start
);
if
(
now
-
This
->
stream_start
-
start
<=
-
10000
)
{
HANDLE
handles
[
2
]
=
{
This
->
advise_event
,
This
->
flush_event
};
DWORD
ret
;
IReferenceClock_GetTime
(
This
->
filter
.
clock
,
&
now
);
IReferenceClock_AdviseTime
(
This
->
filter
.
clock
,
This
->
stream_start
,
start
,
(
HEVENT
)
This
->
advise_event
,
&
cookie
);
if
(
now
-
This
->
stream_start
-
start
<=
-
10000
)
{
HANDLE
handles
[
2
]
=
{
This
->
advise_event
,
This
->
flush_event
};
DWORD
ret
;
LeaveCriticalSection
(
&
This
->
csRenderLock
);
IReferenceClock_AdviseTime
(
This
->
filter
.
clock
,
This
->
stream_start
,
start
,
(
HEVENT
)
This
->
advise_event
,
&
cookie
);
ret
=
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
INFINITE
);
IReferenceClock_Unadvise
(
This
->
filter
.
clock
,
cookie
);
LeaveCriticalSection
(
&
This
->
csRenderLock
);
if
(
ret
==
1
)
{
TRACE
(
"Flush signaled, discarding current sample.
\n
"
);
return
S_OK
;
}
ret
=
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
INFINITE
);
IReferenceClock_Unadvise
(
This
->
filter
.
clock
,
cookie
);
EnterCriticalSection
(
&
This
->
csRenderLock
);
if
(
ret
==
1
)
{
TRACE
(
"Flush signaled, discarding current sample.
\n
"
);
return
S_OK
;
}
}
else
{
LeaveCriticalSection
(
&
This
->
csRenderLock
);
/* Drop Sample */
return
S_OK
;
EnterCriticalSection
(
&
This
->
csRenderLock
);
}
}
else
start
=
stop
=
-
1
;
if
(
SUCCEEDED
(
hr
))
{
QualityControlRender_BeginRender
(
&
This
->
qc
,
start
,
stop
);
hr
=
This
->
pFuncsTable
->
pfnDoRenderSample
(
This
,
pSample
);
QualityControlRender_EndRender
(
&
This
->
qc
);
}
QualityControlRender_BeginRender
(
&
This
->
qc
,
start
,
stop
);
hr
=
This
->
pFuncsTable
->
pfnDoRenderSample
(
This
,
pSample
);
QualityControlRender_EndRender
(
&
This
->
qc
);
QualityControlRender_DoQOS
(
&
This
->
qc
);
LeaveCriticalSection
(
&
This
->
csRenderLock
);
...
...
include/wine/strmbase.h
View file @
af50b499
...
...
@@ -318,12 +318,6 @@ struct strmbase_renderer
typedef
HRESULT
(
WINAPI
*
BaseRenderer_CheckMediaType
)(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_DoRenderSample
)(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_ShouldDrawSampleNow
)(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
,
REFERENCE_TIME
*
start
,
REFERENCE_TIME
*
end
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_PrepareReceive
)(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_EndOfStream
)(
struct
strmbase_renderer
*
iface
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_BeginFlush
)
(
struct
strmbase_renderer
*
iface
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_EndFlush
)
(
struct
strmbase_renderer
*
iface
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_BreakConnect
)
(
struct
strmbase_renderer
*
iface
);
struct
strmbase_renderer_ops
...
...
@@ -333,12 +327,8 @@ struct strmbase_renderer_ops
void
(
*
renderer_init_stream
)(
struct
strmbase_renderer
*
iface
);
void
(
*
renderer_start_stream
)(
struct
strmbase_renderer
*
iface
);
void
(
*
renderer_stop_stream
)(
struct
strmbase_renderer
*
iface
);
BaseRenderer_ShouldDrawSampleNow
pfnShouldDrawSampleNow
;
BaseRenderer_PrepareReceive
pfnPrepareReceive
;
HRESULT
(
*
renderer_connect
)(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
);
BaseRenderer_BreakConnect
pfnBreakConnect
;
BaseRenderer_EndOfStream
pfnEndOfStream
;
BaseRenderer_EndFlush
pfnEndFlush
;
void
(
*
renderer_destroy
)(
struct
strmbase_renderer
*
iface
);
HRESULT
(
*
renderer_query_interface
)(
struct
strmbase_renderer
*
iface
,
REFIID
iid
,
void
**
out
);
HRESULT
(
*
renderer_pin_query_interface
)(
struct
strmbase_renderer
*
iface
,
REFIID
iid
,
void
**
out
);
...
...
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