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
f78ed39b
Commit
f78ed39b
authored
Jul 06, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Use the generic IPersistStream for DMTempoTrack.
parent
ee093103
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
66 deletions
+21
-66
dmutils.h
dlls/dmime/dmutils.h
+0
-8
tempotrack.c
dlls/dmime/tempotrack.c
+21
-58
No files found.
dlls/dmime/dmutils.h
View file @
f78ed39b
...
...
@@ -27,8 +27,6 @@ typedef struct _DMUS_PRIVATE_CHUNK {
DWORD
dwSize
;
/* size of the chunk */
}
DMUS_PRIVATE_CHUNK
,
*
LPDMUS_PRIVATE_CHUNK
;
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
/**
* Parsing utilities
*/
...
...
@@ -51,12 +49,6 @@ typedef struct {
}
guid_info
;
/* used for initialising structs */
#define DM_STRUCT_INIT(x) \
do { \
memset((x), 0, sizeof(*(x))); \
(x)->dwSize = sizeof(*x); \
} while (0)
#define FE(x) { x, #x }
#define GE(x) { &x, #x }
...
...
dlls/dmime/tempotrack.c
View file @
f78ed39b
...
...
@@ -19,6 +19,7 @@
*/
#include "dmime_private.h"
#include "dmobject.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmime
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
...
...
@@ -28,9 +29,8 @@ WINE_DECLARE_DEBUG_CHANNEL(dmfile);
*/
typedef
struct
IDirectMusicTempoTrack
{
IDirectMusicTrack8
IDirectMusicTrack8_iface
;
const
IPersistStreamVtbl
*
PersistStreamVtbl
;
struct
dmobject
dmobj
;
/* IPersistStream only */
LONG
ref
;
DMUS_OBJECTDESC
*
pDesc
;
BOOL
enabled
;
struct
list
Items
;
}
IDirectMusicTempoTrack
;
...
...
@@ -54,7 +54,7 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface(IDirectMusicTrack8 *
IsEqualIID
(
riid
,
&
IID_IDirectMusicTrack8
))
*
ret_iface
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistStream
))
*
ret_iface
=
&
This
->
PersistStreamVtbl
;
*
ret_iface
=
&
This
->
dmobj
.
IPersistStream_iface
;
else
{
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ret_iface
);
return
E_NOINTERFACE
;
...
...
@@ -315,37 +315,14 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = {
IDirectMusicTrack8Impl_Join
};
/* IDirectMusicTempoTrack IPersistStream part: */
static
HRESULT
WINAPI
IDirectMusicTempoTrack_IPersistStream_QueryInterface
(
LPPERSISTSTREAM
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
return
IDirectMusicTrack8_QueryInterface
(
&
This
->
IDirectMusicTrack8_iface
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
IDirectMusicTempoTrack_IPersistStream_AddRef
(
LPPERSISTSTREAM
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
return
IDirectMusicTrack8_AddRef
(
&
This
->
IDirectMusicTrack8_iface
);
}
static
ULONG
WINAPI
IDirectMusicTempoTrack_IPersistStream_Release
(
LPPERSISTSTREAM
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
return
IDirectMusicTrack8_Release
(
&
This
->
IDirectMusicTrack8_iface
);
}
static
HRESULT
WINAPI
IDirectMusicTempoTrack_IPersistStream_GetClassID
(
LPPERSISTSTREAM
iface
,
CLSID
*
pClassID
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
pClassID
);
*
pClassID
=
CLSID_DirectMusicTempoTrack
;
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicTempoTrack_IPersistStream_IsDirty
(
LPPERSISTSTREAM
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
FIXME
(
"(%p): stub, always S_FALSE
\n
"
,
This
);
return
S_FALSE
;
static
inline
IDirectMusicTempoTrack
*
impl_from_IPersistStream
(
IPersistStream
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectMusicTempoTrack
,
dmobj
.
IPersistStream_iface
);
}
static
HRESULT
WINAPI
IDirectMusicTempoTrack_IPersistStream_Load
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
static
HRESULT
WINAPI
IPersistStreamImpl_Load
(
IPersistStream
*
iface
,
IStream
*
pStm
)
{
IDirectMusicTempoTrack
*
This
=
impl_from_IPersistStream
(
iface
);
DMUS_PRIVATE_CHUNK
Chunk
;
DWORD
StreamSize
,
StreamCount
;
LARGE_INTEGER
liMove
;
...
...
@@ -392,27 +369,15 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicTempoTrack_IPersistStream_Save
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
FIXME
(
"(%p): Saving not implemented yet
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IDirectMusicTempoTrack_IPersistStream_GetSizeMax
(
LPPERSISTSTREAM
iface
,
ULARGE_INTEGER
*
pcbSize
)
{
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
PersistStreamVtbl
,
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pcbSize
);
return
E_NOTIMPL
;
}
static
const
IPersistStreamVtbl
DirectMusicTempoTrack_PersistStream_Vtbl
=
{
IDirectMusicTempoTrack_IPersistStream_QueryInterface
,
IDirectMusicTempoTrack_IPersistStream_AddRef
,
IDirectMusicTempoTrack_IPersistStream_Release
,
IDirectMusicTempoTrack_IPersistStream_GetClassID
,
IDirectMusicTempoTrack_IPersistStream_IsDirty
,
IDirectMusicTempoTrack_IPersistStream_Load
,
IDirectMusicTempoTrack_IPersistStream_Save
,
IDirectMusicTempoTrack_IPersistStream_GetSizeMax
static
const
IPersistStreamVtbl
persiststream_vtbl
=
{
dmobj_IPersistStream_QueryInterface
,
dmobj_IPersistStream_AddRef
,
dmobj_IPersistStream_Release
,
dmobj_IPersistStream_GetClassID
,
unimpl_IPersistStream_IsDirty
,
IPersistStreamImpl_Load
,
unimpl_IPersistStream_Save
,
unimpl_IPersistStream_GetSizeMax
};
/* for ClassFactory */
...
...
@@ -427,12 +392,10 @@ HRESULT WINAPI create_dmtempotrack(REFIID lpcGUID, void **ppobj)
return
E_OUTOFMEMORY
;
}
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
PersistStreamVtbl
=
&
DirectMusicTempoTrack_PersistStream_Vtbl
;
track
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
DM_STRUCT_INIT
(
track
->
pDesc
);
track
->
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
track
->
pDesc
->
guidClass
=
CLSID_DirectMusicTempoTrack
;
track
->
ref
=
1
;
dmobject_init
(
&
track
->
dmobj
,
&
CLSID_DirectMusicTempoTrack
,
(
IUnknown
*
)
&
track
->
IDirectMusicTrack8_iface
);
track
->
dmobj
.
IPersistStream_iface
.
lpVtbl
=
&
persiststream_vtbl
;
track
->
enabled
=
TRUE
;
list_init
(
&
track
->
Items
);
...
...
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