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
7c02cd8c
Commit
7c02cd8c
authored
Nov 02, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Set rcSource and rcTarget for WMF video formats.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0b79e2ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
17 deletions
+22
-17
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-1
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+17
-12
wm_reader.c
dlls/winegstreamer/wm_reader.c
+2
-2
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+2
-2
No files found.
dlls/winegstreamer/gst_private.h
View file @
7c02cd8c
...
...
@@ -101,7 +101,7 @@ HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN
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_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
,
bool
wm
);
bool
amt_to_wg_format
(
const
AM_MEDIA_TYPE
*
mt
,
struct
wg_format
*
format
);
BOOL
init_gstreamer
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/winegstreamer/quartz_parser.c
View file @
7c02cd8c
...
...
@@ -275,7 +275,7 @@ static unsigned int get_image_size(const struct wg_format *format)
return
0
;
}
static
bool
amt_from_wg_format_video
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
)
static
bool
amt_from_wg_format_video
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
,
bool
wm
)
{
static
const
struct
{
...
...
@@ -322,6 +322,11 @@ static bool amt_from_wg_format_video(AM_MEDIA_TYPE *mt, const struct wg_format *
memset
(
video_format
,
0
,
sizeof
(
*
video_format
));
if
(
wm
)
{
SetRect
(
&
video_format
->
rcSource
,
0
,
0
,
format
->
u
.
video
.
width
,
format
->
u
.
video
.
height
);
video_format
->
rcTarget
=
video_format
->
rcSource
;
}
if
((
frame_time
=
MulDiv
(
10000000
,
format
->
u
.
video
.
fps_d
,
format
->
u
.
video
.
fps_n
))
!=
-
1
)
video_format
->
AvgTimePerFrame
=
frame_time
;
video_format
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
...
...
@@ -343,7 +348,7 @@ static bool amt_from_wg_format_video(AM_MEDIA_TYPE *mt, const struct wg_format *
return
true
;
}
bool
amt_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
)
bool
amt_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
,
bool
wm
)
{
memset
(
mt
,
0
,
sizeof
(
*
mt
));
...
...
@@ -356,7 +361,7 @@ bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format)
return
amt_from_wg_format_audio
(
mt
,
format
);
case
WG_MAJOR_TYPE_VIDEO
:
return
amt_from_wg_format_video
(
mt
,
format
);
return
amt_from_wg_format_video
(
mt
,
format
,
wm
);
}
assert
(
0
);
...
...
@@ -1076,7 +1081,7 @@ static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
memset
(
mt
,
0
,
sizeof
(
AM_MEDIA_TYPE
));
if
(
amt_from_wg_format
(
mt
,
&
format
))
if
(
amt_from_wg_format
(
mt
,
&
format
,
false
))
{
if
(
!
index
--
)
return
S_OK
;
...
...
@@ -1086,14 +1091,14 @@ static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
if
(
format
.
major_type
==
WG_MAJOR_TYPE_VIDEO
&&
index
<
ARRAY_SIZE
(
video_formats
))
{
format
.
u
.
video
.
format
=
video_formats
[
index
];
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
if
(
!
amt_from_wg_format
(
mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
else
if
(
format
.
major_type
==
WG_MAJOR_TYPE_AUDIO
&&
!
index
)
{
format
.
u
.
audio
.
format
=
WG_AUDIO_FORMAT_S16LE
;
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
if
(
!
amt_from_wg_format
(
mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1613,7 +1618,7 @@ static HRESULT wave_parser_source_query_accept(struct parser_source *pin, const
HRESULT
hr
;
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
))
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
hr
=
compare_media_types
(
mt
,
&
pad_mt
)
?
S_OK
:
S_FALSE
;
FreeMediaType
(
&
pad_mt
);
...
...
@@ -1628,7 +1633,7 @@ static HRESULT wave_parser_source_get_media_type(struct parser_source *pin,
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
if
(
!
amt_from_wg_format
(
mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1699,7 +1704,7 @@ static HRESULT avi_splitter_source_query_accept(struct parser_source *pin, const
HRESULT
hr
;
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
))
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
hr
=
compare_media_types
(
mt
,
&
pad_mt
)
?
S_OK
:
S_FALSE
;
FreeMediaType
(
&
pad_mt
);
...
...
@@ -1714,7 +1719,7 @@ static HRESULT avi_splitter_source_get_media_type(struct parser_source *pin,
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
if
(
!
amt_from_wg_format
(
mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1783,7 +1788,7 @@ static HRESULT mpeg_splitter_source_query_accept(struct parser_source *pin, cons
HRESULT
hr
;
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
))
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
hr
=
compare_media_types
(
mt
,
&
pad_mt
)
?
S_OK
:
S_FALSE
;
FreeMediaType
(
&
pad_mt
);
...
...
@@ -1798,7 +1803,7 @@ static HRESULT mpeg_splitter_source_get_media_type(struct parser_source *pin,
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
if
(
!
amt_from_wg_format
(
mt
,
&
format
,
false
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
dlls/winegstreamer/wm_reader.c
View file @
7c02cd8c
...
...
@@ -157,7 +157,7 @@ static IWMOutputMediaProps *output_props_create(const struct wg_format *format)
object
->
IWMOutputMediaProps_iface
.
lpVtbl
=
&
output_props_vtbl
;
object
->
refcount
=
1
;
if
(
!
amt_from_wg_format
(
&
object
->
mt
,
format
))
if
(
!
amt_from_wg_format
(
&
object
->
mt
,
format
,
true
))
{
free
(
object
);
return
NULL
;
...
...
@@ -338,7 +338,7 @@ static HRESULT WINAPI stream_config_GetStreamType(IWMStreamConfig *iface, GUID *
EnterCriticalSection
(
&
reader
->
cs
);
if
(
!
amt_from_wg_format
(
&
mt
,
&
config
->
stream
->
format
))
if
(
!
amt_from_wg_format
(
&
mt
,
&
config
->
stream
->
format
,
true
))
{
LeaveCriticalSection
(
&
reader
->
cs
);
return
E_OUTOFMEMORY
;
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
7c02cd8c
...
...
@@ -629,8 +629,8 @@ static void check_video_type(const WM_MEDIA_TYPE *mt)
todo_wine
ok
(
!
mt
->
bTemporalCompression
,
"Got temporal compression %d.
\n
"
,
mt
->
bTemporalCompression
);
ok
(
!
mt
->
pUnk
,
"Got pUnk %p.
\n
"
,
mt
->
pUnk
);
todo_wine
ok
(
EqualRect
(
&
video_info
->
rcSource
,
&
rect
),
"Got source rect %s.
\n
"
,
wine_dbgstr_rect
(
&
rect
));
todo_wine
ok
(
EqualRect
(
&
video_info
->
rcTarget
,
&
rect
),
"Got target rect %s.
\n
"
,
wine_dbgstr_rect
(
&
rect
));
ok
(
EqualRect
(
&
video_info
->
rcSource
,
&
rect
),
"Got source rect %s.
\n
"
,
wine_dbgstr_rect
(
&
rect
));
ok
(
EqualRect
(
&
video_info
->
rcTarget
,
&
rect
),
"Got target rect %s.
\n
"
,
wine_dbgstr_rect
(
&
rect
));
ok
(
!
video_info
->
dwBitRate
,
"Got bit rate %u.
\n
"
,
video_info
->
dwBitRate
);
ok
(
!
video_info
->
dwBitErrorRate
,
"Got bit error rate %u.
\n
"
,
video_info
->
dwBitErrorRate
);
ok
(
video_info
->
bmiHeader
.
biSize
==
sizeof
(
video_info
->
bmiHeader
),
...
...
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