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
b3edb269
Commit
b3edb269
authored
Jul 05, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Add MFMPEG4SinkClassFactory.
parent
f98f3612
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
34 deletions
+31
-34
mf.c
dlls/mf/tests/mf.c
+20
-23
mfplat.c
dlls/mfreadwrite/tests/mfplat.c
+2
-11
main.c
dlls/winegstreamer/main.c
+2
-0
winegstreamer_classes.idl
dlls/winegstreamer/winegstreamer_classes.idl
+7
-0
No files found.
dlls/mf/tests/mf.c
View file @
b3edb269
...
...
@@ -6938,58 +6938,39 @@ static void test_mpeg4_media_sink(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMPEG4MediaSink
(
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
sink
=
(
void
*
)
0xdeadbeef
;
hr
=
MFCreateMPEG4MediaSink
(
NULL
,
NULL
,
NULL
,
&
sink
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
sink
==
(
void
*
)
0xdeadbeef
,
"Unexpected pointer %p.
\n
"
,
sink
);
sink
=
NULL
;
hr
=
MFCreateMPEG4MediaSink
(
bytestream_empty
,
NULL
,
NULL
,
&
sink_empty
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_INVALIDARG
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMPEG4MediaSink
(
bytestream_audio
,
NULL
,
audio_type
,
&
sink_audio
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMPEG4MediaSink
(
bytestream_video
,
video_type
,
NULL
,
&
sink_video
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMPEG4MediaSink
(
bytestream
,
video_type
,
audio_type
,
&
sink
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
!
sink
)
{
if
(
sink_video
)
IMFMediaSink_Release
(
sink_video
);
if
(
sink_audio
)
IMFMediaSink_Release
(
sink_audio
);
if
(
sink_empty
)
IMFMediaSink_Release
(
sink_empty
);
IMFByteStream_Release
(
bytestream
);
IMFByteStream_Release
(
bytestream_empty
);
IMFByteStream_Release
(
bytestream_video
);
IMFByteStream_Release
(
bytestream_audio
);
IMFMediaType_Release
(
video_type
);
IMFMediaType_Release
(
audio_type
);
return
;
}
/* Test sink. */
flags
=
0xdeadbeef
;
hr
=
IMFMediaSink_GetCharacteristics
(
sink
,
&
flags
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
flags
==
MEDIASINK_RATELESS
||
broken
(
flags
==
(
MEDIASINK_RATELESS
|
MEDIASINK_FIXED_STREAMS
)),
"Unexpected flags %#lx.
\n
"
,
flags
);
check_interface
(
sink
,
&
IID_IMFMediaEventGenerator
,
TRUE
);
check_interface
(
sink
,
&
IID_IMFFinalizableMediaSink
,
TRUE
);
check_interface
(
sink
,
&
IID_IMFClockStateSink
,
TRUE
);
todo_wine
check_interface
(
sink
,
&
IID_IMFGetService
,
TRUE
);
/* Test sink stream count. */
...
...
@@ -7104,8 +7085,11 @@ static void test_mpeg4_media_sink(void)
hr
=
MFCreatePresentationClock
(
&
clock
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaSink_SetPresentationClock
(
sink
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
hr
=
IMFMediaSink_SetPresentationClock
(
sink
,
clock
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFPresentationClock_Release
(
clock
);
...
...
@@ -7124,13 +7108,18 @@ static void test_mpeg4_media_sink(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
&
guid
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
IsEqualGUID
(
&
guid
,
&
MFMediaType_Audio
),
"Unexpected major type.
\n
"
);
hr
=
IMFMediaTypeHandler_GetMediaTypeCount
(
type_handler
,
&
count
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
count
==
1
,
"Unexpected count %lu.
\n
"
,
count
);
hr
=
IMFMediaTypeHandler_GetCurrentMediaType
(
type_handler
,
&
media_type
);
...
...
@@ -7140,8 +7129,10 @@ static void test_mpeg4_media_sink(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_SetCurrentMediaType
(
type_handler
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_SetCurrentMediaType
(
type_handler
,
media_type
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaType_Release
(
media_type
);
...
...
@@ -7160,19 +7151,25 @@ static void test_mpeg4_media_sink(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
&
guid
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFStreamSink_Release
(
stream_sink
);
hr
=
IMFMediaSink_AddStreamSink
(
sink
,
0
,
audio_type
,
&
stream_sink
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaSink_GetStreamSinkByIndex
(
sink
,
0
,
&
stream_sink
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaSink_GetStreamSinkById
(
sink
,
0
,
&
stream_sink
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaSink_GetCharacteristics
(
sink
,
&
flags
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaTypeHandler_Release
(
type_handler
);
...
...
dlls/mfreadwrite/tests/mfplat.c
View file @
b3edb269
...
...
@@ -1468,44 +1468,35 @@ static void test_sink_writer_mp4(void)
ok
(
!
writer
,
"Unexpected pointer %p.
\n
"
,
writer
);
hr
=
MFCreateSinkWriterFromURL
(
NULL
,
stream
,
attr
,
&
writer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IMFSinkWriter_Release
(
writer
);
hr
=
MFCreateSinkWriterFromURL
(
tmp_file
,
NULL
,
NULL
,
&
writer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IMFSinkWriter_Release
(
writer
);
hr
=
MFCreateSinkWriterFromURL
(
tmp_file
,
NULL
,
attr
,
&
writer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IMFSinkWriter_Release
(
writer
);
hr
=
MFCreateSinkWriterFromURL
(
tmp_file
,
stream
,
NULL
,
&
writer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IMFSinkWriter_Release
(
writer
);
hr
=
MFCreateSinkWriterFromURL
(
tmp_file
,
stream
,
attr
,
&
writer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
IMFByteStream_Release
(
stream
);
IMFAttributes_Release
(
attr
);
return
;
}
/* Test GetServiceForStream. */
sink
=
(
void
*
)
0xdeadbeef
;
hr
=
IMFSinkWriter_GetServiceForStream
(
writer
,
MF_SINK_WRITER_MEDIASINK
,
&
GUID_NULL
,
&
IID_IMFMediaSink
,
(
void
**
)
&
sink
);
todo_wine
ok
(
hr
==
MF_E_UNSUPPORTED_SERVICE
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
sink
,
"Unexpected pointer %p.
\n
"
,
sink
);
DeleteFileW
(
tmp_file
);
...
...
dlls/winegstreamer/main.c
View file @
b3edb269
...
...
@@ -649,6 +649,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
factory
=
&
color_convert_cf
;
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_MFMP3SinkClassFactory
))
factory
=
&
sink_class_factory_cf
;
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_MFMPEG4SinkClassFactory
))
factory
=
&
sink_class_factory_cf
;
else
{
FIXME
(
"%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.
\n
"
,
debugstr_guid
(
clsid
));
...
...
dlls/winegstreamer/winegstreamer_classes.idl
View file @
b3edb269
...
...
@@ -117,3 +117,10 @@ coclass CColorConvertDMO {}
uuid
(
11275
a82
-
5
e5a
-
47
fd
-
a01c
-
3683
c12fb196
)
]
coclass
MFMP3SinkClassFactory
{}
[
helpstring
(
"MF MPEG4 Sink Class Factory"
),
threading
(
both
),
uuid
(
a22c4fc7
-
6
e91
-
4
e1d
-
89
e9
-
53b2667b72b
a
)
]
coclass
MFMPEG4SinkClassFactory
{}
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