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
0dfeadd7
Commit
0dfeadd7
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_GetOutputFormat in the async reader.
parent
efb6aca8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
55 deletions
+46
-55
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
+45
-52
No files found.
dlls/winegstreamer/gst_private.h
View file @
0dfeadd7
...
...
@@ -189,8 +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
(
struct
wm_reader
*
reader
,
DWORD
output
,
DWORD
index
,
IWMOutputMediaProps
**
props
);
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
);
...
...
dlls/winegstreamer/wm_asyncreader.c
View file @
0dfeadd7
...
...
@@ -536,7 +536,7 @@ static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
TRACE
(
"reader %p, output %lu, index %lu, props %p.
\n
"
,
reader
,
output
,
index
,
props
);
return
wm_reader_get_output_format
(
reader
->
wm_
reader
,
output
,
index
,
props
);
return
IWMSyncReader2_GetOutputFormat
(
reader
->
reader
,
output
,
index
,
props
);
}
static
HRESULT
WINAPI
WMReader_Start
(
IWMReader
*
iface
,
...
...
dlls/winegstreamer/wm_reader.c
View file @
0dfeadd7
...
...
@@ -1538,57 +1538,6 @@ HRESULT wm_reader_get_output_format_count(struct wm_reader *reader, DWORD output
return
S_OK
;
}
HRESULT
wm_reader_get_output_format
(
struct
wm_reader
*
reader
,
DWORD
output
,
DWORD
index
,
IWMOutputMediaProps
**
props
)
{
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
:
if
(
index
>=
ARRAY_SIZE
(
video_formats
))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
NS_E_INVALID_OUTPUT_FORMAT
;
}
format
.
u
.
video
.
format
=
video_formats
[
index
];
break
;
case
WG_MAJOR_TYPE_AUDIO
:
if
(
index
)
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
NS_E_INVALID_OUTPUT_FORMAT
;
}
format
.
u
.
audio
.
format
=
WG_AUDIO_FORMAT_S16LE
;
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
);
break
;
case
WG_MAJOR_TYPE_UNKNOWN
:
break
;
}
LeaveCriticalSection
(
&
reader
->
cs
);
*
props
=
output_props_create
(
&
format
);
return
*
props
?
S_OK
:
E_OUTOFMEMORY
;
}
static
const
char
*
get_major_type_string
(
enum
wg_major_type
type
)
{
switch
(
type
)
...
...
@@ -2086,10 +2035,54 @@ static HRESULT WINAPI reader_GetOutputFormat(IWMSyncReader2 *iface,
DWORD
output
,
DWORD
index
,
IWMOutputMediaProps
**
props
)
{
struct
wm_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
struct
wm_stream
*
stream
;
struct
wg_format
format
;
TRACE
(
"reader %p, output %lu, index %lu, props %p.
\n
"
,
reader
,
output
,
index
,
props
);
return
wm_reader_get_output_format
(
reader
,
output
,
index
,
props
);
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
:
if
(
index
>=
ARRAY_SIZE
(
video_formats
))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
NS_E_INVALID_OUTPUT_FORMAT
;
}
format
.
u
.
video
.
format
=
video_formats
[
index
];
break
;
case
WG_MAJOR_TYPE_AUDIO
:
if
(
index
)
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
NS_E_INVALID_OUTPUT_FORMAT
;
}
format
.
u
.
audio
.
format
=
WG_AUDIO_FORMAT_S16LE
;
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
);
break
;
case
WG_MAJOR_TYPE_UNKNOWN
:
break
;
}
LeaveCriticalSection
(
&
reader
->
cs
);
*
props
=
output_props_create
(
&
format
);
return
*
props
?
S_OK
:
E_OUTOFMEMORY
;
}
static
HRESULT
WINAPI
reader_GetOutputFormatCount
(
IWMSyncReader2
*
iface
,
DWORD
output
,
DWORD
*
count
)
...
...
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