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
69e654a6
Commit
69e654a6
authored
May 17, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use CONTAINING_RECORD instead of casting.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
23320d05
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
14 deletions
+23
-14
avisplit.c
dlls/quartz/avisplit.c
+7
-3
dsoundrender.c
dlls/quartz/dsoundrender.c
+1
-1
mpegsplit.c
dlls/quartz/mpegsplit.c
+1
-1
vmr9.c
dlls/quartz/vmr9.c
+14
-9
No files found.
dlls/quartz/avisplit.c
View file @
69e654a6
...
...
@@ -105,6 +105,11 @@ static inline AVISplitterImpl *impl_from_IMediaSeeking( IMediaSeeking *iface )
return
CONTAINING_RECORD
(
iface
,
AVISplitterImpl
,
Parser
.
sourceSeeking
.
IMediaSeeking_iface
);
}
static
inline
AVISplitterImpl
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
AVISplitterImpl
,
Parser
.
filter
.
IBaseFilter_iface
);
}
/* The threading stuff cries for an explanation
*
* PullPin starts processing and calls AVISplitter_first_request
...
...
@@ -1025,6 +1030,7 @@ static HRESULT AVISplitter_Disconnect(LPVOID iface);
static
HRESULT
AVISplitter_InputPin_PreConnect
(
IPin
*
iface
,
IPin
*
pConnectPin
,
ALLOCATOR_PROPERTIES
*
props
)
{
PullPin
*
This
=
impl_PullPin_from_IPin
(
iface
);
AVISplitterImpl
*
pAviSplit
=
impl_from_IBaseFilter
(
This
->
pin
.
pinInfo
.
pFilter
);
HRESULT
hr
;
RIFFLIST
list
;
LONGLONG
pos
=
0
;
/* in bytes */
...
...
@@ -1034,8 +1040,6 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
ULONG
x
;
DWORD
indexes
;
AVISplitterImpl
*
pAviSplit
=
(
AVISplitterImpl
*
)
This
->
pin
.
pinInfo
.
pFilter
;
hr
=
IAsyncReader_SyncRead
(
This
->
pReader
,
pos
,
sizeof
(
list
),
(
BYTE
*
)
&
list
);
pos
+=
sizeof
(
list
);
...
...
@@ -1264,7 +1268,7 @@ static HRESULT AVISplitter_Disconnect(LPVOID iface)
static
ULONG
WINAPI
AVISplitter_Release
(
IBaseFilter
*
iface
)
{
AVISplitterImpl
*
This
=
(
AVISplitterImpl
*
)
iface
;
AVISplitterImpl
*
This
=
impl_from_IBaseFilter
(
iface
)
;
ULONG
ref
;
ref
=
InterlockedDecrement
(
&
This
->
Parser
.
filter
.
refCount
);
...
...
dlls/quartz/dsoundrender.c
View file @
69e654a6
...
...
@@ -759,8 +759,8 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
static
HRESULT
WINAPI
DSoundRender_Pause
(
IBaseFilter
*
iface
)
{
DSoundRenderImpl
*
This
=
impl_from_IBaseFilter
(
iface
);
HRESULT
hr
=
S_OK
;
DSoundRenderImpl
*
This
=
(
DSoundRenderImpl
*
)
iface
;
TRACE
(
"(%p/%p)->()
\n
"
,
This
,
iface
);
...
...
dlls/quartz/mpegsplit.c
View file @
69e654a6
...
...
@@ -485,7 +485,7 @@ static HRESULT MPEGSplitter_init_audio(MPEGSplitterImpl *This, const BYTE *heade
static
HRESULT
MPEGSplitter_pre_connect
(
IPin
*
iface
,
IPin
*
pConnectPin
,
ALLOCATOR_PROPERTIES
*
props
)
{
PullPin
*
pPin
=
impl_PullPin_from_IPin
(
iface
);
MPEGSplitterImpl
*
This
=
(
MPEGSplitterImpl
*
)
pPin
->
pin
.
pinInfo
.
pFilter
;
MPEGSplitterImpl
*
This
=
impl_from_IBaseFilter
(
pPin
->
pin
.
pinInfo
.
pFilter
)
;
HRESULT
hr
;
LONGLONG
pos
=
0
;
/* in bytes */
BYTE
header
[
10
];
...
...
dlls/quartz/vmr9.c
View file @
69e654a6
...
...
@@ -206,6 +206,11 @@ static inline VMR9DefaultAllocatorPresenterImpl *impl_from_IVMRSurfaceAllocatorE
static
HRESULT
VMR9DefaultAllocatorPresenterImpl_create
(
struct
quartz_vmr
*
parent
,
LPVOID
*
ppv
);
static
inline
struct
quartz_vmr
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
quartz_vmr
,
renderer
.
filter
.
IBaseFilter_iface
);
}
static
DWORD
VMR9_SendSampleData
(
struct
quartz_vmr
*
This
,
VMR9PresentationInfo
*
info
,
LPBYTE
data
,
DWORD
size
)
{
...
...
@@ -286,7 +291,7 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
static
HRESULT
WINAPI
VMR9_DoRenderSample
(
BaseRenderer
*
iface
,
IMediaSample
*
pSample
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
)
;
LPBYTE
pbSrcStream
=
NULL
;
long
cbSrcStream
=
0
;
REFERENCE_TIME
tStart
,
tStop
;
...
...
@@ -351,7 +356,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS
static
HRESULT
WINAPI
VMR9_CheckMediaType
(
BaseRenderer
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
)
;
if
(
!
IsEqualIID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Video
)
||
!
pmt
->
pbFormat
)
return
S_FALSE
;
...
...
@@ -445,7 +450,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
static
VOID
WINAPI
VMR9_OnStartStreaming
(
BaseRenderer
*
iface
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
)
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -463,7 +468,7 @@ static VOID WINAPI VMR9_OnStartStreaming(BaseRenderer* iface)
static
VOID
WINAPI
VMR9_OnStopStreaming
(
BaseRenderer
*
iface
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
)
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -481,7 +486,7 @@ static HRESULT WINAPI VMR9_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample
static
HRESULT
WINAPI
VMR9_CompleteConnect
(
BaseRenderer
*
This
,
IPin
*
pReceivePin
)
{
struct
quartz_vmr
*
pVMR9
=
(
struct
quartz_vmr
*
)
This
;
struct
quartz_vmr
*
pVMR9
=
impl_from_IBaseFilter
(
&
This
->
filter
.
IBaseFilter_iface
)
;
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -495,7 +500,7 @@ static HRESULT WINAPI VMR9_CompleteConnect(BaseRenderer *This, IPin *pReceivePin
static
HRESULT
WINAPI
VMR9_BreakConnect
(
BaseRenderer
*
This
)
{
struct
quartz_vmr
*
pVMR9
=
(
struct
quartz_vmr
*
)
This
;
struct
quartz_vmr
*
pVMR9
=
impl_from_IBaseFilter
(
&
This
->
filter
.
IBaseFilter_iface
)
;
HRESULT
hr
=
S_OK
;
if
(
!
pVMR9
->
mode
)
...
...
@@ -863,7 +868,7 @@ static const IUnknownVtbl IInner_VTable =
static
HRESULT
WINAPI
VMR9_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
iface
)
;
if
(
This
->
bAggregatable
)
This
->
bUnkOuterValid
=
TRUE
;
...
...
@@ -893,7 +898,7 @@ static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter * iface, REFIID riid, LPVO
static
ULONG
WINAPI
VMR9_AddRef
(
IBaseFilter
*
iface
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
iface
)
;
LONG
ret
;
if
(
This
->
outer_unk
&&
This
->
bUnkOuterValid
)
...
...
@@ -908,7 +913,7 @@ static ULONG WINAPI VMR9_AddRef(IBaseFilter * iface)
static
ULONG
WINAPI
VMR9_Release
(
IBaseFilter
*
iface
)
{
struct
quartz_vmr
*
This
=
(
struct
quartz_vmr
*
)
iface
;
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
iface
)
;
LONG
ret
;
if
(
This
->
outer_unk
&&
This
->
bUnkOuterValid
)
...
...
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