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
c3811e84
Commit
c3811e84
authored
Nov 02, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement IWMHeaderInfo::GetAttributeByName(L"Seekable").
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
799c7704
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
wm_reader.c
dlls/winegstreamer/wm_reader.c
+21
-0
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+22
-0
No files found.
dlls/winegstreamer/wm_reader.c
View file @
c3811e84
...
...
@@ -910,6 +910,27 @@ static HRESULT WINAPI header_info_GetAttributeByName(IWMHeaderInfo3 *iface, WORD
memcpy
(
value
,
&
duration
,
sizeof
(
QWORD
));
return
S_OK
;
}
else
if
(
!
wcscmp
(
name
,
L"Seekable"
))
{
if
(
*
stream_number
)
{
WARN
(
"Requesting duration for stream %u, returning ASF_E_NOTFOUND.
\n
"
,
*
stream_number
);
return
ASF_E_NOTFOUND
;
}
*
size
=
sizeof
(
BOOL
);
if
(
!
value
)
{
*
type
=
WMT_TYPE_BOOL
;
return
S_OK
;
}
if
(
req_size
<
*
size
)
return
ASF_E_BUFFERTOOSMALL
;
*
type
=
WMT_TYPE_BOOL
;
*
(
BOOL
*
)
value
=
TRUE
;
return
S_OK
;
}
else
{
FIXME
(
"Unknown attribute %s.
\n
"
,
debugstr_w
(
name
));
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
c3811e84
...
...
@@ -468,6 +468,17 @@ static void test_reader_attributes(IWMProfile *profile)
ok
(
ret_stream_number
==
stream_number
,
"Expected stream number %u, got %u.
\n
"
,
stream_number
,
ret_stream_number
);
size
=
sizeof
(
DWORD
);
type
=
0xdeadbeef
;
dword
=
0xdeadbeef
;
hr
=
IWMHeaderInfo_GetAttributeByName
(
header_info
,
&
ret_stream_number
,
L"Seekable"
,
&
type
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
hr
==
ASF_E_NOTFOUND
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
type
==
0xdeadbeef
,
"Got type %#x.
\n
"
,
type
);
ok
(
size
==
sizeof
(
DWORD
),
"Got size %u.
\n
"
,
size
);
ok
(
ret_stream_number
==
stream_number
,
"Expected stream number %u, got %u.
\n
"
,
stream_number
,
ret_stream_number
);
IWMStreamConfig_Release
(
config
);
}
...
...
@@ -546,6 +557,17 @@ static void test_reader_attributes(IWMProfile *profile)
ok
(
size
==
sizeof
(
QWORD
),
"Got size %u.
\n
"
,
size
);
ok
(
stream_number
==
0
,
"Got stream number %u.
\n
"
,
stream_number
);
size
=
sizeof
(
DWORD
);
type
=
0xdeadbeef
;
dword
=
0xdeadbeef
;
hr
=
IWMHeaderInfo_GetAttributeByName
(
header_info
,
&
stream_number
,
L"Seekable"
,
&
type
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
type
==
WMT_TYPE_BOOL
,
"Got type %#x.
\n
"
,
type
);
ok
(
size
==
sizeof
(
DWORD
),
"Got size %u.
\n
"
,
size
);
ok
(
dword
==
TRUE
,
"Got duration %I64u.
\n
"
,
duration
);
ok
(
stream_number
==
0
,
"Got stream number %u.
\n
"
,
stream_number
);
IWMHeaderInfo_Release
(
header_info
);
}
...
...
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