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
76235640
Commit
76235640
authored
Aug 13, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfsrcsnk/wave: Store media format structure.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
bfdf5c77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
Makefile.in
dlls/mfsrcsnk/Makefile.in
+1
-1
wave.c
dlls/mfsrcsnk/wave.c
+11
-2
No files found.
dlls/mfsrcsnk/Makefile.in
View file @
76235640
MODULE
=
mfsrcsnk.dll
MODULE
=
mfsrcsnk.dll
IMPORTLIB
=
mfsrcsnk
IMPORTLIB
=
mfsrcsnk
IMPORTS
=
mfplat mfuuid uuid
IMPORTS
=
ole32
mfplat mfuuid uuid
EXTRADLLFLAGS
=
-Wb
,--prefer-native
EXTRADLLFLAGS
=
-Wb
,--prefer-native
...
...
dlls/mfsrcsnk/wave.c
View file @
76235640
...
@@ -64,6 +64,7 @@ struct wave_sink
...
@@ -64,6 +64,7 @@ struct wave_sink
IMFMediaEventQueue
*
stream_event_queue
;
IMFMediaEventQueue
*
stream_event_queue
;
IMFPresentationClock
*
clock
;
IMFPresentationClock
*
clock
;
WAVEFORMATEX
*
fmt
;
IMFByteStream
*
bytestream
;
IMFByteStream
*
bytestream
;
unsigned
int
flags
;
unsigned
int
flags
;
...
@@ -144,6 +145,7 @@ static ULONG WINAPI wave_sink_Release(IMFFinalizableMediaSink *iface)
...
@@ -144,6 +145,7 @@ static ULONG WINAPI wave_sink_Release(IMFFinalizableMediaSink *iface)
if
(
sink
->
stream_event_queue
)
if
(
sink
->
stream_event_queue
)
IMFMediaEventQueue_Release
(
sink
->
stream_event_queue
);
IMFMediaEventQueue_Release
(
sink
->
stream_event_queue
);
IMFByteStream_Release
(
sink
->
bytestream
);
IMFByteStream_Release
(
sink
->
bytestream
);
CoTaskMemFree
(
sink
->
fmt
);
DeleteCriticalSection
(
&
sink
->
cs
);
DeleteCriticalSection
(
&
sink
->
cs
);
free
(
sink
);
free
(
sink
);
}
}
...
@@ -679,6 +681,7 @@ HRESULT WINAPI MFCreateWAVEMediaSink(IMFByteStream *bytestream, IMFMediaType *me
...
@@ -679,6 +681,7 @@ HRESULT WINAPI MFCreateWAVEMediaSink(IMFByteStream *bytestream, IMFMediaType *me
{
{
struct
wave_sink
*
object
;
struct
wave_sink
*
object
;
DWORD
flags
=
0
;
DWORD
flags
=
0
;
UINT32
size
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"%p, %p, %p.
\n
"
,
bytestream
,
media_type
,
sink
);
TRACE
(
"%p, %p, %p.
\n
"
,
bytestream
,
media_type
,
sink
);
...
@@ -689,11 +692,17 @@ HRESULT WINAPI MFCreateWAVEMediaSink(IMFByteStream *bytestream, IMFMediaType *me
...
@@ -689,11 +692,17 @@ HRESULT WINAPI MFCreateWAVEMediaSink(IMFByteStream *bytestream, IMFMediaType *me
if
(
FAILED
(
hr
=
IMFByteStream_GetCapabilities
(
bytestream
,
&
flags
)))
return
hr
;
if
(
FAILED
(
hr
=
IMFByteStream_GetCapabilities
(
bytestream
,
&
flags
)))
return
hr
;
if
(
!
(
flags
&
MFBYTESTREAM_IS_WRITABLE
))
return
E_INVALIDARG
;
if
(
!
(
flags
&
MFBYTESTREAM_IS_WRITABLE
))
return
E_INVALIDARG
;
/* FIXME: do basic media type validation */
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
/* FIXME: do basic media type validation */
if
(
FAILED
(
hr
=
MFCreateWaveFormatExFromMFMediaType
(
media_type
,
&
object
->
fmt
,
&
size
,
0
)))
{
WARN
(
"Failed to produce WAVEFORMATEX representation, hr %#lx.
\n
"
,
hr
);
goto
failed
;
}
object
->
IMFFinalizableMediaSink_iface
.
lpVtbl
=
&
wave_sink_vtbl
;
object
->
IMFFinalizableMediaSink_iface
.
lpVtbl
=
&
wave_sink_vtbl
;
object
->
IMFMediaEventGenerator_iface
.
lpVtbl
=
&
wave_sink_events_vtbl
;
object
->
IMFMediaEventGenerator_iface
.
lpVtbl
=
&
wave_sink_events_vtbl
;
object
->
IMFStreamSink_iface
.
lpVtbl
=
&
wave_stream_sink_vtbl
;
object
->
IMFStreamSink_iface
.
lpVtbl
=
&
wave_stream_sink_vtbl
;
...
...
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