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
f939fde8
Commit
f939fde8
authored
Mar 19, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Implement stream selection methods for source reader.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79b37c8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
6 deletions
+62
-6
main.c
dlls/mfreadwrite/main.c
+62
-6
No files found.
dlls/mfreadwrite/main.c
View file @
f939fde8
...
...
@@ -229,16 +229,72 @@ static ULONG WINAPI src_reader_Release(IMFSourceReader *iface)
static
HRESULT
WINAPI
src_reader_GetStreamSelection
(
IMFSourceReader
*
iface
,
DWORD
index
,
BOOL
*
selected
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %p
\n
"
,
This
,
index
,
selected
);
return
E_NOTIMPL
;
struct
source_reader
*
reader
=
impl_from_IMFSourceReader
(
iface
);
IMFStreamDescriptor
*
sd
;
TRACE
(
"%p, %#x, %p.
\n
"
,
iface
,
index
,
selected
);
switch
(
index
)
{
case
MF_SOURCE_READER_FIRST_VIDEO_STREAM
:
index
=
reader
->
first_video_stream_index
;
break
;
case
MF_SOURCE_READER_FIRST_AUDIO_STREAM
:
index
=
reader
->
first_audio_stream_index
;
break
;
default:
;
}
if
(
FAILED
(
IMFPresentationDescriptor_GetStreamDescriptorByIndex
(
reader
->
descriptor
,
index
,
selected
,
&
sd
)))
return
MF_E_INVALIDSTREAMNUMBER
;
IMFStreamDescriptor_Release
(
sd
);
return
S_OK
;
}
static
HRESULT
WINAPI
src_reader_SetStreamSelection
(
IMFSourceReader
*
iface
,
DWORD
index
,
BOOL
selected
)
{
srcreader
*
This
=
impl_from_IMFSourceReader
(
iface
);
FIXME
(
"%p, 0x%08x, %d
\n
"
,
This
,
index
,
selected
);
return
E_NOTIMPL
;
struct
source_reader
*
reader
=
impl_from_IMFSourceReader
(
iface
);
unsigned
int
count
;
HRESULT
hr
;
TRACE
(
"%p, %#x, %d.
\n
"
,
iface
,
index
,
selected
);
switch
(
index
)
{
case
MF_SOURCE_READER_FIRST_VIDEO_STREAM
:
index
=
reader
->
first_video_stream_index
;
break
;
case
MF_SOURCE_READER_FIRST_AUDIO_STREAM
:
index
=
reader
->
first_audio_stream_index
;
break
;
case
MF_SOURCE_READER_ALL_STREAMS
:
if
(
FAILED
(
hr
=
IMFPresentationDescriptor_GetStreamDescriptorCount
(
reader
->
descriptor
,
&
count
)))
return
hr
;
for
(
index
=
0
;
index
<
count
;
++
index
)
{
if
(
selected
)
IMFPresentationDescriptor_SelectStream
(
reader
->
descriptor
,
index
);
else
IMFPresentationDescriptor_DeselectStream
(
reader
->
descriptor
,
index
);
}
return
S_OK
;
default:
;
}
if
(
selected
)
hr
=
IMFPresentationDescriptor_SelectStream
(
reader
->
descriptor
,
index
);
else
hr
=
IMFPresentationDescriptor_DeselectStream
(
reader
->
descriptor
,
index
);
if
(
FAILED
(
hr
))
return
MF_E_INVALIDSTREAMNUMBER
;
return
S_OK
;
}
static
HRESULT
WINAPI
src_reader_GetNativeMediaType
(
IMFSourceReader
*
iface
,
DWORD
index
,
DWORD
typeindex
,
...
...
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