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
461a928f
Commit
461a928f
authored
Jul 17, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Set the IQualityControl vtbl in QualityControlImpl_Create().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a881a730
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
33 deletions
+29
-33
qualitycontrol.c
dlls/strmbase/qualitycontrol.c
+29
-19
renderer.c
dlls/strmbase/renderer.c
+0
-9
strmbase_private.h
dlls/strmbase/strmbase_private.h
+0
-5
No files found.
dlls/strmbase/qualitycontrol.c
View file @
461a928f
...
...
@@ -27,20 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase_qc
);
HRESULT
QualityControlImpl_Create
(
struct
strmbase_pin
*
pin
,
struct
strmbase_qc
**
ppv
)
{
struct
strmbase_qc
*
This
;
*
ppv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
strmbase_qc
));
if
(
!*
ppv
)
return
E_OUTOFMEMORY
;
This
=
*
ppv
;
This
->
pin
=
pin
;
This
->
tonotify
=
NULL
;
This
->
current_rstart
=
This
->
current_rstop
=
-
1
;
TRACE
(
"-> %p
\n
"
,
This
);
return
S_OK
;
}
void
QualityControlImpl_Destroy
(
struct
strmbase_qc
*
This
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -51,25 +37,25 @@ static inline struct strmbase_qc *impl_from_IQualityControl(IQualityControl *ifa
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_qc
,
IQualityControl_iface
);
}
HRESULT
WINAPI
QualityControlImp
l_QueryInterface
(
IQualityControl
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
quality_contro
l_QueryInterface
(
IQualityControl
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
strmbase_qc
*
This
=
impl_from_IQualityControl
(
iface
);
return
IBaseFilter_QueryInterface
(
&
This
->
pin
->
filter
->
IBaseFilter_iface
,
riid
,
ppv
);
}
ULONG
WINAPI
QualityControlImp
l_AddRef
(
IQualityControl
*
iface
)
static
ULONG
WINAPI
quality_contro
l_AddRef
(
IQualityControl
*
iface
)
{
struct
strmbase_qc
*
This
=
impl_from_IQualityControl
(
iface
);
return
IBaseFilter_AddRef
(
&
This
->
pin
->
filter
->
IBaseFilter_iface
);
}
ULONG
WINAPI
QualityControlImp
l_Release
(
IQualityControl
*
iface
)
static
ULONG
WINAPI
quality_contro
l_Release
(
IQualityControl
*
iface
)
{
struct
strmbase_qc
*
This
=
impl_from_IQualityControl
(
iface
);
return
IBaseFilter_Release
(
&
This
->
pin
->
filter
->
IBaseFilter_iface
);
}
HRESULT
WINAPI
QualityControlImp
l_Notify
(
IQualityControl
*
iface
,
IBaseFilter
*
sender
,
Quality
qm
)
static
HRESULT
WINAPI
quality_contro
l_Notify
(
IQualityControl
*
iface
,
IBaseFilter
*
sender
,
Quality
qm
)
{
struct
strmbase_qc
*
This
=
impl_from_IQualityControl
(
iface
);
HRESULT
hr
=
S_FALSE
;
...
...
@@ -94,7 +80,7 @@ HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *se
return
hr
;
}
HRESULT
WINAPI
QualityControlImp
l_SetSink
(
IQualityControl
*
iface
,
IQualityControl
*
tonotify
)
static
HRESULT
WINAPI
quality_contro
l_SetSink
(
IQualityControl
*
iface
,
IQualityControl
*
tonotify
)
{
struct
strmbase_qc
*
This
=
impl_from_IQualityControl
(
iface
);
TRACE
(
"%p %p
\n
"
,
This
,
tonotify
);
...
...
@@ -102,6 +88,15 @@ HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityContro
return
S_OK
;
}
static
const
IQualityControlVtbl
quality_control_vtbl
=
{
quality_control_QueryInterface
,
quality_control_AddRef
,
quality_control_Release
,
quality_control_Notify
,
quality_control_SetSink
,
};
/* Macros copied from gstreamer, weighted average between old average and new ones */
#define DO_RUNNING_AVG(avg,val,size) (((val) + ((size)-1) * (avg)) / (size))
...
...
@@ -317,3 +312,18 @@ void QualityControlRender_EndRender(struct strmbase_qc *This)
else
This
->
avg_render
=
UPDATE_RUNNING_AVG
(
This
->
avg_render
,
elapsed
);
}
HRESULT
QualityControlImpl_Create
(
struct
strmbase_pin
*
pin
,
struct
strmbase_qc
**
ppv
)
{
struct
strmbase_qc
*
This
;
*
ppv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
strmbase_qc
));
if
(
!*
ppv
)
return
E_OUTOFMEMORY
;
This
=
*
ppv
;
This
->
pin
=
pin
;
This
->
tonotify
=
NULL
;
This
->
current_rstart
=
This
->
current_rstop
=
-
1
;
This
->
IQualityControl_iface
.
lpVtbl
=
&
quality_control_vtbl
;
TRACE
(
"-> %p
\n
"
,
This
);
return
S_OK
;
}
dlls/strmbase/renderer.c
View file @
461a928f
...
...
@@ -27,14 +27,6 @@ static inline struct strmbase_renderer *impl_from_strmbase_filter(struct strmbas
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_renderer
,
filter
);
}
static
const
IQualityControlVtbl
Renderer_QualityControl_Vtbl
=
{
QualityControlImpl_QueryInterface
,
QualityControlImpl_AddRef
,
QualityControlImpl_Release
,
QualityControlImpl_Notify
,
QualityControlImpl_SetSink
};
static
inline
struct
strmbase_renderer
*
impl_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_renderer
,
sink
.
pin
.
IPin_iface
);
...
...
@@ -406,5 +398,4 @@ void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
filter
->
flush_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
QualityControlImpl_Create
(
&
filter
->
sink
.
pin
,
&
filter
->
qcimpl
);
filter
->
qcimpl
->
IQualityControl_iface
.
lpVtbl
=
&
Renderer_QualityControl_Vtbl
;
}
dlls/strmbase/strmbase_private.h
View file @
461a928f
...
...
@@ -70,11 +70,6 @@ struct strmbase_qc
HRESULT
QualityControlImpl_Create
(
struct
strmbase_pin
*
pin
,
struct
strmbase_qc
**
out
);
void
QualityControlImpl_Destroy
(
struct
strmbase_qc
*
qc
);
HRESULT
WINAPI
QualityControlImpl_QueryInterface
(
IQualityControl
*
iface
,
REFIID
riid
,
void
**
ppv
);
ULONG
WINAPI
QualityControlImpl_AddRef
(
IQualityControl
*
iface
);
ULONG
WINAPI
QualityControlImpl_Release
(
IQualityControl
*
iface
);
HRESULT
WINAPI
QualityControlImpl_Notify
(
IQualityControl
*
iface
,
IBaseFilter
*
sender
,
Quality
qm
);
HRESULT
WINAPI
QualityControlImpl_SetSink
(
IQualityControl
*
iface
,
IQualityControl
*
tonotify
);
void
QualityControlRender_Start
(
struct
strmbase_qc
*
This
,
REFERENCE_TIME
tStart
);
void
QualityControlRender_DoQOS
(
struct
strmbase_qc
*
priv
);
...
...
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