]> git.sesse.net Git - vlc/commitdiff
Minor comment cleanup.
authorSteinar Gunderson <sgunderson@bigfoot.com>
Sun, 26 Sep 2010 00:21:28 +0000 (02:21 +0200)
committerSteinar Gunderson <sgunderson@bigfoot.com>
Sun, 26 Sep 2010 00:21:28 +0000 (02:21 +0200)
modules/codec/lpcm.c

index f323304c9e93637f34cd82a46e84052c6e659727..908fb934fc663f04bbf72e9007ecb530a63de4bb 100644 (file)
@@ -48,7 +48,7 @@ static void CloseCommon   ( vlc_object_t * );
 #ifdef ENABLE_SOUT
 static int  OpenEncoder   ( vlc_object_t * );
 static void CloseEncoder  ( vlc_object_t * );
-static block_t *EncoderEncode( encoder_t *, aout_buffer_t * );
+static block_t *EncodeFrames( encoder_t *, aout_buffer_t * );
 #endif
 
 vlc_module_begin ()
@@ -423,29 +423,28 @@ static void CloseCommon( vlc_object_t *p_this )
 }
 
 /*****************************************************************************
- * OpenEncoder:
+ * OpenEncoder: lpcm encoder construction
  *****************************************************************************/
 static int OpenEncoder( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
     encoder_sys_t *p_sys;
 
+    /* We only support DVD LPCM yet. */
     if( p_enc->fmt_out.i_codec != VLC_CODEC_DVD_LPCM ||
         ( p_enc->fmt_in.audio.i_rate != 48000 &&
           p_enc->fmt_in.audio.i_rate != 96000 &&
           p_enc->fmt_in.audio.i_rate != 44100 &&
           p_enc->fmt_in.audio.i_rate != 32000 ) ||
        p_enc->fmt_in.audio.i_channels > 8 )
-    {
         return VLC_EGENERIC;
-    }
 
     /* Allocate the memory needed to store the encoder's structure */
     if( ( p_enc->p_sys = p_sys =
           (encoder_sys_t *)malloc(sizeof(encoder_sys_t)) ) == NULL )
         return VLC_ENOMEM;
 
-    p_enc->pf_encode_audio = EncoderEncode;
+    p_enc->pf_encode_audio = EncodeFrames;
     p_enc->fmt_in.i_codec = p_enc->fmt_out.i_codec;
 
     p_enc->fmt_in.audio.i_bitspersample = 16;
@@ -472,7 +471,7 @@ static int OpenEncoder( vlc_object_t *p_this )
 }
 
 /*****************************************************************************
- * CloseEncoder
+ * CloseEncoder: lpcm encoder destruction
  *****************************************************************************/
 static void CloseEncoder ( vlc_object_t *p_this )
 {
@@ -480,9 +479,9 @@ static void CloseEncoder ( vlc_object_t *p_this )
 }
 
 /*****************************************************************************
- * EncoderEncode:
+ * EncodeFrames: encode zero or more LCPM audio packets
  *****************************************************************************/
-static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
+static block_t *EncodeFrames( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
 {
     encoder_sys_t *p_sys = p_enc->p_sys;
     block_t *p_first_block = NULL, *p_last_block = NULL;
@@ -545,7 +544,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
          */
         p_block->i_dts = p_block->i_pts = p_aout_buf->i_pts + i * p_sys->i_frame_samples * CLOCK_FREQ / p_sys->i_rate;
         p_block->i_length = p_sys->i_frame_samples * CLOCK_FREQ / p_sys->i_rate;
-        
+    
         if( !p_first_block )
             p_first_block = p_last_block = p_block;
         else