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
54f825d2
Commit
54f825d2
authored
Nov 10, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement IWMSyncReader::SetReadStreamSamples().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cad38401
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
7 deletions
+46
-7
wm_syncreader.c
dlls/winegstreamer/wm_syncreader.c
+6
-4
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+40
-3
No files found.
dlls/winegstreamer/wm_syncreader.c
View file @
54f825d2
...
...
@@ -296,11 +296,13 @@ static HRESULT WINAPI WMSyncReader_SetRangeByFrame(IWMSyncReader2 *iface, WORD s
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WMSyncReader_SetReadStreamSamples
(
IWMSyncReader2
*
iface
,
WORD
stream_num
,
BOOL
compressed
)
static
HRESULT
WINAPI
WMSyncReader_SetReadStreamSamples
(
IWMSyncReader2
*
iface
,
WORD
stream_num
ber
,
BOOL
compressed
)
{
struct
sync_reader
*
This
=
impl_from_IWMSyncReader2
(
iface
);
FIXME
(
"(%p)->(%u %x): stub!
\n
"
,
This
,
stream_num
,
compressed
);
return
E_NOTIMPL
;
struct
sync_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
TRACE
(
"reader %p, stream_index %u, compressed %d.
\n
"
,
reader
,
stream_number
,
compressed
);
return
wm_reader_set_read_compressed
(
&
reader
->
reader
,
stream_number
,
compressed
);
}
static
HRESULT
WINAPI
WMSyncReader_SetStreamsSelected
(
IWMSyncReader2
*
iface
,
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
54f825d2
...
...
@@ -821,6 +821,45 @@ static void test_sync_reader_selection(IWMSyncReader *reader)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
static
void
test_sync_reader_compressed
(
IWMSyncReader
*
reader
)
{
QWORD
pts
,
duration
;
INSSBuffer
*
sample
;
WORD
stream_number
;
DWORD
flags
;
HRESULT
hr
;
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
0
,
TRUE
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
1
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
2
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
3
,
TRUE
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetRange
(
reader
,
0
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_GetNextSample
(
reader
,
0
,
&
sample
,
&
pts
,
&
duration
,
&
flags
,
NULL
,
&
stream_number
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
INSSBuffer_Release
(
sample
);
for
(;;)
{
hr
=
IWMSyncReader_GetNextSample
(
reader
,
0
,
&
sample
,
&
pts
,
&
duration
,
&
flags
,
NULL
,
&
stream_number
);
if
(
hr
==
NS_E_NO_MORE_SAMPLES
)
break
;
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
INSSBuffer_Release
(
sample
);
}
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
1
,
FALSE
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
2
,
FALSE
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
static
void
test_sync_reader_streaming
(
void
)
{
DWORD
size
,
capacity
,
flags
,
output_number
,
expect_output_number
;
...
...
@@ -883,9 +922,6 @@ static void test_sync_reader_streaming(void)
ref
=
IWMStreamConfig_Release
(
config
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
hr
=
IWMSyncReader_SetReadStreamSamples
(
reader
,
stream_numbers
[
i
],
FALSE
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
hr
=
IWMProfile_GetStream
(
profile
,
2
,
&
config
);
...
...
@@ -1028,6 +1064,7 @@ static void test_sync_reader_streaming(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
test_sync_reader_selection
(
reader
);
test_sync_reader_compressed
(
reader
);
test_reader_attributes
(
profile
);
...
...
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