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
3864d235
Commit
3864d235
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 IWMOutputMediaProps::GetType().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fca2f6c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
+33
-5
wm_reader.c
dlls/winegstreamer/wm_reader.c
+6
-2
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+27
-3
No files found.
dlls/winegstreamer/wm_reader.c
View file @
3864d235
...
@@ -85,8 +85,12 @@ static ULONG WINAPI output_props_Release(IWMOutputMediaProps *iface)
...
@@ -85,8 +85,12 @@ static ULONG WINAPI output_props_Release(IWMOutputMediaProps *iface)
static
HRESULT
WINAPI
output_props_GetType
(
IWMOutputMediaProps
*
iface
,
GUID
*
major_type
)
static
HRESULT
WINAPI
output_props_GetType
(
IWMOutputMediaProps
*
iface
,
GUID
*
major_type
)
{
{
FIXME
(
"iface %p, major_type %p, stub!
\n
"
,
iface
,
major_type
);
const
struct
output_props
*
props
=
impl_from_IWMOutputMediaProps
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, major_type %p.
\n
"
,
iface
,
major_type
);
*
major_type
=
props
->
mt
.
majortype
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
output_props_GetMediaType
(
IWMOutputMediaProps
*
iface
,
WM_MEDIA_TYPE
*
mt
,
DWORD
*
size
)
static
HRESULT
WINAPI
output_props_GetMediaType
(
IWMOutputMediaProps
*
iface
,
WM_MEDIA_TYPE
*
mt
,
DWORD
*
size
)
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
3864d235
...
@@ -861,12 +861,12 @@ static void test_sync_reader_types(void)
...
@@ -861,12 +861,12 @@ static void test_sync_reader_types(void)
bool
got_video
=
false
,
got_audio
=
false
;
bool
got_video
=
false
,
got_audio
=
false
;
DWORD
size
,
ret_size
,
output_number
;
DWORD
size
,
ret_size
,
output_number
;
WORD
stream_number
,
stream_number2
;
WORD
stream_number
,
stream_number2
;
GUID
majortype
,
majortype2
;
struct
teststream
stream
;
struct
teststream
stream
;
IWMStreamConfig
*
config
;
IWMStreamConfig
*
config
;
ULONG
count
,
ref
,
i
,
j
;
ULONG
count
,
ref
,
i
,
j
;
IWMSyncReader
*
reader
;
IWMSyncReader
*
reader
;
IWMProfile
*
profile
;
IWMProfile
*
profile
;
GUID
majortype
;
HANDLE
file
;
HANDLE
file
;
HRESULT
hr
;
HRESULT
hr
;
BOOL
ret
;
BOOL
ret
;
...
@@ -923,6 +923,12 @@ static void test_sync_reader_types(void)
...
@@ -923,6 +923,12 @@ static void test_sync_reader_types(void)
hr
=
IWMOutputMediaProps_GetMediaType
(
output_props
,
mt
,
&
ret_size
);
hr
=
IWMOutputMediaProps_GetMediaType
(
output_props
,
mt
,
&
ret_size
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
memset
(
&
majortype2
,
0xcc
,
sizeof
(
majortype2
));
hr
=
IWMOutputMediaProps_GetType
(
output_props
,
&
majortype2
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
majortype2
,
&
majortype
),
"Expected major type %s, got %s.
\n
"
,
debugstr_guid
(
&
majortype
),
debugstr_guid
(
&
majortype2
));
ref
=
IWMOutputMediaProps_Release
(
output_props
);
ref
=
IWMOutputMediaProps_Release
(
output_props
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
@@ -981,6 +987,12 @@ static void test_sync_reader_types(void)
...
@@ -981,6 +987,12 @@ static void test_sync_reader_types(void)
else
else
check_video_type
(
mt
);
check_video_type
(
mt
);
memset
(
&
majortype2
,
0xcc
,
sizeof
(
majortype2
));
hr
=
IWMOutputMediaProps_GetType
(
output_props
,
&
majortype2
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
majortype2
,
&
majortype
),
"Expected major type %s, got %s.
\n
"
,
debugstr_guid
(
&
majortype
),
debugstr_guid
(
&
majortype2
));
hr
=
IWMSyncReader_SetOutputProps
(
reader
,
output_number
,
output_props
);
hr
=
IWMSyncReader_SetOutputProps
(
reader
,
output_number
,
output_props
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetOutputProps
(
reader
,
1
-
output_number
,
output_props
);
hr
=
IWMSyncReader_SetOutputProps
(
reader
,
1
-
output_number
,
output_props
);
...
@@ -1398,13 +1410,13 @@ static void test_async_reader_types(void)
...
@@ -1398,13 +1410,13 @@ static void test_async_reader_types(void)
bool
got_video
=
false
,
got_audio
=
false
;
bool
got_video
=
false
,
got_audio
=
false
;
DWORD
size
,
ret_size
,
output_number
;
DWORD
size
,
ret_size
,
output_number
;
IWMReaderAdvanced2
*
advanced
;
IWMReaderAdvanced2
*
advanced
;
GUID
majortype
,
majortype2
;
struct
teststream
stream
;
struct
teststream
stream
;
struct
callback
callback
;
struct
callback
callback
;
IWMStreamConfig
*
config
;
IWMStreamConfig
*
config
;
ULONG
count
,
ref
,
i
,
j
;
ULONG
count
,
ref
,
i
,
j
;
IWMProfile
*
profile
;
IWMProfile
*
profile
;
IWMReader
*
reader
;
IWMReader
*
reader
;
GUID
majortype
;
HANDLE
file
;
HANDLE
file
;
HRESULT
hr
;
HRESULT
hr
;
BOOL
ret
;
BOOL
ret
;
...
@@ -1458,11 +1470,17 @@ static void test_async_reader_types(void)
...
@@ -1458,11 +1470,17 @@ static void test_async_reader_types(void)
ret_size
=
sizeof
(
mt_buffer
);
ret_size
=
sizeof
(
mt_buffer
);
hr
=
IWMOutputMediaProps_GetMediaType
(
output_props
,
mt
,
&
ret_size
);
hr
=
IWMOutputMediaProps_GetMediaType
(
output_props
,
mt
,
&
ret_size
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
majortype
=
mt
->
majortype
;
memset
(
&
majortype2
,
0xcc
,
sizeof
(
majortype2
));
hr
=
IWMOutputMediaProps_GetType
(
output_props
,
&
majortype2
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
majortype2
,
&
majortype
),
"Expected major type %s, got %s.
\n
"
,
debugstr_guid
(
&
majortype
),
debugstr_guid
(
&
majortype2
));
ref
=
IWMOutputMediaProps_Release
(
output_props
);
ref
=
IWMOutputMediaProps_Release
(
output_props
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
majortype
=
mt
->
majortype
;
if
(
IsEqualGUID
(
&
majortype
,
&
MEDIATYPE_Audio
))
if
(
IsEqualGUID
(
&
majortype
,
&
MEDIATYPE_Audio
))
{
{
got_audio
=
true
;
got_audio
=
true
;
...
@@ -1538,6 +1556,12 @@ static void test_async_reader_types(void)
...
@@ -1538,6 +1556,12 @@ static void test_async_reader_types(void)
else
else
check_video_type
(
mt
);
check_video_type
(
mt
);
memset
(
&
majortype2
,
0xcc
,
sizeof
(
majortype2
));
hr
=
IWMOutputMediaProps_GetType
(
output_props
,
&
majortype2
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
majortype2
,
&
majortype
),
"Expected major type %s, got %s.
\n
"
,
debugstr_guid
(
&
majortype
),
debugstr_guid
(
&
majortype2
));
hr
=
IWMReader_SetOutputProps
(
reader
,
output_number
,
output_props
);
hr
=
IWMReader_SetOutputProps
(
reader
,
output_number
,
output_props
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMReader_SetOutputProps
(
reader
,
1
-
output_number
,
output_props
);
hr
=
IWMReader_SetOutputProps
(
reader
,
1
-
output_number
,
output_props
);
...
...
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