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
0f6f105c
Commit
0f6f105c
authored
Aug 22, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use IWMSyncReader2_SetStreamsSelected in the async reader.
parent
54843124
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
48 deletions
+39
-48
gst_private.h
dlls/winegstreamer/gst_private.h
+0
-2
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+1
-1
wm_reader.c
dlls/winegstreamer/wm_reader.c
+38
-45
No files found.
dlls/winegstreamer/gst_private.h
View file @
0f6f105c
...
...
@@ -193,7 +193,5 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
INSSBuffer
**
ret_sample
,
QWORD
*
pts
,
QWORD
*
duration
,
DWORD
*
flags
,
WORD
*
ret_stream_number
);
HRESULT
wm_reader_set_allocate_for_output
(
struct
wm_reader
*
reader
,
DWORD
output
,
BOOL
allocate
);
HRESULT
wm_reader_set_allocate_for_stream
(
struct
wm_reader
*
reader
,
WORD
stream_number
,
BOOL
allocate
);
HRESULT
wm_reader_set_streams_selected
(
struct
wm_reader
*
reader
,
WORD
count
,
const
WORD
*
stream_numbers
,
const
WMT_STREAM_SELECTION
*
selections
);
#endif
/* __GST_PRIVATE_INCLUDED__ */
dlls/winegstreamer/wm_asyncreader.c
View file @
0f6f105c
...
...
@@ -701,7 +701,7 @@ static HRESULT WINAPI WMReaderAdvanced_SetStreamsSelected(IWMReaderAdvanced6 *if
TRACE
(
"reader %p, count %u, stream_numbers %p, selections %p.
\n
"
,
reader
,
count
,
stream_numbers
,
selections
);
return
wm_reader_set_streams_selected
(
reader
->
wm_
reader
,
count
,
stream_numbers
,
selections
);
return
IWMSyncReader2_SetStreamsSelected
(
reader
->
reader
,
count
,
stream_numbers
,
selections
);
}
static
HRESULT
WINAPI
WMReaderAdvanced_GetStreamSelected
(
IWMReaderAdvanced6
*
iface
,
...
...
dlls/winegstreamer/wm_reader.c
View file @
0f6f105c
...
...
@@ -1696,50 +1696,6 @@ HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackA
}
}
HRESULT
wm_reader_set_streams_selected
(
struct
wm_reader
*
reader
,
WORD
count
,
const
WORD
*
stream_numbers
,
const
WMT_STREAM_SELECTION
*
selections
)
{
struct
wm_stream
*
stream
;
WORD
i
;
if
(
!
count
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
reader
->
cs
);
for
(
i
=
0
;
i
<
count
;
++
i
)
{
if
(
!
(
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_numbers
[
i
])))
{
LeaveCriticalSection
(
&
reader
->
cs
);
WARN
(
"Invalid stream number %u; returning NS_E_INVALID_REQUEST.
\n
"
,
stream_numbers
[
i
]);
return
NS_E_INVALID_REQUEST
;
}
}
for
(
i
=
0
;
i
<
count
;
++
i
)
{
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_numbers
[
i
]);
stream
->
selection
=
selections
[
i
];
if
(
selections
[
i
]
==
WMT_OFF
)
{
TRACE
(
"Disabling stream %u.
\n
"
,
stream_numbers
[
i
]);
wg_parser_stream_disable
(
stream
->
wg_stream
);
}
else
if
(
selections
[
i
]
==
WMT_ON
)
{
if
(
selections
[
i
]
!=
WMT_ON
)
FIXME
(
"Ignoring selection %#x for stream %u; treating as enabled.
\n
"
,
selections
[
i
],
stream_numbers
[
i
]);
TRACE
(
"Enabling stream %u.
\n
"
,
stream_numbers
[
i
]);
wg_parser_stream_enable
(
stream
->
wg_stream
,
&
stream
->
format
);
}
}
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
HRESULT
wm_reader_set_allocate_for_output
(
struct
wm_reader
*
reader
,
DWORD
output
,
BOOL
allocate
)
{
struct
wm_stream
*
stream
;
...
...
@@ -2412,11 +2368,48 @@ static HRESULT WINAPI reader_SetStreamsSelected(IWMSyncReader2 *iface,
WORD
count
,
WORD
*
stream_numbers
,
WMT_STREAM_SELECTION
*
selections
)
{
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
struct
wm_stream
*
stream
;
WORD
i
;
TRACE
(
"reader %p, count %u, stream_numbers %p, selections %p.
\n
"
,
reader
,
count
,
stream_numbers
,
selections
);
return
wm_reader_set_streams_selected
(
reader
,
count
,
stream_numbers
,
selections
);
if
(
!
count
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
reader
->
cs
);
for
(
i
=
0
;
i
<
count
;
++
i
)
{
if
(
!
(
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_numbers
[
i
])))
{
LeaveCriticalSection
(
&
reader
->
cs
);
WARN
(
"Invalid stream number %u; returning NS_E_INVALID_REQUEST.
\n
"
,
stream_numbers
[
i
]);
return
NS_E_INVALID_REQUEST
;
}
}
for
(
i
=
0
;
i
<
count
;
++
i
)
{
stream
=
wm_reader_get_stream_by_stream_number
(
reader
,
stream_numbers
[
i
]);
stream
->
selection
=
selections
[
i
];
if
(
selections
[
i
]
==
WMT_OFF
)
{
TRACE
(
"Disabling stream %u.
\n
"
,
stream_numbers
[
i
]);
wg_parser_stream_disable
(
stream
->
wg_stream
);
}
else
if
(
selections
[
i
]
==
WMT_ON
)
{
if
(
selections
[
i
]
!=
WMT_ON
)
FIXME
(
"Ignoring selection %#x for stream %u; treating as enabled.
\n
"
,
selections
[
i
],
stream_numbers
[
i
]);
TRACE
(
"Enabling stream %u.
\n
"
,
stream_numbers
[
i
]);
wg_parser_stream_enable
(
stream
->
wg_stream
,
&
stream
->
format
);
}
}
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
reader_SetRangeByTimecode
(
IWMSyncReader2
*
iface
,
WORD
stream_num
,
...
...
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