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
002010e3
Commit
002010e3
authored
Apr 19, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Add a helper to get stream identifier.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5dfe4776
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
main.c
dlls/mfreadwrite/main.c
+15
-8
No files found.
dlls/mfreadwrite/main.c
View file @
002010e3
...
...
@@ -152,6 +152,20 @@ static HRESULT media_event_get_object(IMFMediaEvent *event, REFIID riid, void **
return
hr
;
}
static
HRESULT
media_stream_get_id
(
IMFMediaStream
*
stream
,
DWORD
*
id
)
{
IMFStreamDescriptor
*
sd
;
HRESULT
hr
;
if
(
SUCCEEDED
(
hr
=
IMFMediaStream_GetStreamDescriptor
(
stream
,
&
sd
)))
{
hr
=
IMFStreamDescriptor_GetStreamIdentifier
(
sd
,
id
);
IMFStreamDescriptor_Release
(
sd
);
}
return
hr
;
}
static
HRESULT
WINAPI
source_reader_source_events_callback_QueryInterface
(
IMFAsyncCallback
*
iface
,
REFIID
riid
,
void
**
obj
)
{
...
...
@@ -190,7 +204,6 @@ static HRESULT WINAPI source_reader_source_events_callback_GetParameters(IMFAsyn
static
HRESULT
source_reader_new_stream_handler
(
struct
source_reader
*
reader
,
IMFMediaEvent
*
event
)
{
IMFStreamDescriptor
*
sd
;
IMFMediaStream
*
stream
;
unsigned
int
i
;
DWORD
id
=
0
;
...
...
@@ -204,13 +217,7 @@ static HRESULT source_reader_new_stream_handler(struct source_reader *reader, IM
TRACE
(
"Got new stream %p.
\n
"
,
stream
);
if
(
SUCCEEDED
(
hr
=
IMFMediaStream_GetStreamDescriptor
(
stream
,
&
sd
)))
{
hr
=
IMFStreamDescriptor_GetStreamIdentifier
(
sd
,
&
id
);
IMFStreamDescriptor_Release
(
sd
);
}
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
media_stream_get_id
(
stream
,
&
id
)))
{
WARN
(
"Unidentified stream %p, hr %#x.
\n
"
,
stream
,
hr
);
IMFMediaStream_Release
(
stream
);
...
...
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