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
5b178b2f
Commit
5b178b2f
authored
May 05, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Register stub ColorConvertDMO transform.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
09b56e2f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
159 additions
and
1 deletion
+159
-1
mf.c
dlls/mf/tests/mf.c
+41
-1
Makefile.in
dlls/winegstreamer/Makefile.in
+1
-0
color_convert.c
dlls/winegstreamer/color_convert.c
+0
-0
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-0
main.c
dlls/winegstreamer/main.c
+50
-0
mfplat.c
dlls/winegstreamer/mfplat.c
+60
-0
winegstreamer_classes.idl
dlls/winegstreamer/winegstreamer_classes.idl
+6
-0
No files found.
dlls/mf/tests/mf.c
View file @
5b178b2f
...
@@ -8020,14 +8020,17 @@ static void test_color_convert(void)
...
@@ -8020,14 +8020,17 @@ static void test_color_convert(void)
check_interface
(
transform
,
&
IID_IMFTransform
,
TRUE
);
check_interface
(
transform
,
&
IID_IMFTransform
,
TRUE
);
check_interface
(
transform
,
&
IID_IMediaObject
,
TRUE
);
check_interface
(
transform
,
&
IID_IMediaObject
,
TRUE
);
check_interface
(
transform
,
&
IID_IPropertyStore
,
TRUE
);
check_interface
(
transform
,
&
IID_IPropertyStore
,
TRUE
);
todo_wine
check_interface
(
transform
,
&
IID_IMFRealTimeClient
,
TRUE
);
check_interface
(
transform
,
&
IID_IMFRealTimeClient
,
TRUE
);
/* check_interface(transform, &IID_IWMColorConvProps, TRUE); */
/* check_interface(transform, &IID_IWMColorConvProps, TRUE); */
/* check default media types */
/* check default media types */
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
0
,
&
input_info
);
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
0
,
&
input_info
);
todo_wine
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"GetInputStreamInfo returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"GetInputStreamInfo returned %#lx
\n
"
,
hr
);
hr
=
IMFTransform_GetOutputStreamInfo
(
transform
,
0
,
&
output_info
);
hr
=
IMFTransform_GetOutputStreamInfo
(
transform
,
0
,
&
output_info
);
todo_wine
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"GetOutputStreamInfo returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"GetOutputStreamInfo returned %#lx
\n
"
,
hr
);
i
=
-
1
;
i
=
-
1
;
...
@@ -8041,7 +8044,9 @@ static void test_color_convert(void)
...
@@ -8041,7 +8044,9 @@ static void test_color_convert(void)
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
winetest_pop_context
();
winetest_pop_context
();
}
}
todo_wine
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"GetOutputAvailableType returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"GetOutputAvailableType returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
i
==
16
,
"%lu output media types
\n
"
,
i
);
ok
(
i
==
16
,
"%lu output media types
\n
"
,
i
);
i
=
-
1
;
i
=
-
1
;
...
@@ -8063,7 +8068,9 @@ static void test_color_convert(void)
...
@@ -8063,7 +8068,9 @@ static void test_color_convert(void)
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
winetest_pop_context
();
winetest_pop_context
();
}
}
todo_wine
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"GetInputAvailableType returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"GetInputAvailableType returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
i
==
20
,
"%lu input media types
\n
"
,
i
);
ok
(
i
==
20
,
"%lu input media types
\n
"
,
i
);
/* check required output media type attributes */
/* check required output media type attributes */
...
@@ -8071,18 +8078,22 @@ static void test_color_convert(void)
...
@@ -8071,18 +8078,22 @@ static void test_color_convert(void)
hr
=
MFCreateMediaType
(
&
media_type
);
hr
=
MFCreateMediaType
(
&
media_type
);
ok
(
hr
==
S_OK
,
"MFCreateMediaType returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"MFCreateMediaType returned %#lx
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
init_media_type
(
media_type
,
output_type_desc
,
1
);
init_media_type
(
media_type
,
output_type_desc
,
1
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
init_media_type
(
media_type
,
output_type_desc
,
2
);
init_media_type
(
media_type
,
output_type_desc
,
2
);
for
(
i
=
2
;
i
<
ARRAY_SIZE
(
output_type_desc
)
-
1
;
++
i
)
for
(
i
=
2
;
i
<
ARRAY_SIZE
(
output_type_desc
)
-
1
;
++
i
)
{
{
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
init_media_type
(
media_type
,
output_type_desc
,
i
+
1
);
init_media_type
(
media_type
,
output_type_desc
,
i
+
1
);
}
}
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
ret
=
IMFMediaType_Release
(
media_type
);
ret
=
IMFMediaType_Release
(
media_type
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
...
@@ -8092,36 +8103,50 @@ static void test_color_convert(void)
...
@@ -8092,36 +8103,50 @@ static void test_color_convert(void)
hr
=
MFCreateMediaType
(
&
media_type
);
hr
=
MFCreateMediaType
(
&
media_type
);
ok
(
hr
==
S_OK
,
"MFCreateMediaType returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"MFCreateMediaType returned %#lx
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetInputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetInputType returned %#lx.
\n
"
,
hr
);
init_media_type
(
media_type
,
input_type_desc
,
1
);
init_media_type
(
media_type
,
input_type_desc
,
1
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetInputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"SetInputType returned %#lx.
\n
"
,
hr
);
init_media_type
(
media_type
,
input_type_desc
,
2
);
init_media_type
(
media_type
,
input_type_desc
,
2
);
for
(
i
=
2
;
i
<
ARRAY_SIZE
(
input_type_desc
)
-
1
;
++
i
)
for
(
i
=
2
;
i
<
ARRAY_SIZE
(
input_type_desc
)
-
1
;
++
i
)
{
{
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"SetInputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"SetInputType returned %#lx.
\n
"
,
hr
);
init_media_type
(
media_type
,
input_type_desc
,
i
+
1
);
init_media_type
(
media_type
,
input_type_desc
,
i
+
1
);
}
}
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"SetInputType returned %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"SetInputType returned %#lx.
\n
"
,
hr
);
ret
=
IMFMediaType_Release
(
media_type
);
ret
=
IMFMediaType_Release
(
media_type
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
memset
(
&
input_info
,
0xcd
,
sizeof
(
input_info
));
memset
(
&
input_info
,
0xcd
,
sizeof
(
input_info
));
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
0
,
&
input_info
);
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
0
,
&
input_info
);
todo_wine
ok
(
hr
==
S_OK
,
"GetInputStreamInfo returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetInputStreamInfo returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
input_info
.
hnsMaxLatency
==
0
,
"got hnsMaxLatency %s
\n
"
,
wine_dbgstr_longlong
(
input_info
.
hnsMaxLatency
));
ok
(
input_info
.
hnsMaxLatency
==
0
,
"got hnsMaxLatency %s
\n
"
,
wine_dbgstr_longlong
(
input_info
.
hnsMaxLatency
));
todo_wine
ok
(
input_info
.
dwFlags
==
0
,
"got dwFlags %#lx
\n
"
,
input_info
.
dwFlags
);
ok
(
input_info
.
dwFlags
==
0
,
"got dwFlags %#lx
\n
"
,
input_info
.
dwFlags
);
todo_wine
ok
(
input_info
.
cbSize
==
actual_width
*
actual_height
*
3
/
2
,
"got cbSize %#lx
\n
"
,
input_info
.
cbSize
);
ok
(
input_info
.
cbSize
==
actual_width
*
actual_height
*
3
/
2
,
"got cbSize %#lx
\n
"
,
input_info
.
cbSize
);
todo_wine
ok
(
input_info
.
cbMaxLookahead
==
0
,
"got cbMaxLookahead %#lx
\n
"
,
input_info
.
cbMaxLookahead
);
ok
(
input_info
.
cbMaxLookahead
==
0
,
"got cbMaxLookahead %#lx
\n
"
,
input_info
.
cbMaxLookahead
);
todo_wine
ok
(
input_info
.
cbAlignment
==
1
,
"got cbAlignment %#lx
\n
"
,
input_info
.
cbAlignment
);
ok
(
input_info
.
cbAlignment
==
1
,
"got cbAlignment %#lx
\n
"
,
input_info
.
cbAlignment
);
memset
(
&
output_info
,
0xcd
,
sizeof
(
output_info
));
memset
(
&
output_info
,
0xcd
,
sizeof
(
output_info
));
hr
=
IMFTransform_GetOutputStreamInfo
(
transform
,
0
,
&
output_info
);
hr
=
IMFTransform_GetOutputStreamInfo
(
transform
,
0
,
&
output_info
);
todo_wine
ok
(
hr
==
S_OK
,
"GetOutputStreamInfo returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetOutputStreamInfo returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
output_info
.
dwFlags
==
0
,
"got dwFlags %#lx
\n
"
,
output_info
.
dwFlags
);
ok
(
output_info
.
dwFlags
==
0
,
"got dwFlags %#lx
\n
"
,
output_info
.
dwFlags
);
todo_wine
ok
(
output_info
.
cbSize
==
actual_width
*
actual_height
*
4
,
"got cbSize %#lx
\n
"
,
output_info
.
cbSize
);
ok
(
output_info
.
cbSize
==
actual_width
*
actual_height
*
4
,
"got cbSize %#lx
\n
"
,
output_info
.
cbSize
);
todo_wine
ok
(
output_info
.
cbAlignment
==
1
,
"got cbAlignment %#lx
\n
"
,
output_info
.
cbAlignment
);
ok
(
output_info
.
cbAlignment
==
1
,
"got cbAlignment %#lx
\n
"
,
output_info
.
cbAlignment
);
resource
=
FindResourceW
(
NULL
,
L"nv12frame.bin"
,
(
const
WCHAR
*
)
RT_RCDATA
);
resource
=
FindResourceW
(
NULL
,
L"nv12frame.bin"
,
(
const
WCHAR
*
)
RT_RCDATA
);
...
@@ -8136,10 +8161,13 @@ static void test_color_convert(void)
...
@@ -8136,10 +8161,13 @@ static void test_color_convert(void)
hr
=
IMFSample_SetSampleDuration
(
sample
,
10000000
);
hr
=
IMFSample_SetSampleDuration
(
sample
,
10000000
);
ok
(
hr
==
S_OK
,
"SetSampleDuration returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"SetSampleDuration returned %#lx
\n
"
,
hr
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
sample
,
0
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
sample
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"ProcessInput returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ProcessInput returned %#lx
\n
"
,
hr
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
sample
,
0
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
sample
,
0
);
todo_wine
ok
(
hr
==
MF_E_NOTACCEPTING
,
"ProcessInput returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_NOTACCEPTING
,
"ProcessInput returned %#lx
\n
"
,
hr
);
hr
=
IMFTransform_ProcessMessage
(
transform
,
MFT_MESSAGE_COMMAND_DRAIN
,
0
);
hr
=
IMFTransform_ProcessMessage
(
transform
,
MFT_MESSAGE_COMMAND_DRAIN
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"ProcessMessage returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ProcessMessage returned %#lx
\n
"
,
hr
);
IMFSample_Release
(
sample
);
IMFSample_Release
(
sample
);
...
@@ -8147,7 +8175,9 @@ static void test_color_convert(void)
...
@@ -8147,7 +8175,9 @@ static void test_color_convert(void)
ok
(
resource
!=
0
,
"FindResourceW failed, error %lu
\n
"
,
GetLastError
());
ok
(
resource
!=
0
,
"FindResourceW failed, error %lu
\n
"
,
GetLastError
());
rgb32_data
=
LockResource
(
LoadResource
(
GetModuleHandleW
(
NULL
),
resource
));
rgb32_data
=
LockResource
(
LoadResource
(
GetModuleHandleW
(
NULL
),
resource
));
rgb32_data_len
=
SizeofResource
(
GetModuleHandleW
(
NULL
),
resource
);
rgb32_data_len
=
SizeofResource
(
GetModuleHandleW
(
NULL
),
resource
);
todo_wine
ok
(
rgb32_data_len
==
output_info
.
cbSize
,
"got length %lu
\n
"
,
rgb32_data_len
);
ok
(
rgb32_data_len
==
output_info
.
cbSize
,
"got length %lu
\n
"
,
rgb32_data_len
);
if
(
rgb32_data_len
!=
output_info
.
cbSize
)
output_info
.
cbSize
=
actual_width
*
actual_height
*
4
;
/* and generate a new one as well in a temporary directory */
/* and generate a new one as well in a temporary directory */
GetTempPathW
(
ARRAY_SIZE
(
output_path
),
output_path
);
GetTempPathW
(
ARRAY_SIZE
(
output_path
),
output_path
);
...
@@ -8160,21 +8190,29 @@ static void test_color_convert(void)
...
@@ -8160,21 +8190,29 @@ static void test_color_convert(void)
memset
(
&
output
,
0
,
sizeof
(
output
));
memset
(
&
output
,
0
,
sizeof
(
output
));
output
.
pSample
=
sample
;
output
.
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
transform
,
0
,
1
,
&
output
,
&
status
);
hr
=
IMFTransform_ProcessOutput
(
transform
,
0
,
1
,
&
output
,
&
status
);
todo_wine
ok
(
hr
==
S_OK
,
"ProcessOutput returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ProcessOutput returned %#lx
\n
"
,
hr
);
ok
(
output
.
pSample
==
sample
,
"got pSample %p
\n
"
,
output
.
pSample
);
ok
(
output
.
pSample
==
sample
,
"got pSample %p
\n
"
,
output
.
pSample
);
ok
(
output
.
dwStatus
==
0
||
broken
(
output
.
dwStatus
==
6
)
/* win7 */
,
"got dwStatus %#lx
\n
"
,
output
.
dwStatus
);
ok
(
output
.
dwStatus
==
0
||
broken
(
output
.
dwStatus
==
6
)
/* win7 */
,
"got dwStatus %#lx
\n
"
,
output
.
dwStatus
);
todo_wine
ok
(
status
==
0
,
"got status %#lx
\n
"
,
status
);
ok
(
status
==
0
,
"got status %#lx
\n
"
,
status
);
hr
=
IMFSample_GetSampleTime
(
sample
,
&
time
);
hr
=
IMFSample_GetSampleTime
(
sample
,
&
time
);
todo_wine
ok
(
hr
==
S_OK
,
"GetSampleTime returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetSampleTime returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
time
==
0
,
"got time %I64d
\n
"
,
time
);
ok
(
time
==
0
,
"got time %I64d
\n
"
,
time
);
hr
=
IMFSample_GetSampleDuration
(
sample
,
&
duration
);
hr
=
IMFSample_GetSampleDuration
(
sample
,
&
duration
);
todo_wine
ok
(
hr
==
S_OK
,
"GetSampleDuration returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetSampleDuration returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
duration
==
10000000
,
"got duration %I64d
\n
"
,
duration
);
ok
(
duration
==
10000000
,
"got duration %I64d
\n
"
,
duration
);
hr
=
IMFSample_GetTotalLength
(
sample
,
&
length
);
hr
=
IMFSample_GetTotalLength
(
sample
,
&
length
);
ok
(
hr
==
S_OK
,
"GetTotalLength returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetTotalLength returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
length
==
output_info
.
cbSize
,
"got length %lu
\n
"
,
length
);
ok
(
length
==
output_info
.
cbSize
,
"got length %lu
\n
"
,
length
);
check_sample_rgb32
(
sample
,
rgb32_data
,
output_file
);
if
(
length
==
output_info
.
cbSize
)
check_sample_rgb32
(
sample
,
rgb32_data
,
output_file
);
rgb32_data_len
-=
output_info
.
cbSize
;
rgb32_data_len
-=
output_info
.
cbSize
;
rgb32_data
+=
output_info
.
cbSize
;
rgb32_data
+=
output_info
.
cbSize
;
...
@@ -8189,9 +8227,11 @@ static void test_color_convert(void)
...
@@ -8189,9 +8227,11 @@ static void test_color_convert(void)
memset
(
&
output
,
0
,
sizeof
(
output
));
memset
(
&
output
,
0
,
sizeof
(
output
));
output
.
pSample
=
sample
;
output
.
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
transform
,
0
,
1
,
&
output
,
&
status
);
hr
=
IMFTransform_ProcessOutput
(
transform
,
0
,
1
,
&
output
,
&
status
);
todo_wine
ok
(
hr
==
MF_E_TRANSFORM_NEED_MORE_INPUT
,
"ProcessOutput returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_TRANSFORM_NEED_MORE_INPUT
,
"ProcessOutput returned %#lx
\n
"
,
hr
);
ok
(
output
.
pSample
==
sample
,
"got pSample %p
\n
"
,
output
.
pSample
);
ok
(
output
.
pSample
==
sample
,
"got pSample %p
\n
"
,
output
.
pSample
);
ok
(
output
.
dwStatus
==
0
,
"got dwStatus %#lx
\n
"
,
output
.
dwStatus
);
ok
(
output
.
dwStatus
==
0
,
"got dwStatus %#lx
\n
"
,
output
.
dwStatus
);
todo_wine
ok
(
status
==
0
,
"got status %#lx
\n
"
,
status
);
ok
(
status
==
0
,
"got status %#lx
\n
"
,
status
);
hr
=
IMFSample_GetTotalLength
(
sample
,
&
length
);
hr
=
IMFSample_GetTotalLength
(
sample
,
&
length
);
ok
(
hr
==
S_OK
,
"GetTotalLength returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetTotalLength returned %#lx
\n
"
,
hr
);
...
...
dlls/winegstreamer/Makefile.in
View file @
5b178b2f
...
@@ -7,6 +7,7 @@ EXTRAINCL = $(GSTREAMER_CFLAGS)
...
@@ -7,6 +7,7 @@ EXTRAINCL = $(GSTREAMER_CFLAGS)
EXTRALIBS
=
$(GSTREAMER_LIBS)
$(PTHREAD_LIBS)
EXTRALIBS
=
$(GSTREAMER_LIBS)
$(PTHREAD_LIBS)
C_SRCS
=
\
C_SRCS
=
\
color_convert.c
\
h264_decoder.c
\
h264_decoder.c
\
main.c
\
main.c
\
media_source.c
\
media_source.c
\
...
...
dlls/winegstreamer/color_convert.c
0 → 100644
View file @
5b178b2f
This diff is collapsed.
Click to expand it.
dlls/winegstreamer/gst_private.h
View file @
5b178b2f
...
@@ -112,6 +112,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out);
...
@@ -112,6 +112,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out);
HRESULT
wave_parser_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
HRESULT
wave_parser_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
HRESULT
wma_decoder_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
HRESULT
wma_decoder_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
HRESULT
resampler_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
HRESULT
resampler_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
HRESULT
color_convert_create
(
IUnknown
*
outer
,
IUnknown
**
out
);
bool
amt_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
,
bool
wm
);
bool
amt_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
,
bool
wm
);
bool
amt_to_wg_format
(
const
AM_MEDIA_TYPE
*
mt
,
struct
wg_format
*
format
);
bool
amt_to_wg_format
(
const
AM_MEDIA_TYPE
*
mt
,
struct
wg_format
*
format
);
...
...
dlls/winegstreamer/main.c
View file @
5b178b2f
...
@@ -438,6 +438,7 @@ static struct class_factory mpeg_splitter_cf = {{&class_factory_vtbl}, mpeg_spli
...
@@ -438,6 +438,7 @@ static struct class_factory mpeg_splitter_cf = {{&class_factory_vtbl}, mpeg_spli
static
struct
class_factory
wave_parser_cf
=
{{
&
class_factory_vtbl
},
wave_parser_create
};
static
struct
class_factory
wave_parser_cf
=
{{
&
class_factory_vtbl
},
wave_parser_create
};
static
struct
class_factory
wma_decoder_cf
=
{{
&
class_factory_vtbl
},
wma_decoder_create
};
static
struct
class_factory
wma_decoder_cf
=
{{
&
class_factory_vtbl
},
wma_decoder_create
};
static
struct
class_factory
resampler_cf
=
{{
&
class_factory_vtbl
},
resampler_create
};
static
struct
class_factory
resampler_cf
=
{{
&
class_factory_vtbl
},
resampler_create
};
static
struct
class_factory
color_convert_cf
=
{{
&
class_factory_vtbl
},
color_convert_create
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
{
{
...
@@ -466,6 +467,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
...
@@ -466,6 +467,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
factory
=
&
wma_decoder_cf
;
factory
=
&
wma_decoder_cf
;
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_CResamplerMediaObject
))
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_CResamplerMediaObject
))
factory
=
&
resampler_cf
;
factory
=
&
resampler_cf
;
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_CColorConvertDMO
))
factory
=
&
color_convert_cf
;
else
else
{
{
FIXME
(
"%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.
\n
"
,
debugstr_guid
(
clsid
));
FIXME
(
"%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.
\n
"
,
debugstr_guid
(
clsid
));
...
@@ -677,6 +680,48 @@ HRESULT WINAPI DllRegisterServer(void)
...
@@ -677,6 +680,48 @@ HRESULT WINAPI DllRegisterServer(void)
{.
type
=
MEDIATYPE_Audio
,
.
subtype
=
MEDIASUBTYPE_WMAUDIO3
},
{.
type
=
MEDIATYPE_Audio
,
.
subtype
=
MEDIASUBTYPE_WMAUDIO3
},
{.
type
=
MEDIATYPE_Audio
,
.
subtype
=
MEDIASUBTYPE_WMAUDIO_LOSSLESS
},
{.
type
=
MEDIATYPE_Audio
,
.
subtype
=
MEDIASUBTYPE_WMAUDIO_LOSSLESS
},
};
};
DMO_PARTIAL_MEDIATYPE
color_convert_input
[
20
]
=
{
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YV12
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YUY2
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_UYVY
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_AYUV
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_NV12
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB32
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB565
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_I420
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_IYUV
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YVYU
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB24
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB555
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB8
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_V216
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_V410
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_NV11
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_Y41P
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_Y41T
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_Y42T
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YVU9
},
};
DMO_PARTIAL_MEDIATYPE
color_convert_output
[
16
]
=
{
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YV12
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YUY2
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_UYVY
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_AYUV
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_NV12
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB32
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB565
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_I420
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_IYUV
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_YVYU
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB24
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB555
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_RGB8
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_V216
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_V410
},
{.
type
=
MEDIATYPE_Video
,
.
subtype
=
MEDIASUBTYPE_NV11
},
};
IFilterMapper2
*
mapper
;
IFilterMapper2
*
mapper
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -707,6 +752,9 @@ HRESULT WINAPI DllRegisterServer(void)
...
@@ -707,6 +752,9 @@ HRESULT WINAPI DllRegisterServer(void)
if
(
FAILED
(
hr
=
DMORegister
(
L"Resampler DMO"
,
&
CLSID_CResamplerMediaObject
,
&
DMOCATEGORY_AUDIO_EFFECT
,
if
(
FAILED
(
hr
=
DMORegister
(
L"Resampler DMO"
,
&
CLSID_CResamplerMediaObject
,
&
DMOCATEGORY_AUDIO_EFFECT
,
0
,
ARRAY_SIZE
(
audio_convert_types
),
audio_convert_types
,
ARRAY_SIZE
(
audio_convert_types
),
audio_convert_types
)))
0
,
ARRAY_SIZE
(
audio_convert_types
),
audio_convert_types
,
ARRAY_SIZE
(
audio_convert_types
),
audio_convert_types
)))
return
hr
;
return
hr
;
if
(
FAILED
(
hr
=
DMORegister
(
L"Color Converter DMO"
,
&
CLSID_CColorConvertDMO
,
&
DMOCATEGORY_VIDEO_EFFECT
,
0
,
ARRAY_SIZE
(
color_convert_input
),
color_convert_input
,
ARRAY_SIZE
(
color_convert_output
),
color_convert_output
)))
return
hr
;
return
mfplat_DllRegisterServer
();
return
mfplat_DllRegisterServer
();
}
}
...
@@ -733,6 +781,8 @@ HRESULT WINAPI DllUnregisterServer(void)
...
@@ -733,6 +781,8 @@ HRESULT WINAPI DllUnregisterServer(void)
IFilterMapper2_Release
(
mapper
);
IFilterMapper2_Release
(
mapper
);
if
(
FAILED
(
hr
=
DMOUnregister
(
&
CLSID_CColorConvertDMO
,
&
DMOCATEGORY_VIDEO_EFFECT
)))
return
hr
;
if
(
FAILED
(
hr
=
DMOUnregister
(
&
CLSID_CResamplerMediaObject
,
&
DMOCATEGORY_AUDIO_EFFECT
)))
if
(
FAILED
(
hr
=
DMOUnregister
(
&
CLSID_CResamplerMediaObject
,
&
DMOCATEGORY_AUDIO_EFFECT
)))
return
hr
;
return
hr
;
if
(
FAILED
(
hr
=
DMOUnregister
(
&
CLSID_WMADecMediaObject
,
&
DMOCATEGORY_AUDIO_DECODER
)))
if
(
FAILED
(
hr
=
DMOUnregister
(
&
CLSID_WMADecMediaObject
,
&
DMOCATEGORY_AUDIO_DECODER
)))
...
...
dlls/winegstreamer/mfplat.c
View file @
5b178b2f
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "ksmedia.h"
#include "ksmedia.h"
#include "wmcodecdsp.h"
#include "wmcodecdsp.h"
#include "initguid.h"
#include "initguid.h"
#include "d3d9types.h"
#include "mfapi.h"
#include "mfapi.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -30,6 +31,12 @@
...
@@ -30,6 +31,12 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
DEFINE_GUID
(
DMOVideoFormat_RGB32
,
D3DFMT_X8R8G8B8
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
DMOVideoFormat_RGB24
,
D3DFMT_R8G8B8
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
DMOVideoFormat_RGB565
,
D3DFMT_R5G6B5
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
DMOVideoFormat_RGB555
,
D3DFMT_X1R5G5B5
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
DEFINE_GUID
(
DMOVideoFormat_RGB8
,
D3DFMT_P8
,
0x524f
,
0x11ce
,
0x9f
,
0x53
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
struct
video_processor
struct
video_processor
{
{
IMFTransform
IMFTransform_iface
;
IMFTransform
IMFTransform_iface
;
...
@@ -520,6 +527,49 @@ HRESULT mfplat_DllRegisterServer(void)
...
@@ -520,6 +527,49 @@ HRESULT mfplat_DllRegisterServer(void)
{
MFMediaType_Video
,
MFVideoFormat_YVYU
},
{
MFMediaType_Video
,
MFVideoFormat_YVYU
},
};
};
MFT_REGISTER_TYPE_INFO
color_convert_input_types
[]
=
{
{
MFMediaType_Video
,
MFVideoFormat_YV12
},
{
MFMediaType_Video
,
MFVideoFormat_YUY2
},
{
MFMediaType_Video
,
MFVideoFormat_UYVY
},
{
MFMediaType_Video
,
MFVideoFormat_AYUV
},
{
MFMediaType_Video
,
MFVideoFormat_NV12
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB32
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB565
},
{
MFMediaType_Video
,
MFVideoFormat_I420
},
{
MFMediaType_Video
,
MFVideoFormat_IYUV
},
{
MFMediaType_Video
,
MFVideoFormat_YVYU
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB24
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB555
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB8
},
{
MFMediaType_Video
,
MEDIASUBTYPE_V216
},
{
MFMediaType_Video
,
MEDIASUBTYPE_V410
},
{
MFMediaType_Video
,
MFVideoFormat_NV11
},
{
MFMediaType_Video
,
MFVideoFormat_Y41P
},
{
MFMediaType_Video
,
MFVideoFormat_Y41T
},
{
MFMediaType_Video
,
MFVideoFormat_Y42T
},
{
MFMediaType_Video
,
MFVideoFormat_YVU9
},
};
MFT_REGISTER_TYPE_INFO
color_convert_output_types
[]
=
{
{
MFMediaType_Video
,
MFVideoFormat_YV12
},
{
MFMediaType_Video
,
MFVideoFormat_YUY2
},
{
MFMediaType_Video
,
MFVideoFormat_UYVY
},
{
MFMediaType_Video
,
MFVideoFormat_AYUV
},
{
MFMediaType_Video
,
MFVideoFormat_NV12
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB32
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB565
},
{
MFMediaType_Video
,
MFVideoFormat_I420
},
{
MFMediaType_Video
,
MFVideoFormat_IYUV
},
{
MFMediaType_Video
,
MFVideoFormat_YVYU
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB24
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB555
},
{
MFMediaType_Video
,
DMOVideoFormat_RGB8
},
{
MFMediaType_Video
,
MEDIASUBTYPE_V216
},
{
MFMediaType_Video
,
MEDIASUBTYPE_V410
},
{
MFMediaType_Video
,
MFVideoFormat_NV11
},
};
struct
mft
struct
mft
{
{
GUID
clsid
;
GUID
clsid
;
...
@@ -573,6 +623,16 @@ HRESULT mfplat_DllRegisterServer(void)
...
@@ -573,6 +623,16 @@ HRESULT mfplat_DllRegisterServer(void)
ARRAY_SIZE
(
resampler_types
),
ARRAY_SIZE
(
resampler_types
),
resampler_types
,
resampler_types
,
},
},
{
CLSID_CColorConvertDMO
,
MFT_CATEGORY_VIDEO_EFFECT
,
L"Color Converter MFT"
,
MFT_ENUM_FLAG_SYNCMFT
,
ARRAY_SIZE
(
color_convert_input_types
),
color_convert_input_types
,
ARRAY_SIZE
(
color_convert_output_types
),
color_convert_output_types
,
},
};
};
unsigned
int
i
;
unsigned
int
i
;
...
...
dlls/winegstreamer/winegstreamer_classes.idl
View file @
5b178b2f
...
@@ -86,3 +86,9 @@ coclass CMSH264DecoderMFT {}
...
@@ -86,3 +86,9 @@ coclass CMSH264DecoderMFT {}
uuid
(
f447b69e
-
1884
-
4
a7e
-
8055
-
346
f74d6edb3
)
uuid
(
f447b69e
-
1884
-
4
a7e
-
8055
-
346
f74d6edb3
)
]
]
coclass
CResamplerMediaObject
{}
coclass
CResamplerMediaObject
{}
[
threading
(
both
),
uuid
(
98230571
-
0087
-
4204
-
b020
-
3282538
e57d3
)
]
coclass
CColorConvertDMO
{}
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