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
117a2081
Commit
117a2081
authored
Mar 16, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: The descriptor is already parsed for the segment form.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b73c4ec4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
91 deletions
+2
-91
dmutils.c
dlls/dmime/dmutils.c
+0
-55
dmutils.h
dlls/dmime/dmutils.h
+0
-2
segment.c
dlls/dmime/segment.c
+2
-34
No files found.
dlls/dmime/dmutils.c
View file @
117a2081
...
...
@@ -92,61 +92,6 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_CHUNK* p
return
S_OK
;
}
HRESULT
IDirectMusicUtils_IPersistStream_ParseUNFOGeneric
(
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
LPDMUS_OBJECTDESC
pDesc
)
{
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
/**
* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
* (though strings seem to be valid unicode)
*/
switch
(
pChunk
->
fccID
)
{
case
mmioFOURCC
(
'I'
,
'N'
,
'A'
,
'M'
):
case
DMUS_FOURCC_UNAM_CHUNK
:
{
TRACE
(
": name chunk
\n
"
);
pDesc
->
dwValidData
|=
DMUS_OBJ_NAME
;
IStream_Read
(
pStm
,
pDesc
->
wszName
,
pChunk
->
dwSize
,
NULL
);
TRACE
(
" - wszName: %s
\n
"
,
debugstr_w
(
pDesc
->
wszName
));
break
;
}
case
mmioFOURCC
(
'I'
,
'A'
,
'R'
,
'T'
):
case
DMUS_FOURCC_UART_CHUNK
:
{
TRACE
(
": artist chunk (ignored)
\n
"
);
liMove
.
QuadPart
=
pChunk
->
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
case
mmioFOURCC
(
'I'
,
'C'
,
'O'
,
'P'
):
case
DMUS_FOURCC_UCOP_CHUNK
:
{
TRACE
(
": copyright chunk (ignored)
\n
"
);
liMove
.
QuadPart
=
pChunk
->
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
case
mmioFOURCC
(
'I'
,
'S'
,
'B'
,
'J'
):
case
DMUS_FOURCC_USBJ_CHUNK
:
{
TRACE
(
": subject chunk (ignored)
\n
"
);
liMove
.
QuadPart
=
pChunk
->
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
case
mmioFOURCC
(
'I'
,
'C'
,
'M'
,
'T'
):
case
DMUS_FOURCC_UCMT_CHUNK
:
{
TRACE
(
": comment chunk (ignored)
\n
"
);
liMove
.
QuadPart
=
pChunk
->
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
default:
/* not handled */
return
S_FALSE
;
}
return
S_OK
;
}
HRESULT
IDirectMusicUtils_IPersistStream_ParseReference
(
LPPERSISTSTREAM
iface
,
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
IDirectMusicObject
**
ppObject
)
{
DMUS_PRIVATE_CHUNK
Chunk
;
DWORD
ListSize
[
3
],
ListCount
[
3
];
...
...
dlls/dmime/dmutils.h
View file @
117a2081
...
...
@@ -30,8 +30,6 @@ typedef struct _DMUS_PRIVATE_CHUNK {
/**
* Parsing utilities
*/
extern
HRESULT
IDirectMusicUtils_IPersistStream_ParseDescGeneric
(
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
LPDMUS_OBJECTDESC
pDesc
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IDirectMusicUtils_IPersistStream_ParseUNFOGeneric
(
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
LPDMUS_OBJECTDESC
pDesc
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IDirectMusicUtils_IPersistStream_ParseReference
(
LPPERSISTSTREAM
iface
,
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
IDirectMusicObject
**
ppObject
)
DECLSPEC_HIDDEN
;
/**
...
...
dlls/dmime/segment.c
View file @
117a2081
...
...
@@ -877,7 +877,7 @@ static HRESULT parse_segment_form(IDirectMusicSegment8Impl *This, DWORD StreamSi
{
HRESULT
hr
=
E_FAIL
;
DMUS_PRIVATE_CHUNK
Chunk
;
DWORD
StreamCount
,
ListSize
[
3
],
ListCount
[
3
]
;
DWORD
StreamCount
;
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
StreamSize
-=
sizeof
(
FOURCC
);
...
...
@@ -888,11 +888,7 @@ static HRESULT parse_segment_form(IDirectMusicSegment8Impl *This, DWORD StreamSi
StreamCount
+=
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
)
+
Chunk
.
dwSize
;
TRACE_
(
dmfile
)(
": %s chunk (size = %d)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
hr
=
IDirectMusicUtils_IPersistStream_ParseDescGeneric
(
&
Chunk
,
pStm
,
&
This
->
dmobj
.
desc
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
hr
==
S_FALSE
)
{
switch
(
Chunk
.
fccID
)
{
switch
(
Chunk
.
fccID
)
{
case
DMUS_FOURCC_SEGMENT_CHUNK
:
{
DWORD
checkSz
=
sizeof
(
FOURCC
);
TRACE_
(
dmfile
)(
": segment chunk
\n
"
);
...
...
@@ -938,34 +934,7 @@ static HRESULT parse_segment_form(IDirectMusicSegment8Impl *This, DWORD StreamSi
case
FOURCC_LIST
:
{
IStream_Read
(
pStm
,
&
Chunk
.
fccID
,
sizeof
(
FOURCC
),
NULL
);
TRACE_
(
dmfile
)(
": LIST chunk of type %s"
,
debugstr_fourcc
(
Chunk
.
fccID
));
ListSize
[
0
]
=
Chunk
.
dwSize
-
sizeof
(
FOURCC
);
ListCount
[
0
]
=
0
;
switch
(
Chunk
.
fccID
)
{
case
DMUS_FOURCC_UNFO_LIST
:
{
TRACE_
(
dmfile
)(
": UNFO list
\n
"
);
do
{
IStream_Read
(
pStm
,
&
Chunk
,
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
),
NULL
);
ListCount
[
0
]
+=
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
)
+
Chunk
.
dwSize
;
TRACE_
(
dmfile
)(
": %s chunk (size = %d)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
hr
=
IDirectMusicUtils_IPersistStream_ParseUNFOGeneric
(
&
Chunk
,
pStm
,
&
This
->
dmobj
.
desc
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
hr
==
S_FALSE
)
{
switch
(
Chunk
.
fccID
)
{
default:
{
TRACE_
(
dmfile
)(
": unknown chunk (irrelevant & skipping)
\n
"
);
liMove
.
QuadPart
=
Chunk
.
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
}
}
TRACE_
(
dmfile
)(
": ListCount[0] = %d < ListSize[0] = %d
\n
"
,
ListCount
[
0
],
ListSize
[
0
]);
}
while
(
ListCount
[
0
]
<
ListSize
[
0
]);
break
;
}
case
DMUS_FOURCC_TRACK_LIST
:
{
TRACE_
(
dmfile
)(
": TRACK list
\n
"
);
hr
=
parse_track_list
(
This
,
&
Chunk
,
pStm
);
...
...
@@ -987,7 +956,6 @@ static HRESULT parse_segment_form(IDirectMusicSegment8Impl *This, DWORD StreamSi
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
}
}
TRACE_
(
dmfile
)(
": StreamCount[0] = %d < StreamSize[0] = %d
\n
"
,
StreamCount
,
StreamSize
);
}
while
(
StreamCount
<
StreamSize
);
...
...
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