Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
40d4d0fd
Commit
40d4d0fd
authored
Oct 26, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: log buffer attribute changes
parent
503feeaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+13
-5
No files found.
modules/audio_output/pulse.c
View file @
40d4d0fd
...
...
@@ -370,6 +370,16 @@ static void stream_state_cb(pa_stream *s, void *userdata)
}
}
static
void
stream_buffer_attr_cb
(
pa_stream
*
s
,
void
*
userdata
)
{
audio_output_t
*
aout
=
userdata
;
const
pa_buffer_attr
*
pba
=
pa_stream_get_buffer_attr
(
s
);
msg_Dbg
(
aout
,
"changed buffer metrics: maxlength=%u, tlength=%u, "
"prebuf=%u, minreq=%u"
,
pba
->
maxlength
,
pba
->
tlength
,
pba
->
prebuf
,
pba
->
minreq
);
}
static
void
stream_event_cb
(
pa_stream
*
s
,
const
char
*
name
,
pa_proplist
*
pl
,
void
*
userdata
)
{
...
...
@@ -922,6 +932,7 @@ static int Open(vlc_object_t *obj)
}
sys
->
stream
=
s
;
pa_stream_set_state_callback
(
s
,
stream_state_cb
,
sys
->
mainloop
);
pa_stream_set_buffer_attr_callback
(
s
,
stream_buffer_attr_cb
,
aout
);
pa_stream_set_event_callback
(
s
,
stream_event_cb
,
aout
);
pa_stream_set_latency_update_callback
(
s
,
stream_latency_cb
,
aout
);
pa_stream_set_moved_callback
(
s
,
stream_moved_cb
,
aout
);
...
...
@@ -950,11 +961,7 @@ static int Open(vlc_object_t *obj)
}
}
#endif
const
struct
pa_buffer_attr
*
pba
=
pa_stream_get_buffer_attr
(
s
);
msg_Dbg
(
aout
,
"using buffer metrics: maxlength=%u, tlength=%u, "
"prebuf=%u, minreq=%u"
,
pba
->
maxlength
,
pba
->
tlength
,
pba
->
prebuf
,
pba
->
minreq
);
stream_buffer_attr_cb
(
s
,
aout
);
var_Create
(
aout
,
"audio-device"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
);
var_Change
(
aout
,
"audio-device"
,
VLC_VAR_SETTEXT
,
...
...
@@ -1012,6 +1019,7 @@ static void Close (vlc_object_t *obj)
/* Clear all callbacks */
pa_stream_set_state_callback
(
s
,
NULL
,
NULL
);
pa_stream_set_buffer_attr_callback
(
s
,
NULL
,
NULL
);
pa_stream_set_event_callback
(
s
,
NULL
,
NULL
);
pa_stream_set_latency_update_callback
(
s
,
NULL
,
NULL
);
pa_stream_set_moved_callback
(
s
,
NULL
,
NULL
);
...
...
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