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
f56c12c8
Commit
f56c12c8
authored
Jul 20, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Update network state when loading the media source.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
04547b42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
main.c
dlls/mfmediaengine/main.c
+14
-3
mfmediaengine.idl
include/mfmediaengine.idl
+8
-0
No files found.
dlls/mfmediaengine/main.c
View file @
f56c12c8
...
...
@@ -126,6 +126,7 @@ struct media_engine
double
default_playback_rate
;
double
volume
;
double
duration
;
MF_MEDIA_ENGINE_NETWORK
network_state
;
MF_MEDIA_ENGINE_ERR
error_code
;
HRESULT
extended_code
;
MF_MEDIA_ENGINE_READY
ready_state
;
...
...
@@ -1190,6 +1191,7 @@ static HRESULT WINAPI media_engine_load_handler_Invoke(IMFAsyncCallback *iface,
EnterCriticalSection
(
&
engine
->
cs
);
engine
->
network_state
=
MF_MEDIA_ENGINE_NETWORK_LOADING
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_LOADSTART
,
0
,
0
);
if
(
FAILED
(
hr
=
IMFSourceResolver_EndCreateObjectFromURL
(
engine
->
resolver
,
result
,
&
obj_type
,
&
object
)))
...
...
@@ -1205,8 +1207,13 @@ static HRESULT WINAPI media_engine_load_handler_Invoke(IMFAsyncCallback *iface,
IUnknown_Release
(
object
);
}
if
(
FAILED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
engine
->
network_state
=
MF_MEDIA_ENGINE_NETWORK_IDLE
;
}
else
{
engine
->
network_state
=
MF_MEDIA_ENGINE_NETWORK_NO_SOURCE
;
engine
->
error_code
=
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED
;
engine
->
extended_code
=
hr
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_ERROR
,
engine
->
error_code
,
...
...
@@ -1365,6 +1372,8 @@ static HRESULT WINAPI media_engine_SetSource(IMFMediaEngine *iface, BSTR url)
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS
,
0
,
0
);
engine
->
network_state
=
MF_MEDIA_ENGINE_NETWORK_NO_SOURCE
;
if
(
url
)
{
IPropertyStore
*
props
=
NULL
;
...
...
@@ -1410,9 +1419,11 @@ static HRESULT WINAPI media_engine_GetCurrentSource(IMFMediaEngine *iface, BSTR
static
USHORT
WINAPI
media_engine_GetNetworkState
(
IMFMediaEngine
*
iface
)
{
FIXME
(
"(%p): stub.
\n
"
,
iface
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
TRACE
(
"%p.
\n
"
,
iface
);
return
0
;
return
engine
->
network_state
;
}
static
MF_MEDIA_ENGINE_PRELOAD
WINAPI
media_engine_GetPreload
(
IMFMediaEngine
*
iface
)
...
...
include/mfmediaengine.idl
View file @
f56c12c8
...
...
@@ -50,6 +50,14 @@ cpp_quote("EXTERN_GUID(MF_MEDIA_ENGINE_TELEMETRY_APPLICATION_ID, 0x1e7
cpp_quote
(
"EXTERN_GUID(MF_MEDIA_ENGINE_TRACK_ID, 0x65bea312, 0x4043, 0x4815, 0x8e, 0xab, 0x44, 0xdc, 0xe2, 0xef, 0x8f, 0x2a);"
)
cpp_quote
(
"EXTERN_GUID(MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT, 0x5066893c, 0x8cf9, 0x42bc, 0x8b, 0x8a, 0x47, 0x22, 0x12, 0xe5, 0x27, 0x26);"
)
typedef
enum
MF_MEDIA_ENGINE_NETWORK
{
MF_MEDIA_ENGINE_NETWORK_EMPTY
,
MF_MEDIA_ENGINE_NETWORK_IDLE
,
MF_MEDIA_ENGINE_NETWORK_LOADING
,
MF_MEDIA_ENGINE_NETWORK_NO_SOURCE
}
MF_MEDIA_ENGINE_NETWORK
;
typedef
enum
MF_MEDIA_ENGINE_ERR
{
MF_MEDIA_ENGINE_ERR_NOERROR
,
...
...
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