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
7608e775
Commit
7608e775
authored
Feb 18, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Implement GetStreamAttribute().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2086698e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
main.c
dlls/mfmediaengine/main.c
+21
-2
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+6
-0
No files found.
dlls/mfmediaengine/main.c
View file @
7608e775
...
...
@@ -2504,9 +2504,28 @@ static HRESULT WINAPI media_engine_GetNumberOfStreams(IMFMediaEngineEx *iface, D
static
HRESULT
WINAPI
media_engine_GetStreamAttribute
(
IMFMediaEngineEx
*
iface
,
DWORD
stream_index
,
REFGUID
attribute
,
PROPVARIANT
*
value
)
{
FIXME
(
"%p, %ld, %s, %p stub.
\n
"
,
iface
,
stream_index
,
debugstr_guid
(
attribute
),
value
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
IMFStreamDescriptor
*
sd
;
HRESULT
hr
=
E_FAIL
;
BOOL
selected
;
return
E_NOTIMPL
;
TRACE
(
"%p, %ld, %s, %p.
\n
"
,
iface
,
stream_index
,
debugstr_guid
(
attribute
),
value
);
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
else
if
(
engine
->
presentation
.
pd
)
{
if
(
SUCCEEDED
(
hr
=
IMFPresentationDescriptor_GetStreamDescriptorByIndex
(
engine
->
presentation
.
pd
,
stream_index
,
&
selected
,
&
sd
)))
{
hr
=
IMFStreamDescriptor_GetItem
(
sd
,
attribute
,
value
);
IMFStreamDescriptor_Release
(
sd
);
}
}
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
media_engine_GetStreamSelection
(
IMFMediaEngineEx
*
iface
,
DWORD
stream_index
,
BOOL
*
enabled
)
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
7608e775
...
...
@@ -497,6 +497,9 @@ static void test_Shutdown(void)
hr
=
IMFMediaEngineEx_GetPresentationAttribute
(
media_engine_ex
,
&
MF_PD_DURATION
,
&
propvar
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaEngineEx_GetStreamAttribute
(
media_engine_ex
,
0
,
&
MF_SD_PROTECTED
,
&
propvar
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaEngineEx_Release
(
media_engine_ex
);
}
...
...
@@ -935,6 +938,9 @@ static void test_SetSourceFromByteStream(void)
hr
=
IMFMediaEngineEx_GetPresentationAttribute
(
media_engine
,
&
MF_PD_DURATION
,
&
propvar
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaEngineEx_GetStreamAttribute
(
media_engine
,
0
,
&
MF_SD_PROTECTED
,
&
propvar
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaEngineEx_Release
(
media_engine
);
IMFMediaEngineNotify_Release
(
&
notify
->
IMFMediaEngineNotify_iface
);
}
...
...
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