Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
ea9c43c2
Commit
ea9c43c2
authored
Oct 31, 2012
by
Rémi Denis-Courmont
Browse files
aout: remove dead recycling code
parent
78d846a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/audio_output/aout_internal.h
View file @
ea9c43c2
...
...
@@ -171,7 +171,6 @@ bool aout_DecIsEmpty(audio_output_t *);
void
aout_InputRequestRestart
(
audio_output_t
*
);
void
aout_RequestRestart
(
audio_output_t
*
);
void
aout_Shutdown
(
audio_output_t
*
);
/* Audio output locking */
static
inline
void
aout_lock
(
audio_output_t
*
p_aout
)
...
...
src/audio_output/common.c
View file @
ea9c43c2
...
...
@@ -184,8 +184,7 @@ void aout_Destroy (audio_output_t *aout)
{
aout_owner_t
*
owner
=
aout_owner
(
aout
);
if
(
owner
->
module
!=
NULL
)
aout_Shutdown
(
aout
);
assert
(
owner
->
module
==
NULL
);
var_DelCallback
(
aout
,
"mute"
,
var_Copy
,
aout
->
p_parent
);
var_SetFloat
(
aout
,
"volume"
,
-
1
.
f
);
...
...
src/audio_output/dec.c
View file @
ea9c43c2
...
...
@@ -67,22 +67,6 @@ int aout_DecNew( audio_output_t *p_aout,
}
aout_owner_t
*
owner
=
aout_owner
(
p_aout
);
#ifdef RECYCLE
/* Calling decoder is responsible for serializing aout_DecNew() and
* aout_DecDelete(). So no need to lock to _read_ those properties. */
if
(
owner
->
module
!=
NULL
)
/* <- output exists */
{
/* Check if we can recycle the existing output and pipelines */
if
(
AOUT_FMTS_IDENTICAL
(
&
owner
->
input_format
,
p_format
))
return
0
;
/* TODO? If the new input format is closer to the output format than
* the old input format was, then the output could be recycled. The
* input pipeline however would need to be restarted. */
/* No recycling: delete everything and restart from scratch */
aout_Shutdown
(
p_aout
);
}
#endif
int
ret
=
0
;
/* TODO: reduce lock scope depending on decoder's real need */
...
...
@@ -121,7 +105,7 @@ error:
/**
* Stops all plugins involved in the audio output.
*/
void
aout_
Shutdown
(
audio_output_t
*
p_aout
)
void
aout_
DecDelete
(
audio_output_t
*
p_aout
)
{
aout_owner_t
*
owner
=
aout_owner
(
p_aout
);
aout_input_t
*
input
;
...
...
@@ -145,19 +129,6 @@ void aout_Shutdown (audio_output_t *p_aout)
free
(
input
);
}
/**
* Stops the decoded audio input.
* @note Due to output recycling, this function is esssentially a stub.
*/
void
aout_DecDelete
(
audio_output_t
*
aout
)
{
#ifdef RECYCLE
(
void
)
aout
;
#else
aout_Shutdown
(
aout
);
#endif
}
#define AOUT_RESTART_OUTPUT 1
#define AOUT_RESTART_INPUT 2
static
void
aout_CheckRestart
(
audio_output_t
*
aout
)
...
...
Write
Preview
Supports
Markdown
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