]> git.sesse.net Git - vlc/blobdiff - src/input/input_ctrl.c
Gras de parametres en ligne de commande ou en variables d'environnement,
[vlc] / src / input / input_ctrl.c
index 53e84d6ae25f65258fb65e3dc53acecded6a102a..96505db00305e3743ed12bb9705b4e13fa36e775 100644 (file)
@@ -9,12 +9,13 @@
 /*******************************************************************************
  * Preamble
  *******************************************************************************/
+
 #include "vlc.h"
 
-/*
+#if 0
 #include <errno.h>
-#include <sys/uio.h>                                                
-#include <stdlib.h>                             
+#include <sys/uio.h>                                                 /* iovec */
+#include <stdlib.h>                               /* atoi(), malloc(), free() */
 #include <string.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -22,7 +23,7 @@
 #include <X11/Xlib.h>
 #include <X11/extensions/XShm.h>
 #include <sys/soundcard.h>
-#include <netinet/in.h>                                             
+#include <netinet/in.h>                                              /* ntohs */
 
 #include "common.h"
 #include "config.h"
@@ -42,7 +43,9 @@
 
 #include "video.h"
 #include "video_output.h"
-#include "video_decoder.h" */
+#include "video_decoder.h"
+
+#endif
 
 /******************************************************************************
  * input_AddPgrmElem: Start the extraction and the decoding of a program element
@@ -92,7 +95,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 );
             }
@@ -128,10 +131,19 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
                     case MPEG2_VIDEO_ES:
                         /* Spawn video thread. */
 /* Les 2 pointeurs NULL ne doivent pas etre NULL sinon on segfault !!!! */
+#ifdef OLD_DECODER
                         if( ((vdec_thread_t*)(p_input->p_es[i_es_loop].p_dec) =
                             vdec_CreateThread( p_input )) == NULL )
+#else
+                        if( ((vpar_thread_t*)(p_input->p_es[i_es_loop].p_dec) =
+                            vpar_CreateThread( p_input )) == NULL )
+#endif
                         {
+#ifdef OLD_DECODER
                             intf_ErrMsg("Could not start video decoder\n");
+#else
+                            intf_ErrMsg("Could not start video parser\n");
+#endif
                             vlc_mutex_unlock( &p_input->es_lock );
                             return( -1 );
                         }
@@ -139,7 +151,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 );
@@ -216,7 +228,11 @@ int input_DelPgrmElem( input_thread_t *p_input, int i_current_id )
 
                     case MPEG1_VIDEO_ES:
                     case MPEG2_VIDEO_ES:
+#ifdef OLD_DECODER
                         vdec_DestroyThread( (vdec_thread_t*)(p_input->pp_selected_es[i_selected_es_loop]->p_dec) /*, NULL */ );
+#else
+                        vpar_DestroyThread( (vpar_thread_t*)(p_input->pp_selected_es[i_selected_es_loop]->p_dec) /*, NULL */ );
+#endif
                         break;
                 }