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
08effb90
Commit
08effb90
authored
Sep 05, 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_GetOutputFormatCount in the async reader.
parent
0dfeadd7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
38 deletions
+31
-38
gst_private.h
dlls/winegstreamer/gst_private.h
+0
-1
wm_asyncreader.c
dlls/winegstreamer/wm_asyncreader.c
+1
-1
wm_reader.c
dlls/winegstreamer/wm_reader.c
+30
-36
No files found.
dlls/winegstreamer/gst_private.h
View file @
08effb90
...
...
@@ -189,7 +189,6 @@ struct wm_reader
HRESULT
WINAPI
winegstreamer_create_wm_sync_reader
(
IUnknown
*
outer
,
void
**
out
);
struct
wm_reader
*
wm_reader_from_sync_reader_inner
(
IUnknown
*
inner
);
HRESULT
wm_reader_get_output_format_count
(
struct
wm_reader
*
reader
,
DWORD
output
,
DWORD
*
count
);
HRESULT
wm_reader_get_stream_sample
(
struct
wm_reader
*
reader
,
IWMReaderCallbackAdvanced
*
callback_advanced
,
WORD
stream_number
,
INSSBuffer
**
ret_sample
,
QWORD
*
pts
,
QWORD
*
duration
,
DWORD
*
flags
,
WORD
*
ret_stream_number
);
HRESULT
wm_reader_get_stream_selection
(
struct
wm_reader
*
reader
,
...
...
dlls/winegstreamer/wm_asyncreader.c
View file @
08effb90
...
...
@@ -526,7 +526,7 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
TRACE
(
"reader %p, output %lu, count %p.
\n
"
,
reader
,
output
,
count
);
return
wm_reader_get_output_format_count
(
reader
->
wm_
reader
,
output
,
count
);
return
IWMSyncReader2_GetOutputFormatCount
(
reader
->
reader
,
output
,
count
);
}
static
HRESULT
WINAPI
WMReader_GetOutputFormat
(
IWMReader
*
iface
,
DWORD
output
,
...
...
dlls/winegstreamer/wm_reader.c
View file @
08effb90
...
...
@@ -1503,41 +1503,6 @@ static const enum wg_video_format video_formats[] =
WG_VIDEO_FORMAT_RGB15
,
};
HRESULT
wm_reader_get_output_format_count
(
struct
wm_reader
*
reader
,
DWORD
output
,
DWORD
*
count
)
{
struct
wm_stream
*
stream
;
struct
wg_format
format
;
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
(
stream
=
get_stream_by_output_number
(
reader
,
output
)))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_INVALIDARG
;
}
wg_parser_stream_get_preferred_format
(
stream
->
wg_stream
,
&
format
);
switch
(
format
.
major_type
)
{
case
WG_MAJOR_TYPE_VIDEO
:
*
count
=
ARRAY_SIZE
(
video_formats
);
break
;
case
WG_MAJOR_TYPE_MPEG1_AUDIO
:
case
WG_MAJOR_TYPE_WMA
:
case
WG_MAJOR_TYPE_H264
:
FIXME
(
"Format %u not implemented!
\n
"
,
format
.
major_type
);
/* fallthrough */
case
WG_MAJOR_TYPE_AUDIO
:
case
WG_MAJOR_TYPE_UNKNOWN
:
*
count
=
1
;
break
;
}
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
const
char
*
get_major_type_string
(
enum
wg_major_type
type
)
{
switch
(
type
)
...
...
@@ -2088,10 +2053,39 @@ static HRESULT WINAPI reader_GetOutputFormat(IWMSyncReader2 *iface,
static
HRESULT
WINAPI
reader_GetOutputFormatCount
(
IWMSyncReader2
*
iface
,
DWORD
output
,
DWORD
*
count
)
{
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
struct
wm_stream
*
stream
;
struct
wg_format
format
;
TRACE
(
"reader %p, output %lu, count %p.
\n
"
,
reader
,
output
,
count
);
return
wm_reader_get_output_format_count
(
reader
,
output
,
count
);
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
(
stream
=
get_stream_by_output_number
(
reader
,
output
)))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_INVALIDARG
;
}
wg_parser_stream_get_preferred_format
(
stream
->
wg_stream
,
&
format
);
switch
(
format
.
major_type
)
{
case
WG_MAJOR_TYPE_VIDEO
:
*
count
=
ARRAY_SIZE
(
video_formats
);
break
;
case
WG_MAJOR_TYPE_MPEG1_AUDIO
:
case
WG_MAJOR_TYPE_WMA
:
case
WG_MAJOR_TYPE_H264
:
FIXME
(
"Format %u not implemented!
\n
"
,
format
.
major_type
);
/* fallthrough */
case
WG_MAJOR_TYPE_AUDIO
:
case
WG_MAJOR_TYPE_UNKNOWN
:
*
count
=
1
;
break
;
}
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
reader_GetOutputNumberForStream
(
IWMSyncReader2
*
iface
,
...
...
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