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
db7eb332
Commit
db7eb332
authored
Oct 27, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Pass a strmbase_pin pointer to QualityControlImpl_Create().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8655691a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
28 deletions
+21
-28
qualitycontrol.c
dlls/strmbase/qualitycontrol.c
+16
-21
renderer.c
dlls/strmbase/renderer.c
+1
-1
strmbase_private.h
dlls/strmbase/strmbase_private.h
+2
-3
transform.c
dlls/strmbase/transform.c
+2
-3
No files found.
dlls/strmbase/qualitycontrol.c
View file @
db7eb332
...
...
@@ -27,16 +27,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase_qc
);
HRESULT
QualityControlImpl_Create
(
IPin
*
input
,
IBaseFilter
*
self
,
QualityControlImpl
**
ppv
)
HRESULT
QualityControlImpl_Create
(
struct
strmbase_pin
*
pin
,
QualityControlImpl
**
ppv
)
{
QualityControlImpl
*
This
;
TRACE
(
"%p, %p, %p
\n
"
,
input
,
self
,
ppv
);
*
ppv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
QualityControlImpl
));
if
(
!*
ppv
)
return
E_OUTOFMEMORY
;
This
=
*
ppv
;
This
->
input
=
input
;
This
->
self
=
self
;
This
->
pin
=
pin
;
This
->
tonotify
=
NULL
;
This
->
clock
=
NULL
;
This
->
current_rstart
=
This
->
current_rstop
=
-
1
;
...
...
@@ -57,19 +55,19 @@ static inline QualityControlImpl *impl_from_IQualityControl(IQualityControl *ifa
HRESULT
WINAPI
QualityControlImpl_QueryInterface
(
IQualityControl
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
QualityControlImpl
*
This
=
impl_from_IQualityControl
(
iface
);
return
IBaseFilter_QueryInterface
(
This
->
self
,
riid
,
ppv
);
return
IBaseFilter_QueryInterface
(
&
This
->
pin
->
filter
->
IBaseFilter_iface
,
riid
,
ppv
);
}
ULONG
WINAPI
QualityControlImpl_AddRef
(
IQualityControl
*
iface
)
{
QualityControlImpl
*
This
=
impl_from_IQualityControl
(
iface
);
return
IBaseFilter_AddRef
(
This
->
self
);
return
IBaseFilter_AddRef
(
&
This
->
pin
->
filter
->
IBaseFilter_iface
);
}
ULONG
WINAPI
QualityControlImpl_Release
(
IQualityControl
*
iface
)
{
QualityControlImpl
*
This
=
impl_from_IQualityControl
(
iface
);
return
IBaseFilter_Release
(
This
->
self
);
return
IBaseFilter_Release
(
&
This
->
pin
->
filter
->
IBaseFilter_iface
);
}
HRESULT
WINAPI
QualityControlImpl_Notify
(
IQualityControl
*
iface
,
IBaseFilter
*
sender
,
Quality
qm
)
...
...
@@ -81,19 +79,16 @@ HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *se
iface
,
sender
,
qm
.
Type
,
qm
.
Proportion
,
debugstr_time
(
qm
.
Late
),
debugstr_time
(
qm
.
TimeStamp
));
if
(
This
->
tonotify
)
return
IQualityControl_Notify
(
This
->
tonotify
,
This
->
self
,
qm
);
if
(
This
->
input
)
{
IPin
*
to
=
NULL
;
IPin_ConnectedTo
(
This
->
input
,
&
to
);
if
(
to
)
{
IQualityControl
*
qc
=
NULL
;
IPin_QueryInterface
(
to
,
&
IID_IQualityControl
,
(
void
**
)
&
qc
);
if
(
qc
)
{
hr
=
IQualityControl_Notify
(
qc
,
This
->
self
,
qm
);
IQualityControl_Release
(
qc
);
}
IPin_Release
(
to
);
return
IQualityControl_Notify
(
This
->
tonotify
,
&
This
->
pin
->
filter
->
IBaseFilter_iface
,
qm
);
if
(
This
->
pin
->
peer
)
{
IQualityControl
*
qc
=
NULL
;
IPin_QueryInterface
(
This
->
pin
->
peer
,
&
IID_IQualityControl
,
(
void
**
)
&
qc
);
if
(
qc
)
{
hr
=
IQualityControl_Notify
(
qc
,
&
This
->
pin
->
filter
->
IBaseFilter_iface
,
qm
);
IQualityControl_Release
(
qc
);
}
}
...
...
@@ -270,7 +265,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv)
q
.
Late
=
priv
->
current_jitter
;
q
.
TimeStamp
=
priv
->
current_rstart
;
TRACE
(
"Late: %s from %s, rate: %g
\n
"
,
debugstr_time
(
q
.
Late
),
debugstr_time
(
q
.
TimeStamp
),
1
.
/
priv
->
avg_rate
);
hr
=
IQualityControl_Notify
(
&
priv
->
IQualityControl_iface
,
priv
->
self
,
q
);
hr
=
IQualityControl_Notify
(
&
priv
->
IQualityControl_iface
,
&
priv
->
pin
->
filter
->
IBaseFilter_iface
,
q
);
priv
->
qos_handled
=
hr
==
S_OK
;
}
...
...
dlls/strmbase/renderer.c
View file @
db7eb332
...
...
@@ -545,7 +545,7 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown
filter
->
advise_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
filter
->
flush_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
QualityControlImpl_Create
(
&
filter
->
sink
.
pin
.
IPin_iface
,
&
filter
->
filter
.
IBaseFilter_iface
,
&
filter
->
qcimpl
);
QualityControlImpl_Create
(
&
filter
->
sink
.
pin
,
&
filter
->
qcimpl
);
filter
->
qcimpl
->
IQualityControl_iface
.
lpVtbl
=
&
Renderer_QualityControl_Vtbl
;
return
S_OK
;
...
...
dlls/strmbase/strmbase_private.h
View file @
db7eb332
...
...
@@ -53,8 +53,7 @@ static inline const char *debugstr_time(REFERENCE_TIME time)
/* Quality Control */
typedef
struct
QualityControlImpl
{
IQualityControl
IQualityControl_iface
;
IPin
*
input
;
IBaseFilter
*
self
;
struct
strmbase_pin
*
pin
;
IQualityControl
*
tonotify
;
/* Render stuff */
...
...
@@ -66,7 +65,7 @@ typedef struct QualityControlImpl {
BOOL
qos_handled
,
is_dropped
;
}
QualityControlImpl
;
HRESULT
QualityControlImpl_Create
(
IPin
*
input
,
IBaseFilter
*
self
,
QualityControlImpl
**
ppv
);
HRESULT
QualityControlImpl_Create
(
struct
strmbase_pin
*
pin
,
QualityControlImpl
**
out
);
void
QualityControlImpl_Destroy
(
QualityControlImpl
*
This
);
HRESULT
WINAPI
QualityControlImpl_QueryInterface
(
IQualityControl
*
iface
,
REFIID
riid
,
void
**
ppv
);
ULONG
WINAPI
QualityControlImpl_AddRef
(
IQualityControl
*
iface
);
...
...
dlls/strmbase/transform.c
View file @
db7eb332
...
...
@@ -286,8 +286,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
strmbase_source_init
(
&
filter
->
source
,
&
TransformFilter_OutputPin_Vtbl
,
&
filter
->
filter
,
wcsOutputPinName
,
&
source_ops
);
QualityControlImpl_Create
(
&
filter
->
sink
.
pin
.
IPin_iface
,
&
filter
->
filter
.
IBaseFilter_iface
,
&
filter
->
qcimpl
);
QualityControlImpl_Create
(
&
filter
->
sink
.
pin
,
&
filter
->
qcimpl
);
filter
->
qcimpl
->
IQualityControl_iface
.
lpVtbl
=
&
TransformFilter_QualityControl_Vtbl
;
filter
->
seekthru_unk
=
NULL
;
...
...
@@ -483,7 +482,7 @@ static const IPinVtbl TransformFilter_OutputPin_Vtbl =
static
HRESULT
WINAPI
TransformFilter_QualityControlImpl_Notify
(
IQualityControl
*
iface
,
IBaseFilter
*
sender
,
Quality
qm
)
{
QualityControlImpl
*
qc
=
(
QualityControlImpl
*
)
iface
;
TransformFilter
*
This
=
impl_from_
IBaseFilter
(
qc
->
self
);
TransformFilter
*
This
=
impl_from_
source_IPin
(
&
qc
->
pin
->
IPin_iface
);
if
(
This
->
pFuncsTable
->
pfnNotify
)
return
This
->
pFuncsTable
->
pfnNotify
(
This
,
sender
,
qm
);
...
...
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