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
d8839e25
Commit
d8839e25
authored
May 30, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline aout_BufferAlloc and simplify
parent
b92aee83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
41 deletions
+17
-41
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+0
-3
src/audio_output/common.c
src/audio_output/common.c
+0
-18
src/audio_output/mixer.c
src/audio_output/mixer.c
+17
-20
No files found.
src/audio_output/aout_internal.h
View file @
d8839e25
...
...
@@ -26,9 +26,6 @@
# include <vlc_aout_mixer.h>
aout_buffer_t
*
aout_BufferAlloc
(
aout_alloc_t
*
allocation
,
mtime_t
microseconds
,
aout_buffer_t
*
old_buffer
);
typedef
struct
{
struct
vout_thread_t
*
(
*
pf_request_vout
)(
void
*
,
struct
vout_thread_t
*
,
...
...
src/audio_output/common.c
View file @
d8839e25
...
...
@@ -736,24 +736,6 @@ bool aout_CheckChannelExtraction( int *pi_selection,
return
i_out
==
i_channels
;
}
/*****************************************************************************
* aout_BufferAlloc:
*****************************************************************************/
aout_buffer_t
*
aout_BufferAlloc
(
aout_alloc_t
*
allocation
,
mtime_t
microseconds
,
aout_buffer_t
*
old_buffer
)
{
if
(
!
allocation
->
b_alloc
)
{
return
old_buffer
;
}
size_t
i_alloc_size
=
(
int
)(
(
uint64_t
)
allocation
->
i_bytes_per_sec
*
(
microseconds
)
/
1000000
+
1
);
return
block_Alloc
(
i_alloc_size
);
}
/* Return the order in which filters should be inserted */
static
int
FilterOrder
(
const
char
*
psz_name
)
{
...
...
src/audio_output/mixer.c
View file @
d8839e25
...
...
@@ -97,7 +97,6 @@ void aout_MixerDelete( aout_instance_t * p_aout )
static
int
MixBuffer
(
aout_instance_t
*
p_aout
)
{
int
i
,
i_first_input
=
0
;
aout_buffer_t
*
p_output_buffer
;
mtime_t
start_date
,
end_date
;
date_t
exact_start_date
;
...
...
@@ -323,33 +322,31 @@ static int MixBuffer( aout_instance_t * p_aout )
}
/* Run the mixer. */
p_output_buffer
=
aout_BufferAlloc
(
&
p_aout
->
p_mixer
->
allocation
,
((
uint64_t
)
p_aout
->
output
.
i_nb_samples
*
1000000
)
/
p_aout
->
output
.
output
.
i_rate
,
/* This is a bit kludgy, but is actually only used
* for the S/PDIF dummy mixer : */
p_aout
->
pp_inputs
[
i_first_input
]
->
mixer
.
fifo
.
p_first
);
if
(
p_output_buffer
==
NULL
)
aout_buffer_t
*
p_outbuf
;
if
(
p_aout
->
p_mixer
->
allocation
.
b_alloc
)
{
aout_unlock_input_fifos
(
p_aout
);
return
-
1
;
p_outbuf
=
block_Alloc
(
p_aout
->
output
.
i_nb_samples
*
p_aout
->
p_mixer
->
fmt
.
i_bytes_per_frame
/
p_aout
->
p_mixer
->
fmt
.
i_frame_length
);
if
(
likely
(
p_outbuf
!=
NULL
)
)
p_outbuf
->
i_nb_samples
=
p_aout
->
output
.
i_nb_samples
;
}
/* This is again a bit kludgy - for the S/PDIF mixer. */
if
(
p_aout
->
p_mixer
->
allocation
.
b_alloc
)
else
p_outbuf
=
p_aout
->
pp_inputs
[
i_first_input
]
->
mixer
.
fifo
.
p_first
;
if
(
p_outbuf
==
NULL
)
{
p_output_buffer
->
i_nb_samples
=
p_aout
->
output
.
i_nb_samples
;
p_output_buffer
->
i_buffer
=
p_aout
->
output
.
i_nb_samples
*
p_aout
->
p_mixer
->
fmt
.
i_bytes_per_frame
/
p_aout
->
p_mixer
->
fmt
.
i_frame_length
;
aout_unlock_input_fifos
(
p_aout
);
return
-
1
;
}
p_out
put_buffer
->
i_pts
=
start_date
;
p_out
put_buffer
->
i_length
=
end_date
-
start_date
;
p_out
buf
->
i_pts
=
start_date
;
p_out
buf
->
i_length
=
end_date
-
start_date
;
p_aout
->
p_mixer
->
mix
(
p_aout
->
p_mixer
,
p_out
put_buffer
);
p_aout
->
p_mixer
->
mix
(
p_aout
->
p_mixer
,
p_out
buf
);
aout_unlock_input_fifos
(
p_aout
);
aout_OutputPlay
(
p_aout
,
p_out
put_buffer
);
aout_OutputPlay
(
p_aout
,
p_out
buf
);
return
0
;
}
...
...
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