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
b643cefd
Commit
b643cefd
authored
Jun 04, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Update ready state property during resolution.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
496a7035
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
main.c
dlls/mfmediaengine/main.c
+17
-2
mfmediaengine.idl
include/mfmediaengine.idl
+9
-0
No files found.
dlls/mfmediaengine/main.c
View file @
b643cefd
...
...
@@ -86,6 +86,7 @@ struct media_engine
double
duration
;
MF_MEDIA_ENGINE_ERR
error_code
;
HRESULT
extended_code
;
MF_MEDIA_ENGINE_READY
ready_state
;
IMFMediaSession
*
session
;
IMFSourceResolver
*
resolver
;
BSTR
current_source
;
...
...
@@ -400,8 +401,13 @@ static HRESULT media_engine_create_topology(struct media_engine *engine, IMFMedi
else
engine
->
duration
=
INFINITY
;
engine
->
ready_state
=
MF_MEDIA_ENGINE_READY_HAVE_METADATA
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE
,
0
,
0
);
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA
,
0
,
0
);
engine
->
ready_state
=
MF_MEDIA_ENGINE_READY_HAVE_ENOUGH_DATA
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_LOADEDDATA
,
0
,
0
);
/* TODO: set up topology nodes */
...
...
@@ -584,6 +590,8 @@ static HRESULT WINAPI media_engine_SetSource(IMFMediaEngine *iface, BSTR url)
if
(
url
)
engine
->
current_source
=
SysAllocString
(
url
);
engine
->
ready_state
=
MF_MEDIA_ENGINE_READY_HAVE_NOTHING
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS
,
0
,
0
);
if
(
url
)
...
...
@@ -671,9 +679,16 @@ static HRESULT WINAPI media_engine_CanPlayType(IMFMediaEngine *iface, BSTR type,
static
USHORT
WINAPI
media_engine_GetReadyState
(
IMFMediaEngine
*
iface
)
{
FIXME
(
"(%p): stub.
\n
"
,
iface
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
unsigned
short
state
;
return
0
;
TRACE
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
engine
->
cs
);
state
=
engine
->
ready_state
;
LeaveCriticalSection
(
&
engine
->
cs
);
return
state
;
}
static
BOOL
WINAPI
media_engine_IsSeeking
(
IMFMediaEngine
*
iface
)
...
...
include/mfmediaengine.idl
View file @
b643cefd
...
...
@@ -137,6 +137,15 @@ typedef enum MF_MEDIA_ENGINE_EVENT
MF_MEDIA_ENGINE_EVENT_AUDIOENDPOINTCHANGE
=
1016
,
}
MF_MEDIA_ENGINE_EVENT
;
typedef
enum
MF_MEDIA_ENGINE_READY
{
MF_MEDIA_ENGINE_READY_HAVE_NOTHING
,
MF_MEDIA_ENGINE_READY_HAVE_METADATA
,
MF_MEDIA_ENGINE_READY_HAVE_CURRENT_DATA
,
MF_MEDIA_ENGINE_READY_HAVE_FUTURE_DATA
,
MF_MEDIA_ENGINE_READY_HAVE_ENOUGH_DATA
,
}
MF_MEDIA_ENGINE_READY
;
[
object
,
uuid
(
fc0e10d2
-
ab2a
-
4501
-
a951
-
06b
b1075184c
),
...
...
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