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
a79d27c0
Commit
a79d27c0
authored
May 16, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Implement GetNumberOfStreams().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
b9bfd74a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
main.c
dlls/mfmediaengine/main.c
+12
-2
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+16
-3
No files found.
dlls/mfmediaengine/main.c
View file @
a79d27c0
...
...
@@ -2517,9 +2517,19 @@ static HRESULT WINAPI media_engine_GetPresentationAttribute(IMFMediaEngineEx *if
static
HRESULT
WINAPI
media_engine_GetNumberOfStreams
(
IMFMediaEngineEx
*
iface
,
DWORD
*
stream_count
)
{
FIXME
(
"%p, %p stub.
\n
"
,
iface
,
stream_count
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
E_FAIL
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
stream_count
);
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
if
(
engine
->
presentation
.
pd
)
hr
=
IMFPresentationDescriptor_GetStreamDescriptorCount
(
engine
->
presentation
.
pd
,
stream_count
);
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
media_engine_GetStreamAttribute
(
IMFMediaEngineEx
*
iface
,
DWORD
stream_index
,
REFGUID
attribute
,
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
a79d27c0
...
...
@@ -1035,7 +1035,7 @@ static void test_SetSourceFromByteStream(void)
struct
media_engine_notify
*
notify
;
IMFMediaEngineEx
*
media_engine
;
PROPVARIANT
propvar
;
DWORD
flags
;
DWORD
count
,
flags
;
HRESULT
hr
;
notify
=
create_callback
();
...
...
@@ -1063,6 +1063,14 @@ static void test_SetSourceFromByteStream(void)
hr
=
IMFMediaEngineEx_GetStreamAttribute
(
media_engine
,
0
,
&
MF_SD_PROTECTED
,
&
propvar
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaEngineEx_GetNumberOfStreams
(
media_engine
,
NULL
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
count
=
123
;
hr
=
IMFMediaEngineEx_GetNumberOfStreams
(
media_engine
,
&
count
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
count
==
123
,
"Unexpected value %lu.
\n
"
,
count
);
IMFMediaEngineEx_Release
(
media_engine
);
IMFMediaEngineNotify_Release
(
&
notify
->
IMFMediaEngineNotify_iface
);
}
...
...
@@ -1203,7 +1211,7 @@ static IMFMediaEngineNotifyVtbl test_transfer_notify_vtbl =
test_transfer_notify_EventNotify
,
};
static
void
test_TransferVideoFrame
s
(
void
)
static
void
test_TransferVideoFrame
(
void
)
{
struct
test_transfer_notify
notify
=
{{
&
test_transfer_notify_vtbl
}};
WCHAR
url
[]
=
{
L"i420-64x64.avi"
};
...
...
@@ -1267,6 +1275,11 @@ static void test_TransferVideoFrames(void)
goto
done
;
}
res
=
0
;
hr
=
IMFMediaEngineEx_GetNumberOfStreams
(
media_engine
,
&
res
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
res
==
1
,
"Unexpected stream count %lu.
\n
"
,
res
);
/* FIXME: Wine first video frame is often full of garbage, wait for another update */
res
=
WaitForSingleObject
(
notify
.
ready_event
,
500
);
/* It's also missing the MF_MEDIA_ENGINE_EVENT_TIMEUPDATE notifications */
...
...
@@ -1343,7 +1356,7 @@ START_TEST(mfmediaengine)
test_time_range
();
test_SetSourceFromByteStream
();
test_audio_configuration
();
test_TransferVideoFrame
s
();
test_TransferVideoFrame
();
IMFMediaEngineClassFactory_Release
(
factory
);
...
...
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