Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c765fb8c
Commit
c765fb8c
authored
Nov 21, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: implement TimeGet()
This enables the normal VLC core resampling.
parent
44a7ebee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+19
-3
No files found.
modules/audio_output/pulse.c
View file @
c765fb8c
...
@@ -426,6 +426,22 @@ static void sink_input_info_cb(pa_context *ctx, const pa_sink_input_info *i,
...
@@ -426,6 +426,22 @@ static void sink_input_info_cb(pa_context *ctx, const pa_sink_input_info *i,
/*** VLC audio output callbacks ***/
/*** VLC audio output callbacks ***/
static
int
TimeGet
(
audio_output_t
*
aout
,
mtime_t
*
restrict
write_pts
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
pa_stream
*
s
=
sys
->
stream
;
if
(
pa_stream_is_corked
(
s
)
>
0
)
return
-
1
;
/* latency is irrelevant if corked */
mtime_t
delta
=
vlc_pa_get_latency
(
aout
,
sys
->
context
,
s
);
if
(
delta
==
VLC_TS_INVALID
)
return
-
1
;
*
write_pts
=
mdate
()
+
delta
;
return
0
;
}
/* Memory free callback. The block_t address is in front of the data. */
/* Memory free callback. The block_t address is in front of the data. */
static
void
data_free
(
void
*
data
)
static
void
data_free
(
void
*
data
)
{
{
...
@@ -760,8 +776,8 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
...
@@ -760,8 +776,8 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
/* Stream parameters */
/* Stream parameters */
const
pa_stream_flags_t
flags
=
PA_STREAM_START_CORKED
const
pa_stream_flags_t
flags
=
PA_STREAM_START_CORKED
//
| PA_STREAM_INTERPOLATE_TIMING
|
PA_STREAM_INTERPOLATE_TIMING
|
PA_STREAM_NOT_MONOTONIC
|
PA_STREAM_NOT_MONOTONIC
|
PA_STREAM_AUTO_TIMING_UPDATE
|
PA_STREAM_AUTO_TIMING_UPDATE
/*| PA_STREAM_FIX_RATE*/
;
/*| PA_STREAM_FIX_RATE*/
;
...
@@ -936,7 +952,7 @@ static int Open(vlc_object_t *obj)
...
@@ -936,7 +952,7 @@ static int Open(vlc_object_t *obj)
aout
->
sys
=
sys
;
aout
->
sys
=
sys
;
aout
->
start
=
Start
;
aout
->
start
=
Start
;
aout
->
stop
=
Stop
;
aout
->
stop
=
Stop
;
aout
->
time_get
=
NULL
;
aout
->
time_get
=
TimeGet
;
aout
->
play
=
Play
;
aout
->
play
=
Play
;
aout
->
pause
=
Pause
;
aout
->
pause
=
Pause
;
aout
->
flush
=
Flush
;
aout
->
flush
=
Flush
;
...
...
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