[vlc-commits] aout: remove dead recycling code

Rémi Denis-Courmont git at videolan.org
Wed Oct 31 21:27:26 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct 31 22:16:10 2012 +0200| [ea9c43c2faaed4bbb51e8c254e164adcb33effe5] | committer: Rémi Denis-Courmont

aout: remove dead recycling code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea9c43c2faaed4bbb51e8c254e164adcb33effe5
---

 src/audio_output/aout_internal.h |    1 -
 src/audio_output/common.c        |    3 +--
 src/audio_output/dec.c           |   31 +------------------------------
 3 files changed, 2 insertions(+), 33 deletions(-)

diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 70d15e3..d40d45c 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -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 )
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index c4775c0..216a667 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -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);
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 4b455b5..fbfe69f 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -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)



More information about the vlc-commits mailing list