Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
obs-studio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yunxiang Li
obs-studio
Commits
bbc62f26
Commit
bbc62f26
authored
10 years ago
by
fryshorts
Browse files
Options
Downloads
Patches
Plain Diff
Add function to get info on a specific source to pulse wrapper
parent
5ac364ff
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/linux-pulseaudio/pulse-wrapper.c
+19
-0
19 additions, 0 deletions
plugins/linux-pulseaudio/pulse-wrapper.c
plugins/linux-pulseaudio/pulse-wrapper.h
+19
-0
19 additions, 0 deletions
plugins/linux-pulseaudio/pulse-wrapper.h
with
38 additions
and
0 deletions
plugins/linux-pulseaudio/pulse-wrapper.c
+
19
−
0
View file @
bbc62f26
...
@@ -181,6 +181,25 @@ int_fast32_t pulse_get_source_info_list(pa_source_info_cb_t cb, void* userdata)
...
@@ -181,6 +181,25 @@ int_fast32_t pulse_get_source_info_list(pa_source_info_cb_t cb, void* userdata)
return
0
;
return
0
;
}
}
int_fast32_t
pulse_get_source_info
(
pa_source_info_cb_t
cb
,
const
char
*
name
,
void
*
userdata
)
{
if
(
pulse_context_ready
()
<
0
)
return
-
1
;
pulse_lock
();
pa_operation
*
op
=
pa_context_get_source_info_by_name
(
pulse_context
,
name
,
cb
,
userdata
);
while
(
pa_operation_get_state
(
op
)
==
PA_OPERATION_RUNNING
)
pulse_wait
();
pa_operation_unref
(
op
);
pulse_unlock
();
return
0
;
}
int_fast32_t
pulse_get_server_info
(
pa_server_info_cb_t
cb
,
void
*
userdata
)
int_fast32_t
pulse_get_server_info
(
pa_server_info_cb_t
cb
,
void
*
userdata
)
{
{
if
(
pulse_context_ready
()
<
0
)
if
(
pulse_context_ready
()
<
0
)
...
...
This diff is collapsed.
Click to expand it.
plugins/linux-pulseaudio/pulse-wrapper.h
+
19
−
0
View file @
bbc62f26
...
@@ -93,6 +93,25 @@ void pulse_accept();
...
@@ -93,6 +93,25 @@ void pulse_accept();
*/
*/
int_fast32_t
pulse_get_source_info_list
(
pa_source_info_cb_t
cb
,
void
*
userdata
);
int_fast32_t
pulse_get_source_info_list
(
pa_source_info_cb_t
cb
,
void
*
userdata
);
/**
* Request source information from a specific source
*
* The function will block until the operation was executed and the mainloop
* called the provided callback function.
*
* @param cb pointer to the callback function
* @param name the source name to get information for
* @param userdata pointer to userdata the callback will be called with
*
* @return negative on error
*
* @note The function will block until the server context is ready.
*
* @warning call without active locks
*/
int_fast32_t
pulse_get_source_info
(
pa_source_info_cb_t
cb
,
const
char
*
name
,
void
*
userdata
);
/**
/**
* Request server information
* Request server information
*
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment