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
f8ecc081
Commit
f8ecc081
authored
Aug 10, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Aug 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement IMFMediaEventGenerator for stream sink.
parent
44c49b23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
media_sink.c
dlls/winegstreamer/media_sink.c
+26
-8
No files found.
dlls/winegstreamer/media_sink.c
View file @
f8ecc081
...
...
@@ -34,6 +34,7 @@ struct stream_sink
IMFMediaType
*
type
;
IMFFinalizableMediaSink
*
media_sink
;
IMFMediaEventQueue
*
event_queue
;
struct
list
entry
;
};
...
...
@@ -101,6 +102,7 @@ static ULONG WINAPI stream_sink_Release(IMFStreamSink *iface)
if
(
!
refcount
)
{
IMFMediaEventQueue_Release
(
stream_sink
->
event_queue
);
IMFFinalizableMediaSink_Release
(
stream_sink
->
media_sink
);
if
(
stream_sink
->
type
)
IMFMediaType_Release
(
stream_sink
->
type
);
...
...
@@ -112,34 +114,42 @@ static ULONG WINAPI stream_sink_Release(IMFStreamSink *iface)
static
HRESULT
WINAPI
stream_sink_GetEvent
(
IMFStreamSink
*
iface
,
DWORD
flags
,
IMFMediaEvent
**
event
)
{
FIXME
(
"iface %p, flags %#lx, event %p.
\n
"
,
iface
,
flags
,
event
);
struct
stream_sink
*
stream_sink
=
impl_from_IMFStreamSink
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, flags %#lx, event %p.
\n
"
,
iface
,
flags
,
event
);
return
IMFMediaEventQueue_GetEvent
(
stream_sink
->
event_queue
,
flags
,
event
);
}
static
HRESULT
WINAPI
stream_sink_BeginGetEvent
(
IMFStreamSink
*
iface
,
IMFAsyncCallback
*
callback
,
IUnknown
*
state
)
{
FIXME
(
"iface %p, callback %p, state %p.
\n
"
,
iface
,
callback
,
stat
e
);
struct
stream_sink
*
stream_sink
=
impl_from_IMFStreamSink
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, callback %p, state %p.
\n
"
,
iface
,
callback
,
state
);
return
IMFMediaEventQueue_BeginGetEvent
(
stream_sink
->
event_queue
,
callback
,
state
);
}
static
HRESULT
WINAPI
stream_sink_EndGetEvent
(
IMFStreamSink
*
iface
,
IMFAsyncResult
*
result
,
IMFMediaEvent
**
event
)
{
FIXME
(
"iface %p, result %p, event %p.
\n
"
,
iface
,
result
,
event
);
struct
stream_sink
*
stream_sink
=
impl_from_IMFStreamSink
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, result %p, event %p.
\n
"
,
iface
,
result
,
event
);
return
IMFMediaEventQueue_EndGetEvent
(
stream_sink
->
event_queue
,
result
,
event
);
}
static
HRESULT
WINAPI
stream_sink_QueueEvent
(
IMFStreamSink
*
iface
,
MediaEventType
event_type
,
REFGUID
ext_type
,
HRESULT
hr
,
const
PROPVARIANT
*
value
)
{
FIXME
(
"iface %p, event_type %lu, ext_type %s, hr %#lx, value %p.
\n
"
,
struct
stream_sink
*
stream_sink
=
impl_from_IMFStreamSink
(
iface
);
TRACE
(
"iface %p, event_type %lu, ext_type %s, hr %#lx, value %p.
\n
"
,
iface
,
event_type
,
debugstr_guid
(
ext_type
),
hr
,
value
);
return
E_NOTIMPL
;
return
IMFMediaEventQueue_QueueEventParamVar
(
stream_sink
->
event_queue
,
event_type
,
ext_type
,
hr
,
value
)
;
}
static
HRESULT
WINAPI
stream_sink_GetMediaSink
(
IMFStreamSink
*
iface
,
IMFMediaSink
**
ret
)
...
...
@@ -215,6 +225,7 @@ static HRESULT stream_sink_create(DWORD stream_sink_id, IMFMediaType *media_type
struct
stream_sink
**
out
)
{
struct
stream_sink
*
stream_sink
;
HRESULT
hr
;
TRACE
(
"stream_sink_id %#lx, media_type %p, media_sink %p, out %p.
\n
"
,
stream_sink_id
,
media_type
,
media_sink
,
out
);
...
...
@@ -222,6 +233,12 @@ static HRESULT stream_sink_create(DWORD stream_sink_id, IMFMediaType *media_type
if
(
!
(
stream_sink
=
calloc
(
1
,
sizeof
(
*
stream_sink
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
MFCreateEventQueue
(
&
stream_sink
->
event_queue
)))
{
free
(
stream_sink
);
return
hr
;
}
stream_sink
->
IMFStreamSink_iface
.
lpVtbl
=
&
stream_sink_vtbl
;
stream_sink
->
refcount
=
1
;
stream_sink
->
id
=
stream_sink_id
;
...
...
@@ -401,6 +418,7 @@ static HRESULT WINAPI media_sink_Shutdown(IMFFinalizableMediaSink *iface)
LIST_FOR_EACH_ENTRY_SAFE
(
stream_sink
,
next
,
&
media_sink
->
stream_sinks
,
struct
stream_sink
,
entry
)
{
list_remove
(
&
stream_sink
->
entry
);
IMFMediaEventQueue_Shutdown
(
stream_sink
->
event_queue
);
IMFStreamSink_Release
(
&
stream_sink
->
IMFStreamSink_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