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
25adac6e
Commit
25adac6e
authored
Nov 08, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement INSSBuffer::GetMaxLength().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dc1a1ae4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
wm_reader.c
dlls/winegstreamer/wm_reader.c
+6
-2
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+14
-2
No files found.
dlls/winegstreamer/wm_reader.c
View file @
25adac6e
...
...
@@ -237,8 +237,12 @@ static HRESULT WINAPI buffer_SetLength(INSSBuffer *iface, DWORD size)
static
HRESULT
WINAPI
buffer_GetMaxLength
(
INSSBuffer
*
iface
,
DWORD
*
size
)
{
FIXME
(
"iface %p, size %p, stub!
\n
"
,
iface
,
size
);
return
E_NOTIMPL
;
struct
buffer
*
buffer
=
impl_from_INSSBuffer
(
iface
);
TRACE
(
"buffer %p, size %p.
\n
"
,
buffer
,
size
);
*
size
=
buffer
->
size
;
return
S_OK
;
}
static
HRESULT
WINAPI
buffer_GetBuffer
(
INSSBuffer
*
iface
,
BYTE
**
data
)
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
25adac6e
...
...
@@ -591,7 +591,7 @@ static void test_reader_attributes(IWMProfile *profile)
static
void
test_sync_reader_streaming
(
void
)
{
DWORD
size
,
flags
,
output_number
,
expect_output_number
;
DWORD
size
,
capacity
,
flags
,
output_number
,
expect_output_number
;
const
WCHAR
*
filename
=
load_resource
(
L"test.wmv"
);
WORD
stream_numbers
[
2
],
stream_number
;
IWMStreamConfig
*
config
,
*
config2
;
...
...
@@ -682,6 +682,10 @@ static void test_sync_reader_streaming(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
data2
==
data
,
"Data pointers didn't match.
\n
"
);
hr
=
INSSBuffer_GetMaxLength
(
sample
,
&
capacity
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
size
<=
capacity
,
"Size %u exceeds capacity %u.
\n
"
,
size
,
capacity
);
ref
=
INSSBuffer_Release
(
sample
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
@@ -747,6 +751,10 @@ static void test_sync_reader_streaming(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
data2
==
data
,
"Data pointers didn't match.
\n
"
);
hr
=
INSSBuffer_GetMaxLength
(
sample
,
&
capacity
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
size
<=
capacity
,
"Size %u exceeds capacity %u.
\n
"
,
size
,
capacity
);
ref
=
INSSBuffer_Release
(
sample
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
...
...
@@ -1193,9 +1201,9 @@ static HRESULT WINAPI callback_OnSample(IWMReaderCallback *iface, DWORD output,
QWORD
time
,
QWORD
duration
,
DWORD
flags
,
INSSBuffer
*
sample
,
void
*
context
)
{
struct
callback
*
callback
=
impl_from_IWMReaderCallback
(
iface
);
DWORD
size
,
capacity
;
BYTE
*
data
,
*
data2
;
HRESULT
hr
;
DWORD
size
;
if
(
winetest_debug
>
1
)
trace
(
"%u: %04x: IWMReaderCallback::OnSample(output %u, time %I64u, duration %I64u, flags %#x)
\n
"
,
...
...
@@ -1210,6 +1218,10 @@ static HRESULT WINAPI callback_OnSample(IWMReaderCallback *iface, DWORD output,
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
data2
==
data
,
"Data pointers didn't match.
\n
"
);
hr
=
INSSBuffer_GetMaxLength
(
sample
,
&
capacity
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
size
<=
capacity
,
"Size %u exceeds capacity %u.
\n
"
,
size
,
capacity
);
ok
(
callback
->
got_started
>
0
,
"Got %u WMT_STARTED callbacks.
\n
"
,
callback
->
got_started
);
ok
(
!
callback
->
got_eof
,
"Got %u WMT_EOF callbacks.
\n
"
,
callback
->
got_eof
);
++
callback
->
got_sample
;
...
...
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