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
914ad66c
Commit
914ad66c
authored
Mar 10, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Move run_event to the strmbase_renderer structure.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bcfa8f41
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
22 deletions
+14
-22
nullrenderer.c
dlls/qedit/nullrenderer.c
+3
-6
videorenderer.c
dlls/quartz/videorenderer.c
+3
-8
vmr9.c
dlls/quartz/vmr9.c
+3
-8
renderer.c
dlls/strmbase/renderer.c
+2
-0
strmbase.h
include/wine/strmbase.h
+3
-0
No files found.
dlls/qedit/nullrenderer.c
View file @
914ad66c
...
...
@@ -29,7 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit);
struct
null_renderer
{
struct
strmbase_renderer
renderer
;
HANDLE
run_event
;
};
static
struct
null_renderer
*
impl_from_strmbase_renderer
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -43,7 +42,7 @@ static HRESULT WINAPI NullRenderer_DoRenderSample(struct strmbase_renderer *ifac
if
(
filter
->
renderer
.
filter
.
state
==
State_Paused
)
{
const
HANDLE
events
[
2
]
=
{
filter
->
run_event
,
filter
->
renderer
.
flush_event
};
const
HANDLE
events
[
2
]
=
{
filter
->
r
enderer
.
r
un_event
,
filter
->
renderer
.
flush_event
};
SetEvent
(
filter
->
renderer
.
state_event
);
WaitForMultipleObjects
(
2
,
events
,
FALSE
,
INFINITE
);
...
...
@@ -62,7 +61,6 @@ static void null_renderer_destroy(struct strmbase_renderer *iface)
{
struct
null_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
CloseHandle
(
filter
->
run_event
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
free
(
filter
);
}
...
...
@@ -70,13 +68,13 @@ static void null_renderer_destroy(struct strmbase_renderer *iface)
static
void
null_renderer_start_stream
(
struct
strmbase_renderer
*
iface
)
{
struct
null_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
SetEvent
(
filter
->
run_event
);
SetEvent
(
filter
->
r
enderer
.
r
un_event
);
}
static
void
null_renderer_stop_stream
(
struct
strmbase_renderer
*
iface
)
{
struct
null_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
ResetEvent
(
filter
->
run_event
);
ResetEvent
(
filter
->
r
enderer
.
r
un_event
);
}
static
const
struct
strmbase_renderer_ops
renderer_ops
=
...
...
@@ -96,7 +94,6 @@ HRESULT null_renderer_create(IUnknown *outer, IUnknown **out)
return
E_OUTOFMEMORY
;
strmbase_renderer_init
(
&
object
->
renderer
,
outer
,
&
CLSID_NullRenderer
,
L"In"
,
&
renderer_ops
);
object
->
run_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
TRACE
(
"Created null renderer %p.
\n
"
,
object
);
*
out
=
&
object
->
renderer
.
filter
.
IUnknown_inner
;
...
...
dlls/quartz/videorenderer.c
View file @
914ad66c
...
...
@@ -48,8 +48,6 @@ struct video_renderer
LONG
FullScreenMode
;
DWORD
saved_style
;
HANDLE
run_event
;
};
static
inline
struct
video_renderer
*
impl_from_video_window
(
struct
video_window
*
iface
)
...
...
@@ -106,7 +104,7 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *ifa
if
(
filter
->
renderer
.
filter
.
state
==
State_Paused
)
{
const
HANDLE
events
[
2
]
=
{
filter
->
run_event
,
filter
->
renderer
.
flush_event
};
const
HANDLE
events
[
2
]
=
{
filter
->
r
enderer
.
r
un_event
,
filter
->
renderer
.
flush_event
};
SetEvent
(
filter
->
renderer
.
state_event
);
LeaveCriticalSection
(
&
filter
->
renderer
.
filter
.
stream_cs
);
...
...
@@ -140,7 +138,6 @@ static void video_renderer_destroy(struct strmbase_renderer *iface)
struct
video_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
video_window_cleanup
(
&
filter
->
window
);
CloseHandle
(
filter
->
run_event
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
free
(
filter
);
...
...
@@ -179,7 +176,7 @@ static void video_renderer_start_stream(struct strmbase_renderer *iface)
{
struct
video_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
SetEvent
(
filter
->
run_event
);
SetEvent
(
filter
->
r
enderer
.
r
un_event
);
}
static
void
video_renderer_stop_stream
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -192,7 +189,7 @@ static void video_renderer_stop_stream(struct strmbase_renderer *iface)
/* Black it out */
RedrawWindow
(
This
->
window
.
hwnd
,
NULL
,
NULL
,
RDW_INVALIDATE
|
RDW_ERASE
);
ResetEvent
(
This
->
run_event
);
ResetEvent
(
This
->
r
enderer
.
r
un_event
);
}
static
void
video_renderer_init_stream
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -519,8 +516,6 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
return
hr
;
}
object
->
run_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
TRACE
(
"Created video renderer %p.
\n
"
,
object
);
*
out
=
&
object
->
renderer
.
filter
.
IUnknown_inner
;
return
S_OK
;
...
...
dlls/quartz/vmr9.c
View file @
914ad66c
...
...
@@ -108,8 +108,6 @@ struct quartz_vmr
LONG
VideoWidth
;
LONG
VideoHeight
;
VMR9AspectRatioMode
aspect_mode
;
HANDLE
run_event
;
};
static
inline
BOOL
is_vmr9
(
const
struct
quartz_vmr
*
filter
)
...
...
@@ -211,7 +209,7 @@ static inline struct quartz_vmr *impl_from_IBaseFilter(IBaseFilter *iface)
static
HRESULT
WINAPI
VMR9_DoRenderSample
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
)
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
const
HANDLE
events
[
2
]
=
{
filter
->
run_event
,
filter
->
renderer
.
flush_event
};
const
HANDLE
events
[
2
]
=
{
filter
->
r
enderer
.
r
un_event
,
filter
->
renderer
.
flush_event
};
unsigned
int
data_size
,
width
,
depth
,
src_pitch
;
const
BITMAPINFOHEADER
*
bitmap_header
;
REFERENCE_TIME
start_time
,
end_time
;
...
...
@@ -486,7 +484,7 @@ static void vmr_start_stream(struct strmbase_renderer *iface)
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
IVMRImagePresenter9_StartPresenting
(
filter
->
presenter
,
filter
->
cookie
);
SetEvent
(
filter
->
run_event
);
SetEvent
(
filter
->
r
enderer
.
r
un_event
);
}
static
void
vmr_stop_stream
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -497,7 +495,7 @@ static void vmr_stop_stream(struct strmbase_renderer *iface)
if
(
This
->
renderer
.
filter
.
state
==
State_Running
)
IVMRImagePresenter9_StopPresenting
(
This
->
presenter
,
This
->
cookie
);
ResetEvent
(
This
->
run_event
);
ResetEvent
(
This
->
r
enderer
.
r
un_event
);
}
static
HRESULT
vmr_connect
(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
...
...
@@ -585,7 +583,6 @@ static void vmr_destroy(struct strmbase_renderer *iface)
filter
->
allocator_d3d9_dev
=
NULL
;
}
CloseHandle
(
filter
->
run_event
);
FreeLibrary
(
filter
->
hD3d9
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
if
(
!
filter
->
IVMRSurfaceAllocatorNotify9_refcount
)
...
...
@@ -2610,8 +2607,6 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
return
hr
;
}
object
->
run_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
object
->
mixing_prefs
=
MixerPref9_NoDecimation
|
MixerPref9_ARAdjustXorY
|
MixerPref9_BiLinearFiltering
|
MixerPref9_RenderTargetRGB
;
...
...
dlls/strmbase/renderer.c
View file @
914ad66c
...
...
@@ -554,6 +554,7 @@ void strmbase_renderer_cleanup(struct strmbase_renderer *filter)
CloseHandle
(
filter
->
state_event
);
CloseHandle
(
filter
->
advise_event
);
CloseHandle
(
filter
->
run_event
);
CloseHandle
(
filter
->
flush_event
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
}
...
...
@@ -573,5 +574,6 @@ void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
filter
->
state_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
filter
->
advise_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
filter
->
run_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
filter
->
flush_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
}
include/wine/strmbase.h
View file @
914ad66c
...
...
@@ -286,6 +286,9 @@ struct strmbase_renderer
/* Signaled when the sample presentation time occurs. The streaming thread
* waits for this event in Receive() if applicable. */
HANDLE
advise_event
;
/* Signaled when the filter is running. The streaming thread waits for this
* event in Receive() while paused. */
HANDLE
run_event
;
/* Signaled when a flush or state change occurs, i.e. anything that needs
* to immediately unblock the streaming thread. */
HANDLE
flush_event
;
...
...
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