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
545b1c67
Commit
545b1c67
authored
Mar 31, 2024
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Apr 25, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement input media type enumeration in MPEG splitter.
parent
486f89b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
45 deletions
+53
-45
mpegsplit.c
dlls/quartz/tests/mpegsplit.c
+30
-45
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+23
-0
No files found.
dlls/quartz/tests/mpegsplit.c
View file @
545b1c67
...
...
@@ -556,40 +556,28 @@ static void test_media_types(void)
expect_mt
.
lSampleSize
=
1
;
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
expect_mt
.
subtype
=
MEDIASUBTYPE_MPEG1System
;
if
(
hr
==
S_OK
)
{
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
}
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
expect_mt
.
subtype
=
MEDIASUBTYPE_MPEG1VideoCD
;
if
(
hr
==
S_OK
)
{
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
}
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
expect_mt
.
subtype
=
MEDIASUBTYPE_MPEG1Video
;
if
(
hr
==
S_OK
)
{
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
}
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
expect_mt
.
subtype
=
MEDIASUBTYPE_MPEG1Audio
;
if
(
hr
==
S_OK
)
{
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
}
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -655,13 +643,10 @@ static void test_media_types(void)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
expect_mt
.
subtype
=
MEDIASUBTYPE_MPEG1System
;
if
(
hr
==
S_OK
)
{
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
}
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
CoTaskMemFree
(
pmt
);
IEnumMediaTypes_Release
(
enummt
);
IPin_Release
(
pin
);
...
...
@@ -866,8 +851,8 @@ static void test_enum_media_types(void)
for
(
i
=
0
;
i
<
4
;
++
i
)
{
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
CoTaskMemFree
(
mts
[
0
]);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
CoTaskMemFree
(
mts
[
0
]);
}
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
NULL
);
...
...
@@ -879,9 +864,9 @@ static void test_enum_media_types(void)
for
(
i
=
0
;
i
<
4
;
++
i
)
{
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
&
count
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
count
==
1
,
"Got count %lu.
\n
"
,
count
);
if
(
hr
==
S_OK
)
CoTaskMemFree
(
mts
[
0
]);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
count
==
1
,
"Got count %lu.
\n
"
,
count
);
CoTaskMemFree
(
mts
[
0
]);
}
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
&
count
);
...
...
@@ -892,16 +877,16 @@ static void test_enum_media_types(void)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
2
,
mts
,
&
count
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
count
==
2
,
"Got count %lu.
\n
"
,
count
);
if
(
count
>
0
)
CoTaskMemFree
(
mts
[
0
]);
if
(
count
>
1
)
CoTaskMemFree
(
mts
[
1
]);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
count
==
2
,
"Got count %lu.
\n
"
,
count
);
CoTaskMemFree
(
mts
[
0
]);
CoTaskMemFree
(
mts
[
1
]);
hr
=
IEnumMediaTypes_Next
(
enum1
,
3
,
mts
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
count
==
2
,
"Got count %lu.
\n
"
,
count
);
if
(
count
>
0
)
CoTaskMemFree
(
mts
[
0
]);
if
(
count
>
1
)
CoTaskMemFree
(
mts
[
1
]);
ok
(
count
==
2
,
"Got count %lu.
\n
"
,
count
);
CoTaskMemFree
(
mts
[
0
]);
CoTaskMemFree
(
mts
[
1
]);
hr
=
IEnumMediaTypes_Next
(
enum1
,
2
,
mts
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -923,7 +908,7 @@ static void test_enum_media_types(void)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Skip
(
enum1
,
4
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Skip
(
enum1
,
1
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
...
...
@@ -932,8 +917,8 @@ static void test_enum_media_types(void)
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum2
,
1
,
mts
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
CoTaskMemFree
(
mts
[
0
]);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
CoTaskMemFree
(
mts
[
0
]);
IEnumMediaTypes_Release
(
enum1
);
IEnumMediaTypes_Release
(
enum2
);
...
...
dlls/winegstreamer/quartz_parser.c
View file @
545b1c67
...
...
@@ -2358,9 +2358,32 @@ static HRESULT mpeg_splitter_sink_query_accept(struct strmbase_pin *iface, const
return
S_FALSE
;
}
static
HRESULT
mpeg_splitter_sink_get_media_type
(
struct
strmbase_pin
*
pin
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
static
const
GUID
*
const
subtypes
[]
=
{
&
MEDIASUBTYPE_MPEG1System
,
&
MEDIASUBTYPE_MPEG1VideoCD
,
&
MEDIASUBTYPE_MPEG1Video
,
&
MEDIASUBTYPE_MPEG1Audio
,
};
if
(
index
>=
ARRAY_SIZE
(
subtypes
))
return
S_FALSE
;
memset
(
mt
,
0
,
sizeof
(
*
mt
));
mt
->
majortype
=
MEDIATYPE_Stream
;
mt
->
subtype
=
*
subtypes
[
index
];
mt
->
bFixedSizeSamples
=
TRUE
;
mt
->
bTemporalCompression
=
TRUE
;
mt
->
lSampleSize
=
1
;
return
S_OK
;
}
static
const
struct
strmbase_sink_ops
mpeg_splitter_sink_ops
=
{
.
base
.
pin_query_accept
=
mpeg_splitter_sink_query_accept
,
.
base
.
pin_get_media_type
=
mpeg_splitter_sink_get_media_type
,
.
sink_connect
=
parser_sink_connect
,
.
sink_disconnect
=
parser_sink_disconnect
,
};
...
...
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