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
6174d63b
Commit
6174d63b
authored
May 04, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
May 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/audiorecord: Add a stub source pin.
parent
eab26e61
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
audiorecord.c
dlls/qcap/audiorecord.c
+27
-2
No files found.
dlls/qcap/audiorecord.c
View file @
6174d63b
/* Implementation of the Audio Capture Filter (CLSID_AudioRecord)
/*
* Audio capture filter
*
* Copyright 2015 Damjan Jovanovic
* Copyright 2023 Zeb Figura for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -25,6 +27,8 @@ struct audio_record
{
struct
strmbase_filter
filter
;
IPersistPropertyBag
IPersistPropertyBag_iface
;
struct
strmbase_source
source
;
};
static
struct
audio_record
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
filter
)
...
...
@@ -32,6 +36,21 @@ static struct audio_record *impl_from_strmbase_filter(struct strmbase_filter *fi
return
CONTAINING_RECORD
(
filter
,
struct
audio_record
,
filter
);
}
static
HRESULT
WINAPI
audio_record_source_DecideBufferSize
(
struct
strmbase_source
*
iface
,
IMemAllocator
*
allocator
,
ALLOCATOR_PROPERTIES
*
props
)
{
ALLOCATOR_PROPERTIES
ret_props
;
return
IMemAllocator_SetProperties
(
allocator
,
props
,
&
ret_props
);
}
static
const
struct
strmbase_source_ops
source_ops
=
{
.
pfnAttemptConnection
=
BaseOutputPinImpl_AttemptConnection
,
.
pfnDecideAllocator
=
BaseOutputPinImpl_DecideAllocator
,
.
pfnDecideBufferSize
=
audio_record_source_DecideBufferSize
,
};
static
struct
audio_record
*
impl_from_IPersistPropertyBag
(
IPersistPropertyBag
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
audio_record
,
IPersistPropertyBag_iface
);
...
...
@@ -39,7 +58,10 @@ static struct audio_record *impl_from_IPersistPropertyBag(IPersistPropertyBag *i
static
struct
strmbase_pin
*
audio_record_get_pin
(
struct
strmbase_filter
*
iface
,
unsigned
int
index
)
{
FIXME
(
"iface %p, index %u, stub!
\n
"
,
iface
,
index
);
struct
audio_record
*
filter
=
impl_from_strmbase_filter
(
iface
);
if
(
!
index
)
return
&
filter
->
source
.
pin
;
return
NULL
;
}
...
...
@@ -47,6 +69,7 @@ static void audio_record_destroy(struct strmbase_filter *iface)
{
struct
audio_record
*
filter
=
impl_from_strmbase_filter
(
iface
);
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
free
(
filter
);
}
...
...
@@ -154,6 +177,8 @@ HRESULT audio_record_create(IUnknown *outer, IUnknown **out)
object
->
IPersistPropertyBag_iface
.
lpVtbl
=
&
PersistPropertyBagVtbl
;
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_AudioRecord
,
&
filter_ops
);
strmbase_source_init
(
&
object
->
source
,
&
object
->
filter
,
L"Capture"
,
&
source_ops
);
TRACE
(
"Created audio recorder %p.
\n
"
,
object
);
*
out
=
&
object
->
filter
.
IUnknown_inner
;
return
S_OK
;
...
...
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