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
9e57659b
Commit
9e57659b
authored
Mar 20, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Keep async callback reference for the reader.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a35ddb13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
main.c
dlls/mfreadwrite/main.c
+7
-0
mfreadwrite.idl
include/mfreadwrite.idl
+21
-0
No files found.
dlls/mfreadwrite/main.c
View file @
9e57659b
...
...
@@ -81,6 +81,7 @@ typedef struct source_reader
IMFPresentationDescriptor
*
descriptor
;
DWORD
first_audio_stream_index
;
DWORD
first_video_stream_index
;
IMFSourceReaderCallback
*
async_callback
;
}
srcreader
;
struct
sink_writer
...
...
@@ -217,6 +218,8 @@ static ULONG WINAPI src_reader_Release(IMFSourceReader *iface)
if
(
!
refcount
)
{
if
(
reader
->
async_callback
)
IMFSourceReaderCallback_Release
(
reader
->
async_callback
);
IMFMediaSource_Shutdown
(
reader
->
source
);
if
(
reader
->
descriptor
)
IMFPresentationDescriptor_Release
(
reader
->
descriptor
);
...
...
@@ -535,6 +538,10 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
goto
failed
;
}
if
(
attributes
)
IMFAttributes_GetUnknown
(
attributes
,
&
MF_SOURCE_READER_ASYNC_CALLBACK
,
&
IID_IMFSourceReaderCallback
,
(
void
**
)
&
object
->
async_callback
);
hr
=
IMFSourceReader_QueryInterface
(
&
object
->
IMFSourceReader_iface
,
riid
,
out
);
failed:
...
...
include/mfreadwrite.idl
View file @
9e57659b
...
...
@@ -90,6 +90,27 @@ cpp_quote("EXTERN_GUID(MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING, 0xfb
cpp_quote
(
"EXTERN_GUID(MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS, 0x6d23f5c8, 0xc5d7, 0x4a9b, 0x99, 0x71, 0x5d, 0x11, 0xf8, 0xbc, 0xa8, 0x80);"
)
cpp_quote
(
"EXTERN_GUID(MF_SOURCE_READER_MEDIASOURCE_CONFIG, 0x9085abeb, 0x0354, 0x48f9, 0xab, 0xb5, 0x20, 0x0d, 0xf8, 0x38, 0xc6, 0x8e);"
)
[
object
,
uuid
(
deec8d99
-
fa1d
-
4
d82
-
84
c2
-
2
c8969944867
),
local
]
interface
IMFSourceReaderCallback
:
IUnknown
{
HRESULT
OnReadSample
(
[
in
]
HRESULT
hr
,
[
in
]
DWORD
stream_index
,
[
in
]
DWORD
stream_flags
,
[
in
]
LONGLONG
timestamp
,
[
in
]
IMFSample
*
sample
)
;
HRESULT
OnFlush
(
[
in
]
DWORD
stream_index
)
;
HRESULT
OnEvent
(
[
in
]
DWORD
stream_index
,
[
in
]
IMFMediaEvent
*
event
)
;
}
interface
IMFMediaSource
;
[
...
...
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