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
769057b9
Commit
769057b9
authored
Nov 11, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Add IWMMediaProps to the stream config object.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
639c04a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
wm_reader.c
dlls/winegstreamer/wm_reader.c
+55
-0
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+15
-0
No files found.
dlls/winegstreamer/wm_reader.c
View file @
769057b9
...
...
@@ -292,6 +292,7 @@ static const INSSBufferVtbl buffer_vtbl =
struct
stream_config
{
IWMStreamConfig
IWMStreamConfig_iface
;
IWMMediaProps
IWMMediaProps_iface
;
LONG
refcount
;
const
struct
wm_stream
*
stream
;
...
...
@@ -310,6 +311,8 @@ static HRESULT WINAPI stream_config_QueryInterface(IWMStreamConfig *iface, REFII
if
(
IsEqualGUID
(
iid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
iid
,
&
IID_IWMStreamConfig
))
*
out
=
&
config
->
IWMStreamConfig_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IWMMediaProps
))
*
out
=
&
config
->
IWMMediaProps_iface
;
else
{
*
out
=
NULL
;
...
...
@@ -453,6 +456,57 @@ static const IWMStreamConfigVtbl stream_config_vtbl =
stream_config_SetBufferWindow
,
};
static
struct
stream_config
*
impl_from_IWMMediaProps
(
IWMMediaProps
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
stream_config
,
IWMMediaProps_iface
);
}
static
HRESULT
WINAPI
stream_props_QueryInterface
(
IWMMediaProps
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
stream_config
*
config
=
impl_from_IWMMediaProps
(
iface
);
return
IWMStreamConfig_QueryInterface
(
&
config
->
IWMStreamConfig_iface
,
iid
,
out
);
}
static
ULONG
WINAPI
stream_props_AddRef
(
IWMMediaProps
*
iface
)
{
struct
stream_config
*
config
=
impl_from_IWMMediaProps
(
iface
);
return
IWMStreamConfig_AddRef
(
&
config
->
IWMStreamConfig_iface
);
}
static
ULONG
WINAPI
stream_props_Release
(
IWMMediaProps
*
iface
)
{
struct
stream_config
*
config
=
impl_from_IWMMediaProps
(
iface
);
return
IWMStreamConfig_Release
(
&
config
->
IWMStreamConfig_iface
);
}
static
HRESULT
WINAPI
stream_props_GetType
(
IWMMediaProps
*
iface
,
GUID
*
major_type
)
{
FIXME
(
"iface %p, major_type %p, stub!
\n
"
,
iface
,
major_type
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stream_props_GetMediaType
(
IWMMediaProps
*
iface
,
WM_MEDIA_TYPE
*
mt
,
DWORD
*
size
)
{
FIXME
(
"iface %p, mt %p, size %p, stub!
\n
"
,
iface
,
mt
,
size
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
stream_props_SetMediaType
(
IWMMediaProps
*
iface
,
WM_MEDIA_TYPE
*
mt
)
{
FIXME
(
"iface %p, mt %p, stub!
\n
"
,
iface
,
mt
);
return
E_NOTIMPL
;
}
static
const
IWMMediaPropsVtbl
stream_props_vtbl
=
{
stream_props_QueryInterface
,
stream_props_AddRef
,
stream_props_Release
,
stream_props_GetType
,
stream_props_GetMediaType
,
stream_props_SetMediaType
,
};
static
DWORD
CALLBACK
read_thread
(
void
*
arg
)
{
struct
wm_reader
*
reader
=
arg
;
...
...
@@ -687,6 +741,7 @@ static HRESULT WINAPI profile_GetStream(IWMProfile3 *iface, DWORD index, IWMStre
}
object
->
IWMStreamConfig_iface
.
lpVtbl
=
&
stream_config_vtbl
;
object
->
IWMMediaProps_iface
.
lpVtbl
=
&
stream_props_vtbl
;
object
->
refcount
=
1
;
object
->
stream
=
&
reader
->
streams
[
index
];
IWMProfile3_AddRef
(
&
reader
->
IWMProfile3_iface
);
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
769057b9
...
...
@@ -1125,6 +1125,17 @@ static void check_audio_type(const WM_MEDIA_TYPE *mt)
ok
(
wave_format
->
wFormatTag
==
WAVE_FORMAT_PCM
,
"Got tag %#x.
\n
"
,
wave_format
->
wFormatTag
);
}
static
void
test_stream_media_props
(
IWMStreamConfig
*
config
)
{
IWMMediaProps
*
props
;
HRESULT
hr
;
hr
=
IWMStreamConfig_QueryInterface
(
config
,
&
IID_IWMMediaProps
,
(
void
**
)
&
props
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IWMMediaProps_Release
(
props
);
}
static
void
test_sync_reader_types
(
void
)
{
char
mt_buffer
[
2000
],
mt2_buffer
[
2000
];
...
...
@@ -1177,6 +1188,8 @@ static void test_sync_reader_types(void)
else
ok
(
IsEqualGUID
(
&
majortype
,
&
MEDIATYPE_Audio
),
"Got major type %s.
\n
"
,
debugstr_guid
(
&
majortype
));
test_stream_media_props
(
config
);
ref
=
IWMStreamConfig_Release
(
config
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
@@ -2267,6 +2280,8 @@ static void test_async_reader_types(void)
else
ok
(
IsEqualGUID
(
&
majortype
,
&
MEDIATYPE_Audio
),
"Got major type %s.
\n
"
,
debugstr_guid
(
&
majortype
));
test_stream_media_props
(
config
);
ref
=
IWMStreamConfig_Release
(
config
);
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