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
bb779688
Commit
bb779688
authored
Apr 03, 2024
by
Ziqing Hui
Committed by
Alexandre Julliard
Apr 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Merge video_mpeg1 into video field.
parent
8ff54f9d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
28 deletions
+21
-28
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+8
-11
quartz_transform.c
dlls/winegstreamer/quartz_transform.c
+1
-1
unixlib.h
dlls/winegstreamer/unixlib.h
+2
-6
wg_format.c
dlls/winegstreamer/wg_format.c
+10
-10
No files found.
dlls/winegstreamer/quartz_parser.c
View file @
bb779688
...
...
@@ -394,14 +394,11 @@ unsigned int wg_format_get_max_size(const struct wg_format *format)
return
format
->
u
.
video
.
width
*
format
->
u
.
video
.
height
*
3
;
case
WG_MAJOR_TYPE_VIDEO_MPEG1
:
case
WG_MAJOR_TYPE_VIDEO_WMV
:
/* Estimated max size of a compressed video frame.
* There's no way to no way to know the real upper bound,
* so let's just use the decompressed size and hope it works. */
return
wg_format_get_max_size_video_raw
(
WG_VIDEO_FORMAT_YV12
,
format
->
u
.
video_mpeg1
.
width
,
format
->
u
.
video_mpeg1
.
height
);
case
WG_MAJOR_TYPE_VIDEO_WMV
:
return
wg_format_get_max_size_video_raw
(
WG_VIDEO_FORMAT_YV12
,
format
->
u
.
video
.
width
,
format
->
u
.
video
.
height
);
case
WG_MAJOR_TYPE_AUDIO
:
...
...
@@ -701,11 +698,11 @@ static bool amt_from_wg_format_video_mpeg1(AM_MEDIA_TYPE *mt, const struct wg_fo
mt
->
pbFormat
=
(
BYTE
*
)
video_format
;
memset
(
video_format
,
0
,
sizeof
(
*
video_format
));
if
((
frame_time
=
MulDiv
(
10000000
,
format
->
u
.
video
_mpeg1
.
fps_d
,
format
->
u
.
video_mpeg1
.
fps_n
))
!=
-
1
)
if
((
frame_time
=
MulDiv
(
10000000
,
format
->
u
.
video
.
fps_d
,
format
->
u
.
video
.
fps_n
))
!=
-
1
)
video_format
->
hdr
.
AvgTimePerFrame
=
frame_time
;
video_format
->
hdr
.
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
video_format
->
hdr
.
bmiHeader
.
biWidth
=
format
->
u
.
video
_mpeg1
.
width
;
video_format
->
hdr
.
bmiHeader
.
biHeight
=
format
->
u
.
video
_mpeg1
.
height
;
video_format
->
hdr
.
bmiHeader
.
biWidth
=
format
->
u
.
video
.
width
;
video_format
->
hdr
.
bmiHeader
.
biHeight
=
format
->
u
.
video
.
height
;
video_format
->
hdr
.
bmiHeader
.
biPlanes
=
1
;
video_format
->
hdr
.
bmiHeader
.
biBitCount
=
12
;
video_format
->
hdr
.
bmiHeader
.
biCompression
=
mt
->
subtype
.
Data1
;
...
...
@@ -1034,10 +1031,10 @@ static bool amt_to_wg_format_video_mpeg1(const AM_MEDIA_TYPE *mt, struct wg_form
}
format
->
major_type
=
WG_MAJOR_TYPE_VIDEO_MPEG1
;
format
->
u
.
video
_mpeg1
.
width
=
video_format
->
hdr
.
bmiHeader
.
biWidth
;
format
->
u
.
video
_mpeg1
.
height
=
video_format
->
hdr
.
bmiHeader
.
biHeight
;
format
->
u
.
video
_mpeg1
.
fps_n
=
10000000
;
format
->
u
.
video
_mpeg1
.
fps_d
=
video_format
->
hdr
.
AvgTimePerFrame
;
format
->
u
.
video
.
width
=
video_format
->
hdr
.
bmiHeader
.
biWidth
;
format
->
u
.
video
.
height
=
video_format
->
hdr
.
bmiHeader
.
biHeight
;
format
->
u
.
video
.
fps_n
=
10000000
;
format
->
u
.
video
.
fps_d
=
video_format
->
hdr
.
AvgTimePerFrame
;
return
true
;
}
...
...
dlls/winegstreamer/quartz_transform.c
View file @
bb779688
...
...
@@ -907,7 +907,7 @@ HRESULT mpeg_video_codec_create(IUnknown *outer, IUnknown **out)
static
const
struct
wg_format
input_format
=
{
.
major_type
=
WG_MAJOR_TYPE_VIDEO_MPEG1
,
.
u
.
video
_mpeg1
=
{},
.
u
.
video
=
{},
};
struct
wg_transform_attrs
attrs
=
{
0
};
wg_transform_t
transform
;
...
...
dlls/winegstreamer/unixlib.h
View file @
bb779688
...
...
@@ -120,7 +120,8 @@ struct wg_format
* CINEPAK: width, height, fps_n, fps_d.
* H264: width, height, fps_n, fps_d, profile, level, codec_data_len, codec_data.
* WMV: width, height, fps_n, fps_d, codec_data_len, codec_data.
* INDEO: width, height, fps_n, fps_d, version. */
* INDEO: width, height, fps_n, fps_d, version.
* MPEG1: width, height, fps_n, fps_d. */
struct
{
wg_video_format
format
;
...
...
@@ -136,11 +137,6 @@ struct wg_format
uint32_t
codec_data_len
;
unsigned
char
codec_data
[
64
];
}
video
;
struct
{
int32_t
width
,
height
;
uint32_t
fps_n
,
fps_d
;
}
video_mpeg1
;
}
u
;
};
...
...
dlls/winegstreamer/wg_format.c
View file @
bb779688
...
...
@@ -384,10 +384,10 @@ static void wg_format_from_caps_video_mpeg1(struct wg_format *format, const GstC
}
format
->
major_type
=
WG_MAJOR_TYPE_VIDEO_MPEG1
;
format
->
u
.
video
_mpeg1
.
width
=
width
;
format
->
u
.
video
_mpeg1
.
height
=
height
;
format
->
u
.
video
_mpeg1
.
fps_n
=
fps_n
;
format
->
u
.
video
_mpeg1
.
fps_d
=
fps_d
;
format
->
u
.
video
.
width
=
width
;
format
->
u
.
video
.
height
=
height
;
format
->
u
.
video
.
fps_n
=
fps_n
;
format
->
u
.
video
.
fps_d
=
fps_d
;
}
void
wg_format_from_caps
(
struct
wg_format
*
format
,
const
GstCaps
*
caps
)
...
...
@@ -844,12 +844,12 @@ static GstCaps *wg_format_to_caps_video_mpeg1(const struct wg_format *format)
gst_caps_set_simple
(
caps
,
"mpegversion"
,
G_TYPE_INT
,
1
,
NULL
);
gst_caps_set_simple
(
caps
,
"systemstream"
,
G_TYPE_BOOLEAN
,
FALSE
,
NULL
);
gst_caps_set_simple
(
caps
,
"parsed"
,
G_TYPE_BOOLEAN
,
TRUE
,
NULL
);
if
(
format
->
u
.
video
_mpeg1
.
width
)
gst_caps_set_simple
(
caps
,
"width"
,
G_TYPE_INT
,
format
->
u
.
video
_mpeg1
.
width
,
NULL
);
if
(
format
->
u
.
video
_mpeg1
.
height
)
gst_caps_set_simple
(
caps
,
"height"
,
G_TYPE_INT
,
format
->
u
.
video
_mpeg1
.
height
,
NULL
);
if
(
format
->
u
.
video
_mpeg1
.
fps_d
||
format
->
u
.
video
.
fps_n
)
gst_caps_set_simple
(
caps
,
"framerate"
,
GST_TYPE_FRACTION
,
format
->
u
.
video
_mpeg1
.
fps_n
,
format
->
u
.
video_mpeg1
.
fps_d
,
NULL
);
if
(
format
->
u
.
video
.
width
)
gst_caps_set_simple
(
caps
,
"width"
,
G_TYPE_INT
,
format
->
u
.
video
.
width
,
NULL
);
if
(
format
->
u
.
video
.
height
)
gst_caps_set_simple
(
caps
,
"height"
,
G_TYPE_INT
,
format
->
u
.
video
.
height
,
NULL
);
if
(
format
->
u
.
video
.
fps_d
||
format
->
u
.
video
.
fps_n
)
gst_caps_set_simple
(
caps
,
"framerate"
,
GST_TYPE_FRACTION
,
format
->
u
.
video
.
fps_n
,
format
->
u
.
video
.
fps_d
,
NULL
);
return
caps
;
}
...
...
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