]> git.sesse.net Git - vlc/commitdiff
-LPCM audio selection in ps mode, in prevision of henri's decoder.
authorStéphane Borel <stef@videolan.org>
Wed, 23 May 2001 17:47:34 +0000 (17:47 +0000)
committerStéphane Borel <stef@videolan.org>
Wed, 23 May 2001 17:47:34 +0000 (17:47 +0000)
plugins/mpeg/input_ps.c
src/input/input_programs.c

index d9df981630c183f907915bfffa5ea9bfe5e0ce9f..bf3cc64ce401b30626984da4ff7bbe3bac64a26a 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.23 2001/05/08 00:43:57 sam Exp $
+ * $Id: input_ps.c,v 1.24 2001/05/23 17:47:34 stef Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -338,7 +338,16 @@ static void PSInit( input_thread_t * p_input )
                         break;
 
                     case LPCM_AUDIO_ES:
-                        /* FIXME ! */
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
+                                == ((p_es->i_id & 0x1F00) >> 8) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
+                        {
+                        case 0:
+                            main_PutIntVariable( INPUT_AUDIO_VAR,
+                                                 REQUESTED_LPCM );
+                        case REQUESTED_LPCM:
+                            input_SelectES( p_input, p_es );
+                        }
                         break;
                 }
             }
index 37504de665271f40128057604c18a31510ea2a78..e0f63273bcdf871fff66d8a6afcfdf79ce211ce0 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.56 2001/05/19 00:39:30 stef Exp $
+ * $Id: input_programs.c,v 1.57 2001/05/23 17:47:34 stef Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -599,6 +599,7 @@ vlc_thread_t ac3spdif_CreateThread( void * );
 vlc_thread_t spdif_CreateThread( void * );
 vlc_thread_t vpar_CreateThread( void * );
 vlc_thread_t spudec_CreateThread( void * );
+vlc_thread_t lpcmdec_CreateThread( void * );
 
 int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
 {
@@ -678,9 +679,7 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
     case LPCM_AUDIO_ES:
         if( p_main->b_audio )
         {
-            intf_ErrMsg( "input error: LPCM audio not handled yet" );
-            break;
-
+            decoder.pf_create_thread = lpcmdec_CreateThread;
             p_config = (void *)GetAdecConfig( p_input, p_es );
 
             /* Release the lock, not to block the input thread during