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
8999dd2b
Commit
8999dd2b
authored
Nov 24, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite/reader: Implement GetServiceForStream() for stream objects.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c06e7ba7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
reader.c
dlls/mfreadwrite/reader.c
+27
-3
No files found.
dlls/mfreadwrite/reader.c
View file @
8999dd2b
...
@@ -1906,20 +1906,40 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReader *iface, DWO
...
@@ -1906,20 +1906,40 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReader *iface, DWO
{
{
struct
source_reader
*
reader
=
impl_from_IMFSourceReader
(
iface
);
struct
source_reader
*
reader
=
impl_from_IMFSourceReader
(
iface
);
IUnknown
*
obj
=
NULL
;
IUnknown
*
obj
=
NULL
;
HRESULT
hr
;
HRESULT
hr
=
S_OK
;
TRACE
(
"%p, %#x, %s, %s, %p
\n
"
,
iface
,
index
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
object
);
TRACE
(
"%p, %#x, %s, %s, %p
\n
"
,
iface
,
index
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
object
);
EnterCriticalSection
(
&
reader
->
cs
);
switch
(
index
)
switch
(
index
)
{
{
case
MF_SOURCE_READER_MEDIASOURCE
:
case
MF_SOURCE_READER_MEDIASOURCE
:
obj
=
(
IUnknown
*
)
reader
->
source
;
obj
=
(
IUnknown
*
)
reader
->
source
;
break
;
break
;
default:
default:
FIXME
(
"Unsupported index %#x.
\n
"
,
index
);
if
(
index
==
MF_SOURCE_READER_FIRST_VIDEO_STREAM
)
return
E_NOTIMPL
;
index
=
reader
->
first_video_stream_index
;
else
if
(
index
==
MF_SOURCE_READER_FIRST_AUDIO_STREAM
)
index
=
reader
->
first_audio_stream_index
;
if
(
index
>=
reader
->
stream_count
)
hr
=
MF_E_INVALIDSTREAMNUMBER
;
else
{
obj
=
(
IUnknown
*
)
reader
->
streams
[
index
].
decoder
;
if
(
!
obj
)
hr
=
E_NOINTERFACE
;
}
}
break
;
}
if
(
obj
)
IUnknown_AddRef
(
obj
);
LeaveCriticalSection
(
&
reader
->
cs
);
if
(
obj
)
{
if
(
IsEqualGUID
(
service
,
&
GUID_NULL
))
if
(
IsEqualGUID
(
service
,
&
GUID_NULL
))
{
{
hr
=
IUnknown_QueryInterface
(
obj
,
riid
,
object
);
hr
=
IUnknown_QueryInterface
(
obj
,
riid
,
object
);
...
@@ -1935,6 +1955,10 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReader *iface, DWO
...
@@ -1935,6 +1955,10 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReader *iface, DWO
IMFGetService_Release
(
gs
);
IMFGetService_Release
(
gs
);
}
}
}
}
}
if
(
obj
)
IUnknown_Release
(
obj
);
return
hr
;
return
hr
;
}
}
...
...
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