]> git.sesse.net Git - vlc/commitdiff
. ajout des patches ac3 de MaXX dans le nouveau d�codeur
authorSam Hocevar <sam@videolan.org>
Wed, 19 Jan 2000 20:59:51 +0000 (20:59 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 19 Jan 2000 20:59:51 +0000 (20:59 +0000)
 . fix� ce #@!#@! de idct.c.new qui fait _chier_

include/vlc.h.new
src/input/input_ctrl.c
src/input/input_ctrl.c.new

index a2a58c57c4608927efd8a189e2f40b58a1443f48..cd091cb8bff620574bd996a16a5d09a8ea3ffe2c 100644 (file)
@@ -64,6 +64,7 @@
 /* Audio */
 #include "audio_output.h"
 #include "audio_decoder.h"
+#include "ac3_decoder.h"
 
 /* Video */
 #include "video.h"
index 53e84d6ae25f65258fb65e3dc53acecded6a102a..ea62c58cc280254fa103716457bce9f5c13ed0c8 100644 (file)
@@ -92,7 +92,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
             /* Don't decode PSI streams ! */
             if( p_input->p_es[i_es_loop].b_psi )
             {
-                intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n");
+                intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n", i_current_id);
                 vlc_mutex_unlock( &p_input->es_lock );
                 return( -1 );
             }
@@ -139,7 +139,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
 
                     default:
                         /* That should never happen. */
-                        intf_DbgMsg("input error: unknown stream type (%d)\n",
+                        intf_DbgMsg("input error: unknown stream type (0x%.2x)\n",
                                     p_input->p_es[i_es_loop].i_type);
                         vlc_mutex_unlock( &p_input->es_lock );
                         return( -1 );
index f129392acc6a882f8891629ded9d5086521b3699..55ec6adc673dfb0a0c496b5f83bb07ef4d8251d2 100644 (file)
@@ -94,7 +94,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
             /* Don't decode PSI streams ! */
             if( p_input->p_es[i_es_loop].b_psi )
             {
-                intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n");
+                intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n", i_current_id);
                 vlc_mutex_unlock( &p_input->es_lock );
                 return( -1 );
             }
@@ -103,6 +103,17 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
                 /* Spawn the decoder. */
                 switch( p_input->p_es[i_es_loop].i_type )
                 {
+                    case AC3_AUDIO_ES:
+                        /* Spawn ac3 thread */
+                        if ( ((ac3dec_thread_t *)(p_input->p_es[i_es_loop].p_dec) =
+                            ac3dec_CreateThread(p_input)) == NULL )
+                        {
+                            intf_ErrMsg( "Could not start ac3 decoder\n" );
+                            vlc_mutex_unlock( &p_input->es_lock );
+                            return( -1 );
+                        }
+                        break;
+
                     case MPEG1_AUDIO_ES:
                     case MPEG2_AUDIO_ES:
                         /* Spawn audio thread. */
@@ -130,7 +141,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
 
                     default:
                         /* That should never happen. */
-                        intf_DbgMsg("input error: unknown stream type (%d)\n",
+                        intf_DbgMsg("input error: unknown stream type (0x%.2x)\n",
                                     p_input->p_es[i_es_loop].i_type);
                         vlc_mutex_unlock( &p_input->es_lock );
                         return( -1 );
@@ -196,6 +207,10 @@ int input_DelPgrmElem( input_thread_t *p_input, int i_current_id )
                 /* Cancel the decoder. */
                 switch( p_input->pp_selected_es[i_selected_es_loop]->i_type )
                 {
+                    case AC3_AUDIO_ES:
+                        ac3dec_DestroyThread( (ac3dec_thread_t *)(p_input->pp_selected_es[i_selected_es_loop]->p_dec) );
+                        break;
+
                     case MPEG1_AUDIO_ES:
                     case MPEG2_AUDIO_ES:
                         adec_DestroyThread( (adec_thread_t*)(p_input->pp_selected_es[i_selected_es_loop]->p_dec) );