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
538b86bf
Commit
538b86bf
authored
Oct 31, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement INSSBuffer::GetBufferAndLength().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3b8579d8
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
+19
-3
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+1
-1
No files found.
dlls/winegstreamer/wm_reader.c
View file @
538b86bf
...
...
@@ -171,6 +171,9 @@ struct buffer
{
INSSBuffer
INSSBuffer_iface
;
LONG
refcount
;
DWORD
size
;
BYTE
data
[
1
];
};
static
struct
buffer
*
impl_from_INSSBuffer
(
INSSBuffer
*
iface
)
...
...
@@ -246,8 +249,13 @@ static HRESULT WINAPI buffer_GetBuffer(INSSBuffer *iface, BYTE **data)
static
HRESULT
WINAPI
buffer_GetBufferAndLength
(
INSSBuffer
*
iface
,
BYTE
**
data
,
DWORD
*
size
)
{
FIXME
(
"iface %p, data %p, size %p, stub!
\n
"
,
iface
,
data
,
size
);
return
E_NOTIMPL
;
struct
buffer
*
buffer
=
impl_from_INSSBuffer
(
iface
);
TRACE
(
"buffer %p, data %p, size %p.
\n
"
,
buffer
,
data
,
size
);
*
size
=
buffer
->
size
;
*
data
=
buffer
->
data
;
return
S_OK
;
}
static
const
INSSBufferVtbl
buffer_vtbl
=
...
...
@@ -1579,7 +1587,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
{
case
WG_PARSER_EVENT_BUFFER
:
/* FIXME: Should these be pooled? */
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
if
(
!
(
object
=
calloc
(
1
,
offsetof
(
struct
buffer
,
data
[
event
.
u
.
buffer
.
size
]
))))
{
wg_parser_stream_release_buffer
(
wg_stream
);
return
E_OUTOFMEMORY
;
...
...
@@ -1587,6 +1595,14 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
object
->
INSSBuffer_iface
.
lpVtbl
=
&
buffer_vtbl
;
object
->
refcount
=
1
;
object
->
size
=
event
.
u
.
buffer
.
size
;
if
(
!
wg_parser_stream_copy_buffer
(
wg_stream
,
object
->
data
,
0
,
object
->
size
))
{
/* The GStreamer pin has been flushed. */
free
(
object
);
break
;
}
wg_parser_stream_release_buffer
(
wg_stream
);
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
538b86bf
...
...
@@ -509,7 +509,7 @@ static void test_sync_reader_streaming(void)
if
(
hr
==
S_OK
)
{
hr
=
INSSBuffer_GetBufferAndLength
(
sample
,
&
data
,
&
size
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
INSSBuffer_Release
(
sample
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
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