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
6c424b7e
Commit
6c424b7e
authored
Mar 13, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
May 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement amt_from_wg_format_video_wmv.
parent
13188bb1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+57
-1
No files found.
dlls/winegstreamer/quartz_parser.c
View file @
6c424b7e
...
...
@@ -541,6 +541,60 @@ static bool amt_from_wg_format_video_cinepak(AM_MEDIA_TYPE *mt, const struct wg_
return
true
;
}
static
bool
amt_from_wg_format_video_wmv
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
)
{
VIDEOINFO
*
video_format
;
uint32_t
frame_time
;
const
GUID
*
subtype
;
if
(
!
(
video_format
=
CoTaskMemAlloc
(
sizeof
(
*
video_format
))))
return
false
;
switch
(
format
->
u
.
video_wmv
.
format
)
{
case
WG_WMV_VIDEO_FORMAT_WMV1
:
subtype
=
&
MEDIASUBTYPE_WMV1
;
break
;
case
WG_WMV_VIDEO_FORMAT_WMV2
:
subtype
=
&
MEDIASUBTYPE_WMV2
;
break
;
case
WG_WMV_VIDEO_FORMAT_WMV3
:
subtype
=
&
MEDIASUBTYPE_WMV3
;
break
;
case
WG_WMV_VIDEO_FORMAT_WMVA
:
subtype
=
&
MEDIASUBTYPE_WMVA
;
break
;
case
WG_WMV_VIDEO_FORMAT_WVC1
:
subtype
=
&
MEDIASUBTYPE_WVC1
;
break
;
default:
WARN
(
"Invalid WMV format %u.
\n
"
,
format
->
u
.
video_wmv
.
format
);
return
false
;
}
mt
->
majortype
=
MEDIATYPE_Video
;
mt
->
subtype
=
*
subtype
;
mt
->
bFixedSizeSamples
=
FALSE
;
mt
->
bTemporalCompression
=
TRUE
;
mt
->
lSampleSize
=
0
;
mt
->
formattype
=
FORMAT_VideoInfo
;
mt
->
cbFormat
=
sizeof
(
VIDEOINFOHEADER
);
mt
->
pbFormat
=
(
BYTE
*
)
video_format
;
memset
(
video_format
,
0
,
sizeof
(
*
video_format
));
SetRect
(
&
video_format
->
rcSource
,
0
,
0
,
format
->
u
.
video_wmv
.
width
,
format
->
u
.
video_wmv
.
height
);
video_format
->
rcTarget
=
video_format
->
rcSource
;
if
((
frame_time
=
MulDiv
(
10000000
,
format
->
u
.
video_wmv
.
fps_d
,
format
->
u
.
video_wmv
.
fps_n
))
!=
-
1
)
video_format
->
AvgTimePerFrame
=
frame_time
;
video_format
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
video_format
->
bmiHeader
.
biWidth
=
format
->
u
.
video_wmv
.
width
;
video_format
->
bmiHeader
.
biHeight
=
format
->
u
.
video_wmv
.
height
;
video_format
->
bmiHeader
.
biPlanes
=
1
;
video_format
->
bmiHeader
.
biCompression
=
mt
->
subtype
.
Data1
;
return
true
;
}
bool
amt_from_wg_format
(
AM_MEDIA_TYPE
*
mt
,
const
struct
wg_format
*
format
,
bool
wm
)
{
memset
(
mt
,
0
,
sizeof
(
*
mt
));
...
...
@@ -550,7 +604,6 @@ bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool
case
WG_MAJOR_TYPE_AUDIO_MPEG4
:
case
WG_MAJOR_TYPE_AUDIO_WMA
:
case
WG_MAJOR_TYPE_VIDEO_H264
:
case
WG_MAJOR_TYPE_VIDEO_WMV
:
case
WG_MAJOR_TYPE_VIDEO_INDEO
:
FIXME
(
"Format %u not implemented!
\n
"
,
format
->
major_type
);
/* fallthrough */
...
...
@@ -568,6 +621,9 @@ bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool
case
WG_MAJOR_TYPE_VIDEO_CINEPAK
:
return
amt_from_wg_format_video_cinepak
(
mt
,
format
);
case
WG_MAJOR_TYPE_VIDEO_WMV
:
return
amt_from_wg_format_video_wmv
(
mt
,
format
);
}
assert
(
0
);
...
...
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