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
970c1bc4
Commit
970c1bc4
authored
Oct 31, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement IWMSyncReader::SetOutputProps().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6fdae197
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
13 deletions
+58
-13
gst_private.h
dlls/winegstreamer/gst_private.h
+3
-0
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+1
-1
wm_reader.c
dlls/winegstreamer/wm_reader.c
+47
-0
wm_syncreader.c
dlls/winegstreamer/wm_syncreader.c
+6
-4
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+1
-8
No files found.
dlls/winegstreamer/gst_private.h
View file @
970c1bc4
...
...
@@ -102,6 +102,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT
wave_parser_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
DECLSPEC_HIDDEN
;
bool
amt_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
);
bool
amt_to_wg_format
(
const
AM_MEDIA_TYPE
*
mt
,
struct
wg_format
*
format
);
BOOL
init_gstreamer
(
void
)
DECLSPEC_HIDDEN
;
...
...
@@ -160,5 +161,7 @@ HRESULT wm_reader_get_output_props(struct wm_reader *reader, DWORD output,
IWMOutputMediaProps
**
props
);
void
wm_reader_init
(
struct
wm_reader
*
reader
,
const
struct
wm_reader_ops
*
ops
);
HRESULT
wm_reader_open_stream
(
struct
wm_reader
*
reader
,
IStream
*
stream
);
HRESULT
wm_reader_set_output_props
(
struct
wm_reader
*
reader
,
DWORD
output
,
IWMOutputMediaProps
*
props
);
#endif
/* __GST_PRIVATE_INCLUDED__ */
dlls/winegstreamer/quartz_parser.c
View file @
970c1bc4
...
...
@@ -540,7 +540,7 @@ static bool amt_to_wg_format_video(const AM_MEDIA_TYPE *mt, struct wg_format *fo
return
false
;
}
static
bool
amt_to_wg_format
(
const
AM_MEDIA_TYPE
*
mt
,
struct
wg_format
*
format
)
bool
amt_to_wg_format
(
const
AM_MEDIA_TYPE
*
mt
,
struct
wg_format
*
format
)
{
memset
(
format
,
0
,
sizeof
(
*
format
));
...
...
dlls/winegstreamer/wm_reader.c
View file @
970c1bc4
...
...
@@ -140,6 +140,14 @@ static const struct IWMOutputMediaPropsVtbl output_props_vtbl =
output_props_GetConnectionName
,
};
static
struct
output_props
*
unsafe_impl_from_IWMOutputMediaProps
(
IWMOutputMediaProps
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
output_props_vtbl
);
return
impl_from_IWMOutputMediaProps
(
iface
);
}
static
IWMOutputMediaProps
*
output_props_create
(
const
struct
wg_format
*
format
)
{
struct
output_props
*
object
;
...
...
@@ -1382,6 +1390,45 @@ HRESULT wm_reader_get_output_format(struct wm_reader *reader, DWORD output,
return
*
props
?
S_OK
:
E_OUTOFMEMORY
;
}
HRESULT
wm_reader_set_output_props
(
struct
wm_reader
*
reader
,
DWORD
output
,
IWMOutputMediaProps
*
props_iface
)
{
struct
output_props
*
props
=
unsafe_impl_from_IWMOutputMediaProps
(
props_iface
);
struct
wg_format
format
,
pref_format
;
struct
wm_stream
*
stream
;
strmbase_dump_media_type
(
&
props
->
mt
);
if
(
!
amt_to_wg_format
(
&
props
->
mt
,
&
format
))
{
ERR
(
"Failed to convert media type to winegstreamer format.
\n
"
);
return
E_FAIL
;
}
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
,
&
pref_format
);
if
(
pref_format
.
major_type
!=
format
.
major_type
)
{
/* R.U.S.E sets the type of the wrong stream, apparently by accident. */
LeaveCriticalSection
(
&
reader
->
cs
);
WARN
(
"Major types don't match; returning NS_E_INCOMPATIBLE_FORMAT.
\n
"
);
return
NS_E_INCOMPATIBLE_FORMAT
;
}
stream
->
format
=
format
;
wg_parser_stream_enable
(
stream
->
wg_stream
,
&
format
);
LeaveCriticalSection
(
&
reader
->
cs
);
return
S_OK
;
}
void
wm_reader_init
(
struct
wm_reader
*
reader
,
const
struct
wm_reader_ops
*
ops
)
{
reader
->
IWMHeaderInfo3_iface
.
lpVtbl
=
&
header_info_vtbl
;
...
...
dlls/winegstreamer/wm_syncreader.c
View file @
970c1bc4
...
...
@@ -186,11 +186,13 @@ static HRESULT WINAPI WMSyncReader_OpenStream(IWMSyncReader2 *iface, IStream *st
return
wm_reader_open_stream
(
&
reader
->
reader
,
stream
);
}
static
HRESULT
WINAPI
WMSyncReader_SetOutputProps
(
IWMSyncReader2
*
iface
,
DWORD
output
_num
,
IWMOutputMediaProps
*
output
)
static
HRESULT
WINAPI
WMSyncReader_SetOutputProps
(
IWMSyncReader2
*
iface
,
DWORD
output
,
IWMOutputMediaProps
*
props
)
{
struct
sync_reader
*
This
=
impl_from_IWMSyncReader2
(
iface
);
FIXME
(
"(%p)->(%u %p): stub!
\n
"
,
This
,
output_num
,
output
);
return
E_NOTIMPL
;
struct
sync_reader
*
reader
=
impl_from_IWMSyncReader2
(
iface
);
TRACE
(
"reader %p, output %u, props %p.
\n
"
,
reader
,
output
,
props
);
return
wm_reader_set_output_props
(
&
reader
->
reader
,
output
,
props
);
}
static
HRESULT
WINAPI
WMSyncReader_SetOutputSetting
(
IWMSyncReader2
*
iface
,
DWORD
output_num
,
const
WCHAR
*
name
,
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
970c1bc4
...
...
@@ -789,14 +789,7 @@ static void test_sync_reader_types(void)
check_video_type
(
mt
);
hr
=
IWMSyncReader_SetOutputProps
(
reader
,
output_number
,
output_props
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
ref
=
IWMOutputMediaProps_Release
(
output_props
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
winetest_pop_context
();
continue
;
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IWMSyncReader_SetOutputProps
(
reader
,
1
-
output_number
,
output_props
);
if
(
!
i
)
todo_wine
ok
(
hr
==
ASF_E_BADMEDIATYPE
,
"Got hr %#x.
\n
"
,
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