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
02216db8
Commit
02216db8
authored
Jul 02, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Move VideoRenderer_create() to avoid forward declarations.
parent
37cfaa2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
62 deletions
+62
-62
videorenderer.c
dlls/quartz/videorenderer.c
+62
-62
No files found.
dlls/quartz/videorenderer.c
View file @
02216db8
...
@@ -42,12 +42,6 @@
...
@@ -42,12 +42,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
quartz
);
WINE_DEFAULT_DEBUG_CHANNEL
(
quartz
);
static
const
IBaseFilterVtbl
VideoRenderer_Vtbl
;
static
const
IUnknownVtbl
IInner_VTable
;
static
const
IBasicVideoVtbl
IBasicVideo_VTable
;
static
const
IVideoWindowVtbl
IVideoWindow_VTable
;
static
const
IAMFilterMiscFlagsVtbl
IAMFilterMiscFlags_Vtbl
;
typedef
struct
VideoRendererImpl
typedef
struct
VideoRendererImpl
{
{
BaseRenderer
renderer
;
BaseRenderer
renderer
;
...
@@ -640,62 +634,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
...
@@ -640,62 +634,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
VideoRenderer_SetTargetRect
VideoRenderer_SetTargetRect
};
};
HRESULT
VideoRenderer_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
{
HRESULT
hr
;
VideoRendererImpl
*
pVideoRenderer
;
TRACE
(
"(%p, %p)
\n
"
,
pUnkOuter
,
ppv
);
*
ppv
=
NULL
;
pVideoRenderer
=
CoTaskMemAlloc
(
sizeof
(
VideoRendererImpl
));
pVideoRenderer
->
IUnknown_inner
.
lpVtbl
=
&
IInner_VTable
;
pVideoRenderer
->
IAMFilterMiscFlags_iface
.
lpVtbl
=
&
IAMFilterMiscFlags_Vtbl
;
pVideoRenderer
->
init
=
0
;
ZeroMemory
(
&
pVideoRenderer
->
SourceRect
,
sizeof
(
RECT
));
ZeroMemory
(
&
pVideoRenderer
->
DestRect
,
sizeof
(
RECT
));
ZeroMemory
(
&
pVideoRenderer
->
WindowPos
,
sizeof
(
RECT
));
if
(
pUnkOuter
)
pVideoRenderer
->
outer_unk
=
pUnkOuter
;
else
pVideoRenderer
->
outer_unk
=
&
pVideoRenderer
->
IUnknown_inner
;
hr
=
BaseRenderer_Init
(
&
pVideoRenderer
->
renderer
,
&
VideoRenderer_Vtbl
,
pUnkOuter
,
&
CLSID_VideoRenderer
,
(
DWORD_PTR
)(
__FILE__
": VideoRendererImpl.csFilter"
),
&
BaseFuncTable
);
if
(
FAILED
(
hr
))
goto
fail
;
hr
=
BaseControlWindow_Init
(
&
pVideoRenderer
->
baseControlWindow
,
&
IVideoWindow_VTable
,
&
pVideoRenderer
->
renderer
.
filter
,
&
pVideoRenderer
->
renderer
.
filter
.
csFilter
,
&
pVideoRenderer
->
renderer
.
pInputPin
->
pin
,
&
renderer_BaseWindowFuncTable
);
if
(
FAILED
(
hr
))
goto
fail
;
hr
=
BaseControlVideo_Init
(
&
pVideoRenderer
->
baseControlVideo
,
&
IBasicVideo_VTable
,
&
pVideoRenderer
->
renderer
.
filter
,
&
pVideoRenderer
->
renderer
.
filter
.
csFilter
,
&
pVideoRenderer
->
renderer
.
pInputPin
->
pin
,
&
renderer_BaseControlVideoFuncTable
);
if
(
FAILED
(
hr
))
goto
fail
;
if
(
!
CreateRenderingSubsystem
(
pVideoRenderer
))
{
hr
=
E_FAIL
;
goto
fail
;
}
*
ppv
=
&
pVideoRenderer
->
IUnknown_inner
;
return
S_OK
;
fail:
BaseRendererImpl_Release
(
&
pVideoRenderer
->
renderer
.
filter
.
IBaseFilter_iface
);
CoTaskMemFree
(
pVideoRenderer
);
return
hr
;
}
HRESULT
VideoRendererDefault_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
{
/* TODO: Attempt to use the VMR-7 renderer instead when possible */
return
VideoRenderer_create
(
pUnkOuter
,
ppv
);
}
static
inline
VideoRendererImpl
*
impl_from_IUnknown
(
IUnknown
*
iface
)
static
inline
VideoRendererImpl
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
IUnknown_inner
);
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
IUnknown_inner
);
...
@@ -1060,3 +998,65 @@ static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl = {
...
@@ -1060,3 +998,65 @@ static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl = {
AMFilterMiscFlags_Release
,
AMFilterMiscFlags_Release
,
AMFilterMiscFlags_GetMiscFlags
AMFilterMiscFlags_GetMiscFlags
};
};
HRESULT
VideoRenderer_create
(
IUnknown
*
pUnkOuter
,
void
**
ppv
)
{
HRESULT
hr
;
VideoRendererImpl
*
pVideoRenderer
;
TRACE
(
"(%p, %p)
\n
"
,
pUnkOuter
,
ppv
);
*
ppv
=
NULL
;
pVideoRenderer
=
CoTaskMemAlloc
(
sizeof
(
VideoRendererImpl
));
pVideoRenderer
->
IUnknown_inner
.
lpVtbl
=
&
IInner_VTable
;
pVideoRenderer
->
IAMFilterMiscFlags_iface
.
lpVtbl
=
&
IAMFilterMiscFlags_Vtbl
;
pVideoRenderer
->
init
=
0
;
ZeroMemory
(
&
pVideoRenderer
->
SourceRect
,
sizeof
(
RECT
));
ZeroMemory
(
&
pVideoRenderer
->
DestRect
,
sizeof
(
RECT
));
ZeroMemory
(
&
pVideoRenderer
->
WindowPos
,
sizeof
(
RECT
));
if
(
pUnkOuter
)
pVideoRenderer
->
outer_unk
=
pUnkOuter
;
else
pVideoRenderer
->
outer_unk
=
&
pVideoRenderer
->
IUnknown_inner
;
hr
=
BaseRenderer_Init
(
&
pVideoRenderer
->
renderer
,
&
VideoRenderer_Vtbl
,
pUnkOuter
,
&
CLSID_VideoRenderer
,
(
DWORD_PTR
)(
__FILE__
": VideoRendererImpl.csFilter"
),
&
BaseFuncTable
);
if
(
FAILED
(
hr
))
goto
fail
;
hr
=
BaseControlWindow_Init
(
&
pVideoRenderer
->
baseControlWindow
,
&
IVideoWindow_VTable
,
&
pVideoRenderer
->
renderer
.
filter
,
&
pVideoRenderer
->
renderer
.
filter
.
csFilter
,
&
pVideoRenderer
->
renderer
.
pInputPin
->
pin
,
&
renderer_BaseWindowFuncTable
);
if
(
FAILED
(
hr
))
goto
fail
;
hr
=
BaseControlVideo_Init
(
&
pVideoRenderer
->
baseControlVideo
,
&
IBasicVideo_VTable
,
&
pVideoRenderer
->
renderer
.
filter
,
&
pVideoRenderer
->
renderer
.
filter
.
csFilter
,
&
pVideoRenderer
->
renderer
.
pInputPin
->
pin
,
&
renderer_BaseControlVideoFuncTable
);
if
(
FAILED
(
hr
))
goto
fail
;
if
(
!
CreateRenderingSubsystem
(
pVideoRenderer
))
{
hr
=
E_FAIL
;
goto
fail
;
}
*
ppv
=
&
pVideoRenderer
->
IUnknown_inner
;
return
S_OK
;
fail:
BaseRendererImpl_Release
(
&
pVideoRenderer
->
renderer
.
filter
.
IBaseFilter_iface
);
CoTaskMemFree
(
pVideoRenderer
);
return
hr
;
}
HRESULT
VideoRendererDefault_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
{
/* TODO: Attempt to use the VMR-7 renderer instead when possible */
return
VideoRenderer_create
(
pUnkOuter
,
ppv
);
}
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