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
f98f3612
Commit
f98f3612
authored
Aug 18, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/tests: Use h264 and aac in mp4 media sink tests.
parent
b4be3b1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
11 deletions
+26
-11
mf.c
dlls/mf/tests/mf.c
+18
-7
mf_test.h
dlls/mf/tests/mf_test.h
+6
-0
transform.c
dlls/mf/tests/transform.c
+2
-4
No files found.
dlls/mf/tests/mf.c
View file @
f98f3612
...
...
@@ -6883,7 +6883,7 @@ static void test_mpeg4_media_sink(void)
{
IMFMediaSink
*
sink
=
NULL
,
*
sink2
=
NULL
,
*
sink_audio
=
NULL
,
*
sink_video
=
NULL
,
*
sink_empty
=
NULL
;
IMFByteStream
*
bytestream
,
*
bytestream_audio
,
*
bytestream_video
,
*
bytestream_empty
;
DWORD
id
,
count
,
flags
,
width
=
16
,
height
=
16
,
fps
=
10
;
DWORD
id
,
count
,
flags
,
width
=
96
,
height
=
96
;
IMFMediaType
*
audio_type
,
*
video_type
,
*
media_type
;
IMFMediaTypeHandler
*
type_handler
=
NULL
;
IMFPresentationClock
*
clock
;
...
...
@@ -6899,22 +6899,33 @@ static void test_mpeg4_media_sink(void)
hr
=
IMFMediaType_SetGUID
(
audio_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
audio_type
,
&
MF_MT_SUBTYPE
,
&
MFAudioFormat_
PCM
);
hr
=
IMFMediaType_SetGUID
(
audio_type
,
&
MF_MT_SUBTYPE
,
&
MFAudioFormat_
AAC
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_NUM_CHANNELS
,
2
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_NUM_CHANNELS
,
1
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_
SAMPLES_PER_SECOND
,
48000
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_
BITS_PER_SAMPLE
,
16
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_BITS_PER_SAMPLE
,
8
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_SAMPLES_PER_SECOND
,
44100
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AUDIO_AVG_BYTES_PER_SECOND
,
12000
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION
,
41
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
audio_type
,
&
MF_MT_AAC_PAYLOAD_TYPE
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetBlob
(
audio_type
,
&
MF_MT_USER_DATA
,
test_aac_codec_data
,
sizeof
(
test_aac_codec_data
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
video_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Video
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
video_type
,
&
MF_MT_SUBTYPE
,
&
MFVideoFormat_
RGB2
4
);
hr
=
IMFMediaType_SetGUID
(
video_type
,
&
MF_MT_SUBTYPE
,
&
MFVideoFormat_
H26
4
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_SIZE
,
((
UINT64
)
width
<<
32
)
|
height
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_RATE
,
((
UINT64
)
fps
<<
32
)
|
1
);
hr
=
IMFMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_RATE
,
((
UINT64
)
30000
<<
32
)
|
1001
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetBlob
(
video_type
,
&
MF_MT_MPEG_SEQUENCE_HEADER
,
test_h264_sequence_header
,
sizeof
(
test_h264_sequence_header
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateTempFile
(
MF_ACCESSMODE_WRITE
,
MF_OPENMODE_DELETE_IF_EXIST
,
0
,
&
bytestream_audio
);
...
...
dlls/mf/tests/mf_test.h
View file @
f98f3612
...
...
@@ -44,6 +44,12 @@ static const BYTE test_h264_sequence_header[] =
0xa7
,
0x00
,
0x00
,
0x00
,
0x01
,
0x68
,
0xce
,
0x3c
,
0x80
,
};
const
static
BYTE
test_aac_codec_data
[]
=
{
0x00
,
0x00
,
0x29
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x12
,
0x08
,
};
struct
attribute_desc
{
const
GUID
*
key
;
...
...
dlls/mf/tests/transform.c
View file @
f98f3612
...
...
@@ -1973,8 +1973,6 @@ static IMFSample *create_sample(const BYTE *data, ULONG size)
return
sample
;
}
static
const
BYTE
aac_codec_data
[
14
]
=
{
0x00
,
0x00
,
0x29
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x12
,
0x08
};
static
void
test_aac_encoder
(
void
)
{
const
GUID
*
const
class_id
=
&
CLSID_AACMFTEncoder
;
...
...
@@ -2045,7 +2043,7 @@ static void test_aac_encoder(void)
ATTR_UINT32
(
MF_MT_AUDIO_PREFER_WAVEFORMATEX
,
1
),
ATTR_UINT32
(
MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION
,
41
),
ATTR_UINT32
(
MF_MT_AAC_PAYLOAD_TYPE
,
0
),
ATTR_BLOB
(
MF_MT_USER_DATA
,
aac_codec_data
,
sizeof
(
aac_codec_data
)),
ATTR_BLOB
(
MF_MT_USER_DATA
,
test_aac_codec_data
,
sizeof
(
test_
aac_codec_data
)),
{
0
},
};
const
MFT_OUTPUT_STREAM_INFO
initial_output_info
=
{
0
},
output_info
=
{.
cbSize
=
0x600
};
...
...
@@ -2506,7 +2504,7 @@ static void test_aac_decoder(void)
ATTR_GUID
(
MF_MT_MAJOR_TYPE
,
MFMediaType_Audio
,
.
required
=
TRUE
),
ATTR_GUID
(
MF_MT_SUBTYPE
,
MFAudioFormat_AAC
,
.
required
=
TRUE
),
ATTR_UINT32
(
MF_MT_AUDIO_SAMPLES_PER_SECOND
,
44100
,
.
required
=
TRUE
),
ATTR_BLOB
(
MF_MT_USER_DATA
,
aac_codec_data
,
sizeof
(
aac_codec_data
),
.
required
=
TRUE
),
ATTR_BLOB
(
MF_MT_USER_DATA
,
test_aac_codec_data
,
sizeof
(
test_
aac_codec_data
),
.
required
=
TRUE
),
ATTR_UINT32
(
MF_MT_AUDIO_BITS_PER_SAMPLE
,
16
),
ATTR_UINT32
(
MF_MT_AUDIO_NUM_CHANNELS
,
1
),
ATTR_UINT32
(
MF_MT_AUDIO_AVG_BYTES_PER_SECOND
,
12000
),
...
...
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