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
b3a46a94
Commit
b3a46a94
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_cinepak into video field.
parent
03f852a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
24 deletions
+22
-24
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+4
-4
unixlib.h
dlls/winegstreamer/unixlib.h
+5
-7
wg_format.c
dlls/winegstreamer/wg_format.c
+13
-13
No files found.
dlls/winegstreamer/quartz_parser.c
View file @
b3a46a94
...
@@ -391,7 +391,7 @@ unsigned int wg_format_get_max_size(const struct wg_format *format)
...
@@ -391,7 +391,7 @@ unsigned int wg_format_get_max_size(const struct wg_format *format)
/* Both ffmpeg's encoder and a Cinepak file seen in the wild report
/* Both ffmpeg's encoder and a Cinepak file seen in the wild report
* 24 bpp. ffmpeg sets biSizeImage as below; others may be smaller,
* 24 bpp. ffmpeg sets biSizeImage as below; others may be smaller,
* but as long as every sample fits into our allocator, we're fine. */
* but as long as every sample fits into our allocator, we're fine. */
return
format
->
u
.
video
_cinepak
.
width
*
format
->
u
.
video_cinepak
.
height
*
3
;
return
format
->
u
.
video
.
width
*
format
->
u
.
video
.
height
*
3
;
case
WG_MAJOR_TYPE_VIDEO_MPEG1
:
case
WG_MAJOR_TYPE_VIDEO_MPEG1
:
/* Estimated max size of a compressed video frame.
/* Estimated max size of a compressed video frame.
...
@@ -609,11 +609,11 @@ static bool amt_from_wg_format_video_cinepak(AM_MEDIA_TYPE *mt, const struct wg_
...
@@ -609,11 +609,11 @@ static bool amt_from_wg_format_video_cinepak(AM_MEDIA_TYPE *mt, const struct wg_
mt
->
pbFormat
=
(
BYTE
*
)
video_format
;
mt
->
pbFormat
=
(
BYTE
*
)
video_format
;
memset
(
video_format
,
0
,
sizeof
(
*
video_format
));
memset
(
video_format
,
0
,
sizeof
(
*
video_format
));
if
((
frame_time
=
MulDiv
(
10000000
,
format
->
u
.
video
_cinepak
.
fps_d
,
format
->
u
.
video_cinepak
.
fps_n
))
!=
-
1
)
if
((
frame_time
=
MulDiv
(
10000000
,
format
->
u
.
video
.
fps_d
,
format
->
u
.
video
.
fps_n
))
!=
-
1
)
video_format
->
AvgTimePerFrame
=
frame_time
;
video_format
->
AvgTimePerFrame
=
frame_time
;
video_format
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
video_format
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
video_format
->
bmiHeader
.
biWidth
=
format
->
u
.
video
_cinepak
.
width
;
video_format
->
bmiHeader
.
biWidth
=
format
->
u
.
video
.
width
;
video_format
->
bmiHeader
.
biHeight
=
format
->
u
.
video
_cinepak
.
height
;
video_format
->
bmiHeader
.
biHeight
=
format
->
u
.
video
.
height
;
video_format
->
bmiHeader
.
biPlanes
=
1
;
video_format
->
bmiHeader
.
biPlanes
=
1
;
video_format
->
bmiHeader
.
biBitCount
=
24
;
video_format
->
bmiHeader
.
biBitCount
=
24
;
video_format
->
bmiHeader
.
biCompression
=
mt
->
subtype
.
Data1
;
video_format
->
bmiHeader
.
biCompression
=
mt
->
subtype
.
Data1
;
...
...
dlls/winegstreamer/unixlib.h
View file @
b3a46a94
...
@@ -119,9 +119,14 @@ struct wg_format
...
@@ -119,9 +119,14 @@ struct wg_format
unsigned
char
codec_data
[
64
];
unsigned
char
codec_data
[
64
];
}
audio
;
}
audio
;
/* Valid members for different video formats:
*
* Uncompressed(RGB and YUV): width, height, fps_n, fps_d, padding.
* CINEPAK: width, height, fps_n, fps_d. */
struct
struct
{
{
wg_video_format
format
;
wg_video_format
format
;
/* Positive height indicates top-down video; negative height
/* Positive height indicates top-down video; negative height
* indicates bottom-up video. */
* indicates bottom-up video. */
int32_t
width
,
height
;
int32_t
width
,
height
;
...
@@ -130,13 +135,6 @@ struct wg_format
...
@@ -130,13 +135,6 @@ struct wg_format
}
video
;
}
video
;
struct
struct
{
{
uint32_t
width
;
uint32_t
height
;
uint32_t
fps_n
;
uint32_t
fps_d
;
}
video_cinepak
;
struct
{
int32_t
width
,
height
;
int32_t
width
,
height
;
uint32_t
fps_n
,
fps_d
;
uint32_t
fps_n
,
fps_d
;
uint32_t
profile
;
uint32_t
profile
;
...
...
dlls/winegstreamer/wg_format.c
View file @
b3a46a94
...
@@ -287,10 +287,10 @@ static void wg_format_from_caps_video_cinepak(struct wg_format *format, const Gs
...
@@ -287,10 +287,10 @@ static void wg_format_from_caps_video_cinepak(struct wg_format *format, const Gs
}
}
format
->
major_type
=
WG_MAJOR_TYPE_VIDEO_CINEPAK
;
format
->
major_type
=
WG_MAJOR_TYPE_VIDEO_CINEPAK
;
format
->
u
.
video
_cinepak
.
width
=
width
;
format
->
u
.
video
.
width
=
width
;
format
->
u
.
video
_cinepak
.
height
=
height
;
format
->
u
.
video
.
height
=
height
;
format
->
u
.
video
_cinepak
.
fps_n
=
fps_n
;
format
->
u
.
video
.
fps_n
=
fps_n
;
format
->
u
.
video
_cinepak
.
fps_d
=
fps_d
;
format
->
u
.
video
.
fps_d
=
fps_d
;
}
}
static
void
wg_format_from_caps_video_wmv
(
struct
wg_format
*
format
,
const
GstCaps
*
caps
)
static
void
wg_format_from_caps_video_wmv
(
struct
wg_format
*
format
,
const
GstCaps
*
caps
)
...
@@ -622,12 +622,12 @@ static GstCaps *wg_format_to_caps_video_cinepak(const struct wg_format *format)
...
@@ -622,12 +622,12 @@ static GstCaps *wg_format_to_caps_video_cinepak(const struct wg_format *format)
if
(
!
(
caps
=
gst_caps_new_empty_simple
(
"video/x-cinepak"
)))
if
(
!
(
caps
=
gst_caps_new_empty_simple
(
"video/x-cinepak"
)))
return
NULL
;
return
NULL
;
if
(
format
->
u
.
video
_cinepak
.
width
)
if
(
format
->
u
.
video
.
width
)
gst_caps_set_simple
(
caps
,
"width"
,
G_TYPE_INT
,
format
->
u
.
video
_cinepak
.
width
,
NULL
);
gst_caps_set_simple
(
caps
,
"width"
,
G_TYPE_INT
,
format
->
u
.
video
.
width
,
NULL
);
if
(
format
->
u
.
video
_cinepak
.
height
)
if
(
format
->
u
.
video
.
height
)
gst_caps_set_simple
(
caps
,
"height"
,
G_TYPE_INT
,
format
->
u
.
video
_cinepak
.
height
,
NULL
);
gst_caps_set_simple
(
caps
,
"height"
,
G_TYPE_INT
,
format
->
u
.
video
.
height
,
NULL
);
if
(
format
->
u
.
video
_cinepak
.
fps_d
||
format
->
u
.
video_cinepak
.
fps_n
)
if
(
format
->
u
.
video
.
fps_d
||
format
->
u
.
video
.
fps_n
)
gst_caps_set_simple
(
caps
,
"framerate"
,
GST_TYPE_FRACTION
,
format
->
u
.
video
_cinepak
.
fps_n
,
format
->
u
.
video_cinepak
.
fps_d
,
NULL
);
gst_caps_set_simple
(
caps
,
"framerate"
,
GST_TYPE_FRACTION
,
format
->
u
.
video
.
fps_n
,
format
->
u
.
video
.
fps_d
,
NULL
);
return
caps
;
return
caps
;
}
}
...
@@ -848,7 +848,7 @@ static GstCaps *wg_format_to_caps_video_mpeg1(const struct wg_format *format)
...
@@ -848,7 +848,7 @@ static GstCaps *wg_format_to_caps_video_mpeg1(const struct wg_format *format)
gst_caps_set_simple
(
caps
,
"width"
,
G_TYPE_INT
,
format
->
u
.
video_mpeg1
.
width
,
NULL
);
gst_caps_set_simple
(
caps
,
"width"
,
G_TYPE_INT
,
format
->
u
.
video_mpeg1
.
width
,
NULL
);
if
(
format
->
u
.
video_mpeg1
.
height
)
if
(
format
->
u
.
video_mpeg1
.
height
)
gst_caps_set_simple
(
caps
,
"height"
,
G_TYPE_INT
,
format
->
u
.
video_mpeg1
.
height
,
NULL
);
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
_cinepak
.
fps_n
)
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
);
gst_caps_set_simple
(
caps
,
"framerate"
,
GST_TYPE_FRACTION
,
format
->
u
.
video_mpeg1
.
fps_n
,
format
->
u
.
video_mpeg1
.
fps_d
,
NULL
);
return
caps
;
return
caps
;
}
}
...
@@ -916,8 +916,8 @@ bool wg_format_compare(const struct wg_format *a, const struct wg_format *b)
...
@@ -916,8 +916,8 @@ bool wg_format_compare(const struct wg_format *a, const struct wg_format *b)
case
WG_MAJOR_TYPE_VIDEO_CINEPAK
:
case
WG_MAJOR_TYPE_VIDEO_CINEPAK
:
/* Do not compare FPS. */
/* Do not compare FPS. */
return
a
->
u
.
video
_cinepak
.
width
==
b
->
u
.
video_cinepak
.
width
return
a
->
u
.
video
.
width
==
b
->
u
.
video
.
width
&&
a
->
u
.
video
_cinepak
.
height
==
b
->
u
.
video_cinepak
.
height
;
&&
a
->
u
.
video
.
height
==
b
->
u
.
video
.
height
;
case
WG_MAJOR_TYPE_VIDEO_WMV
:
case
WG_MAJOR_TYPE_VIDEO_WMV
:
/* Do not compare FPS. */
/* Do not compare FPS. */
...
...
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