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
a9cda37f
Commit
a9cda37f
authored
Oct 02, 2022
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement output media type enumeration in MPEG layer-3 decoder.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=18773
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
parent
0b453697
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
mpeglayer3.c
dlls/quartz/tests/mpeglayer3.c
+1
-1
quartz_transform.c
dlls/winegstreamer/quartz_transform.c
+33
-1
No files found.
dlls/quartz/tests/mpeglayer3.c
View file @
a9cda37f
...
...
@@ -1002,7 +1002,7 @@ static void test_connect_pin(void)
expect_mt
.
lSampleSize
=
2304
;
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
);
if
(
hr
==
S_OK
)
{
ok
(
!
memcmp
(
pmt
,
&
expect_mt
,
offsetof
(
AM_MEDIA_TYPE
,
cbFormat
)),
...
...
dlls/winegstreamer/quartz_transform.c
View file @
a9cda37f
...
...
@@ -766,7 +766,39 @@ static HRESULT mpeg_layer3_decoder_source_query_accept(struct transform *filter,
static
HRESULT
mpeg_layer3_decoder_source_get_media_type
(
struct
transform
*
filter
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
return
VFW_S_NO_MORE_ITEMS
;
const
MPEGLAYER3WAVEFORMAT
*
input_format
;
WAVEFORMATEX
*
output_format
;
if
(
!
filter
->
sink
.
pin
.
peer
)
return
VFW_S_NO_MORE_ITEMS
;
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
input_format
=
(
const
MPEGLAYER3WAVEFORMAT
*
)
filter
->
sink
.
pin
.
mt
.
pbFormat
;
output_format
=
CoTaskMemAlloc
(
sizeof
(
*
output_format
));
if
(
!
output_format
)
return
E_OUTOFMEMORY
;
memset
(
output_format
,
0
,
sizeof
(
*
output_format
));
output_format
->
wFormatTag
=
WAVE_FORMAT_PCM
;
output_format
->
nSamplesPerSec
=
input_format
->
wfx
.
nSamplesPerSec
;
output_format
->
nChannels
=
input_format
->
wfx
.
nChannels
;
output_format
->
wBitsPerSample
=
16
;
output_format
->
nBlockAlign
=
output_format
->
nChannels
*
output_format
->
wBitsPerSample
/
8
;
output_format
->
nAvgBytesPerSec
=
output_format
->
nBlockAlign
*
output_format
->
nSamplesPerSec
;
memset
(
mt
,
0
,
sizeof
(
*
mt
));
mt
->
majortype
=
MEDIATYPE_Audio
;
mt
->
subtype
=
MEDIASUBTYPE_PCM
;
mt
->
bFixedSizeSamples
=
TRUE
;
mt
->
lSampleSize
=
1152
*
output_format
->
nBlockAlign
;
mt
->
formattype
=
FORMAT_WaveFormatEx
;
mt
->
cbFormat
=
sizeof
(
*
output_format
);
mt
->
pbFormat
=
(
BYTE
*
)
output_format
;
return
S_OK
;
}
static
HRESULT
mpeg_layer3_decoder_source_decide_buffer_size
(
struct
transform
*
filter
,
IMemAllocator
*
allocator
,
ALLOCATOR_PROPERTIES
*
props
)
...
...
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