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
256e9afc
Commit
256e9afc
authored
Apr 02, 2024
by
Ziqing Hui
Committed by
Alexandre Julliard
Apr 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Merge audio_mpeg4 into audio field.
parent
29dfcb99
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
mfplat.c
dlls/winegstreamer/mfplat.c
+6
-6
unixlib.h
dlls/winegstreamer/unixlib.h
+3
-5
wg_format.c
dlls/winegstreamer/wg_format.c
+4
-4
No files found.
dlls/winegstreamer/mfplat.c
View file @
256e9afc
...
...
@@ -650,22 +650,22 @@ static void mf_media_type_to_wg_format_audio_mpeg4(IMFMediaType *type, const GUI
raw_aac
=
IsEqualGUID
(
subtype
,
&
MFAudioFormat_RAW_AAC
);
if
(
!
raw_aac
)
codec_data_size
-=
min
(
codec_data_size
,
sizeof
(
HEAACWAVEINFO
)
-
sizeof
(
WAVEFORMATEX
));
if
(
codec_data_size
>
sizeof
(
format
->
u
.
audio
_mpeg4
.
codec_data
))
if
(
codec_data_size
>
sizeof
(
format
->
u
.
audio
.
codec_data
))
{
FIXME
(
"Codec data needs %u bytes.
\n
"
,
codec_data_size
);
return
;
}
if
(
raw_aac
)
memcpy
(
format
->
u
.
audio
_mpeg4
.
codec_data
,
(
BYTE
*
)(
&
wfx
->
wfInfo
.
wfx
+
1
),
codec_data_size
);
memcpy
(
format
->
u
.
audio
.
codec_data
,
(
BYTE
*
)(
&
wfx
->
wfInfo
.
wfx
+
1
),
codec_data_size
);
else
memcpy
(
format
->
u
.
audio
_mpeg4
.
codec_data
,
wfx
->
pbAudioSpecificConfig
,
codec_data_size
);
memcpy
(
format
->
u
.
audio
.
codec_data
,
wfx
->
pbAudioSpecificConfig
,
codec_data_size
);
format
->
major_type
=
WG_MAJOR_TYPE_AUDIO_MPEG4
;
if
(
FAILED
(
IMFMediaType_GetUINT32
(
type
,
&
MF_MT_AAC_PAYLOAD_TYPE
,
&
format
->
u
.
audio
_mpeg4
.
payload_type
)))
format
->
u
.
audio
_mpeg4
.
payload_type
=
0
;
if
(
FAILED
(
IMFMediaType_GetUINT32
(
type
,
&
MF_MT_AAC_PAYLOAD_TYPE
,
&
format
->
u
.
audio
.
payload_type
)))
format
->
u
.
audio
.
payload_type
=
0
;
format
->
u
.
audio
_mpeg4
.
codec_data_len
=
codec_data_size
;
format
->
u
.
audio
.
codec_data_len
=
codec_data_size
;
}
static
enum
wg_video_format
mf_video_format_to_wg
(
const
GUID
*
subtype
)
...
...
dlls/winegstreamer/unixlib.h
View file @
256e9afc
...
...
@@ -98,7 +98,8 @@ struct wg_format
/* Valid members for different audio formats:
*
* Uncompressed(PCM): channels, channel_mask, rate.
* MPEG1: channels, rate, layer. */
* MPEG1: channels, rate, layer.
* MPEG4: payload_type, codec_data_len, codec_data. */
struct
{
wg_audio_format
format
;
...
...
@@ -107,13 +108,10 @@ struct wg_format
uint32_t
channel_mask
;
/* In WinMM format. */
uint32_t
rate
;
uint32_t
layer
;
}
audio
;
struct
{
uint32_t
payload_type
;
uint32_t
codec_data_len
;
unsigned
char
codec_data
[
64
];
}
audio
_mpeg4
;
}
audio
;
struct
{
uint32_t
version
;
...
...
dlls/winegstreamer/wg_format.c
View file @
256e9afc
...
...
@@ -524,7 +524,7 @@ static GstCaps *wg_format_to_caps_audio_mpeg4(const struct wg_format *format)
gst_caps_set_simple
(
caps
,
"mpegversion"
,
G_TYPE_INT
,
4
,
NULL
);
switch
(
format
->
u
.
audio
_mpeg4
.
payload_type
)
switch
(
format
->
u
.
audio
.
payload_type
)
{
case
0
:
gst_caps_set_simple
(
caps
,
"stream-format"
,
G_TYPE_STRING
,
"raw"
,
NULL
);
break
;
case
1
:
gst_caps_set_simple
(
caps
,
"stream-format"
,
G_TYPE_STRING
,
"adts"
,
NULL
);
break
;
...
...
@@ -534,10 +534,10 @@ static GstCaps *wg_format_to_caps_audio_mpeg4(const struct wg_format *format)
/* FIXME: Use gst_codec_utils_aac_caps_set_level_and_profile from GStreamer pbutils library */
if
(
format
->
u
.
audio
_mpeg4
.
codec_data_len
)
if
(
format
->
u
.
audio
.
codec_data_len
)
{
buffer
=
gst_buffer_new_and_alloc
(
format
->
u
.
audio
_mpeg4
.
codec_data_len
);
gst_buffer_fill
(
buffer
,
0
,
format
->
u
.
audio
_mpeg4
.
codec_data
,
format
->
u
.
audio_mpeg4
.
codec_data_len
);
buffer
=
gst_buffer_new_and_alloc
(
format
->
u
.
audio
.
codec_data_len
);
gst_buffer_fill
(
buffer
,
0
,
format
->
u
.
audio
.
codec_data
,
format
->
u
.
audio
.
codec_data_len
);
gst_caps_set_simple
(
caps
,
"codec_data"
,
GST_TYPE_BUFFER
,
buffer
,
NULL
);
gst_buffer_unref
(
buffer
);
}
...
...
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