Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
57a7d6d4
Commit
57a7d6d4
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: Introduce callbacks for streaming events.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98ccda3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
12 deletions
+34
-12
pin.c
dlls/strmbase/pin.c
+30
-12
strmbase.h
include/wine/strmbase.h
+4
-0
No files found.
dlls/strmbase/pin.c
View file @
57a7d6d4
...
...
@@ -718,6 +718,9 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
TRACE
(
"(%p)->()
\n
"
,
This
);
if
(
This
->
pFuncsTable
->
sink_eos
)
return
This
->
pFuncsTable
->
sink_eos
(
This
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
This
->
flushing
)
hr
=
S_FALSE
;
...
...
@@ -735,15 +738,21 @@ static HRESULT deliver_beginflush(IPin* pin, LPVOID unused)
HRESULT
WINAPI
BaseInputPinImpl_BeginFlush
(
IPin
*
iface
)
{
struct
strmbase_sink
*
This
=
impl_sink_from_IPin
(
iface
);
struct
strmbase_sink
*
pin
=
impl_sink_from_IPin
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p) semi-stub
\n
"
,
This
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
This
->
flushing
=
TRUE
;
TRACE
(
"pin %p.
\n
"
,
pin
);
hr
=
SendFurther
(
This
,
deliver_beginflush
,
NULL
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
EnterCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
pin
->
flushing
=
TRUE
;
if
(
pin
->
pFuncsTable
->
sink_begin_flush
)
hr
=
pin
->
pFuncsTable
->
sink_begin_flush
(
pin
);
else
hr
=
SendFurther
(
pin
,
deliver_beginflush
,
NULL
);
LeaveCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -755,15 +764,21 @@ static HRESULT deliver_endflush(IPin* pin, LPVOID unused)
HRESULT
WINAPI
BaseInputPinImpl_EndFlush
(
IPin
*
iface
)
{
struct
strmbase_sink
*
This
=
impl_sink_from_IPin
(
iface
);
struct
strmbase_sink
*
pin
=
impl_sink_from_IPin
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
This
->
flushing
=
FALSE
;
TRACE
(
"pin %p.
\n
"
,
pin
);
hr
=
SendFurther
(
This
,
deliver_endflush
,
NULL
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
EnterCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
pin
->
flushing
=
FALSE
;
if
(
pin
->
pFuncsTable
->
sink_end_flush
)
hr
=
pin
->
pFuncsTable
->
sink_end_flush
(
pin
);
else
hr
=
SendFurther
(
pin
,
deliver_endflush
,
NULL
);
LeaveCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -788,6 +803,9 @@ HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, R
TRACE
(
"iface %p, start %s, stop %s, rate %.16e.
\n
"
,
iface
,
debugstr_time
(
start
),
debugstr_time
(
stop
),
rate
);
if
(
pin
->
pFuncsTable
->
sink_new_segment
)
return
pin
->
pFuncsTable
->
sink_new_segment
(
pin
,
start
,
stop
,
rate
);
args
.
tStart
=
start
;
args
.
tStop
=
stop
;
args
.
rate
=
rate
;
...
...
include/wine/strmbase.h
View file @
57a7d6d4
...
...
@@ -95,6 +95,10 @@ struct strmbase_sink_ops
BaseInputPin_Receive
pfnReceive
;
HRESULT
(
*
sink_connect
)(
struct
strmbase_sink
*
pin
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
);
void
(
*
sink_disconnect
)(
struct
strmbase_sink
*
pin
);
HRESULT
(
*
sink_eos
)(
struct
strmbase_sink
*
pin
);
HRESULT
(
*
sink_begin_flush
)(
struct
strmbase_sink
*
pin
);
HRESULT
(
*
sink_end_flush
)(
struct
strmbase_sink
*
pin
);
HRESULT
(
*
sink_new_segment
)(
struct
strmbase_sink
*
pin
,
REFERENCE_TIME
start
,
REFERENCE_TIME
stop
,
double
rate
);
};
/* Base Pin */
...
...
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