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
410bdd36
Commit
410bdd36
authored
Mar 12, 2004
by
Raphael Junqueira
Committed by
Alexandre Julliard
Mar 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- scripts sub-containers loading
- better segments Load and ParseDescriptor behaviors
parent
5bec0d7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
11 deletions
+101
-11
segment.c
dlls/dmime/segment.c
+50
-8
container.c
dlls/dmloader/container.c
+2
-1
loader.c
dlls/dmloader/loader.c
+1
-1
script.c
dlls/dmscript/script.c
+48
-1
No files found.
dlls/dmime/segment.c
View file @
410bdd36
...
...
@@ -414,7 +414,7 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicObject_ParseDescriptor (LPDI
TRACE_
(
dmfile
)(
": %s chunk (size = 0x%04lx)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
switch
(
Chunk
.
fccID
)
{
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
(though strings seem to be valid unicode) */
(though strings seem to be valid unicode) */
case
mmioFOURCC
(
'I'
,
'N'
,
'A'
,
'M'
):
case
DMUS_FOURCC_UNAM_CHUNK
:
{
TRACE_
(
dmfile
)(
": name chunk
\n
"
);
...
...
@@ -461,11 +461,29 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicObject_ParseDescriptor (LPDI
}
while
(
ListCount
[
0
]
<
ListSize
[
0
]);
break
;
}
default:
{
TRACE_
(
dmfile
)(
": unknown (skipping)
\n
"
);
liMove
.
QuadPart
=
Chunk
.
dwSize
-
sizeof
(
FOURCC
);
IStream_Seek
(
pStream
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
case
DMUS_FOURCC_TRACK_LIST
:
{
TRACE_
(
dmfile
)(
": TRACK list
\n
"
);
do
{
IStream_Read
(
pStream
,
&
Chunk
,
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
),
NULL
);
ListCount
[
0
]
+=
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
)
+
Chunk
.
dwSize
;
TRACE_
(
dmfile
)(
": %s chunk (size = %ld)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
switch
(
Chunk
.
fccID
)
{
default:
{
TRACE_
(
dmfile
)(
": unknown chunk (irrevelant & skipping)
\n
"
);
liMove
.
QuadPart
=
Chunk
.
dwSize
;
IStream_Seek
(
pStream
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
}
TRACE_
(
dmfile
)(
": ListCount[0] = %ld < ListSize[0] = %ld
\n
"
,
ListCount
[
0
],
ListSize
[
0
]);
}
while
(
ListCount
[
0
]
<
ListSize
[
0
]);
break
;
}
default:
{
TRACE_
(
dmfile
)(
": unknown (skipping)
\n
"
);
liMove
.
QuadPart
=
Chunk
.
dwSize
-
sizeof
(
FOURCC
);
IStream_Seek
(
pStream
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
}
break
;
...
...
@@ -480,6 +498,10 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicObject_ParseDescriptor (LPDI
TRACE_
(
dmfile
)(
": StreamCount[0] = %ld < StreamSize[0] = %ld
\n
"
,
StreamCount
,
StreamSize
);
}
while
(
StreamCount
<
StreamSize
);
break
;
}
else
if
(
Chunk
.
fccID
==
mmioFOURCC
(
'W'
,
'A'
,
'V'
,
'E'
))
{
TRACE_
(
dmfile
)(
": wave form, loading not yet implemented
\n
"
);
liMove
.
QuadPart
=
StreamSize
;
IStream_Seek
(
pStream
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
/* skip the rest of the chunk */
}
else
{
TRACE_
(
dmfile
)(
": unexpected chunk; loading failed)
\n
"
);
liMove
.
QuadPart
=
StreamSize
;
...
...
@@ -540,7 +562,8 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_IsDirty (LPPERSISTSTREAM
HRESULT
WINAPI
IDirectMusicSegment8Impl_IPersistStream_Load
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
)
{
ICOM_THIS_MULTI
(
IDirectMusicSegment8Impl
,
PersistStreamVtbl
,
iface
);
FOURCC
chunkID
;
DWORD
chunkSize
,
StreamSize
,
StreamCount
,
ListSize
[
3
],
ListCount
[
3
];
DWORD
chunkSize
;
DWORD
StreamSize
,
StreamCount
,
ListSize
[
3
],
ListCount
[
3
];
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
FIXME
(
"(%p, %p): Loading not implemented yet
\n
"
,
This
,
pStm
);
...
...
@@ -595,7 +618,7 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTREAM ifa
TRACE_
(
dmfile
)(
": %s chunk (size = %ld)"
,
debugstr_fourcc
(
chunkID
),
chunkSize
);
switch
(
chunkID
)
{
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
(though strings seem to be valid unicode) */
(though strings seem to be valid unicode) */
case
mmioFOURCC
(
'I'
,
'N'
,
'A'
,
'M'
):
case
DMUS_FOURCC_UNAM_CHUNK
:
{
TRACE_
(
dmfile
)(
": name chunk
\n
"
);
...
...
@@ -642,6 +665,25 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTREAM ifa
}
while
(
ListCount
[
0
]
<
ListSize
[
0
]);
break
;
}
case
DMUS_FOURCC_TRACK_LIST
:
{
TRACE_
(
dmfile
)(
": TRACK list
\n
"
);
do
{
IStream_Read
(
pStm
,
&
chunkID
,
sizeof
(
FOURCC
),
NULL
);
IStream_Read
(
pStm
,
&
chunkSize
,
sizeof
(
FOURCC
),
NULL
);
ListCount
[
0
]
+=
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
)
+
chunkSize
;
TRACE_
(
dmfile
)(
": %s chunk (size = %ld)"
,
debugstr_fourcc
(
chunkID
),
chunkSize
);
switch
(
chunkID
)
{
default:
{
TRACE_
(
dmfile
)(
": unknown chunk (irrevelant & skipping)
\n
"
);
liMove
.
QuadPart
=
chunkSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
}
}
TRACE_
(
dmfile
)(
": ListCount[0] = %ld < ListSize[0] = %ld
\n
"
,
ListCount
[
0
],
ListSize
[
0
]);
}
while
(
ListCount
[
0
]
<
ListSize
[
0
]);
break
;
}
default:
{
TRACE_
(
dmfile
)(
": unknown (skipping)
\n
"
);
liMove
.
QuadPart
=
chunkSize
-
sizeof
(
FOURCC
);
...
...
dlls/dmloader/container.c
View file @
410bdd36
...
...
@@ -361,7 +361,8 @@ ULONG WINAPI IDirectMusicContainerImpl_IPersistStream_Release (LPPERSISTSTREAM i
}
HRESULT
WINAPI
IDirectMusicContainerImpl_IPersistStream_GetClassID
(
LPPERSISTSTREAM
iface
,
CLSID
*
pClassID
)
{
return
E_NOTIMPL
;
*
pClassID
=
CLSID_DirectMusicContainer
;
return
S_OK
;
}
HRESULT
WINAPI
IDirectMusicContainerImpl_IPersistStream_IsDirty
(
LPPERSISTSTREAM
iface
)
{
...
...
dlls/dmloader/loader.c
View file @
410bdd36
...
...
@@ -444,7 +444,7 @@ HRESULT WINAPI IDirectMusicLoader8Impl_GetObject (LPDIRECTMUSICLOADER8 iface, LP
IDirectMusicObject_SetDescriptor
(
pObject
,
&
GotDesc
);
/* release all loading related stuff */
TRACE
(
": releasing all loading-related stuff
\n
"
);
IStream_Release
(
pStream
);
IStream_Release
(
pStream
);
IPersistStream_Release
(
pPersistStream
);
}
else
{
return
E_FAIL
;
...
...
dlls/dmscript/script.c
View file @
410bdd36
...
...
@@ -427,6 +427,8 @@ HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREAM iface
DMUS_PRIVATE_CHUNK
Chunk
;
DWORD
StreamSize
,
StreamCount
,
ListSize
[
3
],
ListCount
[
3
];
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
LPDIRECTMUSICGETLOADER
pGetLoader
=
NULL
;
LPDIRECTMUSICLOADER
pLoader
=
NULL
;
FIXME
(
"(%p, %p): Loading not implemented yet
\n
"
,
This
,
pStm
);
IStream_Read
(
pStm
,
&
Chunk
,
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
),
NULL
);
...
...
@@ -498,6 +500,51 @@ HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREAM iface
IStream_Read
(
pStm
,
This
->
pDesc
->
wszCategory
,
Chunk
.
dwSize
,
NULL
);
break
;
}
case
FOURCC_RIFF
:
{
IDirectMusicObject
*
pObject
=
NULL
;
DMUS_OBJECTDESC
desc
;
desc
.
dwValidData
=
DMUS_OBJ_STREAM
|
DMUS_OBJ_CLASS
;
desc
.
guidClass
=
CLSID_DirectMusicContainer
;
desc
.
pStream
=
NULL
;
IStream_Clone
(
pStm
,
&
desc
.
pStream
);
liMove
.
QuadPart
=
0
;
liMove
.
QuadPart
-=
(
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
));
IStream_Seek
(
desc
.
pStream
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
IStream_QueryInterface
(
pStm
,
&
IID_IDirectMusicGetLoader
,
(
LPVOID
*
)
&
pGetLoader
);
IDirectMusicGetLoader_GetLoader
(
pGetLoader
,
&
pLoader
);
IDirectMusicGetLoader_Release
(
pGetLoader
);
if
(
SUCCEEDED
(
IDirectMusicLoader_GetObject
(
pLoader
,
&
desc
,
&
IID_IDirectMusicObject
,
(
LPVOID
*
)
&
pObject
)))
{
IDirectMusicObject_Release
(
pObject
);
}
else
{
ERR_
(
dmfile
)(
"Error on GetObject while trying to load Scrip SubContainer
\n
"
);
}
IDirectMusicLoader_Release
(
pLoader
);
pLoader
=
NULL
;
/* release loader */
IStream_Release
(
desc
.
pStream
);
desc
.
pStream
=
NULL
;
/* release cloned stream */
liMove
.
QuadPart
=
Chunk
.
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
/*
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
TRACE_(dmfile)(": RIFF chunk of type %s", debugstr_fourcc(Chunk.fccID));
ListSize[0] = Chunk.dwSize - sizeof(FOURCC);
ListCount[0] = 0;
switch (Chunk.fccID) {
default: {
TRACE_(dmfile)(": unknown (skipping)\n");
liMove.QuadPart = Chunk.dwSize - sizeof(FOURCC);
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
break;
}
}
*/
break
;
}
case
FOURCC_LIST
:
{
IStream_Read
(
pStm
,
&
Chunk
.
fccID
,
sizeof
(
FOURCC
),
NULL
);
TRACE_
(
dmfile
)(
": LIST chunk of type %s"
,
debugstr_fourcc
(
Chunk
.
fccID
));
...
...
@@ -549,7 +596,7 @@ HRESULT WINAPI IDirectMusicScriptImpl_IPersistStream_Load (LPPERSISTSTREAM iface
break
;
}
default:
{
TRACE_
(
dmfile
)(
": unknown chunk (irrevelant & skipping)
\n
"
);
TRACE_
(
dmfile
)(
": unknown
sub-
chunk (irrevelant & skipping)
\n
"
);
liMove
.
QuadPart
=
Chunk
.
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
break
;
...
...
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