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
487ea5df
Commit
487ea5df
authored
Oct 23, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Get rid of the BaseRenderer typedef.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1454a661
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
126 deletions
+123
-126
evr.c
dlls/evr/evr.c
+6
-6
nullrenderer.c
dlls/qedit/nullrenderer.c
+6
-6
dsoundrender.c
dlls/quartz/dsoundrender.c
+25
-24
videorenderer.c
dlls/quartz/videorenderer.c
+18
-17
vmr9.c
dlls/quartz/vmr9.c
+12
-11
renderer.c
dlls/strmbase/renderer.c
+30
-30
strmbase.h
include/wine/strmbase.h
+26
-32
No files found.
dlls/evr/evr.c
View file @
487ea5df
...
@@ -33,29 +33,29 @@ WINE_DEFAULT_DEBUG_CHANNEL(evr);
...
@@ -33,29 +33,29 @@ WINE_DEFAULT_DEBUG_CHANNEL(evr);
typedef
struct
typedef
struct
{
{
BaseR
enderer
renderer
;
struct
strmbase_r
enderer
renderer
;
}
evr_filter
;
}
evr_filter
;
static
inline
evr_filter
*
impl_from_
BaseRenderer
(
BaseR
enderer
*
iface
)
static
inline
evr_filter
*
impl_from_
strmbase_renderer
(
struct
strmbase_r
enderer
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
evr_filter
,
renderer
);
return
CONTAINING_RECORD
(
iface
,
evr_filter
,
renderer
);
}
}
static
void
evr_destroy
(
BaseR
enderer
*
iface
)
static
void
evr_destroy
(
struct
strmbase_r
enderer
*
iface
)
{
{
evr_filter
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
evr_filter
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
CoTaskMemFree
(
filter
);
CoTaskMemFree
(
filter
);
}
}
static
HRESULT
WINAPI
evr_DoRenderSample
(
BaseR
enderer
*
iface
,
IMediaSample
*
sample
)
static
HRESULT
WINAPI
evr_DoRenderSample
(
struct
strmbase_r
enderer
*
iface
,
IMediaSample
*
sample
)
{
{
FIXME
(
"Not implemented.
\n
"
);
FIXME
(
"Not implemented.
\n
"
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
WINAPI
evr_CheckMediaType
(
BaseR
enderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
static
HRESULT
WINAPI
evr_CheckMediaType
(
struct
strmbase_r
enderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
{
{
FIXME
(
"Not implemented.
\n
"
);
FIXME
(
"Not implemented.
\n
"
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
...
dlls/qedit/nullrenderer.c
View file @
487ea5df
...
@@ -28,28 +28,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit);
...
@@ -28,28 +28,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit);
typedef
struct
NullRendererImpl
typedef
struct
NullRendererImpl
{
{
BaseR
enderer
renderer
;
struct
strmbase_r
enderer
renderer
;
}
NullRendererImpl
;
}
NullRendererImpl
;
static
inline
NullRendererImpl
*
impl_from_
BaseRenderer
(
BaseR
enderer
*
iface
)
static
inline
NullRendererImpl
*
impl_from_
strmbase_renderer
(
struct
strmbase_r
enderer
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
NullRendererImpl
,
renderer
);
return
CONTAINING_RECORD
(
iface
,
NullRendererImpl
,
renderer
);
}
}
static
HRESULT
WINAPI
NullRenderer_DoRenderSample
(
BaseRenderer
*
iface
,
IMediaSample
*
pMediaS
ample
)
static
HRESULT
WINAPI
NullRenderer_DoRenderSample
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
s
ample
)
{
{
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
NullRenderer_CheckMediaType
(
BaseRenderer
*
iface
,
const
AM_MEDIA_TYPE
*
p
mt
)
static
HRESULT
WINAPI
NullRenderer_CheckMediaType
(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
{
{
TRACE
(
"Not a stub!
\n
"
);
TRACE
(
"Not a stub!
\n
"
);
return
S_OK
;
return
S_OK
;
}
}
static
void
null_renderer_destroy
(
BaseR
enderer
*
iface
)
static
void
null_renderer_destroy
(
struct
strmbase_r
enderer
*
iface
)
{
{
NullRendererImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
NullRendererImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
CoTaskMemFree
(
filter
);
CoTaskMemFree
(
filter
);
...
...
dlls/quartz/dsoundrender.c
View file @
487ea5df
...
@@ -45,7 +45,7 @@ static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
...
@@ -45,7 +45,7 @@ static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
typedef
struct
DSoundRenderImpl
typedef
struct
DSoundRenderImpl
{
{
BaseR
enderer
renderer
;
struct
strmbase_r
enderer
renderer
;
IBasicAudio
IBasicAudio_iface
;
IBasicAudio
IBasicAudio_iface
;
IReferenceClock
IReferenceClock_iface
;
IReferenceClock
IReferenceClock_iface
;
...
@@ -66,7 +66,7 @@ typedef struct DSoundRenderImpl
...
@@ -66,7 +66,7 @@ typedef struct DSoundRenderImpl
HANDLE
advisethread
,
thread_wait
;
HANDLE
advisethread
,
thread_wait
;
}
DSoundRenderImpl
;
}
DSoundRenderImpl
;
static
inline
DSoundRenderImpl
*
impl_from_
BaseRenderer
(
BaseR
enderer
*
iface
)
static
inline
DSoundRenderImpl
*
impl_from_
strmbase_renderer
(
struct
strmbase_r
enderer
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
DSoundRenderImpl
,
renderer
);
return
CONTAINING_RECORD
(
iface
,
DSoundRenderImpl
,
renderer
);
}
}
...
@@ -298,16 +298,17 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM
...
@@ -298,16 +298,17 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, REFERENCE_TIM
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DSoundRender_ShouldDrawSampleNow
(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
,
REFERENCE_TIME
*
pStartTime
,
REFERENCE_TIME
*
pEndTime
)
static
HRESULT
WINAPI
DSoundRender_ShouldDrawSampleNow
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
,
REFERENCE_TIME
*
start
,
REFERENCE_TIME
*
end
)
{
{
/* We time ourselves do not use the base renderers timing */
/* We time ourselves do not use the base renderers timing */
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DSoundRender_PrepareReceive
(
BaseR
enderer
*
iface
,
IMediaSample
*
pSample
)
static
HRESULT
WINAPI
DSoundRender_PrepareReceive
(
struct
strmbase_r
enderer
*
iface
,
IMediaSample
*
pSample
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
AM_MEDIA_TYPE
*
amt
;
AM_MEDIA_TYPE
*
amt
;
...
@@ -340,9 +341,9 @@ static HRESULT WINAPI DSoundRender_PrepareReceive(BaseRenderer *iface, IMediaSam
...
@@ -340,9 +341,9 @@ static HRESULT WINAPI DSoundRender_PrepareReceive(BaseRenderer *iface, IMediaSam
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DSoundRender_DoRenderSample
(
BaseRenderer
*
iface
,
IMediaSample
*
pSample
)
static
HRESULT
WINAPI
DSoundRender_DoRenderSample
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
pSample
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
LPBYTE
pbSrcStream
=
NULL
;
LPBYTE
pbSrcStream
=
NULL
;
LONG
cbSrcStream
=
0
;
LONG
cbSrcStream
=
0
;
REFERENCE_TIME
tStart
,
tStop
;
REFERENCE_TIME
tStart
,
tStop
;
...
@@ -397,7 +398,7 @@ static HRESULT WINAPI DSoundRender_DoRenderSample(BaseRenderer *iface, IMediaSam
...
@@ -397,7 +398,7 @@ static HRESULT WINAPI DSoundRender_DoRenderSample(BaseRenderer *iface, IMediaSam
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
DSoundRender_CheckMediaType
(
BaseR
enderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
static
HRESULT
WINAPI
DSoundRender_CheckMediaType
(
struct
strmbase_r
enderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
{
{
if
(
!
IsEqualIID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Audio
))
if
(
!
IsEqualIID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Audio
))
return
S_FALSE
;
return
S_FALSE
;
...
@@ -408,9 +409,9 @@ static HRESULT WINAPI DSoundRender_CheckMediaType(BaseRenderer *iface, const AM_
...
@@ -408,9 +409,9 @@ static HRESULT WINAPI DSoundRender_CheckMediaType(BaseRenderer *iface, const AM_
return
S_OK
;
return
S_OK
;
}
}
static
void
dsound_render_stop_stream
(
BaseR
enderer
*
iface
)
static
void
dsound_render_stop_stream
(
struct
strmbase_r
enderer
*
iface
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
TRACE
(
"(%p/%p)->()
\n
"
,
This
,
iface
);
TRACE
(
"(%p/%p)->()
\n
"
,
This
,
iface
);
...
@@ -418,9 +419,9 @@ static void dsound_render_stop_stream(BaseRenderer *iface)
...
@@ -418,9 +419,9 @@ static void dsound_render_stop_stream(BaseRenderer *iface)
This
->
writepos
=
This
->
buf_size
;
This
->
writepos
=
This
->
buf_size
;
}
}
static
void
dsound_render_start_stream
(
BaseR
enderer
*
iface
)
static
void
dsound_render_start_stream
(
struct
strmbase_r
enderer
*
iface
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)
\n
"
,
This
);
...
@@ -430,9 +431,9 @@ static void dsound_render_start_stream(BaseRenderer *iface)
...
@@ -430,9 +431,9 @@ static void dsound_render_start_stream(BaseRenderer *iface)
}
}
}
}
static
HRESULT
WINAPI
DSoundRender_CompleteConnect
(
BaseRenderer
*
iface
,
IPin
*
pReceivePin
)
static
HRESULT
WINAPI
DSoundRender_CompleteConnect
(
struct
strmbase_renderer
*
iface
,
IPin
*
pReceivePin
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
const
AM_MEDIA_TYPE
*
pmt
=
&
This
->
renderer
.
sink
.
pin
.
mtCurrent
;
const
AM_MEDIA_TYPE
*
pmt
=
&
This
->
renderer
.
sink
.
pin
.
mtCurrent
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
WAVEFORMATEX
*
format
;
WAVEFORMATEX
*
format
;
...
@@ -478,9 +479,9 @@ static HRESULT WINAPI DSoundRender_CompleteConnect(BaseRenderer * iface, IPin *
...
@@ -478,9 +479,9 @@ static HRESULT WINAPI DSoundRender_CompleteConnect(BaseRenderer * iface, IPin *
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
DSoundRender_BreakConnect
(
BaseRenderer
*
iface
)
static
HRESULT
WINAPI
DSoundRender_BreakConnect
(
struct
strmbase_renderer
*
iface
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
...
@@ -498,9 +499,9 @@ static HRESULT WINAPI DSoundRender_BreakConnect(BaseRenderer* iface)
...
@@ -498,9 +499,9 @@ static HRESULT WINAPI DSoundRender_BreakConnect(BaseRenderer* iface)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DSoundRender_EndOfStream
(
BaseRenderer
*
iface
)
static
HRESULT
WINAPI
DSoundRender_EndOfStream
(
struct
strmbase_renderer
*
iface
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
...
@@ -517,9 +518,9 @@ static HRESULT WINAPI DSoundRender_EndOfStream(BaseRenderer* iface)
...
@@ -517,9 +518,9 @@ static HRESULT WINAPI DSoundRender_EndOfStream(BaseRenderer* iface)
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
DSoundRender_EndFlush
(
BaseRenderer
*
iface
)
static
HRESULT
WINAPI
DSoundRender_EndFlush
(
struct
strmbase_renderer
*
iface
)
{
{
DSoundRenderImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
...
@@ -540,9 +541,9 @@ static HRESULT WINAPI DSoundRender_EndFlush(BaseRenderer* iface)
...
@@ -540,9 +541,9 @@ static HRESULT WINAPI DSoundRender_EndFlush(BaseRenderer* iface)
return
S_OK
;
return
S_OK
;
}
}
static
void
dsound_render_destroy
(
BaseR
enderer
*
iface
)
static
void
dsound_render_destroy
(
struct
strmbase_r
enderer
*
iface
)
{
{
DSoundRenderImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
if
(
filter
->
threadid
)
if
(
filter
->
threadid
)
{
{
...
@@ -562,9 +563,9 @@ static void dsound_render_destroy(BaseRenderer *iface)
...
@@ -562,9 +563,9 @@ static void dsound_render_destroy(BaseRenderer *iface)
CoTaskMemFree
(
filter
);
CoTaskMemFree
(
filter
);
}
}
static
HRESULT
dsound_render_query_interface
(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
dsound_render_query_interface
(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
DSoundRenderImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
DSoundRenderImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicAudio
))
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicAudio
))
*
out
=
&
filter
->
IBasicAudio_iface
;
*
out
=
&
filter
->
IBasicAudio_iface
;
...
...
dlls/quartz/videorenderer.c
View file @
487ea5df
...
@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
...
@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
typedef
struct
VideoRendererImpl
typedef
struct
VideoRendererImpl
{
{
BaseR
enderer
renderer
;
struct
strmbase_r
enderer
renderer
;
BaseControlWindow
baseControlWindow
;
BaseControlWindow
baseControlWindow
;
BaseControlVideo
baseControlVideo
;
BaseControlVideo
baseControlVideo
;
...
@@ -61,7 +61,7 @@ static inline VideoRendererImpl *impl_from_BaseWindow(BaseWindow *iface)
...
@@ -61,7 +61,7 @@ static inline VideoRendererImpl *impl_from_BaseWindow(BaseWindow *iface)
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
baseControlWindow
.
baseWindow
);
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
baseControlWindow
.
baseWindow
);
}
}
static
inline
VideoRendererImpl
*
impl_from_
BaseRenderer
(
BaseR
enderer
*
iface
)
static
inline
VideoRendererImpl
*
impl_from_
strmbase_renderer
(
struct
strmbase_r
enderer
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
renderer
);
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
renderer
);
}
}
...
@@ -176,7 +176,8 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
...
@@ -176,7 +176,8 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
VideoRenderer_ShouldDrawSampleNow
(
BaseRenderer
*
This
,
IMediaSample
*
pSample
,
REFERENCE_TIME
*
pStartTime
,
REFERENCE_TIME
*
pEndTime
)
static
HRESULT
WINAPI
VideoRenderer_ShouldDrawSampleNow
(
struct
strmbase_renderer
*
filter
,
IMediaSample
*
pSample
,
REFERENCE_TIME
*
start
,
REFERENCE_TIME
*
end
)
{
{
/* Preroll means the sample isn't shown, this is used for key frames and things like that */
/* Preroll means the sample isn't shown, this is used for key frames and things like that */
if
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
)
if
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
)
...
@@ -184,9 +185,9 @@ static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(BaseRenderer *This, IMed
...
@@ -184,9 +185,9 @@ static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(BaseRenderer *This, IMed
return
S_FALSE
;
return
S_FALSE
;
}
}
static
HRESULT
WINAPI
VideoRenderer_DoRenderSample
(
BaseRenderer
*
iface
,
IMediaSample
*
pSample
)
static
HRESULT
WINAPI
VideoRenderer_DoRenderSample
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
pSample
)
{
{
VideoRendererImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
LPBYTE
pbSrcStream
=
NULL
;
LPBYTE
pbSrcStream
=
NULL
;
LONG
cbSrcStream
=
0
;
LONG
cbSrcStream
=
0
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -235,9 +236,9 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(BaseRenderer* iface, IMediaSa
...
@@ -235,9 +236,9 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(BaseRenderer* iface, IMediaSa
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
VideoRenderer_CheckMediaType
(
BaseRenderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
static
HRESULT
WINAPI
VideoRenderer_CheckMediaType
(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
{
{
VideoRendererImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
if
(
!
IsEqualIID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Video
))
if
(
!
IsEqualIID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Video
))
return
S_FALSE
;
return
S_FALSE
;
...
@@ -284,9 +285,9 @@ static HRESULT WINAPI VideoRenderer_CheckMediaType(BaseRenderer *iface, const AM
...
@@ -284,9 +285,9 @@ static HRESULT WINAPI VideoRenderer_CheckMediaType(BaseRenderer *iface, const AM
return
S_FALSE
;
return
S_FALSE
;
}
}
static
void
video_renderer_destroy
(
BaseR
enderer
*
iface
)
static
void
video_renderer_destroy
(
struct
strmbase_r
enderer
*
iface
)
{
{
VideoRendererImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
BaseControlWindow_Destroy
(
&
filter
->
baseControlWindow
);
BaseControlWindow_Destroy
(
&
filter
->
baseControlWindow
);
BaseControlVideo_Destroy
(
&
filter
->
baseControlVideo
);
BaseControlVideo_Destroy
(
&
filter
->
baseControlVideo
);
...
@@ -295,9 +296,9 @@ static void video_renderer_destroy(BaseRenderer *iface)
...
@@ -295,9 +296,9 @@ static void video_renderer_destroy(BaseRenderer *iface)
CoTaskMemFree
(
filter
);
CoTaskMemFree
(
filter
);
}
}
static
HRESULT
video_renderer_query_interface
(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
video_renderer_query_interface
(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
VideoRendererImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicVideo
))
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicVideo
))
*
out
=
&
filter
->
baseControlVideo
.
IBasicVideo_iface
;
*
out
=
&
filter
->
baseControlVideo
.
IBasicVideo_iface
;
...
@@ -310,9 +311,9 @@ static HRESULT video_renderer_query_interface(BaseRenderer *iface, REFIID iid, v
...
@@ -310,9 +311,9 @@ static HRESULT video_renderer_query_interface(BaseRenderer *iface, REFIID iid, v
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
video_renderer_pin_query_interface
(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
video_renderer_pin_query_interface
(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
VideoRendererImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IOverlay
))
if
(
IsEqualGUID
(
iid
,
&
IID_IOverlay
))
*
out
=
&
filter
->
IOverlay_iface
;
*
out
=
&
filter
->
IOverlay_iface
;
...
@@ -323,9 +324,9 @@ static HRESULT video_renderer_pin_query_interface(BaseRenderer *iface, REFIID ii
...
@@ -323,9 +324,9 @@ static HRESULT video_renderer_pin_query_interface(BaseRenderer *iface, REFIID ii
return
S_OK
;
return
S_OK
;
}
}
static
void
video_renderer_stop_stream
(
BaseR
enderer
*
iface
)
static
void
video_renderer_stop_stream
(
struct
strmbase_r
enderer
*
iface
)
{
{
VideoRendererImpl
*
This
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
This
=
impl_from_
strmbase_r
enderer
(
iface
);
TRACE
(
"(%p)->()
\n
"
,
This
);
TRACE
(
"(%p)->()
\n
"
,
This
);
...
@@ -334,9 +335,9 @@ static void video_renderer_stop_stream(BaseRenderer *iface)
...
@@ -334,9 +335,9 @@ static void video_renderer_stop_stream(BaseRenderer *iface)
RedrawWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
NULL
,
NULL
,
RDW_INVALIDATE
|
RDW_ERASE
);
RedrawWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
NULL
,
NULL
,
RDW_INVALIDATE
|
RDW_ERASE
);
}
}
static
void
video_renderer_init_stream
(
BaseR
enderer
*
iface
)
static
void
video_renderer_init_stream
(
struct
strmbase_r
enderer
*
iface
)
{
{
VideoRendererImpl
*
filter
=
impl_from_
BaseR
enderer
(
iface
);
VideoRendererImpl
*
filter
=
impl_from_
strmbase_r
enderer
(
iface
);
VideoRenderer_AutoShowWindow
(
filter
);
VideoRenderer_AutoShowWindow
(
filter
);
}
}
...
...
dlls/quartz/vmr9.c
View file @
487ea5df
...
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
...
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
struct
quartz_vmr
struct
quartz_vmr
{
{
BaseR
enderer
renderer
;
struct
strmbase_r
enderer
renderer
;
BaseControlWindow
baseControlWindow
;
BaseControlWindow
baseControlWindow
;
BaseControlVideo
baseControlVideo
;
BaseControlVideo
baseControlVideo
;
...
@@ -256,7 +256,7 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
...
@@ -256,7 +256,7 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
VMR9_DoRenderSample
(
BaseRenderer
*
iface
,
IMediaSample
*
pSample
)
static
HRESULT
WINAPI
VMR9_DoRenderSample
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
pSample
)
{
{
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
LPBYTE
pbSrcStream
=
NULL
;
LPBYTE
pbSrcStream
=
NULL
;
...
@@ -321,7 +321,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS
...
@@ -321,7 +321,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
VMR9_CheckMediaType
(
BaseRenderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
static
HRESULT
WINAPI
VMR9_CheckMediaType
(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
{
{
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
...
@@ -412,7 +412,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
...
@@ -412,7 +412,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
return
hr
;
return
hr
;
}
}
static
void
vmr_start_stream
(
BaseR
enderer
*
iface
)
static
void
vmr_start_stream
(
struct
strmbase_r
enderer
*
iface
)
{
{
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
...
@@ -430,7 +430,7 @@ static void vmr_start_stream(BaseRenderer *iface)
...
@@ -430,7 +430,7 @@ static void vmr_start_stream(BaseRenderer *iface)
GetClientRect
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
This
->
target_rect
);
GetClientRect
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
This
->
target_rect
);
}
}
static
void
vmr_stop_stream
(
BaseR
enderer
*
iface
)
static
void
vmr_stop_stream
(
struct
strmbase_r
enderer
*
iface
)
{
{
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
...
@@ -440,7 +440,8 @@ static void vmr_stop_stream(BaseRenderer *iface)
...
@@ -440,7 +440,8 @@ static void vmr_stop_stream(BaseRenderer *iface)
IVMRImagePresenter9_StopPresenting
(
This
->
presenter
,
This
->
cookie
);
IVMRImagePresenter9_StopPresenting
(
This
->
presenter
,
This
->
cookie
);
}
}
static
HRESULT
WINAPI
VMR9_ShouldDrawSampleNow
(
BaseRenderer
*
This
,
IMediaSample
*
pSample
,
REFERENCE_TIME
*
pStartTime
,
REFERENCE_TIME
*
pEndTime
)
static
HRESULT
WINAPI
VMR9_ShouldDrawSampleNow
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
pSample
,
REFERENCE_TIME
*
start
,
REFERENCE_TIME
*
end
)
{
{
/* Preroll means the sample isn't shown, this is used for key frames and things like that */
/* Preroll means the sample isn't shown, this is used for key frames and things like that */
if
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
)
if
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
)
...
@@ -448,7 +449,7 @@ static HRESULT WINAPI VMR9_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample
...
@@ -448,7 +449,7 @@ static HRESULT WINAPI VMR9_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample
return
S_FALSE
;
return
S_FALSE
;
}
}
static
HRESULT
WINAPI
VMR9_CompleteConnect
(
BaseR
enderer
*
This
,
IPin
*
pReceivePin
)
static
HRESULT
WINAPI
VMR9_CompleteConnect
(
struct
strmbase_r
enderer
*
This
,
IPin
*
pReceivePin
)
{
{
struct
quartz_vmr
*
pVMR9
=
impl_from_IBaseFilter
(
&
This
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
pVMR9
=
impl_from_IBaseFilter
(
&
This
->
filter
.
IBaseFilter_iface
);
HRESULT
hr
;
HRESULT
hr
;
...
@@ -462,7 +463,7 @@ static HRESULT WINAPI VMR9_CompleteConnect(BaseRenderer *This, IPin *pReceivePin
...
@@ -462,7 +463,7 @@ static HRESULT WINAPI VMR9_CompleteConnect(BaseRenderer *This, IPin *pReceivePin
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
VMR9_BreakConnect
(
BaseR
enderer
*
This
)
static
HRESULT
WINAPI
VMR9_BreakConnect
(
struct
strmbase_r
enderer
*
This
)
{
{
struct
quartz_vmr
*
pVMR9
=
impl_from_IBaseFilter
(
&
This
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
pVMR9
=
impl_from_IBaseFilter
(
&
This
->
filter
.
IBaseFilter_iface
);
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
...
@@ -483,7 +484,7 @@ static HRESULT WINAPI VMR9_BreakConnect(BaseRenderer *This)
...
@@ -483,7 +484,7 @@ static HRESULT WINAPI VMR9_BreakConnect(BaseRenderer *This)
return
hr
;
return
hr
;
}
}
static
void
vmr_destroy
(
BaseR
enderer
*
iface
)
static
void
vmr_destroy
(
struct
strmbase_r
enderer
*
iface
)
{
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
...
@@ -506,7 +507,7 @@ static void vmr_destroy(BaseRenderer *iface)
...
@@ -506,7 +507,7 @@ static void vmr_destroy(BaseRenderer *iface)
CoTaskMemFree
(
filter
);
CoTaskMemFree
(
filter
);
}
}
static
HRESULT
vmr_query_interface
(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
vmr_query_interface
(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
...
@@ -541,7 +542,7 @@ static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out)
...
@@ -541,7 +542,7 @@ static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
vmr_pin_query_interface
(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
vmr_pin_query_interface
(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
...
...
dlls/strmbase/renderer.c
View file @
487ea5df
...
@@ -22,14 +22,14 @@
...
@@ -22,14 +22,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase
);
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase
);
static
inline
BaseR
enderer
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
static
inline
struct
strmbase_r
enderer
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
BaseR
enderer
,
filter
.
IBaseFilter_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_r
enderer
,
filter
.
IBaseFilter_iface
);
}
}
static
inline
BaseR
enderer
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
static
inline
struct
strmbase_r
enderer
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
BaseR
enderer
,
filter
);
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_r
enderer
,
filter
);
}
}
static
const
IQualityControlVtbl
Renderer_QualityControl_Vtbl
=
{
static
const
IQualityControlVtbl
Renderer_QualityControl_Vtbl
=
{
...
@@ -40,14 +40,14 @@ static const IQualityControlVtbl Renderer_QualityControl_Vtbl = {
...
@@ -40,14 +40,14 @@ static const IQualityControlVtbl Renderer_QualityControl_Vtbl = {
QualityControlImpl_SetSink
QualityControlImpl_SetSink
};
};
static
inline
BaseR
enderer
*
impl_from_IPin
(
IPin
*
iface
)
static
inline
struct
strmbase_r
enderer
*
impl_from_IPin
(
IPin
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
BaseR
enderer
,
sink
.
pin
.
IPin_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_r
enderer
,
sink
.
pin
.
IPin_iface
);
}
}
static
HRESULT
WINAPI
BaseRenderer_InputPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
)
static
HRESULT
WINAPI
BaseRenderer_InputPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
)
{
{
BaseR
enderer
*
filter
=
impl_from_IPin
(
iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, peer %p, mt %p.
\n
"
,
iface
,
peer
,
mt
);
TRACE
(
"iface %p, peer %p, mt %p.
\n
"
,
iface
,
peer
,
mt
);
...
@@ -67,7 +67,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin *iface, IPin
...
@@ -67,7 +67,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin *iface, IPin
static
HRESULT
WINAPI
BaseRenderer_InputPin_Disconnect
(
IPin
*
iface
)
static
HRESULT
WINAPI
BaseRenderer_InputPin_Disconnect
(
IPin
*
iface
)
{
{
BaseR
enderer
*
filter
=
impl_from_IPin
(
iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
@@ -87,7 +87,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
...
@@ -87,7 +87,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
static
HRESULT
WINAPI
BaseRenderer_InputPin_EndOfStream
(
IPin
*
iface
)
static
HRESULT
WINAPI
BaseRenderer_InputPin_EndOfStream
(
IPin
*
iface
)
{
{
BaseR
enderer
*
pFilter
=
impl_from_IPin
(
iface
);
struct
strmbase_r
enderer
*
pFilter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
@@ -109,7 +109,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
...
@@ -109,7 +109,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
static
HRESULT
WINAPI
BaseRenderer_InputPin_BeginFlush
(
IPin
*
iface
)
static
HRESULT
WINAPI
BaseRenderer_InputPin_BeginFlush
(
IPin
*
iface
)
{
{
BaseR
enderer
*
pFilter
=
impl_from_IPin
(
iface
);
struct
strmbase_r
enderer
*
pFilter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
@@ -126,7 +126,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
...
@@ -126,7 +126,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
static
HRESULT
WINAPI
BaseRenderer_InputPin_EndFlush
(
IPin
*
iface
)
static
HRESULT
WINAPI
BaseRenderer_InputPin_EndFlush
(
IPin
*
iface
)
{
{
BaseR
enderer
*
pFilter
=
impl_from_IPin
(
iface
);
struct
strmbase_r
enderer
*
pFilter
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
@@ -170,7 +170,7 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
...
@@ -170,7 +170,7 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
static
IPin
*
renderer_get_pin
(
struct
strmbase_filter
*
iface
,
unsigned
int
index
)
static
IPin
*
renderer_get_pin
(
struct
strmbase_filter
*
iface
,
unsigned
int
index
)
{
{
BaseR
enderer
*
filter
=
impl_from_strmbase_filter
(
iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_strmbase_filter
(
iface
);
if
(
index
==
0
)
if
(
index
==
0
)
return
&
filter
->
sink
.
pin
.
IPin_iface
;
return
&
filter
->
sink
.
pin
.
IPin_iface
;
...
@@ -179,13 +179,13 @@ static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index)
...
@@ -179,13 +179,13 @@ static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index)
static
void
renderer_destroy
(
struct
strmbase_filter
*
iface
)
static
void
renderer_destroy
(
struct
strmbase_filter
*
iface
)
{
{
BaseR
enderer
*
filter
=
impl_from_strmbase_filter
(
iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_strmbase_filter
(
iface
);
filter
->
pFuncsTable
->
renderer_destroy
(
filter
);
filter
->
pFuncsTable
->
renderer_destroy
(
filter
);
}
}
static
HRESULT
renderer_query_interface
(
struct
strmbase_filter
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
renderer_query_interface
(
struct
strmbase_filter
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
BaseR
enderer
*
filter
=
impl_from_strmbase_filter
(
iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_strmbase_filter
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
if
(
filter
->
pFuncsTable
->
renderer_query_interface
if
(
filter
->
pFuncsTable
->
renderer_query_interface
...
@@ -214,13 +214,13 @@ static const struct strmbase_filter_ops filter_ops =
...
@@ -214,13 +214,13 @@ static const struct strmbase_filter_ops filter_ops =
static
HRESULT
sink_query_accept
(
struct
strmbase_pin
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
static
HRESULT
sink_query_accept
(
struct
strmbase_pin
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
{
{
BaseR
enderer
*
filter
=
impl_from_IPin
(
&
pin
->
IPin_iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_IPin
(
&
pin
->
IPin_iface
);
return
filter
->
pFuncsTable
->
pfnCheckMediaType
(
filter
,
mt
);
return
filter
->
pFuncsTable
->
pfnCheckMediaType
(
filter
,
mt
);
}
}
static
HRESULT
sink_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
static
HRESULT
sink_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
{
{
BaseR
enderer
*
filter
=
impl_from_IPin
(
&
iface
->
IPin_iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_IPin
(
&
iface
->
IPin_iface
);
HRESULT
hr
;
HRESULT
hr
;
if
(
filter
->
pFuncsTable
->
renderer_pin_query_interface
if
(
filter
->
pFuncsTable
->
renderer_pin_query_interface
...
@@ -238,7 +238,7 @@ static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void
...
@@ -238,7 +238,7 @@ static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void
static
HRESULT
WINAPI
BaseRenderer_Receive
(
BaseInputPin
*
pin
,
IMediaSample
*
sample
)
static
HRESULT
WINAPI
BaseRenderer_Receive
(
BaseInputPin
*
pin
,
IMediaSample
*
sample
)
{
{
BaseR
enderer
*
filter
=
impl_from_IPin
(
&
pin
->
pin
.
IPin_iface
);
struct
strmbase_r
enderer
*
filter
=
impl_from_IPin
(
&
pin
->
pin
.
IPin_iface
);
return
BaseRendererImpl_Receive
(
filter
,
sample
);
return
BaseRendererImpl_Receive
(
filter
,
sample
);
}
}
...
@@ -250,7 +250,7 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable =
...
@@ -250,7 +250,7 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable =
.
pfnReceive
=
BaseRenderer_Receive
,
.
pfnReceive
=
BaseRenderer_Receive
,
};
};
void
strmbase_renderer_cleanup
(
BaseR
enderer
*
filter
)
void
strmbase_renderer_cleanup
(
struct
strmbase_r
enderer
*
filter
)
{
{
if
(
filter
->
sink
.
pin
.
peer
)
if
(
filter
->
sink
.
pin
.
peer
)
IPin_Disconnect
(
filter
->
sink
.
pin
.
peer
);
IPin_Disconnect
(
filter
->
sink
.
pin
.
peer
);
...
@@ -271,7 +271,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter)
...
@@ -271,7 +271,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter)
strmbase_filter_cleanup
(
&
filter
->
filter
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
}
}
HRESULT
WINAPI
BaseRendererImpl_Receive
(
BaseRenderer
*
This
,
IMediaSample
*
pSample
)
HRESULT
WINAPI
BaseRendererImpl_Receive
(
struct
strmbase_renderer
*
This
,
IMediaSample
*
pSample
)
{
{
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
REFERENCE_TIME
start
,
stop
;
REFERENCE_TIME
start
,
stop
;
...
@@ -373,7 +373,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
...
@@ -373,7 +373,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
static
HRESULT
WINAPI
BaseRendererImpl_Stop
(
IBaseFilter
*
iface
)
static
HRESULT
WINAPI
BaseRendererImpl_Stop
(
IBaseFilter
*
iface
)
{
{
BaseR
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
struct
strmbase_r
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p)->()
\n
"
,
This
);
TRACE
(
"(%p)->()
\n
"
,
This
);
...
@@ -393,7 +393,7 @@ static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface)
...
@@ -393,7 +393,7 @@ static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface)
static
HRESULT
WINAPI
BaseRendererImpl_Run
(
IBaseFilter
*
iface
,
REFERENCE_TIME
tStart
)
static
HRESULT
WINAPI
BaseRendererImpl_Run
(
IBaseFilter
*
iface
,
REFERENCE_TIME
tStart
)
{
{
BaseR
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
struct
strmbase_r
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"iface %p, start %s.
\n
"
,
iface
,
debugstr_time
(
tStart
));
TRACE
(
"iface %p, start %s.
\n
"
,
iface
,
debugstr_time
(
tStart
));
...
@@ -427,7 +427,7 @@ out:
...
@@ -427,7 +427,7 @@ out:
static
HRESULT
WINAPI
BaseRendererImpl_Pause
(
IBaseFilter
*
iface
)
static
HRESULT
WINAPI
BaseRendererImpl_Pause
(
IBaseFilter
*
iface
)
{
{
BaseR
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
struct
strmbase_r
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->()
\n
"
,
This
);
TRACE
(
"(%p)->()
\n
"
,
This
);
...
@@ -463,7 +463,7 @@ static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface)
...
@@ -463,7 +463,7 @@ static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface)
static
HRESULT
WINAPI
BaseRendererImpl_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
clock
)
static
HRESULT
WINAPI
BaseRendererImpl_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
clock
)
{
{
BaseR
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
struct
strmbase_r
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
...
@@ -477,7 +477,7 @@ static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IRefere
...
@@ -477,7 +477,7 @@ static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IRefere
static
HRESULT
WINAPI
BaseRendererImpl_GetState
(
IBaseFilter
*
iface
,
DWORD
dwMilliSecsTimeout
,
FILTER_STATE
*
pState
)
static
HRESULT
WINAPI
BaseRendererImpl_GetState
(
IBaseFilter
*
iface
,
DWORD
dwMilliSecsTimeout
,
FILTER_STATE
*
pState
)
{
{
HRESULT
hr
;
HRESULT
hr
;
BaseR
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
struct
strmbase_r
enderer
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p)->(%d, %p)
\n
"
,
This
,
dwMilliSecsTimeout
,
pState
);
TRACE
(
"(%p)->(%d, %p)
\n
"
,
This
,
dwMilliSecsTimeout
,
pState
);
...
@@ -510,7 +510,7 @@ static const IBaseFilterVtbl strmbase_renderer_vtbl =
...
@@ -510,7 +510,7 @@ static const IBaseFilterVtbl strmbase_renderer_vtbl =
BaseFilterImpl_QueryVendorInfo
BaseFilterImpl_QueryVendorInfo
};
};
HRESULT
WINAPI
BaseRendererImpl_EndOfStream
(
BaseRenderer
*
iface
)
HRESULT
WINAPI
BaseRendererImpl_EndOfStream
(
struct
strmbase_renderer
*
iface
)
{
{
IMediaEventSink
*
pEventSink
;
IMediaEventSink
*
pEventSink
;
IFilterGraph
*
graph
;
IFilterGraph
*
graph
;
...
@@ -533,7 +533,7 @@ HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface)
...
@@ -533,7 +533,7 @@ HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface)
return
hr
;
return
hr
;
}
}
HRESULT
WINAPI
BaseRendererImpl_BeginFlush
(
BaseRenderer
*
iface
)
HRESULT
WINAPI
BaseRendererImpl_BeginFlush
(
struct
strmbase_renderer
*
iface
)
{
{
TRACE
(
"(%p)
\n
"
,
iface
);
TRACE
(
"(%p)
\n
"
,
iface
);
BaseRendererImpl_ClearPendingSample
(
iface
);
BaseRendererImpl_ClearPendingSample
(
iface
);
...
@@ -541,7 +541,7 @@ HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface)
...
@@ -541,7 +541,7 @@ HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface)
return
S_OK
;
return
S_OK
;
}
}
HRESULT
WINAPI
BaseRendererImpl_EndFlush
(
BaseRenderer
*
iface
)
HRESULT
WINAPI
BaseRendererImpl_EndFlush
(
struct
strmbase_renderer
*
iface
)
{
{
TRACE
(
"(%p)
\n
"
,
iface
);
TRACE
(
"(%p)
\n
"
,
iface
);
QualityControlRender_Start
(
iface
->
qcimpl
,
iface
->
stream_start
);
QualityControlRender_Start
(
iface
->
qcimpl
,
iface
->
stream_start
);
...
@@ -550,7 +550,7 @@ HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface)
...
@@ -550,7 +550,7 @@ HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface)
return
S_OK
;
return
S_OK
;
}
}
HRESULT
WINAPI
BaseRendererImpl_ClearPendingSample
(
BaseR
enderer
*
iface
)
HRESULT
WINAPI
BaseRendererImpl_ClearPendingSample
(
struct
strmbase_r
enderer
*
iface
)
{
{
if
(
iface
->
pMediaSample
)
if
(
iface
->
pMediaSample
)
{
{
...
@@ -560,7 +560,7 @@ HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
...
@@ -560,7 +560,7 @@ HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
return
S_OK
;
return
S_OK
;
}
}
HRESULT
WINAPI
strmbase_renderer_init
(
BaseR
enderer
*
filter
,
IUnknown
*
outer
,
HRESULT
WINAPI
strmbase_renderer_init
(
struct
strmbase_r
enderer
*
filter
,
IUnknown
*
outer
,
const
CLSID
*
clsid
,
const
WCHAR
*
sink_name
,
const
BaseRendererFuncTable
*
func_table
)
const
CLSID
*
clsid
,
const
WCHAR
*
sink_name
,
const
BaseRendererFuncTable
*
func_table
)
{
{
HRESULT
hr
;
HRESULT
hr
;
...
@@ -583,7 +583,7 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer,
...
@@ -583,7 +583,7 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer,
}
}
InitializeCriticalSection
(
&
filter
->
csRenderLock
);
InitializeCriticalSection
(
&
filter
->
csRenderLock
);
filter
->
csRenderLock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
":
BaseR
enderer.csRenderLock"
);
filter
->
csRenderLock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
":
strmbase_r
enderer.csRenderLock"
);
filter
->
state_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
filter
->
state_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
filter
->
advise_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
filter
->
advise_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
filter
->
flush_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
filter
->
flush_event
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
...
...
include/wine/strmbase.h
View file @
487ea5df
...
@@ -505,8 +505,7 @@ HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
...
@@ -505,8 +505,7 @@ HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
#endif
#endif
#endif
#endif
/* BaseRenderer Filter */
struct
strmbase_renderer
typedef
struct
BaseRendererTag
{
{
struct
strmbase_filter
filter
;
struct
strmbase_filter
filter
;
...
@@ -529,50 +528,45 @@ typedef struct BaseRendererTag
...
@@ -529,50 +528,45 @@ typedef struct BaseRendererTag
struct
QualityControlImpl
*
qcimpl
;
struct
QualityControlImpl
*
qcimpl
;
const
struct
BaseRendererFuncTable
*
pFuncsTable
;
const
struct
BaseRendererFuncTable
*
pFuncsTable
;
}
BaseRenderer
;
};
typedef
HRESULT
(
WINAPI
*
BaseRenderer_CheckMediaType
)(
BaseRenderer
*
This
,
const
AM_MEDIA_TYPE
*
pmt
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_CheckMediaType
)(
struct
strmbase_renderer
*
iface
,
const
AM_MEDIA_TYPE
*
mt
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_DoRenderSample
)(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_DoRenderSample
)(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
);
typedef
VOID
(
WINAPI
*
BaseRenderer_OnReceiveFirstSample
)(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_ShouldDrawSampleNow
)(
struct
strmbase_renderer
*
iface
,
typedef
VOID
(
WINAPI
*
BaseRenderer_OnRenderEnd
)(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
);
IMediaSample
*
sample
,
REFERENCE_TIME
*
start
,
REFERENCE_TIME
*
end
);
typedef
VOID
(
WINAPI
*
BaseRenderer_OnRenderStart
)(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_PrepareReceive
)(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
sample
);
typedef
VOID
(
WINAPI
*
BaseRenderer_OnWaitEnd
)(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_EndOfStream
)(
struct
strmbase_renderer
*
iface
);
typedef
VOID
(
WINAPI
*
BaseRenderer_OnWaitStart
)(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_BeginFlush
)
(
struct
strmbase_renderer
*
iface
);
typedef
VOID
(
WINAPI
*
BaseRenderer_PrepareRender
)(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_EndFlush
)
(
struct
strmbase_renderer
*
iface
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_ShouldDrawSampleNow
)(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
,
REFERENCE_TIME
*
pStartTime
,
REFERENCE_TIME
*
pEndTime
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_BreakConnect
)
(
struct
strmbase_renderer
*
iface
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_PrepareReceive
)(
BaseRenderer
*
This
,
IMediaSample
*
pMediaSample
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_CompleteConnect
)
(
struct
strmbase_renderer
*
iface
,
IPin
*
peer
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_EndOfStream
)(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_BeginFlush
)
(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_EndFlush
)
(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_BreakConnect
)
(
BaseRenderer
*
This
);
typedef
HRESULT
(
WINAPI
*
BaseRenderer_CompleteConnect
)
(
BaseRenderer
*
This
,
IPin
*
pReceivePin
);
typedef
struct
BaseRendererFuncTable
{
typedef
struct
BaseRendererFuncTable
{
BaseRenderer_CheckMediaType
pfnCheckMediaType
;
BaseRenderer_CheckMediaType
pfnCheckMediaType
;
BaseRenderer_DoRenderSample
pfnDoRenderSample
;
BaseRenderer_DoRenderSample
pfnDoRenderSample
;
void
(
*
renderer_init_stream
)(
BaseR
enderer
*
iface
);
void
(
*
renderer_init_stream
)(
struct
strmbase_r
enderer
*
iface
);
void
(
*
renderer_start_stream
)(
BaseR
enderer
*
iface
);
void
(
*
renderer_start_stream
)(
struct
strmbase_r
enderer
*
iface
);
void
(
*
renderer_stop_stream
)(
BaseR
enderer
*
iface
);
void
(
*
renderer_stop_stream
)(
struct
strmbase_r
enderer
*
iface
);
BaseRenderer_ShouldDrawSampleNow
pfnShouldDrawSampleNow
;
BaseRenderer_ShouldDrawSampleNow
pfnShouldDrawSampleNow
;
BaseRenderer_PrepareReceive
pfnPrepareReceive
;
BaseRenderer_PrepareReceive
pfnPrepareReceive
;
BaseRenderer_CompleteConnect
pfnCompleteConnect
;
BaseRenderer_CompleteConnect
pfnCompleteConnect
;
BaseRenderer_BreakConnect
pfnBreakConnect
;
BaseRenderer_BreakConnect
pfnBreakConnect
;
BaseRenderer_EndOfStream
pfnEndOfStream
;
BaseRenderer_EndOfStream
pfnEndOfStream
;
BaseRenderer_EndFlush
pfnEndFlush
;
BaseRenderer_EndFlush
pfnEndFlush
;
void
(
*
renderer_destroy
)(
BaseR
enderer
*
iface
);
void
(
*
renderer_destroy
)(
struct
strmbase_r
enderer
*
iface
);
HRESULT
(
*
renderer_query_interface
)(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
);
HRESULT
(
*
renderer_query_interface
)(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
);
HRESULT
(
*
renderer_pin_query_interface
)(
BaseR
enderer
*
iface
,
REFIID
iid
,
void
**
out
);
HRESULT
(
*
renderer_pin_query_interface
)(
struct
strmbase_r
enderer
*
iface
,
REFIID
iid
,
void
**
out
);
}
BaseRendererFuncTable
;
}
BaseRendererFuncTable
;
HRESULT
WINAPI
BaseRendererImpl_
Receive
(
BaseRenderer
*
This
,
IMediaSample
*
pSample
);
HRESULT
WINAPI
BaseRendererImpl_
BeginFlush
(
struct
strmbase_renderer
*
filter
);
HRESULT
WINAPI
BaseRendererImpl_
EndOfStream
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRendererImpl_
ClearPendingSample
(
struct
strmbase_renderer
*
filter
);
HRESULT
WINAPI
BaseRendererImpl_
BeginFlush
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRendererImpl_
EndOfStream
(
struct
strmbase_renderer
*
filter
);
HRESULT
WINAPI
BaseRendererImpl_EndFlush
(
BaseRenderer
*
iface
);
HRESULT
WINAPI
BaseRendererImpl_EndFlush
(
struct
strmbase_renderer
*
filter
);
HRESULT
WINAPI
BaseRendererImpl_
ClearPendingSample
(
BaseRenderer
*
ifac
e
);
HRESULT
WINAPI
BaseRendererImpl_
Receive
(
struct
strmbase_renderer
*
filter
,
IMediaSample
*
sampl
e
);
HRESULT
WINAPI
strmbase_renderer_init
(
BaseR
enderer
*
filter
,
IUnknown
*
outer
,
HRESULT
WINAPI
strmbase_renderer_init
(
struct
strmbase_r
enderer
*
filter
,
IUnknown
*
outer
,
const
CLSID
*
clsid
,
const
WCHAR
*
sink_name
,
const
BaseRendererFuncTable
*
func_table
);
const
CLSID
*
clsid
,
const
WCHAR
*
sink_name
,
const
BaseRendererFuncTable
*
func_table
);
void
strmbase_renderer_cleanup
(
BaseR
enderer
*
filter
);
void
strmbase_renderer_cleanup
(
struct
strmbase_r
enderer
*
filter
);
/* Dll Functions */
/* Dll Functions */
BOOL
WINAPI
STRMBASE_DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
);
BOOL
WINAPI
STRMBASE_DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
);
...
...
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